Beispiel #1
0
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());
}
Beispiel #2
0
void SWDialog::savePrefs()
{
	cfg->action = actionSelected();
	cfg->useStyle = styleCheckBox->isChecked();
	cfg->currentLanguage = languageComboBox->currentIndex();
	cfg->saveConfig();
}
Beispiel #3
0
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);
}
Beispiel #4
0
//*****************************************************************************
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);
}
Beispiel #6
0
 /**
   * Appelé à l'appui sur le bouton d'action
   */
 void ActionToolBar::actionButtonSelected()
 {
     emit actionSelected();
 }