EffectsListView::EffectsListView(QWidget *parent) : QWidget(parent) { m_ui.setupUi(this); QMenu *menu = new QMenu(this); m_effectsList = new EffectsListWidget(menu); QVBoxLayout *lyr = new QVBoxLayout(m_ui.effectlistframe); lyr->addWidget(m_effectsList); lyr->setContentsMargins(0, 0, 0, 0); m_ui.search_effect->setListWidget(m_effectsList); m_ui.buttonInfo->setIcon(KIcon("help-about")); if (KdenliveSettings::showeffectinfo()) { m_ui.buttonInfo->setDown(true); } else m_ui.infopanel->hide(); menu->addAction(KIcon("edit-delete"), i18n("Delete effect"), this, SLOT(slotRemoveEffect())); connect(m_ui.type_combo, SIGNAL(currentIndexChanged(int)), this, SLOT(filterList(int))); connect(m_ui.buttonInfo, SIGNAL(clicked()), this, SLOT(showInfoPanel())); connect(m_effectsList, SIGNAL(itemSelectionChanged()), this, SLOT(slotUpdateInfo())); connect(m_effectsList, SIGNAL(doubleClicked(QListWidgetItem *, const QPoint &)), this, SLOT(slotEffectSelected())); m_effectsList->setCurrentRow(0); }
void GeneralSettings::slotUpdateInfo() { if (OCUpdater *updater = dynamic_cast<OCUpdater*>(Updater::instance())) { connect(updater, SIGNAL(downloadStateChanged()), SLOT(slotUpdateInfo()), Qt::UniqueConnection); connect(_ui->restartButton, SIGNAL(clicked()), updater, SLOT(slotStartInstaller()), Qt::UniqueConnection); connect(_ui->restartButton, SIGNAL(clicked()), qApp, SLOT(quit()), Qt::UniqueConnection); _ui->updateStateLabel->setText(updater->statusString()); _ui->restartButton->setVisible(updater->downloadState() == OCUpdater::DownloadComplete); } else { // can't have those infos from sparkle currently _ui->updatesGroupBox->setVisible(false); } }
GeneralSettings::GeneralSettings(QWidget *parent) : QWidget(parent), _ui(new Ui::GeneralSettings) { _ui->setupUi(this); connect(_ui->desktopNotificationsCheckBox, SIGNAL(toggled(bool)), SLOT(slotToggleOptionalDesktopNotifications(bool))); _ui->autostartCheckBox->setChecked(Utility::hasLaunchOnStartup(Theme::instance()->appName())); connect(_ui->autostartCheckBox, SIGNAL(toggled(bool)), SLOT(slotToggleLaunchOnStartup(bool))); // setup about section QString about = Theme::instance()->about(); if (about.isEmpty()) { _ui->aboutGroupBox->hide(); } else { _ui->aboutLabel->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextBrowserInteraction); _ui->aboutLabel->setText(about); _ui->aboutLabel->setWordWrap(true); _ui->aboutLabel->setOpenExternalLinks(true); } loadMiscSettings(); slotUpdateInfo(); // misc connect(_ui->monoIconsCheckBox, SIGNAL(toggled(bool)), SLOT(saveMiscSettings())); connect(_ui->crashreporterCheckBox, SIGNAL(toggled(bool)), SLOT(saveMiscSettings())); connect(_ui->newFolderLimitCheckBox, SIGNAL(toggled(bool)), SLOT(saveMiscSettings())); connect(_ui->newFolderLimitSpinBox, SIGNAL(valueChanged(int)), SLOT(saveMiscSettings())); #ifndef WITH_CRASHREPORTER _ui->crashreporterCheckBox->setVisible(false); #endif /* Set the left contents margin of the layout to zero to make the checkboxes * align properly vertically , fixes bug #3758 */ int m0, m1, m2, m3; _ui->horizontalLayout_3->getContentsMargins( &m0, &m1, &m2, &m3 ); _ui->horizontalLayout_3->setContentsMargins(0, m1, m2, m3 ); // OEM themes are not obliged to ship mono icons, so there // is no point in offering an option QString themeDir = QString::fromLatin1(":/client/theme/%1/") .arg(Theme::instance()->systrayIconFlavor(true)); _ui->monoIconsCheckBox->setVisible(QDir(themeDir).exists()); connect(_ui->ignoredFilesButton, SIGNAL(clicked()), SLOT(slotIgnoreFilesEditor())); }
GeneralSettings::GeneralSettings(QWidget *parent) : QWidget(parent), _ui(new Ui::GeneralSettings) { _ui->setupUi(this); connect(_ui->desktopNotificationsCheckBox, SIGNAL(toggled(bool)), SLOT(slotToggleOptionalDesktopNotifications(bool))); _ui->autostartCheckBox->setChecked(Utility::hasLaunchOnStartup(Theme::instance()->appName())); connect(_ui->autostartCheckBox, SIGNAL(toggled(bool)), SLOT(slotToggleLaunchOnStartup(bool))); // setup about section QString about = Theme::instance()->about(); if (about.isEmpty()) { _ui->aboutGroupBox->hide(); } else { _ui->aboutLabel->setText(about); _ui->aboutLabel->setWordWrap(true); _ui->aboutLabel->setOpenExternalLinks(true); } loadMiscSettings(); slotUpdateInfo(); // misc connect(_ui->monoIconsCheckBox, SIGNAL(toggled(bool)), SLOT(saveMiscSettings())); connect(_ui->crashreporterCheckBox, SIGNAL(toggled(bool)), SLOT(saveMiscSettings())); connect(_ui->newFolderLimitCheckBox, SIGNAL(toggled(bool)), SLOT(saveMiscSettings())); connect(_ui->newFolderLimitSpinBox, SIGNAL(valueChanged(int)), SLOT(saveMiscSettings())); #ifndef WITH_CRASHREPORTER _ui->crashreporterCheckBox->setVisible(false); #endif // OEM themes are not obliged to ship mono icons, so there // is no point in offering an option QString themeDir = QString::fromLatin1(":/client/theme/%1/") .arg(Theme::instance()->systrayIconFlavor(true)); _ui->monoIconsCheckBox->setVisible(QDir(themeDir).exists()); connect(_ui->ignoredFilesButton, SIGNAL(clicked()), SLOT(slotIgnoreFilesEditor())); connect(_ui->addAccountButton, SIGNAL(clicked()), SLOT(slotOpenAccountWizard())); }