void MessageCarbons::stanzaRequestResult(const Jid &AStreamJid, const Stanza &AStanza) { if (AStanza.type() == "result") { if (FEnableRequests.contains(AStanza.id())) { LogDetaile(QString("[MessageCarbons] Message Carbons enabled for '%1'").arg(AStreamJid.full())); FEnabled[AStreamJid] = true; emit enableChanged(AStreamJid,true); } else if(FDisableRequests.contains(AStanza.id())) { LogDetaile(QString("[MessageCarbons] Message Carbons disabled for '%1'").arg(AStreamJid.full())); FEnabled[AStreamJid] = false; emit enableChanged(AStreamJid,false); } } else { ErrorHandler err(AStanza.element()); LogError(QString("[MessageCarbons] Failed to change Message Carbons state for '%1': %2").arg(AStreamJid.full(),err.message())); emit errorReceived(AStreamJid,err.condition(),err.message()); } FEnableRequests.removeAll(AStanza.id()); FDisableRequests.removeAll(AStanza.id()); }
void Filter::setEnabled(bool enabled) { DPTR_D(Filter); if (d.enabled == enabled) return; d.enabled = enabled; emit enableChanged(enabled); }
void ChessPiece::setEnable(bool enable) { if (m_enable == enable) return; m_enable = enable; emit enableChanged(enable); }
void DesktopBehavior::load( bool useDefaults ) { g_pConfig->setReadDefaults( useDefaults ); g_pConfig->setGroup( "Desktop Icons" ); bool bShowHidden = g_pConfig->readBoolEntry("ShowHidden", DEFAULT_SHOW_HIDDEN_ROOT_ICONS); showHiddenBox->setChecked(bShowHidden); //bool bVertAlign = g_pConfig->readBoolEntry("VertAlign", DEFAULT_VERT_ALIGN); KTrader::OfferList plugins = KTrader::self()->query("ThumbCreator"); previewListView->clear(); QStringList previews = g_pConfig->readListEntry("Preview"); for (KTrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it) new DesktopBehaviorPreviewItem(this, previewListView, *it, previews.contains((*it)->desktopEntryName())); new DesktopBehaviorPreviewItem(this, previewListView, previews.contains("audio/")); // g_pConfig->setGroup( "FMSettings" ); toolTipBox->setChecked(g_pConfig->readBoolEntry( "ShowFileTips", true ) ); g_pConfig->setGroup( "Menubar" ); KConfig config( "kdeglobals" ); config.setGroup("KDE"); bool globalMenuBar = config.readBoolEntry("macStyle", false); bool desktopMenuBar = g_pConfig->readBoolEntry("ShowMenubar", false); if ( globalMenuBar ) desktopMenuGroup->setButton( 2 ); else if ( desktopMenuBar ) desktopMenuGroup->setButton( 1 ); else desktopMenuGroup->setButton( 0 ); g_pConfig->setGroup( "General" ); vrootBox->setChecked( g_pConfig->readBoolEntry( "SetVRoot", false ) ); iconsEnabledBox->setChecked( g_pConfig->readBoolEntry( "Enabled", true ) ); autoLineupIconsBox->setChecked( g_pConfig->readBoolEntry( "AutoLineUpIcons", false ) ); // g_pConfig->setGroup( "Mouse Buttons" ); QString s; s = g_pConfig->readEntry( "Left", "" ); for ( int c = 0 ; c < choiceCount ; c ++ ) if (s == s_choices[c]) { leftComboBox->setCurrentItem( c ); break; } s = g_pConfig->readEntry( "Middle", "WindowListMenu" ); for ( int c = 0 ; c < choiceCount ; c ++ ) if (s == s_choices[c]) { middleComboBox->setCurrentItem( c ); break; } s = g_pConfig->readEntry( "Right", "DesktopMenu" ); for ( int c = 0 ; c < choiceCount ; c ++ ) if (s == s_choices[c]) { rightComboBox->setCurrentItem( c ); break; } comboBoxChanged(); if (m_bHasMedia) fillMediaListView(); enableChanged(); }
KSocksConfig::KSocksConfig(QWidget *parent) : KCModule(parent, "kcmkio") { KAboutData *about = new KAboutData(I18N_NOOP("kcmsocks"), I18N_NOOP("KDE SOCKS Control Module"), 0, 0, KAboutData::License_GPL, I18N_NOOP("(c) 2001 George Staikos")); about->addAuthor("George Staikos", 0, "*****@*****.**"); setAboutData( about ); QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); base = new SocksBase(this); layout->add(base); connect(base->_c_enableSocks, SIGNAL(clicked()), this, SLOT(enableChanged())); connect(base->bg, SIGNAL(clicked(int)), this, SLOT(methodChanged(int))); // The custom library connect(base->_c_customPath, SIGNAL(openFileDialog(KURLRequester *)), this, SLOT(chooseCustomLib(KURLRequester *))); connect(base->_c_customPath, SIGNAL(textChanged(const QString&)), this, SLOT(customPathChanged(const QString&))); // Additional libpaths connect(base->_c_newPath, SIGNAL(openFileDialog(KURLRequester *)), this, SLOT(chooseCustomLib(KURLRequester *))); connect(base->_c_newPath, SIGNAL(returnPressed(const QString&)), this, SLOT(addThisLibrary(const QString&))); connect(base->_c_newPath, SIGNAL(textChanged(const QString&)), this, SLOT(libTextChanged(const QString&))); connect(base->_c_add, SIGNAL(clicked()), this, SLOT(addLibrary())); connect(base->_c_remove, SIGNAL(clicked()), this, SLOT(removeLibrary())); connect(base->_c_libs, SIGNAL(selectionChanged()), this, SLOT(libSelection())); // The "Test" button connect(base->_c_test, SIGNAL(clicked()), this, SLOT(testClicked())); // The config backend load(); }
DesktopBehavior::DesktopBehavior(KConfig *config, QWidget *parent, const char * ) : DesktopBehaviorBase( parent, "kcmkonq" ), g_pConfig(config) { QString strMouseButton1, strMouseButton3, strButtonTxt1, strButtonTxt3; /* * The text on this form depends on the mouse setting, which can be right * or left handed. The outer button functionality is actually swapped * */ bool leftHandedMouse = ( KGlobalSettings::mouseSettings().handed == KGlobalSettings::KMouseSettings::LeftHanded); m_bHasMedia = KProtocolInfo::isKnownProtocol(QString::fromLatin1("media")); connect(desktopMenuGroup, SIGNAL(clicked(int)), this, SIGNAL(changed())); connect(iconsEnabledBox, SIGNAL(clicked()), this, SLOT(enableChanged())); connect(showHiddenBox, SIGNAL(clicked()), this, SIGNAL(changed())); connect(vrootBox, SIGNAL(clicked()), this, SIGNAL(changed())); connect(autoLineupIconsBox, SIGNAL(clicked()), this, SIGNAL(changed())); connect(toolTipBox, SIGNAL(clicked()), this, SIGNAL(changed())); strMouseButton1 = i18n("&Left button:"); strButtonTxt1 = i18n( "You can choose what happens when" " you click the left button of your pointing device on the desktop:"); strMouseButton3 = i18n("Right b&utton:"); strButtonTxt3 = i18n( "You can choose what happens when" " you click the right button of your pointing device on the desktop:"); if ( leftHandedMouse ) { qSwap(strMouseButton1, strMouseButton3); qSwap(strButtonTxt1, strButtonTxt3); } leftLabel->setText( strMouseButton1 ); leftLabel->setBuddy( leftComboBox ); fillMenuCombo( leftComboBox ); connect(leftEditButton, SIGNAL(clicked()), this, SLOT(editButtonPressed())); connect(leftComboBox, SIGNAL(activated(int)), this, SIGNAL(changed())); connect(leftComboBox, SIGNAL(activated(int)), this, SLOT(comboBoxChanged())); QString wtstr = strButtonTxt1 + i18n(" <ul><li><em>No action:</em> as you might guess, nothing happens!</li>" " <li><em>Window list menu:</em> a menu showing all windows on all" " virtual desktops pops up. You can click on the desktop name to switch" " to that desktop, or on a window name to shift focus to that window," " switching desktops if necessary, and restoring the window if it is" " hidden. Hidden or minimized windows are represented with their names" " in parentheses.</li>" " <li><em>Desktop menu:</em> a context menu for the desktop pops up." " Among other things, this menu has options for configuring the display," " locking the screen, and logging out of KDE.</li>" " <li><em>Application menu:</em> the \"K\" menu pops up. This might be" " useful for quickly accessing applications if you like to keep the" " panel (also known as \"Kicker\") hidden from view.</li></ul>"); QWhatsThis::add( leftLabel, wtstr ); QWhatsThis::add( leftComboBox, wtstr ); middleLabel->setBuddy( middleComboBox ); fillMenuCombo( middleComboBox ); connect(middleEditButton, SIGNAL(clicked()), this, SLOT(editButtonPressed())); connect(middleComboBox, SIGNAL(activated(int)), this, SIGNAL(changed())); connect(middleComboBox, SIGNAL(activated(int)), this, SLOT(comboBoxChanged())); wtstr = i18n("You can choose what happens when" " you click the middle button of your pointing device on the desktop:" " <ul><li><em>No action:</em> as you might guess, nothing happens!</li>" " <li><em>Window list menu:</em> a menu showing all windows on all" " virtual desktops pops up. You can click on the desktop name to switch" " to that desktop, or on a window name to shift focus to that window," " switching desktops if necessary, and restoring the window if it is" " hidden. Hidden or minimized windows are represented with their names" " in parentheses.</li>" " <li><em>Desktop menu:</em> a context menu for the desktop pops up." " Among other things, this menu has options for configuring the display," " locking the screen, and logging out of KDE.</li>" " <li><em>Application menu:</em> the \"K\" menu pops up. This might be" " useful for quickly accessing applications if you like to keep the" " panel (also known as \"Kicker\") hidden from view.</li></ul>"); QWhatsThis::add( middleLabel, wtstr ); QWhatsThis::add( middleComboBox, wtstr ); rightLabel->setText( strMouseButton3 ); rightLabel->setBuddy( rightComboBox ); fillMenuCombo( rightComboBox ); connect(rightEditButton, SIGNAL(clicked()), this, SLOT(editButtonPressed())); connect(rightComboBox, SIGNAL(activated(int)), this, SIGNAL(changed())); connect(rightComboBox, SIGNAL(activated(int)), this, SLOT(comboBoxChanged())); wtstr = strButtonTxt3 + i18n(" <ul><li><em>No action:</em> as you might guess, nothing happens!</li>" " <li><em>Window list menu:</em> a menu showing all windows on all" " virtual desktops pops up. You can click on the desktop name to switch" " to that desktop, or on a window name to shift focus to that window," " switching desktops if necessary, and restoring the window if it is" " hidden. Hidden or minimized windows are represented with their names" " in parentheses.</li>" " <li><em>Desktop menu:</em> a context menu for the desktop pops up." " Among other things, this menu has options for configuring the display," " locking the screen, and logging out of KDE.</li>" " <li><em>Application menu:</em> the \"K\" menu pops up. This might be" " useful for quickly accessing applications if you like to keep the" " panel (also known as \"Kicker\") hidden from view.</li></ul>"); QWhatsThis::add( rightLabel, wtstr ); QWhatsThis::add( rightComboBox, wtstr ); if (m_bHasMedia) { connect(enableMediaBox, SIGNAL(clicked()), this, SLOT(enableChanged())); } else { delete behaviorTab->page(2); } load(); }