void DateTimeGroup::createConfigurationInterface(KConfigDialog *parent) { QWidget *widget = new QWidget(); ui.setupUi(widget); parent->addPage(widget, i18n("Appearance"), "view-media-visualization"); ui.localTime->setChecked(m_local); ui.natoOperation->setChecked(m_natoOperation); ui.plainDateTimeGroupFontBold->setChecked(m_plainDateTimeGroupFont.bold()); ui.plainDateTimeGroupFontItalic->setChecked(m_plainDateTimeGroupFont.italic()); ui.plainDateTimeGroupFont->setCurrentFont(m_plainDateTimeGroupFont); ui.useCustomColor->setChecked(m_useCustomColor); ui.plainDateTimeGroupColor->setColor(m_plainDateTimeGroupColor); ui.drawShadow->setChecked(m_drawShadow); ui.useCustomShadowColor->setChecked(m_useCustomShadowColor); ui.plainDateTimeGroupShadowColor->setColor(m_plainDateTimeGroupShadowColor); ui.drawShadow->setChecked(m_drawShadow); ui.sAfterDay->setChecked(m_sAfterDay); ui.sAfterHour->setChecked(m_sAfterHour); ui.sAfterMinute->setChecked(m_sAfterMinute); ui.sAfterSecond->setChecked(m_sAfterSecond); ui.sAfterMonth->setChecked(m_sAfterMonth); ui.sAfterTimeZone->setChecked(m_sAfterTimeZone); switch(m_format){ case 1:ui.shortFormat->setChecked(true); configSpaceForShort(true); break; case 2:ui.longFormat->setChecked(true); configSpaceForLong(true); break; default:ui.stanFormat->setChecked(true); configSpaceForStan(true); } QWidget *widgettz = new QWidget(); timezonesUi.setupUi(widgettz); timezonesUi.searchLine->addTreeWidget(timezonesUi.timeZones); timezonesUi.fullLetters->setChecked(m_rounded); emit timezonesUi.timeZones->hideColumn(4); emit timezonesUi.timeZones->toggleLetters(m_rounded); parent->addPage(widgettz, i18n("Time Zones"), "preferences-desktop-locale"); connect(ui.drawShadow, SIGNAL(toggled(bool)), this, SLOT(configDrawShadowToggled(bool))); connect(ui.natoOperation, SIGNAL(toggled(bool)), this, SLOT(configSpecialZonesToggle())); connect(timezonesUi.fullLetters, SIGNAL(toggled(bool)), timezonesUi.timeZones, SLOT(toggleLetters(bool))); connect(ui.localTime, SIGNAL(toggled(bool)), this, SLOT(configSpecialZonesToggle())); connect(ui.longFormat, SIGNAL(toggled(bool)), this, SLOT(configSpaceForLong(bool))); connect(ui.shortFormat, SIGNAL(toggled(bool)), this, SLOT(configSpaceForShort(bool))); connect(ui.stanFormat, SIGNAL(toggled(bool)), this, SLOT(configSpaceForStan(bool))); connect(timezonesUi.timeZones, SIGNAL(itemClicked(QTreeWidgetItem*,int)), this, SLOT(uncheckTimeBoxes())); configDrawShadowToggled(m_drawShadow); configSpecialZonesToggle(); connect(timezonesUi.timeZones, SIGNAL(itemClicked(QTreeWidgetItem*,int)), parent, SLOT(settingsModified())); connect(ui.plainDateTimeGroupFont, SIGNAL(currentFontChanged(QFont)),parent, SLOT(settingsModified())); connect(ui.plainDateTimeGroupFontBold, SIGNAL(stateChanged(int)),parent, SLOT(settingsModified())); connect(ui.plainDateTimeGroupFontItalic, SIGNAL(stateChanged(int)),parent, SLOT(settingsModified())); connect(ui.useCustomColor, SIGNAL(stateChanged(int)),parent, SLOT(settingsModified())); connect(ui.plainDateTimeGroupColor, SIGNAL(changed(QColor)),parent, SLOT(settingsModified())); connect(ui.drawShadow, SIGNAL(stateChanged(int)),parent, SLOT(settingsModified())); connect(ui.useCustomShadowColor, SIGNAL(stateChanged(int)),parent, SLOT(settingsModified())); connect(ui.plainDateTimeGroupShadowColor, SIGNAL(changed(QColor)), parent, SLOT(settingsModified())); connect(ui.natoOperation, SIGNAL(stateChanged(int)), parent, SLOT(settingsModified())); connect(ui.localTime, SIGNAL(stateChanged(int)), parent, SLOT(settingsModified())); connect(ui.shortFormat, SIGNAL(toggled(bool)), parent, SLOT(settingsModified())); connect(ui.stanFormat, SIGNAL(toggled(bool)), parent, SLOT(settingsModified())); connect(ui.longFormat, SIGNAL(toggled(bool)), parent, SLOT(settingsModified())); connect(ui.sAfterDay, SIGNAL(stateChanged(int)), parent, SLOT(settingsModified())); connect(ui.sAfterHour, SIGNAL(stateChanged(int)), parent, SLOT(settingsModified())); connect(ui.sAfterMinute, SIGNAL(stateChanged(int)), parent, SLOT(settingsModified())); connect(ui.sAfterSecond, SIGNAL(stateChanged(int)), parent, SLOT(settingsModified())); connect(ui.sAfterTimeZone, SIGNAL(stateChanged(int)), parent, SLOT(settingsModified())); connect(ui.sAfterMonth, SIGNAL(stateChanged(int)), parent, SLOT(settingsModified())); connect(timezonesUi.fullLetters, SIGNAL(stateChanged(int)), parent, SLOT(settingsModified())); }
Node * Attr::internalInsertBefore(Node * newChild, Node * refChild) throw(DOMException) { Document * owner = getOwnerDocument(); if (newChild == refChild) { refChild = refChild->getNextSibling(); removeChild(newChild); insertBefore(newChild, refChild); return newChild; } if (isReadOnly()) throw DOMException(DOMException::NO_MODIFICATION_ALLOWED_ERR); if (newChild->getOwnerDocument() != owner) throw DOMException(DOMException::WRONG_DOCUMENT_ERR); if (refChild != null && refChild->getParentNode() != this) throw DOMException(DOMException::NOT_FOUND_ERR); if (newChild != null && newChild->getNodeType() != Node::TEXT_NODE) throw DOMException(DOMException::NOT_SUPPORTED_ERR); Text * newInternal = dynamic_cast<Text*>(newChild); Node * oldparent = newInternal->getParentNode(); if (oldparent != null) oldparent->removeChild(newInternal); Text * refInternal = dynamic_cast<Text*>(refChild); newInternal->ownerNode = this; newInternal->isOwned(true); if (text == null) { text = newInternal; newInternal->isFirstChild(true); newInternal->previousSibling = newInternal; } else { if (refInternal == null) { ChildNode * lastChild = text->previousSibling; lastChild->nextSibling = newInternal; newInternal->previousSibling = lastChild; text->previousSibling = newInternal; } else { if (refChild == text) { text->isFirstChild(false); newInternal->nextSibling = text; newInternal->previousSibling = text->previousSibling; text->previousSibling = newInternal; text = newInternal; newInternal->isFirstChild(true); } else { ChildNode * prev = refInternal->previousSibling; newInternal->nextSibling = refInternal; refInternal->previousSibling = newInternal; newInternal->previousSibling = prev; } } } changed(); return newChild; }
void KCModule::changed() { emit changed(true); }
void BrushEditor::brushChanged() { m_changed = true; emit changed(this); }
NodeImpl *ParentNode::insertBefore(NodeImpl *newChild, NodeImpl *refChild) { bool errorChecking = ownerDocument->getErrorChecking(); if (newChild->isDocumentFragmentImpl()) { // SLOW BUT SAFE: We could insert the whole subtree without // juggling so many next/previous pointers. (Wipe out the // parent's child-list, patch the parent pointers, set the // ends of the list.) But we know some subclasses have special- // case behavior they add to insertBefore(), so we don't risk it. // This approch also takes fewer bytecodes. // NOTE: If one of the children is not a legal child of this // node, throw HIERARCHY_REQUEST_ERR before _any_ of the children // have been transferred. (Alternative behaviors would be to // reparent up to the first failure point or reparent all those // which are acceptable to the target node, neither of which is // as robust. PR-DOM-0818 isn't entirely clear on which it // recommends????? // No need to check kids for right-document; if they weren't, // they wouldn't be kids of that DocFrag. if (errorChecking) { for (NodeImpl *kid = newChild->getFirstChild(); // Prescan kid != null; kid = kid->getNextSibling()) { if (!DocumentImpl::isKidOK(this, kid)) { throw DOM_DOMException( DOM_DOMException::HIERARCHY_REQUEST_ERR, null); } } } while (newChild->hasChildNodes()) { // Move insertBefore(newChild->getFirstChild(),refChild); } return newChild; } // it's a no-op if refChild is the same as newChild if (refChild == newChild) { return newChild; } if (errorChecking) { if (isReadOnly()) { throw DOM_DOMException( DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null); } if (newChild->getOwnerDocument() != ownerDocument) { throw DOM_DOMException(DOM_DOMException::WRONG_DOCUMENT_ERR, null); } if (!DocumentImpl::isKidOK(this, newChild)) { throw DOM_DOMException(DOM_DOMException::HIERARCHY_REQUEST_ERR, null); } // refChild must be a child of this node (or null) if (refChild != null && refChild->getParentNode() != this) { throw DOM_DOMException(DOM_DOMException::NOT_FOUND_ERR, null); } // Prevent cycles in the tree // newChild cannot be ancestor of this Node, // and actually cannot be this bool treeSafe = true; for (NodeImpl *a = this; treeSafe && a != null; a = a->getParentNode()) { treeSafe = (newChild != a); } if (!treeSafe) { throw DOM_DOMException(DOM_DOMException::HIERARCHY_REQUEST_ERR, null); } } // Convert to internal type, to avoid repeated casting ChildNode * newInternal = (ChildNode *)newChild; NodeImpl *oldparent = newInternal->getParentNode(); if (oldparent != null) { oldparent->removeChild(newInternal); } // Convert to internal type, to avoid repeated casting ChildNode *refInternal = (ChildNode *)refChild; // Attach up newInternal->ownerNode = this; newInternal->isOwned(true); // Attach before and after // Note: firstChild.previousSibling == lastChild!! if (firstChild == null) { // this our first and only child firstChild = newInternal; newInternal->isFirstChild(true); newInternal->previousSibling = newInternal; } else { if (refInternal == null) { // this is an append ChildNode *lastChild = firstChild->previousSibling; lastChild->nextSibling = newInternal; newInternal->previousSibling = lastChild; firstChild->previousSibling = newInternal; } else { // this is an insert if (refChild == firstChild) { // at the head of the list firstChild->isFirstChild(false); newInternal->nextSibling = firstChild; newInternal->previousSibling = firstChild->previousSibling; firstChild->previousSibling = newInternal; firstChild = newInternal; newInternal->isFirstChild(true); } else { // somewhere in the middle ChildNode *prev = refInternal->previousSibling; newInternal->nextSibling = refInternal; prev->nextSibling = newInternal; refInternal->previousSibling = newInternal; newInternal->previousSibling = prev; } } } changed(); // update cached length if we have any if (fCachedLength != -1) { fCachedLength++; } if (fCachedChildIndex != -1) { // if we happen to insert just before the cached node, update // the cache to the new node to match the cached index if (fCachedChild == refInternal) { fCachedChild = newInternal; } else { // otherwise just invalidate the cache fCachedChildIndex = -1; } } if (this->getOwnerDocument() != null) { typedef RefVectorOf<RangeImpl> RangeImpls; RangeImpls* ranges = this->getOwnerDocument()->getRanges(); if ( ranges != null) { unsigned int sz = ranges->size(); for (unsigned int i =0; i<sz; i++) { ranges->elementAt(i)->updateRangeForInsertedNode(newInternal); } } } return newInternal; };
void PackageCanvas::history_hide() { Q3CanvasItem::setVisible(FALSE); disconnect(DrawingSettings::instance(), SIGNAL(changed()), this, SLOT(modified())); disconnect(browser_node->get_data(), 0, this, 0); }
void K3bExternalEncoderSettingsWidget::save() { kDebug(); K3bExternalEncoderCommand::saveCommands( m_commands.values() ); emit changed( false ); }
void DesktopSortingStrategy::handleItem(AbstractGroupableItem *item) { disconnect(item, 0, this, 0); //To avoid duplicate connections connect(item, SIGNAL(changed(::TaskManager::TaskChanges)), this, SLOT(check())); AbstractSortingStrategy::handleItem(item); }
void Body::addPrimitive(Primitive* p) { p->setParent(this); m_primitives.push_back(p); emit changed(); }
void QgsMapLayerActionRegistry::addMapLayerAction( QgsMapLayerAction * action ) { mMapLayerActionList.append( action ); emit changed(); }
void TextureEditor::onInitialize() { TamyEditor& mainEditor = TamyEditor::getInstance(); // setup the main layout QVBoxLayout* mainLayout = new QVBoxLayout( this ); mainLayout->setContentsMargins(0, 0, 0, 0); setLayout( mainLayout ); // add the toolbar { QToolBar* toolBar = new QToolBar( this ); mainLayout->addWidget( toolBar ); QAction* actionSaveScene = new QAction( QIcon( tr( ":/TamyEditor/Resources/Icons/Editor/saveFile.png" ) ), tr( "Save Scene" ), toolBar ); toolBar->addAction( actionSaveScene ); connect( actionSaveScene, SIGNAL( triggered() ), this, SLOT( saveTexture() ) ); } // edit frame { QFrame* editFrame = new QFrame( this ); QHBoxLayout* editFrameLayout = new QHBoxLayout( editFrame ); editFrame->setLayout( editFrameLayout ); mainLayout->addWidget( editFrame ); // side panel for properties { QFrame* propertiesFrame = new QFrame( editFrame ); QVBoxLayout* propertiesLayout = new QVBoxLayout( propertiesFrame ); propertiesFrame->setLayout( propertiesLayout ); editFrameLayout->addWidget( propertiesFrame, 0 ); // properties viewer { QPropertiesView* propertiesView = new QPropertiesView(); propertiesLayout->addWidget( propertiesView, 1 ); m_texture.viewProperties( *propertiesView ); } // image info box { QGroupBox* infoFrame = new QGroupBox( "Info", propertiesFrame ); QFormLayout* infoLayout = new QFormLayout( infoFrame ); infoFrame->setLayout( infoLayout ); propertiesLayout->addWidget( infoFrame, 1 ); infoLayout->addRow( new QLabel( "Width:", infoFrame ), m_imageWidthInfo = new QLabel( "0", infoFrame ) ); infoLayout->addRow( new QLabel( "Height:", infoFrame ), m_imageHeightInfo = new QLabel( "0", infoFrame ) ); infoLayout->addRow( new QLabel( "Depth:", infoFrame ), m_imageDepthInfo = new QLabel( "0 bits", infoFrame ) ); } } // add the image viewer widget { m_image = new DropArea( editFrame, new FSNodeMimeData( m_imagePaths ) ); editFrameLayout->addWidget( m_image, 1 ); m_image->setBackgroundRole( QPalette::Base ); m_image->setSizePolicy( QSizePolicy::Ignored, QSizePolicy::Ignored ); m_image->setScaledContents( true ); connect( m_image, SIGNAL( changed() ), this, SLOT( onTextureSet() ) ); } } // initialize the contents refreshImage(); }
// removed the LCD display over the slider - this is not good GUI design :) RNolden 051701 KFocusConfig::KFocusConfig(bool _standAlone, KConfig *_config, const KComponentData &inst, QWidget * parent) : KCModule(inst, parent), config(_config), standAlone(_standAlone) { QString wtstr; QBoxLayout *lay = new QVBoxLayout(this); QLabel *label; //iTLabel = new QLabel(i18n(" Allowed overlap:\n" // "(% of desktop space)"), // plcBox); //iTLabel->setAlignment(AlignTop|AlignHCenter); //pLay->addWidget(iTLabel,1,1); //interactiveTrigger = new QSpinBox(0, 500, 1, plcBox); //pLay->addWidget(interactiveTrigger,1,2); //pLay->addRowSpacing(2,KDialog::spacingHint()); //lay->addWidget(plcBox); // focus policy //fcsBox = new QGroupBox(i18n("Focus"),this); fcsBox = new QWidget(this); QGridLayout *gLay = new QGridLayout(); fcsBox->setLayout(gLay); focusCombo = new KComboBox(fcsBox); focusCombo->setEditable(false); focusCombo->addItem(i18n("Click to Focus"), CLICK_TO_FOCUS); focusCombo->addItem(i18n("Focus Follows Mouse"), FOCUS_FOLLOWS_MOUSE); focusCombo->addItem(i18n("Focus Under Mouse"), FOCUS_UNDER_MOUSE); focusCombo->addItem(i18n("Focus Strictly Under Mouse"), FOCUS_STRICTLY_UNDER_MOUSE); focusCombo->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); label = new QLabel(i18n("&Policy:"), this); label->setAlignment(Qt::AlignVCenter | Qt::AlignRight); label->setBuddy(focusCombo); gLay->addWidget(label, 0, 0, 1, 2); gLay->addWidget(focusCombo, 0, 2); // FIXME, when more policies have been added to KWin wtstr = i18n("The focus policy is used to determine the active window, i.e." " the window you can work in. <ul>" " <li><em>Click to focus:</em> A window becomes active when you click into it." " This is the behavior you might know from other operating systems.</li>" " <li><em>Focus follows mouse:</em> Moving the mouse pointer actively on to a" " normal window activates it. New windows will receive the focus," " without you having to point the mouse at them explicitly." " Very practical if you are using the mouse a lot.</li>" " <li><em>Focus under mouse:</em> The window that happens to be under the" " mouse pointer is active. If the mouse points nowhere, the last window" " that was under the mouse has focus." " New windows will not automatically receive the focus.</li>" " <li><em>Focus strictly under mouse:</em> Only the window under the mouse pointer is" " active. If the mouse points nowhere, nothing has focus.</li>" " </ul>" "Note that 'Focus under mouse' and 'Focus strictly under mouse' prevent certain" " features such as the Alt+Tab walk through windows dialog in the KDE mode" " from working properly." ); focusCombo->setWhatsThis(wtstr); connect(focusCombo, SIGNAL(activated(int)), this, SLOT(focusPolicyChanged())); focusStealing = new KComboBox(this); focusStealing->addItem(i18nc("Focus Stealing Prevention Level", "None")); focusStealing->addItem(i18nc("Focus Stealing Prevention Level", "Low")); focusStealing->addItem(i18nc("Focus Stealing Prevention Level", "Medium")); focusStealing->addItem(i18nc("Focus Stealing Prevention Level", "High")); focusStealing->addItem(i18nc("Focus Stealing Prevention Level", "Extreme")); wtstr = i18n("<p>This option specifies how much KWin will try to prevent unwanted focus stealing " "caused by unexpected activation of new windows. (Note: This feature does not " "work with the Focus Under Mouse or Focus Strictly Under Mouse focus policies.)" "<ul>" "<li><em>None:</em> Prevention is turned off " "and new windows always become activated.</li>" "<li><em>Low:</em> Prevention is enabled; when some window does not have support " "for the underlying mechanism and KWin cannot reliably decide whether to " "activate the window or not, it will be activated. This setting may have both " "worse and better results than the medium level, depending on the applications.</li>" "<li><em>Medium:</em> Prevention is enabled.</li>" "<li><em>High:</em> New windows get activated only if no window is currently active " "or if they belong to the currently active application. This setting is probably " "not really usable when not using mouse focus policy.</li>" "<li><em>Extreme:</em> All windows must be explicitly activated by the user.</li>" "</ul></p>" "<p>Windows that are prevented from stealing focus are marked as demanding attention, " "which by default means their taskbar entry will be highlighted. This can be changed " "in the Notifications control module.</p>"); focusStealing->setWhatsThis(wtstr); connect(focusStealing, SIGNAL(activated(int)), SLOT(changed())); focusStealing->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); label = new QLabel(i18n("Focus stealing prevention level:"), this); label->setAlignment(Qt::AlignVCenter | Qt::AlignRight); label->setBuddy(focusStealing); gLay->addWidget(label, 1, 0, 1, 2); gLay->addWidget(focusStealing, 1, 2); focusNextToMouse = new QCheckBox(/*TODO 4.9 i__18n*/("When the active window disappears, pass focus to window under mouse"), this); gLay->addWidget(focusNextToMouse, 2, 2, 1, 1); focusNextToMouse->hide(); // autoraise delay autoRaiseOn = new QCheckBox(fcsBox); connect(autoRaiseOn, SIGNAL(toggled(bool)), this, SLOT(autoRaiseOnTog(bool))); autoRaise = new KIntNumInput(500, fcsBox); autoRaise->setRange(0, 3000, 100); autoRaise->setSteps(100, 100); autoRaise->setSuffix(i18n(" ms")); autoRaise->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); autoRaiseOnLabel = new QLabel(i18n("&Raise, with the following delay:"), this); autoRaiseOnLabel->setAlignment(Qt::AlignVCenter | Qt::AlignRight); autoRaiseOnLabel->setBuddy(autoRaise); gLay->addWidget(autoRaiseOn, 3, 0); gLay->addWidget(autoRaiseOnLabel, 3, 1); gLay->addWidget(autoRaise, 3, 2); connect(focusCombo, SIGNAL(activated(int)), this, SLOT(setDelayFocusEnabled())); delayFocus = new KIntNumInput(500, fcsBox); delayFocus->setRange(0, 3000, 100); delayFocus->setSteps(100, 100); delayFocus->setSuffix(i18n(" ms")); delayFocus->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); delayFocusOnLabel = new QLabel(i18n("Delay focus by:"), this); delayFocusOnLabel->setAlignment(Qt::AlignVCenter | Qt::AlignRight); delayFocusOnLabel->setBuddy(delayFocus); gLay->addWidget(delayFocusOnLabel, 4, 1); gLay->addWidget(delayFocus, 4, 2); clickRaiseOn = new QCheckBox(i18n("C&lick raises active window"), fcsBox); connect(clickRaiseOn, SIGNAL(toggled(bool)), this, SLOT(clickRaiseOnTog(bool))); gLay->addWidget(clickRaiseOn, 5, 0, 1, 3); autoRaiseOn->setWhatsThis(i18n("When this option is enabled, a window in the background will automatically" " come to the front when the mouse pointer has been over it for some time.")); wtstr = i18n("This is the delay after which the window that the mouse pointer is over will automatically" " come to the front."); autoRaise->setWhatsThis(wtstr); clickRaiseOn->setWhatsThis(i18n("When this option is enabled, the active window will be brought to the" " front when you click somewhere into the window contents. To change" " it for inactive windows, you need to change the settings" " in the Actions tab.")); delayFocus->setWhatsThis(i18n("This is the delay after which the window the mouse pointer is over" " will automatically receive focus.")); separateScreenFocus = new QCheckBox(i18n("S&eparate screen focus"), fcsBox); gLay->addWidget(separateScreenFocus, 6, 0, 1, 3); wtstr = i18n("When this option is enabled, focus operations are limited only to the active Xinerama screen"); separateScreenFocus->setWhatsThis(wtstr); activeMouseScreen = new QCheckBox(i18n("Active screen follows &mouse"), fcsBox); gLay->addWidget(activeMouseScreen, 7, 0, 1, 3); wtstr = i18n("When this option is enabled, the active Xinerama screen (where new windows appear, for example)" " is the screen containing the mouse pointer. When disabled, the active Xinerama screen is the " " screen containing the focused window. By default this option is disabled for Click to focus and" " enabled for other focus policies."); activeMouseScreen->setWhatsThis(wtstr); connect(focusCombo, SIGNAL(activated(int)), this, SLOT(updateActiveMouseScreen())); if (QApplication::desktop()->screenCount() == 1) { // No Ximerama separateScreenFocus->hide(); activeMouseScreen->hide(); } lay->addWidget(fcsBox); lay->addStretch(); // Any changes goes to slotChanged() connect(focusCombo, SIGNAL(activated(int)), SLOT(changed())); connect(autoRaiseOn, SIGNAL(clicked()), SLOT(changed())); connect(clickRaiseOn, SIGNAL(clicked()), SLOT(changed())); connect(autoRaise, SIGNAL(valueChanged(int)), SLOT(changed())); connect(delayFocus, SIGNAL(valueChanged(int)), SLOT(changed())); connect(separateScreenFocus, SIGNAL(clicked()), SLOT(changed())); connect(activeMouseScreen, SIGNAL(clicked()), SLOT(changed())); connect(focusNextToMouse, SIGNAL(clicked()), SLOT(changed())); load(); }
KMovingConfig::KMovingConfig(bool _standAlone, KConfig *_config, const KComponentData &inst, QWidget *parent) : KCModule(inst, parent), config(_config), standAlone(_standAlone) { QString wtstr; QBoxLayout *lay = new QVBoxLayout(this); windowsBox = new KButtonGroup(this); windowsBox->setTitle(i18n("Windows")); QBoxLayout *wLay = new QVBoxLayout(windowsBox); QBoxLayout *bLay = new QVBoxLayout; wLay->addLayout(bLay); geometryTipOn = new QCheckBox(i18n("Display window &geometry when moving or resizing"), windowsBox); bLay->addWidget(geometryTipOn); geometryTipOn->setWhatsThis(i18n("Enable this option if you want a window's geometry to be displayed" " while it is being moved or resized. The window position relative" " to the top-left corner of the screen is displayed together with" " its size.")); moveResizeMaximized = new QCheckBox(i18n("Display borders on &maximized windows"), windowsBox); bLay->addWidget(moveResizeMaximized); moveResizeMaximized->setWhatsThis(i18n("When enabled, this feature activates the border of maximized windows" " and allows you to move or resize them," " just like for normal windows")); lay->addWidget(windowsBox); //iTLabel = new QLabel(i18n(" Allowed overlap:\n" // "(% of desktop space)"), // plcBox); //iTLabel->setAlignment(AlignTop|AlignHCenter); //pLay->addWidget(iTLabel,1,1); //interactiveTrigger = new QSpinBox(0, 500, 1, plcBox); //pLay->addWidget(interactiveTrigger,1,2); //pLay->addRowSpacing(2,KDialog::spacingHint()); //lay->addWidget(plcBox); //CT 15mar98 - add EdgeResistance, BorderAttractor, WindowsAttractor config MagicBox = new KButtonGroup(this); MagicBox->setTitle(i18n("Snap Zones")); QGridLayout *kLay = new QGridLayout(MagicBox); BrdrSnap = new KIntNumInput(10, MagicBox); BrdrSnap->setSpecialValueText(i18nc("no border snap zone", "none")); BrdrSnap->setRange(0, MAX_BRDR_SNAP); BrdrSnap->setSteps(1, 10); BrdrSnap->setWhatsThis(i18n("Here you can set the snap zone for screen borders, i.e." " the 'strength' of the magnetic field which will make windows snap to the border when" " moved near it.")); BrdrSnap->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); BrdrSnapLabel = new QLabel(i18n("&Border snap zone:"), this); BrdrSnapLabel->setAlignment(Qt::AlignVCenter | Qt::AlignRight); BrdrSnapLabel->setBuddy(BrdrSnap); kLay->addWidget(BrdrSnapLabel, 0, 0); kLay->addWidget(BrdrSnap, 0, 1); WndwSnap = new KIntNumInput(10, MagicBox); WndwSnap->setSpecialValueText(i18nc("no window snap zone", "none")); WndwSnap->setRange(0, MAX_WNDW_SNAP); WndwSnap->setSteps(1, 10); WndwSnap->setWhatsThis(i18n("Here you can set the snap zone for windows, i.e." " the 'strength' of the magnetic field which will make windows snap to each other when" " they are moved near another window.")); BrdrSnap->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); WndwSnapLabel = new QLabel(i18n("&Window snap zone:"), this); WndwSnapLabel->setAlignment(Qt::AlignVCenter | Qt::AlignRight); WndwSnapLabel->setBuddy(WndwSnap); kLay->addWidget(WndwSnapLabel, 1, 0); kLay->addWidget(WndwSnap, 1, 1); CntrSnap = new KIntNumInput(10, MagicBox); CntrSnap->setSpecialValueText(i18nc("no center snap zone", "none")); CntrSnap->setRange(0, MAX_CNTR_SNAP); CntrSnap->setSteps(1, 10); CntrSnap->setWhatsThis(i18n("Here you can set the snap zone for the screen center, i.e." " the 'strength' of the magnetic field which will make windows snap to the center of" " the screen when moved near it.")); BrdrSnap->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); CntrSnapLabel = new QLabel(i18n("&Center snap zone:"), this); CntrSnapLabel->setAlignment(Qt::AlignVCenter | Qt::AlignRight); CntrSnapLabel->setBuddy(CntrSnap); kLay->addWidget(CntrSnapLabel, 2, 0); kLay->addWidget(CntrSnap, 2, 1); OverlapSnap = new QCheckBox(i18n("Snap windows onl&y when overlapping"), MagicBox); OverlapSnap->setWhatsThis(i18n("Here you can set that windows will be only" " snapped if you try to overlap them, i.e. they will not be snapped if the windows" " comes only near another window or border.")); kLay->addWidget(OverlapSnap, 3, 0, 1, 2); lay->addWidget(MagicBox); lay->addStretch(); load(); // Any changes goes to slotChanged() connect(geometryTipOn, SIGNAL(clicked()), SLOT(changed())); connect(moveResizeMaximized, SIGNAL(toggled(bool)), SLOT(changed())); connect(BrdrSnap, SIGNAL(valueChanged(int)), SLOT(changed())); connect(BrdrSnap, SIGNAL(valueChanged(int)), SLOT(slotBrdrSnapChanged(int))); connect(WndwSnap, SIGNAL(valueChanged(int)), SLOT(changed())); connect(WndwSnap, SIGNAL(valueChanged(int)), SLOT(slotWndwSnapChanged(int))); connect(CntrSnap, SIGNAL(valueChanged(int)), SLOT(changed())); connect(CntrSnap, SIGNAL(valueChanged(int)), SLOT(slotCntrSnapChanged(int))); connect(OverlapSnap, SIGNAL(clicked()), SLOT(changed())); // To get suffix to BrdrSnap, WndwSnap and CntrSnap inputs with default values. slotBrdrSnapChanged(BrdrSnap->value()); slotWndwSnapChanged(WndwSnap->value()); slotCntrSnapChanged(CntrSnap->value()); }
void ClientDataRef::updateValue(QStringList &newValues) { if(newValues == _values) return; _values = newValues; emit changed(this); }
static long floppywrite(Chan *c, void *a, long n, vlong off) { FDrive *dp; long rv, i; char *aa = a; Cmdbuf *cb; Cmdtab *ct; ulong offset = off; rv = 0; dp = &fl.d[c->qid.path & ~Qmask]; switch ((int)(c->qid.path & Qmask)) { case Qdata: islegal(offset, n, dp); qlock(&fl); if(waserror()){ qunlock(&fl); nexterror(); } floppyon(dp); changed(c, dp); for(rv = 0; rv < n; rv += i){ floppypos(dp, offset+rv); if(dp->tcyl == dp->ccyl) dp->ccyl = -1; i = floppyxfer(dp, Fwrite, aa+rv, offset+rv, n-rv); if(i < 0) break; if(i == 0) error(Eio); } qunlock(&fl); poperror(); break; case Qctl: rv = n; cb = parsecmd(a, n); if(waserror()){ free(cb); nexterror(); } qlock(&fl); if(waserror()){ qunlock(&fl); nexterror(); } ct = lookupcmd(cb, floppyctlmsg, nelem(floppyctlmsg)); switch(ct->index){ case CMeject: floppyeject(dp); break; case CMformat: floppyformat(dp, cb); break; case CMreset: fl.confused = 1; floppyon(dp); break; case CMdebug: floppydebug = 1; break; case CMnodebug: floppydebug = 0; break; } poperror(); qunlock(&fl); poperror(); free(cb); break; default: panic("floppywrite: bad qid"); } return rv; }
void Body::removePrimitive(Primitive* p) { m_primitives.removeAll(p); emit changed(); }
void PackageCanvas::delete_it() { disconnect(DrawingSettings::instance(), SIGNAL(changed()), this, SLOT(modified())); disconnect(browser_node->get_data(), 0, this, 0); DiagramCanvas::delete_it(); }
void Project::valueTreeChildAdded (ValueTree&, ValueTree&) { changed(); }
void FormWindowEditor::setDisplayName(const QString &title) { d->m_textEditor.setDisplayName(title); emit changed(); }
void Project::valueTreeChildRemoved (ValueTree&, ValueTree&, int) { changed(); }
void K3bExternalEncoderSettingsWidget::defaults() { kDebug(); fillEncoderView( K3bExternalEncoderCommand::defaultCommands() ); emit changed( true ); }
void Project::valueTreeChildOrderChanged (ValueTree&, int, int) { changed(); }
void RoleEditor::emitResetProperty() { setEdited(false); emit changed(this); }
static int Per_set_changed(cPersistentObject *self, PyObject *v) { int deactivate = 0; int true; if (!v) { /* delattr is used to invalidate an object even if it has changed. */ if (self->state != cPersistent_GHOST_STATE) self->state = cPersistent_UPTODATE_STATE; deactivate = 1; } else if (v == Py_None) deactivate = 1; if (deactivate) { PyObject *res, *meth; meth = PyObject_GetAttr((PyObject *)self, py__p_deactivate); if (meth == NULL) return -1; res = PyObject_CallObject(meth, NULL); if (res) Py_DECREF(res); else { /* an error occured in _p_deactivate(). It's not clear what we should do here. The code is obviously ignoring the exception, but it shouldn't return 0 for a getattr and set an exception. The simplest change is to clear the exception, but that simply masks the error. This prints an error to stderr just like exceptions in __del__(). It would probably be better to log it but that would be painful from C. */ PyErr_WriteUnraisable(meth); } Py_DECREF(meth); return 0; } /* !deactivate. If passed a true argument, mark self as changed (starting * with ZODB 3.6, that includes activating the object if it's a ghost). * If passed a false argument, and the object isn't a ghost, set the * state as up-to-date. */ true = PyObject_IsTrue(v); if (true == -1) return -1; if (true) { if (self->state < 0) { if (unghostify(self) < 0) return -1; } return changed(self); } /* We were passed a false, non-None argument. If we're not a ghost, * mark self as up-to-date. */ if (self->state >= 0) self->state = cPersistent_UPTODATE_STATE; return 0; }
NodeImpl *ParentNode::removeChild(NodeImpl *oldChild) { if (ownerDocument->getErrorChecking()) { if (isReadOnly()) { throw DOM_DOMException( DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null); } if (oldChild == null || oldChild->getParentNode() != this) { throw DOM_DOMException(DOM_DOMException::NOT_FOUND_ERR, null); } } //fix other ranges for change before deleting the node if (getOwnerDocument() != null) { typedef RefVectorOf<RangeImpl> RangeImpls; RangeImpls* ranges = this->getOwnerDocument()->getRanges(); if (ranges != null) { unsigned int sz = ranges->size(); if (sz != 0) { for (unsigned int i =0; i<sz; i++) { if (ranges->elementAt(i) != null) ranges->elementAt(i)->updateRangeForDeletedNode(oldChild); } } } } ChildNode * oldInternal = (ChildNode *) oldChild; // update cached length if we have any if (fCachedLength != -1) { fCachedLength--; } if (fCachedChildIndex != -1) { // if the removed node is the cached node // move the cache to its (soon former) previous sibling if (fCachedChild == oldInternal) { fCachedChildIndex--; fCachedChild = (ChildNode *)oldInternal->getPreviousSibling(); } else { // otherwise just invalidate the cache fCachedChildIndex = -1; } } // Patch linked list around oldChild // Note: lastChild == firstChild->previousSibling if (oldInternal == firstChild) { // removing first child oldInternal->isFirstChild(false); firstChild = oldInternal->nextSibling; if (firstChild != null) { firstChild->isFirstChild(true); firstChild->previousSibling = oldInternal->previousSibling; } } else { ChildNode *prev = oldInternal->previousSibling; ChildNode *next = oldInternal->nextSibling; prev->nextSibling = next; if (next == null) { // removing last child firstChild->previousSibling = prev; } else { // removing some other child in the middle next->previousSibling = prev; } } // Remove oldInternal's references to tree oldInternal->ownerNode = ownerDocument; oldInternal->isOwned(false); oldInternal->nextSibling = null; oldInternal->previousSibling = null; changed(); return oldInternal; };
//--------------------------------------------------------------------------- // // User clicked Ok // void AmorDialog::slotOk() { mConfig.write(); emit changed(); accept(); }
void KCModule::widgetChanged() { emit changed(d->_unmanagedWidgetChangeState || managedWidgetChangeState()); }
//--------------------------------------------------------------------------- // // User clicked Ok // void AmorDialog::slotApply() { mConfig.write(); emit changed(); }
CrateFeature::CrateFeature(QObject* parent, TrackCollection* pTrackCollection, ConfigObject<ConfigValue>* pConfig) : m_pTrackCollection(pTrackCollection), m_crateDao(pTrackCollection->getCrateDAO()), m_crateTableModel(this, pTrackCollection), m_pConfig(pConfig) { Q_UNUSED(parent); m_pCreateCrateAction = new QAction(tr("New Crate"),this); connect(m_pCreateCrateAction, SIGNAL(triggered()), this, SLOT(slotCreateCrate())); m_pDeleteCrateAction = new QAction(tr("Remove"),this); connect(m_pDeleteCrateAction, SIGNAL(triggered()), this, SLOT(slotDeleteCrate())); m_pRenameCrateAction = new QAction(tr("Rename"),this); connect(m_pRenameCrateAction, SIGNAL(triggered()), this, SLOT(slotRenameCrate())); m_pLockCrateAction = new QAction(tr("Lock"),this); connect(m_pLockCrateAction, SIGNAL(triggered()), this, SLOT(slotToggleCrateLock())); m_pImportPlaylistAction = new QAction(tr("Import Crate"),this); connect(m_pImportPlaylistAction, SIGNAL(triggered()), this, SLOT(slotImportPlaylist())); m_pExportPlaylistAction = new QAction(tr("Export Crate"), this); connect(m_pExportPlaylistAction, SIGNAL(triggered()), this, SLOT(slotExportPlaylist())); m_pDuplicateCrateAction = new QAction(tr("Duplicate Crate"),this); connect(m_pDuplicateCrateAction, SIGNAL(triggered()), this, SLOT(slotDuplicateCrate())); m_pAnalyzeCrateAction = new QAction(tr("Analyze entire Crate"),this); connect(m_pAnalyzeCrateAction, SIGNAL(triggered()), this, SLOT(slotAnalyzeCrate())); #ifdef __AUTODJCRATES__ m_pAutoDjTrackSource = new QAction(tr("Auto DJ Track Source"),this); m_pAutoDjTrackSource->setCheckable(true); connect(m_pAutoDjTrackSource, SIGNAL(changed()), this, SLOT(slotAutoDjTrackSourceChanged())); #endif // __AUTODJCRATES__ connect(&m_crateDao, SIGNAL(added(int)), this, SLOT(slotCrateTableChanged(int))); connect(&m_crateDao, SIGNAL(deleted(int)), this, SLOT(slotCrateTableChanged(int))); connect(&m_crateDao, SIGNAL(renamed(int,QString)), this, SLOT(slotCrateTableRenamed(int,QString))); connect(&m_crateDao, SIGNAL(lockChanged(int)), this, SLOT(slotCrateTableChanged(int))); // construct child model TreeItem *rootItem = new TreeItem(); m_childModel.setRootItem(rootItem); constructChildModel(-1); }
void lcQColorPickerPopup::colorChanged(int colorIndex) { emit changed(colorIndex); }