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(); }
void TestItem::setCommand(const QString &command){ if (command.compare(command) != 0 ) { m_command = command; emit commandChanged(); emit dataChanged(); } }
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 SkCanvasWidget::drawTo(int index) { fDebugger->setIndex(index); fRasterWidget.draw(); #if SK_SUPPORT_GPU fGLWidget.draw(); #endif emit commandChanged(fDebugger->index()); }
void KTimerJob::setCommand( const QString &cmd ) { if( d->command!=cmd ) { d->command = cmd; emit commandChanged( this, cmd ); emit changed( this ); } }
void Shell::setCommand(QString command) { if (m_command == command) return; m_command = command; emit commandChanged(command); }
void AsemanAutoStartManager::setCommand(const QString &cmd) { if(p->command == cmd) return; p->command = cmd; Q_EMIT commandChanged(); save(); }
void SkCanvasWidget::drawTo(int index) { fDebugger->setIndex(index); fRasterWidget.draw(); fGLWidget.draw(); emit commandChanged(fDebugger->index()); }