SourceSelectorWidget::SourceSelectorWidget(QLineEdit* edit, QWidget* parent) :StylableWidget(parent) { QGridLayout* grid = new QGridLayout(this); m_edit = edit; m_edit->setParent(this); grid->setContentsMargins( 0, 0, 0, 0 ); grid->addWidget(m_edit, 0, 0); m_button = new QPushButton(tr("Add")); grid->addWidget(m_button, 0, 1); grid->setColumnStretch(0, 3); onTextChanged(m_edit->text()); m_list = new QListWidget(); m_list->setIconSize(QSize(0,0)); grid->addWidget(m_list, 1, 0, 1, 2); connect(m_edit, SIGNAL(returnPressed()), SLOT(emitAdd())); connect(m_edit, SIGNAL(textChanged(QString)), SLOT(onTextChanged(QString))); connect(m_button, SIGNAL(clicked()), SLOT(emitAdd())); connect(m_list, SIGNAL(itemActivated(QListWidgetItem *)), SIGNAL(itemActivated(QListWidgetItem *))); }
PreferencesDialog::PreferencesDialog(QWidget *parent) : QDialog(parent), m_ui(new Ui::PreferencesDialog) { m_ui->setupUi(this); // Key Settings m_ui->ngIDLineEdit->setValidator(new HexValidator(this)); m_ui->ngKeyIDLineEdit->setValidator(new HexValidator(this)); m_ui->ngSigPt1LineEdit->setValidator(new HexValidator(this)); m_ui->ngSigPt2LineEdit->setValidator(new HexValidator(this)); m_ui->ngPrivLineEdit->setValidator(new HexValidator(this)); m_ui->macAddrLineEdit->setValidator(new HexValidator(this)); connect(m_ui->ngSigPt1LineEdit, SIGNAL(textChanged(QString)), this, SLOT(onTextChanged(QString))); connect(m_ui->ngSigPt2LineEdit, SIGNAL(textChanged(QString)), this, SLOT(onTextChanged(QString))); connect(m_ui->loadKeysBtn, SIGNAL(clicked()), this, SLOT(onLoadKeys())); // Region Settings SettingsManager* settings = SettingsManager::instance(); switch(settings->defaultRegion()) { case SettingsManager::NTSCU: m_ui->ntscURB->setChecked(true); break; case SettingsManager::NTSCJ: m_ui->ntscJRB->setChecked(true); break; case SettingsManager::PAL: m_ui->palRB ->setChecked(true); break; } m_ui->ntscUNameLE->setText(settings->defaultPlayerNameForRegion(SettingsManager::NTSCU)); m_ui->ntscJNameLE->setText(settings->defaultPlayerNameForRegion(SettingsManager::NTSCJ)); m_ui->palNameLE ->setText(settings->defaultPlayerNameForRegion(SettingsManager::PAL )); }
void OneLineTextEdit::keyPressEvent (QKeyEvent *e) { if ((e->key () == Qt::Key_Enter) || (e->key () == Qt::Key_Return)){ emit onTextChanged(); emit onTextChanged(this->toPlainText()); e->ignore (); }else{ QPlainTextEdit::keyPressEvent (e); } }
LabeledPlainTextEdit::LabeledPlainTextEdit(QWidget *parent) : QPlainTextEdit(parent), m_label("Input text...") { //showLabel(); connect(this, SIGNAL(textChanged()), SLOT(onTextChanged())); }
void Editbox::eraseSelectedText(bool modify_text) { if (getSelectionLength() != 0) { // setup new caret position and remove selection highlight. setCaretIndex(d_selectionStart); clearSelection(); // erase the selected characters (if required) if (modify_text) { String newText = getText(); UndoHandler::UndoAction undo; undo.d_type = UndoHandler::UAT_DELETE; undo.d_startIdx = getSelectionStart(); undo.d_text = newText.substr(getSelectionStart(), getSelectionLength()); d_undoHandler->addUndoHistory(undo); newText.erase(getSelectionStart(), getSelectionLength()); setText(newText); // trigger notification that text has changed. WindowEventArgs args(this); onTextChanged(args); } } }
LookupInfoDialog::LookupInfoDialog(AddressTableModel *addressModelIn, QWidget *parent) : QDialog(parent), ui(new Ui::LookupInfoDialog), model(0), proxyModel(0), address(""), addressModel(addressModelIn) { ui->setupUi(this); GUIUtil::setupAddressWidget(ui->addressEdit, this); setWindowTitle(tr("Lookup Address Info")); ui->addressEdit->setEnabled(true); ui->tableView->setContextMenuPolicy(Qt::CustomContextMenu); // Context menu actions QAction *copyValueAction = new QAction(tr("Copy Value"), this); QAction *copyDateAction = new QAction(tr("Copy Date"), this); QAction *copyKeyAction = new QAction(tr("Copy Key"), this); contextMenu = new QMenu(); contextMenu->addAction(copyValueAction); contextMenu->addAction(copyDateAction); contextMenu->addAction(copyKeyAction); connect(copyValueAction, SIGNAL(triggered()), this, SLOT(onCopyValueAction())); connect(copyDateAction, SIGNAL(triggered()), this, SLOT(onCopyDateAction())); connect(copyKeyAction, SIGNAL(triggered()), this, SLOT(onCopyKeyAction())); connect(ui->tableView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextualMenu(QPoint))); connect(ui->addressEdit, SIGNAL(textChanged(QString)), this, SLOT(onTextChanged(QString))); }
/* ** Configure QsciScintilla query widget */ void ScriptWidget::_configureQueryText() { QsciLexerJavaScript *javaScriptLexer = new JSLexer(this); javaScriptLexer->setFont(_textFont); _queryText->setFixedHeight(23); _queryText->setAutoIndent(true); _queryText->setIndentationsUseTabs(false); _queryText->setIndentationWidth(4); _queryText->setUtf8(true); _queryText->installEventFilter(this); _queryText->setMarginWidth(1, 0); // to hide left gray column _queryText->setBraceMatching(QsciScintilla::StrictBraceMatch); _queryText->setFont(_textFont); _queryText->setPaper(QColor(255, 0, 0, 127)); _queryText->setLexer(javaScriptLexer); _queryText->setCaretForegroundColor(QColor("#FFFFFF")); _queryText->setMatchedBraceBackgroundColor(QColor(73, 76, 78)); _queryText->setMatchedBraceForegroundColor(QColor("#FF8861")); //1AB0A6 _queryText->setWrapMode((QsciScintilla::WrapMode)QsciScintilla::SC_WRAP_NONE); _queryText->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); _queryText->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); //_queryText->SendScintilla(QsciScintilla::SCI_SETFONTQUALITY, QsciScintilla::SC_EFF_QUALITY_LCD_OPTIMIZED); //_queryText->SendScintilla (QsciScintillaBase::SCI_SETKEYWORDS, "db"); _queryText->setStyleSheet("QFrame { background-color: rgb(73, 76, 78); border: 1px solid #c7c5c4; border-radius: 4px; margin: 0px; padding: 0px;}"); connect(_queryText, SIGNAL(linesChanged()), SLOT(ui_queryLinesCountChanged())); connect(_queryText, SIGNAL(textChanged()), SLOT(onTextChanged())); connect(_queryText, SIGNAL(cursorPositionChanged(int,int)), SLOT(onCursorPositionChanged(int,int))); }
LineEdit::LineEdit(QWidget* parent) : QLineEdit(parent), hasButton_(false), button_(new QToolButton(this)), buttonStyle_(kNormal), isAutoClearMode_(false), prefixColor_(qApp->palette().text().color()), suffixColor_(qApp->palette().text().color()) { button_->hide(); button_->setCursor(Qt::ArrowCursor); button_->setToolButtonStyle(Qt::ToolButtonIconOnly); button_->setFocusPolicy(Qt::NoFocus); connect(button_, SIGNAL(clicked()), SLOT(onButtonClicked())); connect(this, SIGNAL(textChanged(QString)), SLOT(onTextChanged())); timer_.setInterval(200); timer_.setSingleShot(true); connect(&timer_, SIGNAL(timeout()), SLOT(onTimeout())); }
PropEditorWidget::PropEditorWidget(ObjTreeQtModel* aObjTreeMdl, QWidget * parent, Qt::WindowFlags flags) : QDockWidget(parent, flags), Ui::RKPropEditorWidget(), mdl(aObjTreeMdl->get_object_graph(),aObjTreeMdl->get_root_node()), delegate(&mdl) { setupUi(this); this->tableView->setModel(&mdl); this->tableView->setRootIndex(QModelIndex()); this->tableView->setItemDelegate(&delegate); this->tableTab->setAttribute(Qt::WA_AlwaysShowToolTips, true); this->sourceTab->setAttribute(Qt::WA_AlwaysShowToolTips, true); connect(aObjTreeMdl, SIGNAL(objectNodeSelected(serialization::object_node_desc)), &mdl, SLOT(selectObject(serialization::object_node_desc))); connect(&mdl, SIGNAL(objectTreeChanged()), aObjTreeMdl, SLOT(treeChanged())); connect(&mdl, SIGNAL(objectNameChanged(std::string)), this, SLOT(objNameChanged(std::string))); connect(&mdl, SIGNAL(sourceDataChanged()), this, SLOT(xmlSrcChanged())); connect(this, SIGNAL(editedXMLSrc(std::string)), &mdl, SLOT(sourceDataEdited(std::string))); connect(this->applyButton, SIGNAL(clicked()), this, SLOT(applyButtonClick())); connect(this->cancelButton, SIGNAL(clicked()), this, SLOT(cancelButtonClick())); connect(this->textEdit, SIGNAL(textChanged()), this, SLOT(onTextChanged())); };
void TerminalMessageDialog::initDialog() { if(globaldb.open()) { if(!dbisconnected) { dbisconnected = true; raao->setAppEnable(true); } QSqlQuery query(globaldb); query.prepare("SELECT name,IP FROM terminal"); query.exec(); while(query.next()) { ui->targetmonitor_combobox->addItem(query.value(0).toString(),query.value(1)); } query.clear(); query.finish(); //globaldb.close(); } else { if(dbisconnected) { dbisconnected = false; raao->setAppEnable(false); QMessageBox::warning(0,"警告","数据库连接失败!","确定"); } } //读取监视机IP配置等信息 connect(ui->addmonitor_toolbutton,SIGNAL(clicked()),this,SLOT(onAddMonitor())); connect(ui->removemonitor_toolbutton,SIGNAL(clicked()),this,SLOT(onRemoveMonitor())); connect(ui->sent_pushbutton,SIGNAL(clicked()),this,SLOT(onSendMessage())); connect(ui->editmessage_plaintextedit,SIGNAL(textChanged()),this,SLOT(onTextChanged())); }
/************************************************************************* Handler for when character (printable keys) are typed *************************************************************************/ void MultiLineEditbox::onCharacter(KeyEventArgs& e) { // base class processing Window::onCharacter(e); // only need to take notice if we have focus if (hasInputFocus() && !isReadOnly() && getFont()->isCodepointAvailable(e.codepoint)) { // erase selected text eraseSelectedText(); // if there is room if (d_text.length() - 1 < d_maxTextLen) { d_text.insert(getCaratIndex(), 1, e.codepoint); d_caratPos++; WindowEventArgs args(this); onTextChanged(args); } else { // Trigger text box full event WindowEventArgs args(this); onEditboxFullEvent(args); } } e.handled = true; }
void SDeformMesh::starting() { SLM_TRACE_FUNC(); this->create(); // start with this inherited function // Retrieve Qt container ::fwGuiQt::container::QtContainer::sptr qtContainer = ::fwGuiQt::container::QtContainer::dynamicCast( this->getContainer() ); // Change background color in red QWidget* const container = qtContainer->getQtContainer(); QPalette p( container->palette() ); p.setColor( QPalette::Background, Qt::red ); container->setPalette(p); container->setAutoFillBackground( true ); // Create textEditor QVBoxLayout* layout = new QVBoxLayout( ); m_textEditor = new QTextEdit( ); m_textEditor->setPlainText( "Edit text !" ); layout->addWidget( m_textEditor ); qtContainer->setLayout( layout ); // Connect m_textEditor QObject::connect(m_textEditor, SIGNAL(textChanged()), this, SLOT(onTextChanged())); }
//----------------------------------------------------------------------------// void Editbox::setMaxTextLength(size_t max_len) { if (d_maxTextLen != max_len) { d_maxTextLen = max_len; // Trigger max length changed event WindowEventArgs args(this); onMaximumTextLengthChanged(args); // trim string if (getText().length() > d_maxTextLen) { String newText = getText(); newText.resize(d_maxTextLen); setText(newText); onTextChanged(args); const MatchState state = getStringMatchState(getText()); if (d_validatorMatchState != state) { RegexMatchStateEventArgs rms_args(this, state); onTextValidityChanged(rms_args); d_validatorMatchState = state; } } } }
KoTagFilterWidget::KoTagFilterWidget(QWidget* parent): QWidget(parent) ,d( new Private()) { d->tagSearchBarTooltip_saving_disabled = i18nc ( "@info:tooltip", "<qt>Entering search terms here will add to, or remove resources from the current tag view." "<para>To filter based on the partial, case insensitive name of a resource:<br>" "<icode>partialname</icode> or <icode>!partialname</icode>.</para>" "<para>In-/exclusion of other tag sets:<br>" "<icode>[Tagname]</icode> or <icode>![Tagname]</icode>.</para>" "<para>Case sensitive and full name matching in-/exclusion:<br>" "<icode>\"ExactMatch\"</icode> or <icode>!\"ExactMatch\"</icode>.</para>" "Filter results cannot be saved for the <interface>All Presets</interface> view.<br>" "In this view, pressing <interface>Enter</interface> or clearing the filter box will restore all items.<br>" "Create and/or switch to a different tag if you want to save filtered resources into named sets.</qt>" ); d->tagSearchBarTooltip_saving_enabled = i18nc ( "@info:tooltip", "<qt>Entering search terms here will add to, or remove resources from the current tag view." "<para>To filter based on the partial, case insensitive name of a resource:<br>" "<icode>partialname</icode> or <icode>!partialname</icode>.</para>" "<para>In-/exclusion of other tag sets:<br>" "<icode>[Tagname]</icode> or <icode>![Tagname]</icode>.</para>" "<para>Case sensitive and full name matching in-/exclusion:<br>" "<icode>\"ExactMatch\"</icode> or <icode>!\"ExactMatch\"</icode>.</para>" "Pressing <interface>Enter</interface> or clicking the <interface>Save</interface> button will save the changes.</qt>" ); QGridLayout* filterBarLayout = new QGridLayout; d->tagSearchLineEdit = new KLineEdit(this); d->tagSearchLineEdit->setClearButtonEnabled(true); d->tagSearchLineEdit->setPlaceholderText(i18n("Enter resource filters here")); d->tagSearchLineEdit->setToolTip(d->tagSearchBarTooltip_saving_disabled); d->tagSearchLineEdit->setEnabled(true); filterBarLayout->setSpacing(0); filterBarLayout->setMargin(0); filterBarLayout->setColumnStretch(0, 1); filterBarLayout->addWidget(d->tagSearchLineEdit, 0, 0); d->tagSearchSaveButton = new QPushButton(this); d->tagSearchSaveButton->setIcon(koIcon("media-floppy")); d->tagSearchSaveButton->setToolTip(i18nc("@info:tooltip", "<qt>Save the currently filtered set as the new members of the current tag.</qt>")); d->tagSearchSaveButton->setEnabled(false); filterBarLayout->addWidget(d->tagSearchSaveButton, 0, 1); connect(d->tagSearchSaveButton, SIGNAL(pressed()), this, SLOT(onSaveButtonClicked())); connect(d->tagSearchLineEdit, SIGNAL(returnPressed()), this, SLOT(onSaveButtonClicked())); connect(d->tagSearchLineEdit, SIGNAL(textChanged(QString)), this, SLOT(onTextChanged(QString))); allowSave(false); this->setLayout(filterBarLayout); }
ScriptEditorItem::ScriptEditorItem(ScriptDatum* datum, Canvas* canvas) : QGraphicsTextItem("HELLO WORLD"), datum(datum), border(10), close(new ScriptEditorCloseButton(this)), move(new ScriptEditorMoveButton(this)) { QFont font; font.setFamily("Courier"); setFont(font); canvas->scene->addItem(this); new SyntaxHighlighter(document()); setDefaultTextColor(Colors::base04); setTextInteractionFlags(Qt::TextEditorInteraction); connect(document(), SIGNAL(contentsChanged()), this, SLOT(onTextChanged())); connect(datum, SIGNAL(changed()), this, SLOT(onDatumChanged())); connect(datum, SIGNAL(destroyed()), this, SLOT(deleteLater())); onDatumChanged(); // update tooltip and text setZValue(3); }
void ScintillaEditor::initFont(const QString& fontName, uint size) { this->currentFont = QFont(fontName, size); this->currentFont.setFixedPitch(true); this->lexer->setFont(this->currentFont); qsci->setMarginsFont(this->currentFont); onTextChanged(); // Update margin width }
MessageEditor::MessageEditor(QWidget *AParent) : QTextEdit(AParent) { FAutoResize = true; FMinimumLines = 1; setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred); connect(this,SIGNAL(textChanged()),SLOT(onTextChanged())); }
ChatEdit::ChatEdit(QWidget *parent) : QPlainTextEdit(parent), m_session(0), m_sendKey(SendCtrlEnter) { setMinimumHeight(QFontMetrics(font()).height()*2); connect(this,SIGNAL(textChanged()),SLOT(onTextChanged())); }
void ScintillaEditor::initMargin() { QFontMetrics fontmetrics = QFontMetrics(qsci->font()); qsci->setMarginsFont(qsci->font()); qsci->setMarginWidth(1, fontmetrics.width(QString::number(qsci->lines())) + 6); qsci->setMarginLineNumbers(1, true); connect(qsci, SIGNAL(textChanged()), this, SLOT(onTextChanged())); }
UnsignedIntegerEdit::UnsignedIntegerEdit(QWidget *parent) : QLineEdit(parent) { connect(this, SIGNAL(textChanged(QString)), SLOT(onTextChanged(QString))); // Set the validator range to the range of values in a 32 bit unsigned integer (dbus-type 'u'). // FIXME: Maximum value must be a valid type "int" for the validator to work. What a POS setValidator(new QIntValidator(0, 2147483647, this)); }
ChatEdit::ChatEdit(QWidget *parent) : QTextEdit(parent), m_sendKey(SendCtrlEnter) { setMinimumHeight(QFontMetrics(font()).height() * 2); setAcceptRichText(false); m_autoResize = false; connect(this,SIGNAL(textChanged()),SLOT(onTextChanged())); }
ChatLine::ChatLine(QWidget *parent): QLineEdit(parent) { setStyleSheet("color: white;" "background-color:transparent"); setFixedSize(259,25); connect(this,SIGNAL(returnPressed()),this,SLOT(onReturnPressed())); connect(this,SIGNAL(toChat(unsigned short, google::protobuf::Message*)),logic->getClient(),SLOT(sendMessage(unsigned short, google::protobuf::Message*))); connect(this,SIGNAL(textChanged(QString)),this,SLOT(onTextChanged(QString))); }
void SDeformMesh::stopping() { SLM_TRACE_FUNC(); // Disconnect m_textEditor QObject::disconnect(m_textEditor, SIGNAL(textChanged()), this, SLOT(onTextChanged())); // Destroy the container and all its children this->destroy(); }
NewMessage::NewMessage(QWidget *parent /* = 0 */, gchar* phoneNumber, gchar* contactName, Qt::WFlags flags /* = 0 */) { m_pBelugaMain =(BelugaMain*)parent; m_nRows = 1; m_nMode = 0; this->setModal(TRUE); setupUi(this); setSmsEmailPanelVisible(FALSE); m_qMenuBar = new QMenuBar(this); m_qActionCancel = new QAction(tr("Cancel"), this); m_qActionSend = new QAction(tr("Send"), this); m_qActionMore = new QAction(tr("More"), this); m_qMenuBar->addAction(m_qActionSend); m_qMenuBar->addAction(m_qActionMore); m_qMenuBar->setDefaultAction(m_qActionCancel); send->setDefaultAction(m_qActionSend); more->setDefaultAction(m_qActionMore); connect(m_qActionCancel, SIGNAL(triggered(bool)), this, SLOT(onActionCancelTriggered(bool))); connect(m_qActionSend, SIGNAL(triggered(bool)), this, SLOT(onSendActionTriggered(bool))); connect(m_qActionMore, SIGNAL(triggered(bool)), this, SLOT(onMoreActionTriggered(bool))); connect(contactlist, SIGNAL(textChanged()), this, SLOT(onTextChanged())); connect(toList, SIGNAL(textChanged()), this, SLOT(onTextChanged())); connect(ccList, SIGNAL(textChanged()), this, SLOT(onTextChanged())); connect(bccList, SIGNAL(textChanged()), this, SLOT(onTextChanged())); /* set first contact */ if (phoneNumber) { m_qPhoneNumberList.append(QString::fromUtf8(phoneNumber)); if (contactName) m_qContactNameList.append(QString::fromUtf8(contactName)); else m_qContactNameList.append(QString()); } QString contact = QString("%1(%2)").arg(m_qPhoneNumberList.at(0), m_qContactNameList.at(0)); contactlist->setPlainText(contact); }
void TextField::setText(QString newText) { editBox->setText(newText); onTextChanged(newText); if (checkFunction(newText)) { icon->hide(); } else { icon->show(); } }
void UBTGAdaptableText::showEvent(QShowEvent* e) { Q_UNUSED(e); if(!mIsUpdatingSize && !hasFocus() && mHasPlaceHolder && toPlainText().isEmpty() && !isReadOnly()){ setTextColor(QColor(Qt::lightGray)); setPlainText(mPlaceHolderText); } else // If the teacherguide is collapsed, don't updated the size. Or set the size as the expanded size onTextChanged(); }
// --------- FancyLineEdit FancyLineEdit::FancyLineEdit(QWidget *parent) : CompletingLineEdit(parent), d(new FancyLineEditPrivate(this)) { ensurePolished(); updateMargins(); connect(d->m_iconbutton[Left], SIGNAL(clicked()), this, SLOT(iconClicked())); connect(d->m_iconbutton[Right], SIGNAL(clicked()), this, SLOT(iconClicked())); connect(this, SIGNAL(textChanged(QString)), this, SLOT(onTextChanged(QString))); }
TextBrowser::TextBrowser(QWidget *parent) : QTextBrowser(parent) { setOpenLinks(false); setTextInteractionFlags(Qt::LinksAccessibleByMouse); setFrameStyle(QTextEdit::NoFrame); setStyleSheet(QString("color: %1; font-size: 13pt; background: transparent") .arg(palette().color(QPalette::Text).name())); connect(this, SIGNAL(textChanged()), this, SLOT(onTextChanged())); }
// --------------------------------------------------------- UBPublicationDlg::UBPublicationDlg(QWidget *parent, const char *name):QDialog(parent) , mpLayout(NULL) , mpTitleLayout(NULL) , mpTitleLabel(NULL) , mpTitle(NULL) , mpDescLabel(NULL) , mpDescription(NULL) , mpButtons(NULL) { setObjectName(name); setWindowTitle(tr("Publish document on the web")); resize(500, 300); mpLayout = new QVBoxLayout(); setLayout(mpLayout); mpTitleLabel = new QLabel(tr("Title:"), this); mpTitle = new QLineEdit(this); mpTitleLayout = new QHBoxLayout(); mpTitleLayout->addWidget(mpTitleLabel, 0); mpTitleLayout->addWidget(mpTitle, 1); mpLayout->addLayout(mpTitleLayout, 0); mpDescLabel = new QLabel(tr("Description:"), this); mpLayout->addWidget(mpDescLabel, 0); mpDescription = new QTextEdit(this); mpLayout->addWidget(mpDescription, 1); mpButtons = new QDialogButtonBox(QDialogButtonBox::Cancel | QDialogButtonBox::Ok, Qt::Horizontal, this); mpButtons->button(QDialogButtonBox::Ok)->setText(tr("Publish")); mpLayout->addWidget(mpButtons); mpButtons->button(QDialogButtonBox::Ok)->setEnabled(false); connect(mpButtons, SIGNAL(accepted()), this, SLOT(accept())); connect(mpButtons, SIGNAL(rejected()), this, SLOT(reject())); connect(mpTitle, SIGNAL(textChanged(QString)), this, SLOT(onTextChanged())); connect(mpDescription, SIGNAL(textChanged()), this, SLOT(onTextChanged())); }
FilePicker::FilePicker(mcrl2::gui::qt::PersistentFileDialog* fileDialog, QWidget *parent, bool save) : QWidget(parent), m_fileDialog(fileDialog) { m_ui.setupUi(this); m_save=save; connect(m_ui.btnBrowse, SIGNAL(clicked()), this, SLOT(onBrowse())); connect(m_ui.value, SIGNAL(textChanged(QString)), this, SLOT(onTextChanged(QString))); }