LicensePropsPlugin::LicensePropsPlugin(KPropertiesDialog *_props, const QStringList &) : KPropertiesDialogPlugin(_props) { m_vBox = new KVBox(); m_widget = new QWidget( m_vBox ); QVBoxLayout * vbox = new QVBoxLayout( m_widget ); QWidget *main = new QWidget(m_widget); vbox->addWidget( main ); licenseChooser = new LicenseChooser(main); connect( licenseChooser, SIGNAL(licenseChanged()), this, SLOT(setDirty()) ); m_widget->show(); // In case the dialog was shown already. if ( properties->items().count() == 1 ) { KFileItem *item = properties->item(); if (item->url().isLocalFile()) { _props->addPage( m_vBox, i18n("&License") ); QByteArray ba = item->localPath().toUtf8(); char *license = ll_read(ba.data()); if (license) { licenseChooser->setLicenseURI(QString::fromUtf8(license)); } else { ll_uri_t uri = ll_get_default(); licenseChooser->setLicenseURI(QString::fromUtf8(uri),false); free(uri); } } } }
void LnfLogic::setLicense(const QString &license) { if (LnfLogic::license() == license) { return; } m_tempMetadata[QStringLiteral("X-KDE-PluginInfo-License")] = license; m_needsSave = true; emit needsSaveChanged(); emit licenseChanged(); }
KCMLiblicense::KCMLiblicense(QWidget *parent, const QStringList &) : KCModule(LibLicenseFactory::componentData(), parent/*, name*/) { KAboutData * about = new KAboutData("kcmliblicense", "liblicense", ki18n("Default Content License"), "0.4", ki18n("Default Content License Control Panel Module"), KAboutData::License_LGPL_V2, ki18n("(c) 2007 Jason Kivlighn")); about->addAuthor(ki18n("Jason Kivlighn"), KLocalizedString(), "*****@*****.**"); setAboutData( about ); licenseChooser = new LicenseChooser(this); connect( licenseChooser, SIGNAL(licenseChanged()), this, SLOT(changed()) ); load(); }
void LnfLogic::setTheme(const QString& theme) { if (theme == m_themeName) { return; } m_tempMetadata.clear(); m_themeName = theme; m_package.setPath(theme); m_needsSave = false; emit needsSaveChanged(); emit themeChanged(); emit nameChanged(); emit commentChanged(); emit authorChanged(); emit emailChanged(); emit versionChanged(); emit websiteChanged(); emit licenseChanged(); }
Target * Participant::addTarget() { Target *target = new Target(tr("Hydrogen"), this); connect(target, SIGNAL(authorChanged(QString)), context, SLOT(setSessionModified())); connect(target, SIGNAL(infoChanged(QString)), context, SLOT(setSessionModified())); connect(target, SIGNAL(kitNameChanged(QString)), context, SLOT(setSessionModified())); connect(target, SIGNAL(layerAlgorithmChanged(LayerAlgorithm)), context, SLOT(setSessionModified())); connect(target, SIGNAL(licenseChanged(QString)), context, SLOT(setSessionModified())); connect(target, SIGNAL(nameChanged(QString)), context, SLOT(setSessionModified())); connect(target, SIGNAL(pathChanged(QString)), context, SLOT(setSessionModified())); connect(target, SIGNAL(sampleFormatChanged(SampleFormat)), context, SLOT(setSessionModified())); synthclone::MenuAction *action = new synthclone::MenuAction(tr("Configure"), target); connect(action, SIGNAL(triggered()), SLOT(handleTargetConfiguration())); const synthclone::Registration &targetRegistration = context->addTarget(target); connect(&targetRegistration, SIGNAL(unregistered(QObject *)), SLOT(handleUnregistration(QObject *))); const synthclone::Registration &actionRegistration = context->addMenuAction(action, target); connect(&actionRegistration, SIGNAL(unregistered(QObject *)), SLOT(handleUnregistration(QObject *))); return target; }