Back to index

lightning-sunbird  0.9+nobinonly
Public Slots | Public Member Functions | Public Attributes | Private Slots | Private Attributes
MyMainWindow Class Reference

#include <mainwindow.h>

Collaboration diagram for MyMainWindow:
Collaboration graph
[legend]

List of all members.

Public Slots

void fileOpen ()
void startURIOpen (const QString &, bool &)
void changeLocation ()
void goBack ()
void goForward ()
void stop ()

Public Member Functions

 MyMainWindow ()

Public Attributes

QGeckoEmbedqecko

Private Slots

void slotProgress (int, int)
void slotProgress (const QString &, int, int)

Private Attributes

QLineEdit * location

Detailed Description

Definition at line 9 of file mainwindow.h.


Constructor & Destructor Documentation

Definition at line 15 of file mainwindow.cpp.

{
    QVBox *box = new QVBox(this);
    qecko = new QGeckoEmbed(box, "qgecko");
    box->setFrameStyle(QFrame::Panel | QFrame::Sunken);
    setCentralWidget( box );

    QToolBar *toolbar = new QToolBar(this);
    toolbar->setLabel("Location:");

    QAction *action = new QAction(QPixmap::fromMimeSource( "back.png" ), tr( "Go Back"), CTRL + Key_B,
                         toolbar, "goback");
    connect(action, SIGNAL(activated()), this, SLOT(goBack()));
    action->addTo(toolbar);

    action = new QAction(QPixmap::fromMimeSource( "forward.png" ), tr( "Go Forward"), CTRL + Key_F,
                         toolbar, "goforward");
    connect(action, SIGNAL(activated()), this, SLOT(goForward()));
    action->addTo(toolbar);

    action = new QAction(QPixmap::fromMimeSource( "stop.png" ), tr("Stop"), CTRL + Key_S,
                         toolbar, "stop");
    connect(action, SIGNAL(activated()), this, SLOT(stop()));
    action->addTo(toolbar);

    location = new QLineEdit(toolbar);
    toolbar->setStretchableWidget(location);

    QPopupMenu *menu = new QPopupMenu(this);
    menuBar()->insertItem( tr( "&File" ), menu );

    QAction *a = new QAction( QPixmap::fromMimeSource( "fileopen.png" ), tr( "&Open..." ), CTRL + Key_O,
                              toolbar, "fileOpen" );
    connect( a, SIGNAL( activated() ), this, SLOT( fileOpen() ) );
    //a->addTo( toolbar );
    a->addTo( menu );


    connect( qecko, SIGNAL(linkMessage(const QString &)),
             statusBar(), SLOT(message(const QString &)) );
    connect( qecko, SIGNAL(jsStatusMessage(const QString &)),
             statusBar(), SLOT(message(const QString &)) );
    connect( qecko, SIGNAL(windowTitleChanged(const QString &)),
             SLOT(setCaption(const QString &)) );
    connect( qecko, SIGNAL(startURIOpen(const QString &, bool &)),
             SLOT(startURIOpen(const QString &, bool &)) );
    connect(qecko, SIGNAL(locationChanged(const QString&)),
            location, SLOT(setText(const QString&)));
    connect(qecko, SIGNAL(progress(int, int)),
            SLOT(slotProgress(int, int)));
    connect(qecko, SIGNAL(progressAll(const QString&, int, int)),
            SLOT(slotProgress(const QString&, int, int)));


    connect( location, SIGNAL(returnPressed()), SLOT(changeLocation()));

}

Here is the call graph for this function:


Member Function Documentation

Definition at line 85 of file mainwindow.cpp.

{
    qecko->loadURL( location->text() );
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 73 of file mainwindow.cpp.

{
    QString fn = QFileDialog::getOpenFileName( QString::null, tr( "HTML-Files (*.htm *.html);;All Files (*)" ), this );
    if ( !fn.isEmpty() )
       qecko->loadURL( fn );
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 90 of file mainwindow.cpp.

{
    qecko->goBack();
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 95 of file mainwindow.cpp.

{
    qecko->goForward();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void MyMainWindow::slotProgress ( int  current,
int  max 
) [private, slot]

Definition at line 110 of file mainwindow.cpp.

{
    qDebug("progress %d / %d ", current, max);
}

Here is the caller graph for this function:

void MyMainWindow::slotProgress ( const QString &  url,
int  current,
int  max 
) [private, slot]

Definition at line 105 of file mainwindow.cpp.

{
    qDebug("progress %d / %d (%s)",  current, max, url.latin1());
}
void MyMainWindow::startURIOpen ( const QString &  ,
bool  
) [slot]

Definition at line 80 of file mainwindow.cpp.

{
    qDebug("XX in the signal");
}

Here is the caller graph for this function:

Definition at line 100 of file mainwindow.cpp.

{
    qecko->stopLoad();
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

QLineEdit* MyMainWindow::location [private]

Definition at line 31 of file mainwindow.h.

Definition at line 24 of file mainwindow.h.


The documentation for this class was generated from the following files: