コード例 #1
0
ファイル: vvimindicator.cpp プロジェクト: liunianbanbo/vnote
VVimCmdLineEdit::VVimCmdLineEdit(QWidget *p_parent)
    : VLineEdit(p_parent), m_type(VVim::CommandLineType::Invalid),
      m_registerPending(false), m_enableInputMethod(true)
{
    // When user delete all the text, cancel command input.
    connect(this, &VVimCmdLineEdit::textChanged,
            this, [this](const QString &p_text){
                if (p_text.isEmpty()) {
                    emit commandCancelled();
                } else {
                    emit commandChanged(m_type, p_text.right(p_text.size() - 1));
                }
            });

    connect(this, &VVimCmdLineEdit::textEdited,
            this, [this](const QString &p_text){
                if (p_text.size() < 2) {
                    m_userLastInput.clear();
                } else {
                    m_userLastInput = p_text.right(p_text.size() - 1);
                }
            });

    m_originStyleSheet = styleSheet();
}
コード例 #2
0
ファイル: testitem.cpp プロジェクト: Roadmaster/checkbox
void TestItem::setCommand(const QString &command){
    if (command.compare(command) != 0 ) {
        m_command = command;
        emit commandChanged();
        emit dataChanged();
    }
}
コード例 #3
0
ファイル: kciview.cpp プロジェクト: hgrecco/KateCodeinfo
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());
}
コード例 #4
0
void SkCanvasWidget::drawTo(int index) {
    fDebugger->setIndex(index);
    fRasterWidget.draw();
#if SK_SUPPORT_GPU
    fGLWidget.draw();
#endif
    emit commandChanged(fDebugger->index());
}
コード例 #5
0
ファイル: ktimer.cpp プロジェクト: KDE/ktimer
void KTimerJob::setCommand( const QString &cmd )
{
    if( d->command!=cmd ) {
        d->command = cmd;
        emit commandChanged( this, cmd );
        emit changed( this );
    }
}
コード例 #6
0
ファイル: Shell.cpp プロジェクト: chsterz/performance-tools
void Shell::setCommand(QString command)
{
	if (m_command == command)
		return;

	m_command = command;
	emit commandChanged(command);
}
コード例 #7
0
void AsemanAutoStartManager::setCommand(const QString &cmd)
{
    if(p->command == cmd)
        return;

    p->command = cmd;
    Q_EMIT commandChanged();

    save();
}
コード例 #8
0
ファイル: SkCanvasWidget.cpp プロジェクト: bunhere/skia
void SkCanvasWidget::drawTo(int index) {
    fDebugger->setIndex(index);
    fRasterWidget.draw();
    fGLWidget.draw();
    emit commandChanged(fDebugger->index());
}