Exemplo n.º 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());
}
Exemplo n.º 2
0
void SWDialog::savePrefs()
{
	cfg->action = actionSelected();
	cfg->useStyle = styleCheckBox->isChecked();
	cfg->currentLanguage = languageComboBox->currentIndex();
	cfg->saveConfig();
}
Exemplo n.º 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);
}
Exemplo n.º 4
0
//*****************************************************************************
void Kwave::MenuItem::actionTriggered(bool checked)
{
    Q_UNUSED(checked);
    actionSelected();
}
Exemplo n.º 5
0
void ShortcutTree::onCurrentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous)
{
	ShortcutItem *item = dynamic_cast<ShortcutItem *>(current);
	emit actionSelected(item ? item->getAction() : 0);
}
Exemplo n.º 6
0
 /**
   * Appelé à l'appui sur le bouton d'action
   */
 void ActionToolBar::actionButtonSelected()
 {
     emit actionSelected();
 }