void KWatchGnuPGMainWindow::slotConfigure() { if( !mConfig ) { mConfig = new KWatchGnuPGConfig( this, "config dialog" ); connect( mConfig, SIGNAL( reconfigure() ), this, SLOT( slotReadConfig() ) ); } mConfig->loadConfig(); mConfig->exec(); }
KMenuBar::KMenuBar(QWidget *parent, const char *name) : QMenuBar(parent, name) { #ifdef Q_WS_X11 QXEmbed::initialize(); #endif d = new KMenuBarPrivate; connect(&d->selection_timer, SIGNAL(timeout()), this, SLOT(selectionTimeout())); connect(qApp->desktop(), SIGNAL(resized(int)), SLOT(updateFallbackSize())); if(kapp) // toolbarAppearanceChanged(int) is sent when changing macstyle connect(kapp, SIGNAL(toolbarAppearanceChanged(int)), this, SLOT(slotReadConfig())); slotReadConfig(); }
KWatchGnuPGMainWindow::KWatchGnuPGMainWindow( QWidget* parent, const char* name ) : KMainWindow( parent, name, WType_TopLevel ), mConfig(0) { createActions(); createGUI(); mCentralWidget = new QTextEdit( this, "central log view" ); mCentralWidget->setTextFormat( QTextEdit::LogText ); setCentralWidget( mCentralWidget ); mWatcher = new KProcIO( QTextCodec::codecForMib( 106 /*utf-8*/ ) ); connect( mWatcher, SIGNAL( processExited(KProcess*) ), this, SLOT( slotWatcherExited() ) ); connect( mWatcher, SIGNAL( readReady(KProcIO*) ), this, SLOT( slotReadStdout() ) ); slotReadConfig(); mSysTray = new KWatchGnuPGTray( this ); mSysTray->show(); connect( mSysTray, SIGNAL( quitSelected() ), this, SLOT( slotQuit() ) ); setAutoSaveSettings(); }
/** * Called, if an item is pressed in the tree view. */ void PreFlightWidget::slotPageClicked( QTreeWidgetItem* item, int column ) { Q_UNUSED( column ); QString itemText = item->data( 0, Qt::UserRole ).toString(); if( itemText == COMMON ) { PreFlightMiscPage* pfmp = new PreFlightMiscPage( this ); connect( pfmp, SIGNAL( settingsChanged() ), IgcLogger::instance(), SLOT( slotReadConfig() ) ); if( m_menuCb->checkState() == Qt::Checked ) { connect( pfmp, SIGNAL( closingWidget() ), this, SLOT( slotAccept() ) ); } pfmp->show(); } else if( itemText == CHECKLIST ) { PreFlightCheckListPage* pfclp = new PreFlightCheckListPage( this ); if( m_menuCb->checkState() == Qt::Checked ) { connect( pfclp, SIGNAL( closingWidget() ), this, SLOT( slotAccept() ) ); } pfclp->show(); } else if( itemText == GLIDER ) { PreFlightGliderPage* pfgp = new PreFlightGliderPage( this ); if( m_menuCb->checkState() == Qt::Checked ) { connect( pfgp, SIGNAL( closingWidget() ), this, SLOT( slotAccept() ) ); } pfgp->show(); } else if( itemText == TASKS ) { PreFlightTaskPage* pftp = new PreFlightTaskPage( this ); connect( pftp, SIGNAL( newTaskSelected() ), IgcLogger::instance(), SLOT( slotNewTaskSelected() ) ); connect( pftp, SIGNAL( newTaskSelected() ), MainWindow::mainWindow(), SLOT( slotPreFlightDataChanged() ) ); connect( pftp, SIGNAL( newWaypoint( Waypoint*, bool ) ), calculator, SLOT( slot_WaypointChange( Waypoint*, bool ) ) ); connect( pftp, SIGNAL(manualWindStateChange(bool)), calculator, SLOT(slot_ManualWindChanged(bool)) ); if( m_menuCb->checkState() == Qt::Checked ) { connect( pftp, SIGNAL( closingWidget() ), this, SLOT( slotAccept() ) ); } pftp->show(); } else if( itemText == WAYPOINTS ) { PreFlightWaypointPage* pfwp = new PreFlightWaypointPage( this ); connect( pfwp, SIGNAL(waypointsAdded()), Map::getInstance(), SLOT(slotRedraw()) ); if( m_menuCb->checkState() == Qt::Checked ) { connect( pfwp, SIGNAL( closingWidget() ), this, SLOT( slotAccept() ) ); } pfwp->show(); } else if( itemText == LOGBOOKS ) { PreFlightLogBooksPage* pflp = new PreFlightLogBooksPage( this ); if( m_menuCb->checkState() == Qt::Checked ) { connect( pflp, SIGNAL( closingWidget() ), this, SLOT( slotAccept() ) ); } pflp->show(); } else if( itemText == WIND ) { PreFlightWindPage* pfwp = new PreFlightWindPage( this ); connect( pfwp, SIGNAL(manualWindStateChange(bool)), calculator, SLOT(slot_ManualWindChanged(bool)) ); if( m_menuCb->checkState() == Qt::Checked ) { connect( pfwp, SIGNAL( closingWidget() ), this, SLOT( slotAccept() ) ); } pfwp->show(); } #ifdef FLARM else if( itemText == FLARMIGC ) { PreFlightFlarmPage* pffp = new PreFlightFlarmPage( this ); connect( pffp, SIGNAL( newTaskSelected() ), IgcLogger::instance(), SLOT( slotNewTaskSelected() ) ); connect( pffp, SIGNAL( newTaskSelected() ), MainWindow::mainWindow(), SLOT( slotPreFlightDataChanged() ) ); if( m_menuCb->checkState() == Qt::Checked ) { connect( pffp, SIGNAL( closingWidget() ), this, SLOT( slotAccept() ) ); } pffp->show(); } #endif #ifdef INTERNET else if( itemText == LIVETRACK ) { PreFlightLiveTrack24Page* pflt24p = new PreFlightLiveTrack24Page( this ); connect( pflt24p, SIGNAL( onOffStateChanged(bool) ), MainWindow::mainWindow()->getLiveTrack24Logger(), SLOT( slotNewSwitchState(bool) ) ); connect( pflt24p, SIGNAL( liveTrackingServerChanged() ), MainWindow::mainWindow()->getLiveTrack24Logger(), SLOT( slotConfigChanged() ) ); if( m_menuCb->checkState() == Qt::Checked ) { connect( pflt24p, SIGNAL( closingWidget() ), this, SLOT( slotAccept() ) ); } pflt24p->show(); } else if( itemText == WEATHER ) { PreFlightWeatherPage* pfwp = new PreFlightWeatherPage( this ); if( m_menuCb->checkState() == Qt::Checked ) { connect( pfwp, SIGNAL( closingWidget() ), this, SLOT( slotAccept() ) ); } pfwp->show(); } #endif #ifdef ANDROID else if( itemText == RETRIEVE ) { PreFlightRetrievePage* pfrp = new PreFlightRetrievePage( this ); if( m_menuCb->checkState() == Qt::Checked ) { connect( pfrp, SIGNAL( closingWidget() ), this, SLOT( slotAccept() ) ); } pfrp->show(); } #endif }