Esempio n. 1
0
void mainWindow::makeConnections()
{
	QObject::connect(actionAbout, SIGNAL( triggered() ), this, SLOT( show_aboutDialog() ) );
	QObject::connect(actionPreferences, SIGNAL( triggered() ), this, SLOT( show_preferences() ) );
	QObject::connect(actionStart, SIGNAL( triggered() ), this, SLOT( startFolding() ) );
	QObject::connect(actionStop, SIGNAL( triggered() ), this, SLOT( stopFolding() ) );
	QObject::connect(actionHomepage, SIGNAL( triggered() ), this, SLOT( loadHomepage() ) );
	QObject::connect(actionSourceForge, SIGNAL( triggered() ), this, SLOT( loadSourceForge() ) );
	QObject::connect(actionFoldingWebsite, SIGNAL( triggered() ), this, SLOT( loadFoldingWebsite() ) );
	QObject::connect(actionFoldingForum, SIGNAL( triggered() ), this, SLOT( loadFoldingForum() ) );
	QObject::connect(actionContact, SIGNAL( triggered() ), this, SLOT( contactAuthor() ) );
	QObject::connect(actionAddClient, SIGNAL( triggered() ), this, SLOT( addClient() ) );
	QObject::connect(actionRemoveClient, SIGNAL( triggered() ), this, SLOT( removeClient() ) );
	QObject::connect(actionSaveConfig, SIGNAL( triggered() ), this, SLOT( saveConfig() ) );
	QObject::connect(actionPersonalStats, SIGNAL( triggered() ), this, SLOT( reloadPersonalStats() ) );
	QObject::connect(actionTeamStats, SIGNAL( triggered() ), this, SLOT( reloadTeamStats() ) );
	QObject::connect(actionMoleculeViewer, SIGNAL( triggered() ), this, SLOT( showMolecule() ) );
	QObject::connect(actionExit, SIGNAL(triggered()), this, SLOT(checkExit()));

	
	QObject::connect(clients->table, SIGNAL( cellClicked( int, int) ), this, SLOT( showInfo()));
	
	Reloader = new QTimer(this);
    	connect(Reloader, SIGNAL(timeout()), this, SLOT(reloadClients()));
    	Reloader->start(60000);
}
Esempio n. 2
0
void WebView::handleWindowCloseRequested()
{
    qDebug() << "Handle windowCloseRequested:" << mainSettings->value("browser/show_homepage_on_window_close").toString();
    if (mainSettings->value("browser/show_homepage_on_window_close").toBool()) {
        qDebug() << "-- load homepage";
        loadHomepage();
    } else {
        qDebug() << "-- exit application";
        UnixSignals::signalHandler(SIGINT);
    }
}
Esempio n. 3
0
void WebView::handleWindowCloseRequested()
{
    qDebug() << "Handle windowCloseRequested:" << mainSettings->value("browser/show_homepage_on_window_close").toString();
    if (mainSettings->value("browser/show_homepage_on_window_close").toBool()) {
        qDebug() << "-- load homepage";
        loadHomepage();
    } else {
        qDebug() << "-- exit application";
        QKeyEvent * eventExit = new QKeyEvent( QEvent::KeyPress, Qt::Key_Q, Qt::ControlModifier, "Exit", 0 );
        QCoreApplication::postEvent( this, eventExit );
    }
}