RKPluginBrowser::RKPluginBrowser (const QDomElement &element, RKComponent *parent_component, QWidget *parent_widget) : RKComponent (parent_component, parent_widget) { RK_TRACE (PLUGIN); // get xml-helper XMLHelper *xml = XMLHelper::getStaticHelper (); // create and add property addChild ("selection", selection = new RKComponentPropertyBase (this, true)); connect (selection, SIGNAL (valueChanged (RKComponentPropertyBase *)), this, SLOT (textChanged (RKComponentPropertyBase *))); setRequired (xml->getBoolAttribute (element, "required", true, DL_INFO)); connect (requirednessProperty (), SIGNAL (valueChanged(RKComponentPropertyBase*)), this, SLOT (requirednessChanged(RKComponentPropertyBase*))); QVBoxLayout *vbox = new QVBoxLayout (this, RKGlobals::spacingHint ()); int intmode = xml->getMultiChoiceAttribute (element, "type", "file;dir;savefile", 0, DL_INFO); GetFileNameWidget::FileType mode; if (intmode == 0) { mode = GetFileNameWidget::ExistingFile; } else if (intmode == 0) { mode = GetFileNameWidget::ExistingDirectory; } else { mode = GetFileNameWidget::SaveFile; } selector = new GetFileNameWidget (this, mode, xml->getStringAttribute (element, "label", i18n ("Enter filename"), DL_INFO), i18n ("Select"), xml->getStringAttribute (element, "initial", QString::null, DL_INFO)); selector->setFilter (xml->getStringAttribute (element, "filter", QString::null, DL_INFO)); connect (selector, SIGNAL (locationChanged ()), SLOT (textChanged ())); vbox->addWidget (selector); // initialize updating = false; textChanged (); }
int setNode(Cmiss_node_id node) { FE_value time = location->get_time(); delete location; location = new Field_node_location(node, time); locationChanged(); return 1; }
void Document::setLocation(const Location &location) { if (m_location != location) { m_location = location; emit locationChanged(m_location); } }
/** Recupere le chemin virtuel de l'element selectionne et emet le signal virtualPathChanged. @param current QTreeWidgetItem selectionne @param previous QTreeWidgetItem precedemment selectionne */ void ElementsCategoriesList::selectionChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous) { Q_UNUSED(previous); ElementsLocation emited_location; if (current) { emited_location = valueForItem<ElementsLocation>(current); } emit(locationChanged(emited_location)); }
void setTime(FE_value time) { // avoid re-setting current time as cache may have valid values already if (time != location->get_time()) { location->set_time(time); locationChanged(); } }
/** @param topLevelElement Optional top-level element to inherit fields from */ int setMeshLocation(Cmiss_element_id element, const double *chart_coordinates, Cmiss_element_id top_level_element = 0) { FE_value time = location->get_time(); delete location; location = new Field_element_xi_location(element, chart_coordinates, time, top_level_element); locationChanged(); return 1; }
Location * LocationsFactory::setNewPath(const QString& uPath, const QString& authUser, const QString& passwd, bool savePassword) { storeValidFileInfo(0); CleanUrl url(uPath); m_lastUrlNeedsAuthentication = false; NetAuthenticationData authData(authUser, passwd); if (authData.isEmpty() && url.hasAuthenticationData()) { authData.user = url.user(); authData.password = url.password(); } Location *location = parse(url.cleanUrl()); if (location) { DirItemInfo *item = validateCurrentUrl(location,authData); if (item) { //now if there is Authentication Data //at this point item is ready and authentication if necessary worked if (item && !authData.isEmpty()) { m_authDataStore->store(item->authenticationPath(), authData.user, authData.password, savePassword); } //isContentReadable() must already carry execution permission if (item->isValid() && item->isBrowsable() && item->isContentReadable()) { location->setInfoItem(item); if (location != m_curLoc) { if (m_curLoc) { m_curLoc->stopWorking(); } emit locationChanged(m_curLoc, location); location->startWorking(); m_curLoc = location; } } else { storeValidFileInfo(item); location = 0; } } else { // not valid location = 0; } } #if DEBUG_MESSAGES qDebug() << Q_FUNC_INFO << "input path:" << uPath << "location result:" << location; #endif return location; }
KoModeBoxDocker::KoModeBoxDocker(KoModeBox *modeBox) : m_modeBox(modeBox) { setWidget(modeBox); setFeatures(QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable); setWindowTitle(""); setObjectName("ModeBox"); connect(this, SIGNAL(dockLocationChanged(Qt::DockWidgetArea)), this, SLOT(locationChanged(Qt::DockWidgetArea))); }
void ChooseFolderView::chooseFolder() { QString dir = QFileDialog::getExistingDirectory(this, tr("Where's your music collection?"), QDesktopServices::storageLocation(QDesktopServices::HomeLocation), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); if (!dir.isEmpty()) { emit locationChanged(dir); } }
void FileBrowser::remoteClientsAccept() { this->mLocation = this->mRCDialog->mSelectedClient; this->mRCDialog->hide(); QStringList temp = mLocation.split(" "); this->mLocation = temp.at(0); emit locationChanged(this->mLocation); emit dirChange("."); }
void EntryBase::HandlePEPEvent (QString variant, PEPEventBase *event) { const auto& vars = Variants (); if (!vars.isEmpty () && (!vars.contains (variant) || variant.isEmpty ())) variant = vars.first (); if (const auto activity = dynamic_cast<UserActivity*> (event)) return HandleUserActivity (activity, variant); if (const auto mood = dynamic_cast<UserMood*> (event)) return HandleUserMood (mood, variant); if (const auto tune = dynamic_cast<UserTune*> (event)) return HandleUserTune (tune, variant); if (const auto location = dynamic_cast<UserLocation*> (event)) { if (Location_ [variant] == location->GetInfo ()) return; Location_ [variant] = location->GetInfo (); emit locationChanged (variant, this); emit locationChanged (variant); return; } if (PEPMicroblog *microblog = dynamic_cast<PEPMicroblog*> (event)) { emit gotNewPost (*microblog); return; } if (dynamic_cast<UserAvatarData*> (event) || dynamic_cast<UserAvatarMetadata*> (event)) return; qWarning () << Q_FUNC_INFO << "unhandled PEP event from" << GetJID (); }
/*! Update the registration \a state and notify all interested clients if it is different than the previous value. The locationAreaCode() and cellId() will be set to -1. \sa QGprsNetworkRegistration::registrationState() \sa QGprsNetworkRegistration::registrationStateChanged() */ void QGprsNetworkRegistrationServer::updateRegistrationState ( QTelephony::RegistrationState state ) { if ( locationAreaCode() != -1 || cellId() != -1 ) { if ( state != registrationState() ) { // Update everything. setValue( "state", (int)state, Delayed ); setValue( "locationAreaCode", -1, Delayed ); setValue( "cellId", -1 ); emit registrationStateChanged(); emit locationChanged(); } else { // Update only the location. setValue( "locationAreaCode", -1, Delayed ); setValue( "cellId", -1 ); emit locationChanged(); } } else if ( state != registrationState() ) { // Update only registration. setValue( "state", (int)state ); emit registrationStateChanged(); } }
void Element::setLocation(Location p) { if (m_location != p) { m_location = p; emit locationChanged(); for (Element *elm: m_children) { elm->m_location = p; emit elm->locationChanged(); } traverse(this, m_location); } }
void DeclarativeAppletScript::constraintsEvent(Plasma::Types::Constraints constraints) { if (constraints & Plasma::Types::FormFactorConstraint) { emit formFactorChanged(); } if (constraints & Plasma::Types::LocationConstraint) { emit locationChanged(); } if (constraints & Plasma::Types::ContextConstraint) { emit contextChanged(); } }
Separator::Separator(Plasma::Svg *svg, Applet *applet) : Plasma::SvgWidget(svg, "separator", applet), m_applet(applet), m_isVisible(true) { setObjectName("FancyTasksSeparator"); setAcceptsHoverEvents(true); setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); updateOrientation(); connect(m_applet, SIGNAL(sizeChanged(qreal)), this, SLOT(setSize(qreal))); connect(m_applet, SIGNAL(locationChanged()), this, SLOT(updateOrientation())); }
void Piece::render(SDL_Rect location) { if(context == NULL) { #if DEBUG > 1 std::cerr << "Warning: Could not render piece, problem establishing game context\n"; #endif return; } if(locationChanged(location,currentLocation)) { copyRect(¤tLocation,location); SDL_BlitSurface(image,NULL,context->getRenderContext(),¤tLocation); context->screenUpdated = true; } }
//BEGIN class NewProjectDlg NewProjectDlg::NewProjectDlg( QWidget * parent ) : KDialogBase( parent, "newprojectdlg", true, "New Project", KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true ) { m_pWidget = new NewProjectWidget(this); connect( m_pWidget->projectNameEdit, SIGNAL(textChanged(const QString & )), this, SLOT(locationChanged(const QString& )) ); connect( m_pWidget->projectLocationURL, SIGNAL(textChanged(const QString & )), this, SLOT(locationChanged(const QString& )) ); // Check if already valid dir locationChanged( QString::null ); m_pWidget->projectLocationURL->setURL( QDir::homeDirPath() ); m_pWidget->projectLocationURL->setMode( KFile::Directory ); setMainWidget( m_pWidget ); setInitialSize( m_pWidget->rect().size() ); }
FileBrowser::FileBrowser(TUIFileBrowserButton *instance, QWidget *parent, int id) { Q_UNUSED(parent); this->mTUIElement = instance; this->CreateDialogLayout(); connect(lstDir, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(onLstDirDoubleClick(QListWidgetItem *))); connect(lstFile, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(onLstFileDoubleClick(QListWidgetItem *))); connect(lstFile, SIGNAL(itemClicked(QListWidgetItem *)), this, SLOT(onLstFileClick(QListWidgetItem *))); connect(btnCancel, SIGNAL(pressed()), this, SLOT(onCancelPressed())); connect(txtFilename, SIGNAL(textEdited(QString)), this, SLOT(onFilenameChanged(QString))); connect(txtFilename, SIGNAL(returnPressed()), this, SLOT(onAcceptPressed())); connect(this, SIGNAL(fileNameEntered()), this, SLOT(onAcceptPressed())); connect(cmbFilter, SIGNAL(activated(int)), this, SLOT(onFilterActivated(int))); connect(btnHome, SIGNAL(pressed()), this, SLOT(onHomePressed())); connect(btnMachine, SIGNAL(pressed()), this, SLOT(onMachinePressed())); connect(btnRemote, SIGNAL(pressed()), this, SLOT(onRemotePressed())); connect(btnAccessGrid, SIGNAL(pressed()), this, SLOT(onAccessGridPressed())); connect(cmbDirectory, SIGNAL(activated(int)), this, SLOT(onDirActivated(int))); connect(btnDirUp, SIGNAL(pressed()), this, SLOT(onDirUpPressed())); connect(cmbHistory, SIGNAL(activated(int)), this, SLOT(onHistoryActivated(int))); connect(btnAccept, SIGNAL(pressed()), this, SLOT(onAcceptPressed())); connect(this, SIGNAL(requestLists(QString, QString)), this->mTUIElement, SLOT(handleRequestLists(QString, QString))); connect(this, SIGNAL(filterChange(QString)), this->mTUIElement, SLOT(handleFilterUpdate(QString))); connect(this, SIGNAL(dirChange(QString)), this->mTUIElement, SLOT(handleDirChange(QString))); connect(this, SIGNAL(requestClients()), this->mTUIElement, SLOT(handleClientRequest())); connect(this, SIGNAL(locationChanged(QString)), this->mTUIElement, SLOT(handleLocationChange(QString))); connect(this, SIGNAL(requestLocalHome()), this->mTUIElement, SLOT(handleLocalHome())); connect(this, SIGNAL(reqDriveList()), this->mTUIElement, SLOT(handleReqDriveList())); connect(this, SIGNAL(fileSelected(QString, QString, bool)), this->mTUIElement, SLOT(sendSelectedFile(QString, QString, bool))); this->mLocationPath = ""; this->mId = id; this->mFilename = new QStringList(); mRCDialog = new Ui_RemoteClients(); mRCDialog->setupUi(mRCDialog); this->mMode = FileBrowser::OPEN; QObject::connect(this->mRCDialog->buttonBox, SIGNAL(accepted()), this, SLOT(remoteClientsAccept())); QObject::connect(this->mRCDialog->buttonBox, SIGNAL(rejected()), this, SLOT(remoteClientsReject())); QObject::connect(this->mRCDialog->listWidget, SIGNAL(itemClicked(QListWidgetItem *)), this, SLOT(handleItemClicked(QListWidgetItem *))); emit dirChange(this->mLocationPath); // std::string tmp = this->mLocationPath.toStdString(); //std::cerr << "FileBrowser: Path: " << tmp.c_str() << std::endl; }
void NotificationsManager::AddCLEntry (QObject *entryObj) { connect (entryObj, SIGNAL (statusChanged (EntryStatus, QString)), this, SLOT (handleStatusChanged (EntryStatus, QString))); if (qobject_cast<IAdvancedCLEntry*> (entryObj)) { connect (entryObj, SIGNAL (attentionDrawn (const QString&, const QString&)), this, SLOT (handleAttentionDrawn (const QString&, const QString&))); connect (entryObj, SIGNAL (locationChanged (QString)), this, SLOT (handleLocationChanged (QString))); } if (qobject_cast<IHaveContactTune*> (entryObj)) connect (entryObj, SIGNAL (tuneChanged (QString)), this, SLOT (handleTuneChanged (QString))); if (qobject_cast<IHaveContactMood*> (entryObj)) connect (entryObj, SIGNAL (moodChanged (QString)), this, SLOT (handleMoodChanged (QString))); if (qobject_cast<IHaveContactActivity*> (entryObj)) connect (entryObj, SIGNAL (activityChanged (QString)), this, SLOT (handleActivityChanged (QString))); const auto entry = qobject_cast<ICLEntry*> (entryObj); const auto status = entry->GetStatus (); if (status.State_ != SOffline) HandleStatusChanged (entry, status, entry->Variants ().value (0)); }
KoToolDocker::KoToolDocker(QWidget *parent) : QDockWidget(QObject::tr("Tool Options"), parent), d(new Private(this)) { setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea | Qt::TopDockWidgetArea); //KConfigGroup cfg = KGlobal::config()->group("DockWidget sharedtooldocker"); QSettings cfg("QCalligra", QCoreApplication::applicationName()); cfg.beginGroup("DockWidget sharedtooldocker"); d->tabbed = cfg.value("TabbedMode", false).toBool(); cfg.endGroup(); toggleViewAction()->setVisible(false); //should always be visible, so hide option in menu setFeatures(DockWidgetMovable|DockWidgetFloatable); setTitleBarWidget(new KoDockWidgetTitleBar(this)); connect(this, SIGNAL(dockLocationChanged(Qt::DockWidgetArea )), this, SLOT(locationChanged(Qt::DockWidgetArea))); d->housekeeperWidget = new QWidget(); d->housekeeperLayout = new QGridLayout(); d->housekeeperWidget->setLayout(d->housekeeperLayout); d->housekeeperLayout->setSizeConstraint(QLayout::SetMinAndMaxSize); d->hiderWidget = new QWidget(d->housekeeperWidget); d->hiderWidget->setVisible(false); d->scrollArea = new QScrollArea(); d->scrollArea->setWidget(d->housekeeperWidget); d->scrollArea->setFrameShape(QFrame::NoFrame); d->scrollArea->setWidgetResizable(true); d->scrollArea->setFocusPolicy(Qt::NoFocus); setWidget(d->scrollArea); d->tabButton = new QToolButton(this); // parent hack in toggleLock to keep it clickable d->tabButton->setIcon(d->tabIcon); d->tabButton->setToolTip(QObject::tr("Toggles organising the options in tabs or not")); d->tabButton->setAutoRaise(true); connect(d->tabButton, SIGNAL(clicked()), SLOT(toggleTab())); d->tabButton->resize(d->tabButton->sizeHint()); }
int Cmiss_field_cache::setFieldReal(Cmiss_field_id field, int numberOfValues, const double *values) { // to support the xi field which has 3 components regardless of dimensions, do not // check (numberOfValues >= field->number_of_components), just pad with zeros if (!(field && field->isNumerical() && (numberOfValues > 0) && values)) return 0; RealFieldValueCache *valueCache = RealFieldValueCache::cast(field->getValueCache(*this)); for (int i = 0; i < field->number_of_components; i++) { valueCache->values[i] = (i < numberOfValues) ? values[i] : 0.0; } valueCache->derivatives_valid = 0; locationChanged(); valueCache->evaluationCounter = locationCounter; FE_value time = location->get_time(); // still need to create Field_coordinate_location because image processing fields dynamic cast to recognise delete location; location = new Field_coordinate_location(field, numberOfValues, values, time); return 1; }
void Settings::toggleDefaultLocation(bool def) { QSettings info; info.setValue("usedefault", def); if (!def) // we unchecked default.. but we're still technically default return; QString mc; #ifdef Q_OS_MAC mc = QDir::homePath() + QDir::toNativeSeparators("/Library/Application Support/minecraft"); #elif defined Q_OS_WIN32 // pretend to be minecraft QSettings ini(QSettings::IniFormat, QSettings::UserScope, ".minecraft", "minecraft1"); mc = QFileInfo(ini.fileName()).absolutePath(); #else mc = QDir::homePath()+QDir::toNativeSeparators("/.minecraft"); #endif emit locationChanged(mc); }
// Smoothly move the observer to the given location void StelCore::moveObserverTo(const StelLocation& target, double duration, double durationIfPlanetChange) { emit(locationChanged(target)); double d = (getCurrentLocation().planetName==target.planetName) ? duration : durationIfPlanetChange; if (d>0.) { StelLocation curLoc = getCurrentLocation(); if (position->isTraveling()) { // Avoid using a temporary location name to create another temporary one (otherwise it looks like loc1 -> loc2 -> loc3 etc..) curLoc.name = "."; } SpaceShipObserver* newObs = new SpaceShipObserver(curLoc, target, d); delete position; position = newObs; newObs->update(0); } else { delete position; position = new StelObserver(target); } }
//BEGIN class NewProjectDlg NewProjectDlg::NewProjectDlg( QWidget * parent ) : // KDialog( parent, "newprojectdlg", true, "New Project", KDialog::Ok|KDialog::Cancel, KDialog::Ok, true ) KDialog( parent ) //, "newprojectdlg", true, "New Project", KDialog::Ok|KDialog::Cancel, KDialog::Ok, true ) { setObjectName("newprojectdlg"); setModal(true); setCaption(i18n("New Project")); setButtons(KDialog::Ok | KDialog::Cancel); setDefaultButton(KDialog::Ok); showButtonSeparator(true); m_pWidget = new NewProjectWidget(this); connect( m_pWidget->projectNameEdit, SIGNAL(textChanged(const QString & )), this, SLOT(locationChanged(const QString& )) ); connect( m_pWidget->projectLocationURL, SIGNAL(textChanged(const QString & )), this, SLOT(locationChanged(const QString& )) ); // Check if already valid dir locationChanged( QString::null ); m_pWidget->projectLocationURL->setUrl( QDir::homePath() ); m_pWidget->projectLocationURL->setMode( KFile::Directory ); setMainWidget( m_pWidget ); setInitialSize( m_pWidget->rect().size() ); }
void ChooseFolderView::systemDirChosen() { QString musicLocation = QDesktopServices::storageLocation(QDesktopServices::MusicLocation); emit locationChanged(musicLocation); }
void Settings::browseLocation(bool /* on */) { QString dirName = QFileDialog::getExistingDirectory(this, tr("Find Minecraft")); if (!dirName.isEmpty()) emit locationChanged(dirName); }
void QFacebookGraphUser::setLocation(const QVariantMap &location) { if( m_location != location ) { m_location = location; emit locationChanged(); } }
/*! \reimp */ void FacebookUserInterface::emitPropertyChangeSignals(const QVariantMap &oldData, const QVariantMap &newData) { Q_D(FacebookUserInterface); QString nameStr = newData.value(FACEBOOK_ONTOLOGY_USER_NAME).toString(); QString fnStr = newData.value(FACEBOOK_ONTOLOGY_USER_FIRSTNAME).toString(); QString mnStr = newData.value(FACEBOOK_ONTOLOGY_USER_MIDDLENAME).toString(); QString lnStr = newData.value(FACEBOOK_ONTOLOGY_USER_LASTNAME).toString(); QString gnStr = newData.value(FACEBOOK_ONTOLOGY_USER_GENDER).toString(); QString locStr = newData.value(FACEBOOK_ONTOLOGY_USER_LOCALE).toString(); QString linkStr = newData.value(FACEBOOK_ONTOLOGY_USER_LINK).toString(); QString unStr = newData.value(FACEBOOK_ONTOLOGY_USER_USERNAME).toString(); QString tpiStr = newData.value(FACEBOOK_ONTOLOGY_USER_THIRDPARTYIDENTIFIER).toString(); QString insStr = newData.value(FACEBOOK_ONTOLOGY_USER_INSTALLED).toString(); QString tzoStr = newData.value(FACEBOOK_ONTOLOGY_USER_TIMEZONEOFFSET).toString(); QString verStr = newData.value(FACEBOOK_ONTOLOGY_USER_VERIFIED).toString(); QString udtStr = newData.value(FACEBOOK_ONTOLOGY_USER_UPDATEDTIME).toString(); QString bioStr = newData.value(FACEBOOK_ONTOLOGY_USER_BIO).toString(); QString bdayStr = newData.value(FACEBOOK_ONTOLOGY_USER_BIRTHDAY).toString(); QString emailStr = newData.value(FACEBOOK_ONTOLOGY_USER_EMAIL).toString(); QStringList iinStr = newData.value(FACEBOOK_ONTOLOGY_USER_INTERESTEDIN).toStringList(); QString polStr = newData.value(FACEBOOK_ONTOLOGY_USER_POLITICAL).toString(); QString quoStr = newData.value(FACEBOOK_ONTOLOGY_USER_QUOTES).toString(); QString rssStr = newData.value(FACEBOOK_ONTOLOGY_USER_RELATIONSHIPSTATUS).toString(); QString relStr = newData.value(FACEBOOK_ONTOLOGY_USER_RELIGION).toString(); QString webStr = newData.value(FACEBOOK_ONTOLOGY_USER_WEBSITE).toString(); QVariantMap htMap = newData.value(FACEBOOK_ONTOLOGY_USER_HOMETOWN).toMap(); QVariantMap locMap = newData.value(FACEBOOK_ONTOLOGY_USER_LOCATION).toMap(); QVariantMap picMap = newData.value(FACEBOOK_ONTOLOGY_USER_PICTURE).toMap(); QVariantMap sigMap = newData.value(FACEBOOK_ONTOLOGY_USER_SIGNIFICANTOTHER).toMap(); QString oldNameStr = oldData.value(FACEBOOK_ONTOLOGY_USER_NAME).toString(); QString oldFnStr = oldData.value(FACEBOOK_ONTOLOGY_USER_FIRSTNAME).toString(); QString oldMnStr = oldData.value(FACEBOOK_ONTOLOGY_USER_MIDDLENAME).toString(); QString oldLnStr = oldData.value(FACEBOOK_ONTOLOGY_USER_LASTNAME).toString(); QString oldGnStr = oldData.value(FACEBOOK_ONTOLOGY_USER_GENDER).toString(); QString oldLocStr = oldData.value(FACEBOOK_ONTOLOGY_USER_LOCALE).toString(); QString oldLinkStr = oldData.value(FACEBOOK_ONTOLOGY_USER_LINK).toString(); QString oldUnStr = oldData.value(FACEBOOK_ONTOLOGY_USER_USERNAME).toString(); QString oldTpiStr = oldData.value(FACEBOOK_ONTOLOGY_USER_THIRDPARTYIDENTIFIER).toString(); QString oldInsStr = oldData.value(FACEBOOK_ONTOLOGY_USER_INSTALLED).toString(); QString oldTzoStr = newData.value(FACEBOOK_ONTOLOGY_USER_TIMEZONEOFFSET).toString(); QString oldVerStr = newData.value(FACEBOOK_ONTOLOGY_USER_VERIFIED).toString(); QString oldUdtStr = newData.value(FACEBOOK_ONTOLOGY_USER_UPDATEDTIME).toString(); QString oldBioStr = oldData.value(FACEBOOK_ONTOLOGY_USER_BIO).toString(); QString oldBdayStr = oldData.value(FACEBOOK_ONTOLOGY_USER_BIRTHDAY).toString(); QString oldEmailStr = oldData.value(FACEBOOK_ONTOLOGY_USER_EMAIL).toString(); QStringList oldIinStr = oldData.value(FACEBOOK_ONTOLOGY_USER_INTERESTEDIN).toStringList(); QString oldPolStr = oldData.value(FACEBOOK_ONTOLOGY_USER_POLITICAL).toString(); QString oldQuoStr = oldData.value(FACEBOOK_ONTOLOGY_USER_QUOTES).toString(); QString oldRssStr = oldData.value(FACEBOOK_ONTOLOGY_USER_RELATIONSHIPSTATUS).toString(); QString oldRelStr = oldData.value(FACEBOOK_ONTOLOGY_USER_RELIGION).toString(); QString oldWebStr = oldData.value(FACEBOOK_ONTOLOGY_USER_WEBSITE).toString(); QVariantMap oldHtMap = oldData.value(FACEBOOK_ONTOLOGY_USER_HOMETOWN).toMap(); QVariantMap oldLocMap = oldData.value(FACEBOOK_ONTOLOGY_USER_LOCATION).toMap(); QVariantMap oldPicMap = oldData.value(FACEBOOK_ONTOLOGY_USER_PICTURE).toMap(); QVariantMap oldSigMap = oldData.value(FACEBOOK_ONTOLOGY_USER_SIGNIFICANTOTHER).toMap(); // standard properties if (nameStr != oldNameStr) emit nameChanged(); if (fnStr != oldFnStr) emit firstNameChanged(); if (mnStr != oldMnStr) emit middleNameChanged(); if (lnStr != oldLnStr) emit lastNameChanged(); if (gnStr != oldGnStr) emit genderChanged(); if (locStr != oldLocStr) emit locationChanged(); if (linkStr != oldLinkStr) emit linkChanged(); if (unStr != oldUnStr) emit userNameChanged(); if (tpiStr != oldTpiStr) emit thirdPartyIdentifierChanged(); if (insStr != oldInsStr) emit installedChanged(); if (tzoStr != oldTzoStr) emit timezoneOffsetChanged(); if (verStr != oldVerStr) emit verifiedChanged(); if (udtStr != oldUdtStr) emit updatedTimeChanged(); if (bioStr != oldBioStr) emit bioChanged(); if (bdayStr != oldBdayStr) emit birthdayChanged(); if (emailStr != oldEmailStr) emit emailChanged(); if (iinStr != oldIinStr) emit interestedInChanged(); if (polStr != oldPolStr) emit politicalChanged(); if (quoStr != oldQuoStr) emit quotesChanged(); if (rssStr != oldRssStr) emit relationshipStatusChanged(); if (relStr != oldRelStr) emit religionChanged(); if (webStr != oldWebStr) emit websiteChanged(); // variantmap / object reference properties if (htMap != oldHtMap) { QVariantMap newHtData; newHtData.insert(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTTYPE, FacebookInterface::Location); newHtData.insert(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTIDENTIFIER, newHtData.value(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTIDENTIFIER)); newHtData.insert(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTNAME, newHtData.value(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTNAME)); qobject_cast<FacebookInterface*>(socialNetwork())->setFacebookContentItemData(d->hometown, newHtData); emit hometownChanged(); } if (locMap != oldLocMap) { QVariantMap newLocData; newLocData.insert(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTTYPE, FacebookInterface::Location); newLocData.insert(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTIDENTIFIER, newLocData.value(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTIDENTIFIER)); newLocData.insert(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTNAME, newLocData.value(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTNAME)); qobject_cast<FacebookInterface*>(socialNetwork())->setFacebookContentItemData(d->location, newLocData); emit locationChanged(); } if (picMap != oldPicMap) { qobject_cast<FacebookInterface*>(socialNetwork())->setFacebookContentItemData(d->picture, picMap); emit pictureChanged(); } if (sigMap != oldSigMap) { QVariantMap newSigData; newSigData.insert(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTTYPE, FacebookInterface::User); newSigData.insert(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTIDENTIFIER, newSigData.value(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTIDENTIFIER)); newSigData.insert(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTNAME, newSigData.value(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTNAME)); qobject_cast<FacebookInterface*>(socialNetwork())->setFacebookContentItemData(d->significantOther, newSigData); emit significantOtherChanged(); } // call the super class implementation QVariantMap oldDataWithId = oldData; oldDataWithId.insert(NEMOQMLPLUGINS_SOCIAL_CONTENTITEMID, oldData.value(FACEBOOK_ONTOLOGY_USER_ID)); QVariantMap newDataWithId = newData; newDataWithId.insert(NEMOQMLPLUGINS_SOCIAL_CONTENTITEMID, newData.value(FACEBOOK_ONTOLOGY_USER_ID)); IdentifiableContentItemInterface::emitPropertyChangeSignals(oldDataWithId, newDataWithId); }
RKSettingsModuleOutput::RKSettingsModuleOutput (RKSettings *gui, QWidget *parent) : RKSettingsModule(gui, parent) { RK_TRACE (SETTINGS); QVBoxLayout *main_vbox = new QVBoxLayout (this); QGroupBox *group = new QGroupBox (i18n ("Output Window options"), this); QVBoxLayout* group_layout = new QVBoxLayout (group); group_layout->addWidget (auto_show_box = new QCheckBox (i18n ("show window on new output"), group)); auto_show_box->setChecked (auto_show); connect (auto_show_box, SIGNAL (stateChanged(int)), this, SLOT (boxChanged())); group_layout->addWidget (auto_raise_box = new QCheckBox (i18n ("raise window on new output"), group)); auto_raise_box->setChecked (auto_raise); auto_raise_box->setEnabled (auto_show); connect (auto_raise_box, SIGNAL (stateChanged(int)), this, SLOT (boxChanged())); main_vbox->addWidget (group); custom_css_file_box = new GetFileNameWidget (this, GetFileNameWidget::ExistingFile, true, i18n ("CSS file to use for output (leave empty for default)"), i18n ("Select CSS file"), custom_css_file); connect (custom_css_file_box, SIGNAL (locationChanged()), this, SLOT (boxChanged())); // KF5 TODO new syntax RKCommonFunctions::setTips (i18n ("Select a CSS file for custom formatting of the output window. Leave empty to use the default CSS file shipped with RKWard. Note that this setting takes effect, when initializing an output file (e.g. after flushing the output), only."), custom_css_file_box); main_vbox->addWidget (custom_css_file_box); group = new QGroupBox (i18n ("Graphics"), this); group_layout = new QVBoxLayout (group); QHBoxLayout *h_layout = new QHBoxLayout (); group_layout->addLayout (h_layout); h_layout->addWidget (new QLabel (i18n ("File format"), group)); h_layout->addWidget (graphics_type_box = new QComboBox (group)); graphics_type_box->addItem (i18n ("<Default>"), QString ("NULL")); graphics_type_box->addItem (i18n ("PNG"), QString ("\"PNG\"")); graphics_type_box->addItem (i18n ("SVG"), QString ("\"SVG\"")); graphics_type_box->addItem (i18n ("JPG"), QString ("\"JPG\"")); graphics_type_box->setCurrentIndex (graphics_type_box->findData (graphics_type)); graphics_type_box->setEditable (false); connect (graphics_type_box, SIGNAL (currentIndexChanged(int)), this, SLOT (boxChanged())); h_layout->addSpacing (2*RKGlobals::spacingHint ()); h_layout->addWidget (new QLabel (i18n ("JPG quality"), group)); h_layout->addWidget (graphics_jpg_quality_box = new KIntSpinBox (1, 100, 1, graphics_jpg_quality, group)); graphics_jpg_quality_box->setEnabled (graphics_type == "\"JPG\""); connect (graphics_jpg_quality_box, SIGNAL (valueChanged(int)), this, SLOT (boxChanged())); h_layout->addStretch (); h_layout = new QHBoxLayout (); group_layout->addLayout (h_layout); h_layout->addWidget (new QLabel (i18n ("Width:"), group)); h_layout->addWidget (graphics_width_box = new KIntSpinBox (1, INT_MAX, 1, graphics_width, group)); h_layout->addSpacing (2*RKGlobals::spacingHint ()); h_layout->addWidget (new QLabel (i18n ("Height:"), group)); h_layout->addWidget (graphics_height_box = new KIntSpinBox (1, INT_MAX, 1, graphics_height, group)); h_layout->addStretch (); connect (graphics_width_box, SIGNAL (valueChanged(int)), this, SLOT (boxChanged())); connect (graphics_height_box, SIGNAL (valueChanged(int)), this, SLOT (boxChanged())); main_vbox->addWidget (group); cc_settings = new RKCarbonCopySettings (this); connect (cc_settings, SIGNAL (changed()), this, SLOT (boxChanged())); main_vbox->addWidget (cc_settings); main_vbox->addStretch (); }
void ChooseFolderView::iTunesDirChosen() { QString musicLocation = QDesktopServices::storageLocation(QDesktopServices::MusicLocation) + "/iTunes/iTunes Music"; emit locationChanged(musicLocation); }