KisQPainterCanvas::KisQPainterCanvas(KisCanvas2 *canvas, KisCoordinatesConverter *coordinatesConverter, QWidget * parent) : QWidget(parent) , KisCanvasWidgetBase(canvas, coordinatesConverter) , m_d(new Private()) { setAutoFillBackground(true); setAcceptDrops(true); setFocusPolicy(Qt::StrongFocus); setAttribute(Qt::WA_InputMethodEnabled, true); setAttribute(Qt::WA_StaticContents); setAttribute(Qt::WA_OpaquePaintEvent); connect(KisConfigNotifier::instance(), SIGNAL(configChanged()), SLOT(slotConfigChanged())); slotConfigChanged(); }
void KAMenu::slotHostlistChanged() { /* die Liste der erreichbaren Archiehosts hat sich * veraendert. neu einlesen */ // KConfig *config = KApplication::getKApplication()->getConfig(); QStrList archiehostlist; // int archiehostlistnumber = KConfigGroupSaver saveGroup( config, "HostConfig" ); config->readListEntry( "Hosts", archiehostlist ); // QString currenthost = config->readEntry( "CurrentHost", "archie.sura.net" ); QString defaulthost = "archie.sura.net" ; if ( archiehostlist.isEmpty() ) { archiehostlist.append( defaulthost ); // currentHostId = 0; } host->clear(); char *tmpStr; int i = 0; for (tmpStr=archiehostlist.first(); tmpStr; tmpStr=archiehostlist.next()) { host->insertItem( tmpStr, i, i); i++; } slotConfigChanged(); emit sigArchieHost(host->text(host_id)); }
StartMainPage::StartMainPage(QWidget* parent, GvCore* gvCore) : QFrame(parent) , d(new StartMainPagePrivate) { d->q = this; d->mGvCore = gvCore; d->mSearchUiInitialized = false; d->setupUi(this); if (styleIsGtkBased()) { // Gtk-based styles do not apply the correct background color on tabs. // As a workaround, use the Plastique style instead. QStyle* fix = new QPlastiqueStyle(); fix->setParent(this); d->mHistoryWidget->tabBar()->setStyle(fix); d->mPlacesTagsWidget->tabBar()->setStyle(fix); } setFrameStyle(QFrame::NoFrame); // Bookmark view d->mBookmarksModel = new KFilePlacesModel(this); d->mBookmarksView->setModel(d->mBookmarksModel); d->mBookmarksView->setAutoResizeItemsEnabled(false); connect(d->mBookmarksView, SIGNAL(urlChanged(KUrl)), SIGNAL(urlSelected(KUrl))); // Tag view connect(d->mTagView, SIGNAL(clicked(QModelIndex)), SLOT(slotTagViewClicked(QModelIndex))); // Recent folder view connect(d->mRecentFoldersView, SIGNAL(indexActivated(QModelIndex)), SLOT(slotListViewActivated(QModelIndex))); connect(d->mRecentFoldersView, SIGNAL(customContextMenuRequested(QPoint)), SLOT(showRecentFoldersViewContextMenu(QPoint))); // Url bag view d->mRecentUrlsView->setItemDelegate(new HistoryViewDelegate(d->mRecentUrlsView)); connect(d->mRecentUrlsView, SIGNAL(customContextMenuRequested(QPoint)), SLOT(showRecentFoldersViewContextMenu(QPoint))); if (KGlobalSettings::singleClick()) { if (KGlobalSettings::changeCursorOverIcon()) { d->mRecentUrlsView->setCursor(Qt::PointingHandCursor); } connect(d->mRecentUrlsView, SIGNAL(clicked(QModelIndex)), SLOT(slotListViewActivated(QModelIndex))); } else { connect(d->mRecentUrlsView, SIGNAL(doubleClicked(QModelIndex)), SLOT(slotListViewActivated(QModelIndex))); } d->updateHistoryTab(); connect(GwenviewConfig::self(), SIGNAL(configChanged()), SLOT(slotConfigChanged())); }
KisCanvas2::KisCanvas2(KoViewConverter * viewConverter, KisView2 * view, KoShapeControllerBase * sc) : KoCanvasBase(sc) , m_d(new KisCanvas2Private(this, viewConverter, view)) { createCanvas(); connect(view->canvasController(), SIGNAL(moveDocumentOffset(const QPoint&)), SLOT(documentOffsetMoved(const QPoint&))); connect(KisConfigNotifier::instance(), SIGNAL(configChanged()), SLOT(slotConfigChanged())); }
KisConfigWidget::KisConfigWidget(QWidget * parent, Qt::WFlags f, int delay) : QWidget(parent, f) , m_delay(delay) { m_timer.setSingleShot(true); connect(&m_timer, SIGNAL(timeout()), SLOT(slotConfigChanged())); connect(this, SIGNAL(sigConfigurationItemChanged()), SLOT(kickTimer())); }
PSpellHighlighter::PSpellHighlighter(TextEdit *edit, SpellPlugin *plugin) : SpellHighlighter(edit, plugin) { m_plugin->m_edits.insert(MAP_EDITS::value_type(edit, this)); QObject::connect(edit, SIGNAL(finished(TextEdit*)), plugin, SLOT(textEditFinished(TextEdit*))); QObject::connect(this, SIGNAL(check(const QString&)), plugin, SLOT(check(const QString&))); QObject::connect(plugin, SIGNAL(misspelling(const QString&)), this, SLOT(slotMisspelling(const QString&))); QObject::connect(plugin, SIGNAL(configChanged()), this, SLOT(slotConfigChanged())); }
MicroBlog::MicroBlog( const KComponentData &instance, QObject *parent ) :Plugin(instance, parent), d(new Private) { kDebug(); d->saveTimelinesTimer = new QTimer(this); d->saveTimelinesTimer->setInterval(BehaviorSettings::notifyInterval() * 60000); connect(d->saveTimelinesTimer, SIGNAL(timeout()), SIGNAL(saveTimelines())); connect(BehaviorSettings::self(), SIGNAL(configChanged()), this, SLOT(slotConfigChanged())); d->saveTimelinesTimer->start(); }
void Amor::slotConfigure() { if( !mAmorDialog ) { mAmorDialog = new AmorDialog(); connect( mAmorDialog, SIGNAL(changed()), SLOT(slotConfigChanged()) ); connect( mAmorDialog, SIGNAL(offsetChanged(int)), SLOT(slotOffsetChanged(int)) ); } mAmorDialog->show(); }
KopeteSystemTray::KopeteSystemTray(QWidget* parent) : KStatusNotifierItem(parent) { kDebug(14010) ; setCategory(Communications); setToolTip("kopete", "Kopete", KGlobal::mainComponent().aboutData()->shortDescription()); setStatus(Passive); mIsBlinkIcon = false; mBlinkTimer = new QTimer(this); mBlinkTimer->setObjectName("mBlinkTimer"); mKopeteIcon = "kopete"; connect(contextMenu(), SIGNAL(aboutToShow()), this, SLOT(slotAboutToShowMenu())); connect(mBlinkTimer, SIGNAL(timeout()), this, SLOT(slotBlink())); connect(Kopete::ChatSessionManager::self() , SIGNAL(newEvent(Kopete::MessageEvent*)), this, SLOT(slotNewEvent(Kopete::MessageEvent*))); connect(Kopete::BehaviorSettings::self(), SIGNAL(configChanged()), this, SLOT(slotConfigChanged())); connect(Kopete::AccountManager::self(), SIGNAL(accountOnlineStatusChanged(Kopete::Account *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &)), this, SLOT(slotReevaluateAccountStates())); // the slot called by default by the quit action, KSystemTray::maybeQuit(), // just closes the parent window, which is hard to distinguish in that window's closeEvent() // from a click on the window's close widget // in the quit case, we want to quit the application // in the close widget click case, we only want to hide the parent window // so instead, we make it call our general purpose quit slot on the window, which causes a window close and everything else we need // KDE4 - app will have to listen for quitSelected instead QAction *quit = actionCollection()->action( "file_quit" ); quit->disconnect(); KopeteWindow *myParent = static_cast<KopeteWindow *>( parent ); connect( quit, SIGNAL(activated()), myParent, SLOT(slotQuit()) ); setIconByName(mKopeteIcon); setAttentionMovieByName( QLatin1String( "newmessage" ) ); slotReevaluateAccountStates(); slotConfigChanged(); }
KSpellDlg::KSpellDlg( QWidget * parent, const char * name, bool _progressbar, bool _modal ) : KDialogBase( parent, name, _modal, i18n("Check Spelling"), Help|Cancel|User1, Cancel, true, i18n("&Finished") ), progressbar( false ) { Q_UNUSED( _progressbar ); d = new KSpellDlgPrivate; d->ui = new KSpellUI( this ); setMainWidget( d->ui ); connect( d->ui->m_replaceBtn, SIGNAL(clicked()), this, SLOT(replace())); connect( this, SIGNAL(ready(bool)), d->ui->m_replaceBtn, SLOT(setEnabled(bool)) ); connect( d->ui->m_replaceAllBtn, SIGNAL(clicked()), this, SLOT(replaceAll())); connect(this, SIGNAL(ready(bool)), d->ui->m_replaceAllBtn, SLOT(setEnabled(bool))); connect( d->ui->m_skipBtn, SIGNAL(clicked()), this, SLOT(ignore())); connect( this, SIGNAL(ready(bool)), d->ui->m_skipBtn, SLOT(setEnabled(bool))); connect( d->ui->m_skipAllBtn, SIGNAL(clicked()), this, SLOT(ignoreAll())); connect( this, SIGNAL(ready(bool)), d->ui->m_skipAllBtn, SLOT(setEnabled(bool))); connect( d->ui->m_addBtn, SIGNAL(clicked()), this, SLOT(add())); connect( this, SIGNAL(ready(bool)), d->ui->m_addBtn, SLOT(setEnabled(bool))); connect( d->ui->m_suggestBtn, SIGNAL(clicked()), this, SLOT(suggest())); connect( this, SIGNAL(ready(bool)), d->ui->m_suggestBtn, SLOT(setEnabled(bool)) ); d->ui->m_suggestBtn->hide(); connect(this, SIGNAL(user1Clicked()), this, SLOT(stop())); connect( d->ui->m_replacement, SIGNAL(textChanged(const QString &)), SLOT(textChanged(const QString &)) ); connect( d->ui->m_replacement, SIGNAL(returnPressed()), SLOT(replace()) ); connect( d->ui->m_suggestions, SIGNAL(selectionChanged(QListViewItem*)), SLOT(slotSelectionChanged(QListViewItem*)) ); connect( d->ui->m_suggestions, SIGNAL( doubleClicked ( QListViewItem *, const QPoint &, int ) ), SLOT( replace() ) ); d->spellConfig = new KSpellConfig( 0, 0 ,0, false ); d->spellConfig->fillDicts( d->ui->m_language ); connect( d->ui->m_language, SIGNAL(activated(int)), d->spellConfig, SLOT(sSetDictionary(int)) ); connect( d->spellConfig, SIGNAL(configChanged()), SLOT(slotConfigChanged()) ); setHelp( "spelldlg", "kspell" ); setMinimumSize( sizeHint() ); emit ready( false ); }
KisOpenGLCanvas2::KisOpenGLCanvas2(KisCanvas2 *canvas, KisCoordinatesConverter *coordinatesConverter, QWidget *parent, KisImageWSP image, KisDisplayColorConverter *colorConverter) : QOpenGLWidget(parent) , KisCanvasWidgetBase(canvas, coordinatesConverter) , d(new Private()) { KisConfig cfg; cfg.writeEntry("canvasState", "OPENGL_STARTED"); d->openGLImageTextures = KisOpenGLImageTextures::getImageTextures(image, colorConverter->monitorProfile(), colorConverter->renderingIntent(), colorConverter->conversionFlags()); setAcceptDrops(true); setAutoFillBackground(false); setFocusPolicy(Qt::StrongFocus); setAttribute(Qt::WA_NoSystemBackground, true); #ifdef Q_OS_OSX setAttribute(Qt::WA_AcceptTouchEvents, false); #else setAttribute(Qt::WA_AcceptTouchEvents, true); #endif setAttribute(Qt::WA_InputMethodEnabled, true); setAttribute(Qt::WA_DontCreateNativeAncestors, true); setDisplayFilterImpl(colorConverter->displayFilter(), true); connect(KisConfigNotifier::instance(), SIGNAL(configChanged()), SLOT(slotConfigChanged())); slotConfigChanged(); cfg.writeEntry("canvasState", "OPENGL_SUCCESS"); }
GvCore::GvCore(MainWindow* mainWindow, SortedDirModel* dirModel) : QObject(mainWindow) , d(new GvCorePrivate) { d->q = this; d->mMainWindow = mainWindow; d->mDirModel = dirModel; d->mRecentFoldersModel = 0; d->mRecentUrlsModel = 0; d->setupPalettes(); connect(GwenviewConfig::self(), SIGNAL(configChanged()), SLOT(slotConfigChanged())); }
void MediaControl::preferences() { if ( _prefsDialog ) { _prefsDialog->raise(); } else { _prefsDialog = new MediaControlConfig ( _configFrontend ); connect ( _prefsDialog, SIGNAL(closing()), this, SLOT(slotClosePrefsDialog()) ); connect ( _prefsDialog, SIGNAL(destroyed()), this, SLOT(slotPrefsDialogClosing()) ); connect ( _prefsDialog, SIGNAL(configChanged()), this, SLOT(slotConfigChanged()) ); } }
WinSystemInfo::WinSystemInfo(QWidget *parent) : QFrame(parent) { setLayout(&m_layout); m_layout.setMargin(0); m_layout.setSpacing(0); m_layout.addWidget(&m_middlePanel); m_layout.addWidget(&m_bottomPanel); m_bottomPanel.setFixedHeight(100); slotConfigChanged(); connect(&m_bottomPanel,SIGNAL(sigExit()),this,SLOT(slotQuit())); connect(&m_bottomPanel,SIGNAL(sigReconfig()),this,SLOT(slotReconfigure())); connect(&m_bottomPanel,SIGNAL(sigShowSystemInfo()),&m_middlePanel,SLOT(slotShowSystemInfo())); connect(&m_bottomPanel,SIGNAL(sigShowModuleInfo()),&m_middlePanel,SLOT(slotShowModuleInfo())); connect(&m_middlePanel,SIGNAL(sigHideInfoButton(bool)),&m_bottomPanel,SLOT(slotHideInfoButton(bool))); }
StarView::StarView(HostInfoManager *m, QWidget *parent) : QWidget(parent), StatusView(m) { m_configDialog = new StarViewConfigDialog(this); connect(m_configDialog, SIGNAL(configChanged()), SLOT(slotConfigChanged())); m_canvas = new QGraphicsScene (this); m_canvas->setSceneRect(0, 0, width(), height()); QHBoxLayout *layout = new QHBoxLayout(this); layout->setMargin(0); m_canvasView = new QGraphicsView(m_canvas, this); m_canvasView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); m_canvasView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); m_canvasView->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); layout->addWidget(m_canvasView); m_schedulerItem = new HostItem("", m_canvas, hostInfoManager()); m_schedulerItem->setZValue(150); centerSchedulerItem(); m_schedulerItem->show(); createKnownHosts(); }
KBookmarkBar::KBookmarkBar( KBookmarkManager* mgr, KonqBookmarkOwner *_owner, KToolBar *_toolBar, QObject *parent ) : QObject( parent ), m_pOwner(_owner), m_toolBar(_toolBar), m_pManager( mgr ), d( new KBookmarkBarPrivate ) { m_toolBar->setAcceptDrops( true ); m_toolBar->installEventFilter( this ); // for drops if (d->m_contextMenu) { m_toolBar->setContextMenuPolicy(Qt::CustomContextMenu); connect(m_toolBar, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextMenu(QPoint))); } connect( mgr, SIGNAL(changed(QString,QString)), SLOT(slotBookmarksChanged(QString)) ); connect( mgr, SIGNAL(configChanged()), SLOT(slotConfigChanged()) ); KBookmarkGroup toolbar = getToolbar(); fillBookmarkBar( toolbar ); m_toolBarSeparator = new KAction(this); }
/** * 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 }
WinNetworkInfo::WinNetworkInfo(QWidget *parent) : QFrame(parent) { setLayout(&m_layout); m_layout.setSpacing(15); m_layout.setContentsMargins(80,20,50,20); m_layout.addLayout(&m_layout1,3); m_layout.addLayout(&m_layout2,1); m_layout.addLayout(&m_layout3,3); m_layout.addLayout(&m_layout4,3); m_layout.addLayout(&m_layout5,8); m_layout1.setSpacing(0); m_layout1.setMargin(0); m_ipLabel.setText(tr("IP address")); m_layout1.addWidget(&m_ipLabel,0,0,1,1); m_layout1.addWidget(&m_ip,0,1,1,3); m_subnetLabel.setText(tr("Subnet mask")); m_layout1.addWidget(&m_subnetLabel,1,0,1,1); m_layout1.addWidget(&m_subnet,1,1,1,3); m_gatewayLabel.setText(tr("Default Gateway")); m_layout1.addWidget(&m_gatewayLabel,2,0,1,1); m_layout1.addWidget(&m_gateway,2,1,1,3); m_layout2.setSpacing(0); m_layout2.setMargin(0); m_macLabel.setText(tr("MAC address")); m_layout2.addWidget(&m_macLabel,0,0,1,1); m_layout2.addWidget(&m_mac,0,1,1,3); m_layout3.setSpacing(0); m_layout3.setMargin(0); m_dnsLabel.setText(tr("DNS server")); m_layout3.addWidget(&m_dnsLabel,0,0,1,1); m_priDnsLabel.setText(tr("Primary")); m_layout3.addWidget(&m_priDnsLabel,1,0,1,1); m_layout3.addWidget(&m_priDns,1,1,1,3); m_secDnsLabel.setText(tr("Secondary")); m_layout3.addWidget(&m_secDnsLabel,2,0,1,1); m_layout3.addWidget(&m_secDns,2,1,1,3); m_layout4.setSpacing(0); m_layout4.setMargin(0); m_domainLabel.setText(tr("Domain suffix")); m_layout4.addWidget(&m_domainLabel,0,0,1,1); m_priDomainLabel.setText(tr("Primary")); m_layout4.addWidget(&m_priDomainLabel,1,0,1,1); m_layout4.addWidget(&m_priDomain,1,1,1,3); m_secDomainLabel.setText(tr("Secondary")); m_layout4.addWidget(&m_secDomainLabel,2,0,1,1); m_layout4.addWidget(&m_secDomain,2,1,1,3); m_layout5.setSpacing(0); m_layout5.setMargin(0); m_serverLabel.setText(tr("Server")); m_layout5.addWidget(&m_serverLabel,0,0,1,1); m_ftpLabel.setText(tr("FTP")); m_layout5.addWidget(&m_ftpLabel,1,0,1,1); m_layout5.addWidget(&m_ftp,1,1,1,3); m_webLabel.setText(tr("WEB")); m_layout5.addWidget(&m_webLabel,2,0,1,1); m_layout5.addWidget(&m_web,2,1,1,3); m_sntpLabel.setText(tr("SNTP")); m_layout5.addWidget(&m_sntpLabel,3,0,1,1); m_layout5.addWidget(&m_sntp,3,1,1,3); m_modbusLabel.setText(tr("Modbus")); m_layout5.addWidget(&m_modbusLabel,4,0,1,1); m_layout5.addWidget(&m_modbus,4,1,1,3); m_genLabel.setText(tr("General")); m_layout5.addWidget(&m_genLabel,5,0,1,1); m_layout5.addWidget(&m_gen,5,1,1,3); m_ethLabel.setText(tr("EtherNet/IP")); m_layout5.addWidget(&m_ethLabel,6,0,1,1); m_layout5.addWidget(&m_eth,6,1,1,3); m_darwinLabel.setText(tr("DARWIN")); m_layout5.addWidget(&m_darwinLabel,7,0,1,1); m_layout5.addWidget(&m_darwin,7,1,1,3); setNetConfig(); setFrameConfig(); connect(CfgChannel::instance(),SIGNAL(sigNormalConfigChanged(quint32)),this,SLOT(slotConfigChanged(quint32))); }
K3b::WriterSelectionWidget::WriterSelectionWidget( QWidget *parent ) : QWidget( parent ) { d = new Private; d->forceAutoSpeed = false; d->supportedWritingApps = K3b::WritingAppCdrecord|K3b::WritingAppCdrdao|K3b::WritingAppGrowisofs; d->lastSetSpeed = -1; QGroupBox* groupWriter = new QGroupBox( this ); groupWriter->setTitle( i18n( "Burn Medium" ) ); QGridLayout* groupWriterLayout = new QGridLayout( groupWriter ); groupWriterLayout->setAlignment( Qt::AlignTop ); QLabel* labelSpeed = new QLabel( groupWriter ); labelSpeed->setText( i18n( "Speed:" ) ); m_comboSpeed = new K3b::IntMapComboBox( groupWriter ); m_comboMedium = new MediaSelectionComboBox( groupWriter ); m_writingAppLabel = new QLabel( i18n("Writing app:"), groupWriter ); m_comboWritingApp = new K3b::IntMapComboBox( groupWriter ); groupWriterLayout->addWidget( m_comboMedium, 0, 0 ); groupWriterLayout->addWidget( labelSpeed, 0, 1 ); groupWriterLayout->addWidget( m_comboSpeed, 0, 2 ); groupWriterLayout->addWidget( m_writingAppLabel, 0, 3 ); groupWriterLayout->addWidget( m_comboWritingApp, 0, 4 ); groupWriterLayout->setColumnStretch( 0, 1 ); QGridLayout* mainLayout = new QGridLayout( this ); mainLayout->setAlignment( Qt::AlignTop ); mainLayout->setContentsMargins( 0, 0, 0, 0 ); mainLayout->addWidget( groupWriter, 0, 0 ); // tab order setTabOrder( m_comboMedium, m_comboSpeed ); setTabOrder( m_comboSpeed, m_comboWritingApp ); connect( m_comboMedium, SIGNAL(selectionChanged(K3b::Device::Device*)), this, SIGNAL(writerChanged()) ); connect( m_comboMedium, SIGNAL(selectionChanged(K3b::Device::Device*)), this, SIGNAL(writerChanged(K3b::Device::Device*)) ); connect( m_comboMedium, SIGNAL(newMedia()), this, SIGNAL(newMedia()) ); connect( m_comboMedium, SIGNAL(newMedium(K3b::Device::Device*)), this, SIGNAL(newMedium(K3b::Device::Device*)) ); connect( m_comboMedium, SIGNAL(newMedium(K3b::Device::Device*)), this, SLOT(slotNewBurnMedium(K3b::Device::Device*)) ); connect( m_comboWritingApp, SIGNAL(valueChanged(int)), this, SLOT(slotWritingAppSelected(int)) ); connect( this, SIGNAL(writerChanged()), SLOT(slotWriterChanged()) ); connect( m_comboSpeed, SIGNAL(valueChanged(int)), this, SLOT(slotSpeedChanged(int)) ); m_comboMedium->setToolTip( i18n("The medium that will be used for burning") ); m_comboSpeed->setToolTip( i18n("The speed at which to burn the medium") ); m_comboWritingApp->setToolTip( i18n("The external application to actually burn the medium") ); m_comboMedium->setWhatsThis( i18n("<p>Select the medium that you want to use for burning." "<p>In most cases there will only be one medium available which " "does not leave much choice.") ); m_comboSpeed->setWhatsThis( i18n("<p>Select the speed with which you want to burn." "<p><b>Auto</b><br>" "This will choose the maximum writing speed possible with the used " "medium. " "This is the recommended selection for most media.</p>" "<p><b>Ignore</b> (DVD only)<br>" "This will leave the speed selection to the writer device. " "Use this if K3b is unable to set the writing speed." "<p>1x refers to 175 KB/s for CD, 1385 KB/s for DVD, and 4496 KB/s for Blu-ray.</p>" "<p><b>Caution:</b> Make sure your system is able to send the data " "fast enough to prevent buffer underruns.") ); m_comboWritingApp->setWhatsThis( i18n("<p>K3b uses the command line tools cdrecord, growisofs, and cdrdao " "to actually write a CD or DVD." "<p>Normally K3b chooses the best " "suited application for every task automatically but in some cases it " "may be possible that one of the applications does not work as intended " "with a certain writer. In this case one may select the " "application manually.") ); clearSpeedCombo(); slotConfigChanged( KGlobal::config() ); slotWriterChanged(); }
KdeConnectPluginConfig::KdeConnectPluginConfig(const QString& deviceId, const QString& pluginName) : d(new KdeConnectPluginConfigPrivate()) { d->mConfigDir = KdeConnectConfig::instance()->pluginConfigDir(deviceId, pluginName); QDir().mkpath(d->mConfigDir.path()); d->mConfig = new QSettings(d->mConfigDir.absoluteFilePath(QStringLiteral("config")), QSettings::IniFormat); d->signal = QDBusMessage::createSignal("/kdeconnect/"+deviceId+"/"+pluginName, QStringLiteral("org.kde.kdeconnect.config"), QStringLiteral("configChanged")); QDBusConnection::sessionBus().connect(QLatin1String(""), "/kdeconnect/"+deviceId+"/"+pluginName, QStringLiteral("org.kde.kdeconnect.config"), QStringLiteral("configChanged"), this, SLOT(slotConfigChanged())); }
WinSystemInfoFrame::WinSystemInfoFrame(QWidget *parent) : QFrame(parent) { setLayout(&m_layout); m_layout.setContentsMargins(35,35,35,60); m_layout.addLayout(&m_horLayout1,3); m_layout.addLayout(&m_optionLayout,7); m_layout.addLayout(&m_horLayout2,2); m_layout.addLayout(&m_horLayout3,2); m_horLayout1.setMargin(0); m_horLayout1.addLayout(&m_chanInfoLayout,1); m_horLayout1.addLayout(&m_memLayout,1); m_chanInfoLayout.setMargin(0); m_chanInfoLayout.setSpacing(15); m_chanInfoLayout.addWidget(&m_chanInfoTip); m_chanInfoTip.setText(tr("Channel information")); m_chanInfoLayout.addLayout(&m_chanLabelLayout); m_chanLabelLayout.setMargin(0); m_chanLabelLayout.setSpacing(0); m_inputChanTip.setText(tr("Input")); m_inputChanTip.setObjectName("Input"); m_inputChanTip.setAlignment(Qt::AlignCenter); m_inputChanTip.setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); m_chanLabelLayout.addWidget(&m_inputChanTip,0,0,1,1); m_outputChanTip.setText(tr("Output")); m_outputChanTip.setObjectName("Output"); m_outputChanTip.setAlignment(Qt::AlignCenter); m_outputChanTip.setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); m_chanLabelLayout.addWidget(&m_outputChanTip,0,1,1,1); m_mathChanTip.setText(tr("Math")); m_mathChanTip.setObjectName("Math"); m_mathChanTip.setAlignment(Qt::AlignCenter); m_mathChanTip.setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); m_chanLabelLayout.addWidget(&m_mathChanTip,0,2,1,1); m_commChanTip.setText(tr("Communication")); m_commChanTip.setObjectName("Communication"); m_commChanTip.setAlignment(Qt::AlignCenter); m_commChanTip.setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); m_chanLabelLayout.addWidget(&m_commChanTip,0,3,1,1); m_inputChan.setText(tr("0Ch")); m_inputChan.setObjectName("InputLabel"); m_inputChan.setAlignment(Qt::AlignCenter); m_inputChan.setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); m_chanLabelLayout.addWidget(&m_inputChan,1,0,1,1); m_outputChan.setText(tr("0Ch")); m_outputChan.setObjectName("OutputLabel"); m_outputChan.setAlignment(Qt::AlignCenter); m_outputChan.setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); m_chanLabelLayout.addWidget(&m_outputChan,1,1,1,1); m_mathChan.setText(tr("100Ch")); m_mathChan.setObjectName("MathLabel"); m_mathChan.setAlignment(Qt::AlignCenter); m_mathChan.setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); m_chanLabelLayout.addWidget(&m_mathChan,1,2,1,1); m_commChan.setText(tr("500Ch")); m_commChan.setObjectName("CommLabel"); m_commChan.setAlignment(Qt::AlignCenter); m_commChan.setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); m_chanLabelLayout.addWidget(&m_commChan,1,3,1,1); m_chanLabelLayout.addItem(new QSpacerItem(40,20,QSizePolicy::Expanding,QSizePolicy::Fixed),0,4,2,1); m_chanInfoLayout.addStretch(); m_memLayout.setMargin(0); m_memLayout.setSpacing(15); m_memLayout.addWidget(&m_memTip); m_memLayout.addWidget(&m_memSize); m_memLayout.addStretch(); m_memTip.setText(tr("Internal memory capacity")); m_memSize.setText(tr("1.2GB")); m_optionLayout.setMargin(0); m_optionLayout.setSpacing(15); m_optionLayout.addWidget(&m_optionalTip); m_optionLayout.addLayout(&m_optionLabelLayout); m_optionLayout.addStretch(); m_optionalTip.setText(tr("Optional information")); m_rsLabel.setText(tr("RS-422/485")); m_optionLabelLayout.addWidget(&m_rsLabel,0,0,1,1); m_etherLabel.setText(tr("EtherNet/IP communication")); m_optionLabelLayout.addWidget(&m_etherLabel,0,1,1,1); m_wtLabel.setText(tr("WT communication")); m_optionLabelLayout.addWidget(&m_wtLabel,1,0,1,1); m_vgaLabel.setText(tr("VGA output")); m_optionLabelLayout.addWidget(&m_vgaLabel,1,1,1,1); m_failLabel.setText(tr("Fail output,1point")); m_optionLabelLayout.addWidget(&m_failLabel,2,0,1,1); m_mathFuncLabel.setText(tr("Mathematical function(with report function)")); m_optionLabelLayout.addWidget(&m_mathFuncLabel,2,1,1,1); m_commFuncLabel.setText(tr("Communication channel function")); m_optionLabelLayout.addWidget(&m_commFuncLabel,3,0,1,1); m_logScaleLabel.setText(tr("Log scale")); m_optionLabelLayout.addWidget(&m_logScaleLabel,3,1,1,1); m_usbLabel.setText(tr("USB interface(Host 2 ports)")); m_optionLabelLayout.addWidget(&m_usbLabel,4,0,1,1); m_modAILable.setText(tr("Model pre-installed AI:20Ch(C)")); m_optionLabelLayout.addWidget(&m_modAILable,4,1,1,1); m_modelDILabel.setText(tr("Model per-installed DI:16Ch DO:6Ch")); m_optionLabelLayout.addWidget(&m_modelDILabel,5,0,1,1); m_horLayout2.addLayout(&m_macLayout); m_horLayout2.addLayout(&m_serialLayout); m_macLayout.setMargin(0); m_macLayout.setSpacing(15); m_macTip.setText(tr("MAC address")); m_macLayout.addWidget(&m_macTip); m_macLabel.setText(CfgChannel::instance()->getDeviceMACAddress()); m_macLayout.addWidget(&m_macLabel); m_macLayout.addStretch(); m_serialLayout.setMargin(0); m_serialLayout.setSpacing(15); m_serialTip.setText(tr("Serial number")); m_serialLayout.addWidget(&m_serialTip); m_serialLabel.setText(tr("S5R504091")); m_serialLayout.addWidget(&m_serialLabel); m_serialLayout.addStretch(); m_horLayout3.addLayout(&m_versionLayout); m_horLayout3.addLayout(&m_webLayout); m_versionLayout.setMargin(0); m_versionLayout.setSpacing(15); m_versionTip.setText(tr("Version information")); m_versionLayout.addWidget(&m_versionTip); m_versionLabel.setText(tr("R2.02.08")); m_versionLayout.addWidget(&m_versionLabel); m_versionLayout.addStretch(); m_webLayout.setMargin(0); m_webLayout.setSpacing(15); m_webTip.setText(tr("Web app version information")); m_webLayout.addWidget(&m_webTip); m_webLabel.setText(tr("R2.02.01")); m_webLayout.addWidget(&m_webLabel); m_webLayout.addStretch(); slotConfigChanged(); connect(CfgChannel::instance(),SIGNAL(sigBasicChannelChanged(quint8, bool)),this,SLOT(slotConfigChanged())); setStyleSheet("WinSystemInfoFrame{background-color:white;}\ QLabel{font-size:20px;}\ QLabel#Input,\ QLabel#Output,\ QLabel#Math,\ QLabel#Communication{\ background-color:rgb(200,200,200);\ border:1px solid lightGray;\ }\ QLabel#InputLabel,\ QLabel#OutputLabel,\ QLabel#MathLabel,\ QLabel#CommLabel{\ border:1px solid lightGray;\ }"); }