View::View(Kate::MainWindow *mainWindow) : Kate::PluginView(mainWindow) , mw(mainWindow) { toolView = mainWindow->createToolView("KatecodeinfoPlugin", Kate::MainWindow::Bottom, SmallIcon("msg_info"), i18n("Codeinfo")); QWidget* w = new QWidget(toolView); setupUi(w); config(); w->show(); btnConfig->setIcon(KIcon("configure")); m_nregex = NamedRegExp(); updateCmbActions(); updateGlobal(); connect(btnFile, SIGNAL(clicked()), this, SLOT(loadFile())); connect(btnClipboard, SIGNAL(clicked()), this, SLOT(loadClipboard())); connect(btnRun, SIGNAL(clicked()), this, SLOT(run())); connect(btnConfig, SIGNAL(clicked()), this, SLOT(config())); connect(btnSave, SIGNAL(clicked()), this, SLOT(save())); connect(btnRevert, SIGNAL(clicked()), this, SLOT(revert())); connect(lstCodeinfo, SIGNAL(itemClicked(QTreeWidgetItem*, int)), this, SLOT(infoSelected(QTreeWidgetItem*, int))); connect(cmbActions, SIGNAL(currentIndexChanged(const QString &)), this, SLOT(actionSelected(const QString &))); connect(txtRegex, SIGNAL(textChanged(QString)), this, SLOT(regexChanged(QString))); connect(txtCommand, SIGNAL(textChanged(QString)), this, SLOT(commandChanged(QString))); actionSelected(cmbActions->currentText()); }
void SWDialog::savePrefs() { cfg->action = actionSelected(); cfg->useStyle = styleCheckBox->isChecked(); cfg->currentLanguage = languageComboBox->currentIndex(); cfg->saveConfig(); }
void View::updateCmbActions() { cmbActions->blockSignals(true); cmbActions->clear(); foreach(QString key, Store::actionNames()) { if (Store::readAction(key).enabled) { cmbActions->addItem(key); } } cmbActions->setCurrentIndex(0); actionSelected(cmbActions->currentText()); cmbActions->blockSignals(false); }
//***************************************************************************** void Kwave::MenuItem::actionTriggered(bool checked) { Q_UNUSED(checked); actionSelected(); }
void ShortcutTree::onCurrentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous) { ShortcutItem *item = dynamic_cast<ShortcutItem *>(current); emit actionSelected(item ? item->getAction() : 0); }
/** * Appelé à l'appui sur le bouton d'action */ void ActionToolBar::actionButtonSelected() { emit actionSelected(); }