diff --git a/development/qmake/qt4/qt4.pro b/development/qmake/qt4/qt4.pro index 96a39bee12..d922829972 100644 --- a/development/qmake/qt4/qt4.pro +++ b/development/qmake/qt4/qt4.pro @@ -16,7 +16,6 @@ INC += src/frontends/qt4 HPP += Action.h HPP += BulletsModule.h -HPP += CheckedLineEdit.h HPP += ColorCache.h HPP += DockView.h HPP += EmptyTable.h @@ -97,7 +96,6 @@ HPP += Validator.h CPP += Action.cpp CPP += alert_pimpl.cpp CPP += BulletsModule.cpp -CPP += CheckedLineEdit.cpp CPP += ColorCache.cpp CPP += Dialogs.cpp CPP += EmptyTable.cpp diff --git a/development/scons/scons_manifest.py b/development/scons/scons_manifest.py index fefad9f1c4..9250ddbc64 100644 --- a/development/scons/scons_manifest.py +++ b/development/scons/scons_manifest.py @@ -843,7 +843,6 @@ src_frontends_controllers_tests_regfiles_extra_files = Split(''' src_frontends_qt4_header_files = Split(''' Action.h BulletsModule.h - CheckedLineEdit.h ColorCache.h DockView.h EmptyTable.h @@ -928,7 +927,6 @@ src_frontends_qt4_header_files = Split(''' src_frontends_qt4_files = Split(''' Action.cpp BulletsModule.cpp - CheckedLineEdit.cpp ColorCache.cpp Dialogs.cpp EmptyTable.cpp diff --git a/po/POTFILES.in b/po/POTFILES.in index bcd9d336a9..5bae5f35e4 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -33,10 +33,171 @@ src/callback.cpp src/client/debug.cpp src/debug.cpp src/frontends/LyXView.cpp +src/frontends/backup1/BulletsModule.cpp +src/frontends/backup1/Dialogs.cpp +src/frontends/backup1/FileDialog.cpp +src/frontends/backup1/GuiAbout.cpp +src/frontends/backup1/GuiApplication.cpp +src/frontends/backup1/GuiBibitem.cpp +src/frontends/backup1/GuiBibtex.cpp +src/frontends/backup1/GuiBox.cpp +src/frontends/backup1/GuiBranch.cpp +src/frontends/backup1/GuiBranches.cpp +src/frontends/backup1/GuiChanges.cpp +src/frontends/backup1/GuiCharacter.cpp +src/frontends/backup1/GuiCitation.cpp +src/frontends/backup1/GuiCommandBuffer.cpp +src/frontends/backup1/GuiDelimiter.cpp +src/frontends/backup1/GuiDocument.cpp +src/frontends/backup1/GuiERT.cpp +src/frontends/backup1/GuiExternal.cpp +src/frontends/backup1/GuiFloat.cpp +src/frontends/backup1/GuiGraphics.cpp +src/frontends/backup1/GuiInclude.cpp +src/frontends/backup1/GuiListings.cpp +src/frontends/backup1/GuiMathMatrix.cpp +src/frontends/backup1/GuiNote.cpp +src/frontends/backup1/GuiParagraph.cpp +src/frontends/backup1/GuiPrefs.cpp +src/frontends/backup1/GuiPrint.cpp +src/frontends/backup1/GuiRef.cpp +src/frontends/backup1/GuiSearch.cpp +src/frontends/backup1/GuiSendto.cpp +src/frontends/backup1/GuiShowFile.cpp +src/frontends/backup1/GuiSpellchecker.cpp +src/frontends/backup1/GuiTabular.cpp +src/frontends/backup1/GuiTabularCreate.cpp +src/frontends/backup1/GuiTexinfo.cpp +src/frontends/backup1/GuiThesaurus.cpp +src/frontends/backup1/GuiURL.cpp +src/frontends/backup1/GuiVSpace.cpp +src/frontends/backup1/GuiView.cpp +src/frontends/backup1/GuiWrap.cpp +src/frontends/backup1/IconPalette.cpp +src/frontends/backup1/Qt2BC.h +src/frontends/backup1/Validator.cpp +src/frontends/backup1/alert_pimpl.cpp +src/frontends/backup2/controllers/ControlAboutlyx.cpp +src/frontends/backup2/controllers/ControlBibtex.cpp +src/frontends/backup2/controllers/ControlBox.cpp +src/frontends/backup2/controllers/ControlDocument.cpp +src/frontends/backup2/controllers/ControlErrorList.cpp +src/frontends/backup2/controllers/ControlExternal.cpp +src/frontends/backup2/controllers/ControlGraphics.cpp +src/frontends/backup2/controllers/ControlInclude.cpp +src/frontends/backup2/controllers/ControlLog.cpp +src/frontends/backup2/controllers/ControlPrefs.cpp +src/frontends/backup2/controllers/ControlPrint.cpp +src/frontends/backup2/controllers/ControlSpellchecker.cpp +src/frontends/backup2/controllers/ControlToc.cpp +src/frontends/backup2/controllers/frontend_helpers.cpp +src/frontends/backup2/qt4/BulletsModule.cpp +src/frontends/backup2/qt4/Dialogs.cpp +src/frontends/backup2/qt4/FileDialog.cpp +src/frontends/backup2/qt4/GuiAbout.cpp +src/frontends/backup2/qt4/GuiApplication.cpp +src/frontends/backup2/qt4/GuiBibitem.cpp +src/frontends/backup2/qt4/GuiBibtex.cpp +src/frontends/backup2/qt4/GuiBox.cpp +src/frontends/backup2/qt4/GuiBranch.cpp +src/frontends/backup2/qt4/GuiBranches.cpp +src/frontends/backup2/qt4/GuiChanges.cpp +src/frontends/backup2/qt4/GuiCharacter.cpp +src/frontends/backup2/qt4/GuiCitation.cpp +src/frontends/backup2/qt4/GuiCommandBuffer.cpp +src/frontends/backup2/qt4/GuiDelimiter.cpp +src/frontends/backup2/qt4/GuiDocument.cpp +src/frontends/backup2/qt4/GuiERT.cpp +src/frontends/backup2/qt4/GuiExternal.cpp +src/frontends/backup2/qt4/GuiFloat.cpp +src/frontends/backup2/qt4/GuiGraphics.cpp +src/frontends/backup2/qt4/GuiInclude.cpp +src/frontends/backup2/qt4/GuiListings.cpp +src/frontends/backup2/qt4/GuiMathMatrix.cpp +src/frontends/backup2/qt4/GuiNote.cpp +src/frontends/backup2/qt4/GuiParagraph.cpp +src/frontends/backup2/qt4/GuiPrefs.cpp +src/frontends/backup2/qt4/GuiPrint.cpp +src/frontends/backup2/qt4/GuiRef.cpp +src/frontends/backup2/qt4/GuiSearch.cpp +src/frontends/backup2/qt4/GuiSendto.cpp +src/frontends/backup2/qt4/GuiShowFile.cpp +src/frontends/backup2/qt4/GuiSpellchecker.cpp +src/frontends/backup2/qt4/GuiTabular.cpp +src/frontends/backup2/qt4/GuiTabularCreate.cpp +src/frontends/backup2/qt4/GuiTexinfo.cpp +src/frontends/backup2/qt4/GuiThesaurus.cpp +src/frontends/backup2/qt4/GuiURL.cpp +src/frontends/backup2/qt4/GuiVSpace.cpp +src/frontends/backup2/qt4/GuiView.cpp +src/frontends/backup2/qt4/GuiWrap.cpp +src/frontends/backup2/qt4/IconPalette.cpp +src/frontends/backup2/qt4/Qt2BC.h +src/frontends/backup2/qt4/Validator.cpp +src/frontends/backup2/qt4/alert_pimpl.cpp +src/frontends/backup3/controllers/ControlAboutlyx.cpp +src/frontends/backup3/controllers/ControlBibtex.cpp +src/frontends/backup3/controllers/ControlBox.cpp +src/frontends/backup3/controllers/ControlDocument.cpp +src/frontends/backup3/controllers/ControlErrorList.cpp +src/frontends/backup3/controllers/ControlExternal.cpp +src/frontends/backup3/controllers/ControlGraphics.cpp +src/frontends/backup3/controllers/ControlInclude.cpp +src/frontends/backup3/controllers/ControlLog.cpp +src/frontends/backup3/controllers/ControlPrefs.cpp +src/frontends/backup3/controllers/ControlPrint.cpp +src/frontends/backup3/controllers/ControlSpellchecker.cpp +src/frontends/backup3/controllers/ControlToc.cpp +src/frontends/backup3/controllers/frontend_helpers.cpp +src/frontends/backup3/qt4/BulletsModule.cpp +src/frontends/backup3/qt4/Dialogs.cpp +src/frontends/backup3/qt4/FileDialog.cpp +src/frontends/backup3/qt4/GuiAbout.cpp +src/frontends/backup3/qt4/GuiApplication.cpp +src/frontends/backup3/qt4/GuiBibitem.cpp +src/frontends/backup3/qt4/GuiBibtex.cpp +src/frontends/backup3/qt4/GuiBox.cpp +src/frontends/backup3/qt4/GuiBranch.cpp +src/frontends/backup3/qt4/GuiBranches.cpp +src/frontends/backup3/qt4/GuiChanges.cpp +src/frontends/backup3/qt4/GuiCharacter.cpp +src/frontends/backup3/qt4/GuiCitation.cpp +src/frontends/backup3/qt4/GuiCommandBuffer.cpp +src/frontends/backup3/qt4/GuiDelimiter.cpp +src/frontends/backup3/qt4/GuiDocument.cpp +src/frontends/backup3/qt4/GuiERT.cpp +src/frontends/backup3/qt4/GuiExternal.cpp +src/frontends/backup3/qt4/GuiFloat.cpp +src/frontends/backup3/qt4/GuiGraphics.cpp +src/frontends/backup3/qt4/GuiInclude.cpp +src/frontends/backup3/qt4/GuiListings.cpp +src/frontends/backup3/qt4/GuiMathMatrix.cpp +src/frontends/backup3/qt4/GuiNote.cpp +src/frontends/backup3/qt4/GuiParagraph.cpp +src/frontends/backup3/qt4/GuiPrefs.cpp +src/frontends/backup3/qt4/GuiPrint.cpp +src/frontends/backup3/qt4/GuiRef.cpp +src/frontends/backup3/qt4/GuiSearch.cpp +src/frontends/backup3/qt4/GuiSendto.cpp +src/frontends/backup3/qt4/GuiShowFile.cpp +src/frontends/backup3/qt4/GuiSpellchecker.cpp +src/frontends/backup3/qt4/GuiTabular.cpp +src/frontends/backup3/qt4/GuiTabularCreate.cpp +src/frontends/backup3/qt4/GuiTexinfo.cpp +src/frontends/backup3/qt4/GuiThesaurus.cpp +src/frontends/backup3/qt4/GuiURL.cpp +src/frontends/backup3/qt4/GuiVSpace.cpp +src/frontends/backup3/qt4/GuiView.cpp +src/frontends/backup3/qt4/GuiWrap.cpp +src/frontends/backup3/qt4/IconPalette.cpp +src/frontends/backup3/qt4/Qt2BC.cpp +src/frontends/backup3/qt4/Validator.cpp +src/frontends/backup3/qt4/alert_pimpl.cpp src/frontends/controllers/ControlAboutlyx.cpp src/frontends/controllers/ControlBibtex.cpp src/frontends/controllers/ControlBox.cpp src/frontends/controllers/ControlDocument.cpp +src/frontends/controllers/ControlEmbeddedFiles.cpp src/frontends/controllers/ControlErrorList.cpp src/frontends/controllers/ControlExternal.cpp src/frontends/controllers/ControlGraphics.cpp @@ -83,12 +244,12 @@ src/frontends/qt4/GuiTabular.cpp src/frontends/qt4/GuiTabularCreate.cpp src/frontends/qt4/GuiTexinfo.cpp src/frontends/qt4/GuiThesaurus.cpp -src/frontends/qt4/GuiUrl.cpp +src/frontends/qt4/GuiURL.cpp src/frontends/qt4/GuiVSpace.cpp src/frontends/qt4/GuiView.cpp src/frontends/qt4/GuiWrap.cpp src/frontends/qt4/IconPalette.cpp -src/frontends/qt4/Qt2BC.h +src/frontends/qt4/Qt2BC.cpp src/frontends/qt4/Validator.cpp src/frontends/qt4/alert_pimpl.cpp src/gettext.h diff --git a/src/frontends/qt4/CheckedLineEdit.cpp b/src/frontends/qt4/CheckedLineEdit.cpp deleted file mode 100644 index 9c23cde0d0..0000000000 --- a/src/frontends/qt4/CheckedLineEdit.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/** - * \file CheckedLineEdit.cpp - * This file is part of LyX, the document processor. - * Licence details can be found in the file COPYING. - * - * \author Angus Leeming - * - * Full author contact details are available in file CREDITS. - */ - -#include - -#include "CheckedLineEdit.h" -#include "Qt2BC.h" - -#include -#include -#include - -namespace lyx { -namespace frontend { - -void addCheckedLineEdit(BCView & bcview, QLineEdit * input, QWidget * label) -{ - Qt2BC * bc = static_cast(&bcview); - bc->addCheckedWidget(new CheckedLineEdit(input, label)); -} - - -namespace { - -void setWarningColor(QWidget * widget) -{ - QPalette pal = widget->palette(); - pal.setColor(QPalette::Active, QPalette::Foreground, QColor(255, 0, 0)); - widget->setPalette(pal); -} - - -void setWidget(bool valid, QLineEdit * input, QWidget * label) -{ - if (valid) - input->setPalette(QPalette()); - else - setWarningColor(input); - - if (!label) - return; - - if (valid) - label->setPalette(QPalette()); - else - setWarningColor(label); -} - -} // namespace anon - - -CheckedLineEdit::CheckedLineEdit(QLineEdit * input, QWidget * label) - : input_(input), label_(label) -{} - - -bool CheckedLineEdit::check() const -{ - QValidator const * validator = input_->validator(); - if (!validator) - return true; - - QString t = input_->text(); - int p = 0; - bool const valid = validator->validate(t, p) == QValidator::Acceptable; - - // Visual feedback. - setWidget(valid, input_, label_); - - return valid; -} - -} // namespace frontend -} // namespace lyx diff --git a/src/frontends/qt4/CheckedLineEdit.h b/src/frontends/qt4/CheckedLineEdit.h deleted file mode 100644 index a9cf84162a..0000000000 --- a/src/frontends/qt4/CheckedLineEdit.h +++ /dev/null @@ -1,40 +0,0 @@ -// -*- C++ -*- -/** - * \file qt4/CheckedLineEdit.h - * This file is part of LyX, the document processor. - * Licence details can be found in the file COPYING. - * - * \author Angus Leeming - * - * Full author contact details are available in file CREDITS. - */ - -#ifndef CHECKEDLINEEDIT_H -#define CHECKEDLINEEDIT_H - -class QWidget; -class QLineEdit; - -namespace lyx { -namespace frontend { - -class BCView; - -void addCheckedLineEdit(BCView & bcview, - QLineEdit * input, QWidget * label = 0); - -class CheckedLineEdit -{ -public: - CheckedLineEdit(QLineEdit * input, QWidget * label = 0); - bool check() const; - -private: - QLineEdit * input_; - QWidget * label_; -}; - -} // namespace frontend -} // namespace lyx - -#endif // CHECKEDLINEEDIT_H diff --git a/src/frontends/qt4/GuiBibtex.cpp b/src/frontends/qt4/GuiBibtex.cpp index b92bc8cbdc..06210eefbd 100644 --- a/src/frontends/qt4/GuiBibtex.cpp +++ b/src/frontends/qt4/GuiBibtex.cpp @@ -19,7 +19,6 @@ #include "qt_helpers.h" #include "Validator.h" #include "LyXRC.h" -#include "CheckedLineEdit.h" #include "controllers/ControlBibtex.h" #include "controllers/ButtonPolicy.h" @@ -88,8 +87,7 @@ GuiBibtexDialog::GuiBibtexDialog(GuiBibtex * form) bcview->setOK(add_->addPB); bcview->setCancel(add_->closePB); - - addCheckedLineEdit(add_bc_.view(), add_->bibED, 0); + bcview->addCheckedLineEdit(add_->bibED, 0); connect(add_->bibED, SIGNAL(textChanged(const QString &)), this, SLOT(bibEDChanged())); diff --git a/src/frontends/qt4/GuiBox.cpp b/src/frontends/qt4/GuiBox.cpp index f6ed74df61..2dc3045923 100644 --- a/src/frontends/qt4/GuiBox.cpp +++ b/src/frontends/qt4/GuiBox.cpp @@ -14,7 +14,6 @@ #include "GuiBox.h" -#include "CheckedLineEdit.h" #include "LengthCombo.h" #include "qt_helpers.h" #include "Qt2BC.h" diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index 954a433e3d..48e312457a 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -12,7 +12,6 @@ #include "GuiDocument.h" -#include "CheckedLineEdit.h" #include "FloatPlacement.h" #include "LengthCombo.h" #include "PanelStack.h" diff --git a/src/frontends/qt4/GuiExternal.cpp b/src/frontends/qt4/GuiExternal.cpp index 0a2b285c0e..bbdf922c43 100644 --- a/src/frontends/qt4/GuiExternal.cpp +++ b/src/frontends/qt4/GuiExternal.cpp @@ -11,8 +11,6 @@ #include -// Qt defines a macro 'signals' that clashes with a boost namespace. -// All is well if the namespace is visible first. #include "lengthcommon.h" #include "LyXRC.h" @@ -29,7 +27,6 @@ #include "GuiExternal.h" #include "Qt2BC.h" -#include "CheckedLineEdit.h" #include "LengthCombo.h" #include "qt_helpers.h" #include "Validator.h" @@ -185,7 +182,7 @@ void GuiExternalDialog::browseClicked() docstring const str = form_->controller().browse(qstring_to_ucs4(fileED->text()), template_name); - if(!str.empty()) { + if (!str.empty()) { fileED->setText(toqstr(str)); form_->changed(); } diff --git a/src/frontends/qt4/GuiGraphics.cpp b/src/frontends/qt4/GuiGraphics.cpp index 1b804c841c..a2a05a7892 100644 --- a/src/frontends/qt4/GuiGraphics.cpp +++ b/src/frontends/qt4/GuiGraphics.cpp @@ -15,7 +15,6 @@ #include "GuiGraphics.h" -#include "CheckedLineEdit.h" #include "debug.h" #include "LengthCombo.h" #include "lengthcommon.h" @@ -295,6 +294,7 @@ void GuiGraphicsDialog::on_WidthCB_toggled(bool setWidth) setAutoText(); } + void GuiGraphicsDialog::on_HeightCB_toggled(bool setHeight) { Height->setEnabled(setHeight); @@ -375,17 +375,14 @@ void GuiGraphics::build_dialog() } -namespace { - // returns the number of the string s in the vector v -int getItemNo(vector v, string const & s) { +static int getItemNo(const vector & v, string const & s) +{ vector::const_iterator cit = find(v.begin(), v.end(), s); return (cit != v.end()) ? int(cit - v.begin()) : 0; } -} - void GuiGraphics::update_contents() { diff --git a/src/frontends/qt4/GuiInclude.cpp b/src/frontends/qt4/GuiInclude.cpp index 8debf85106..a2650d5f35 100644 --- a/src/frontends/qt4/GuiInclude.cpp +++ b/src/frontends/qt4/GuiInclude.cpp @@ -15,10 +15,8 @@ #include "GuiInclude.h" -#include "CheckedLineEdit.h" #include "Qt2BC.h" #include "qt_helpers.h" - #include "LyXRC.h" #include "insets/InsetListingsParams.h" diff --git a/src/frontends/qt4/GuiTabular.cpp b/src/frontends/qt4/GuiTabular.cpp index 7094568f20..050a487eac 100644 --- a/src/frontends/qt4/GuiTabular.cpp +++ b/src/frontends/qt4/GuiTabular.cpp @@ -14,7 +14,6 @@ #include "GuiTabular.h" -#include "CheckedLineEdit.h" #include "GuiSetBorder.h" #include "Qt2BC.h" diff --git a/src/frontends/qt4/GuiVSpace.cpp b/src/frontends/qt4/GuiVSpace.cpp index 8828accd77..3473f82f79 100644 --- a/src/frontends/qt4/GuiVSpace.cpp +++ b/src/frontends/qt4/GuiVSpace.cpp @@ -18,7 +18,6 @@ #include "GuiVSpace.h" #include "Qt2BC.h" -#include "CheckedLineEdit.h" #include "LengthCombo.h" #include "qt_helpers.h" #include "Validator.h" diff --git a/src/frontends/qt4/Makefile.am b/src/frontends/qt4/Makefile.am index 2835115028..0c532fdd87 100644 --- a/src/frontends/qt4/Makefile.am +++ b/src/frontends/qt4/Makefile.am @@ -38,7 +38,6 @@ SOURCEFILES = \ Action.cpp \ alert_pimpl.cpp \ BulletsModule.cpp \ - CheckedLineEdit.cpp \ ColorCache.cpp \ Dialogs.cpp \ EmptyTable.cpp \ @@ -119,7 +118,6 @@ SOURCEFILES = \ Validator.cpp NOMOCHEADER = \ - CheckedLineEdit.h \ GuiClipboard.h \ GuiFontLoader.h \ GuiFontMetrics.h \ diff --git a/src/frontends/qt4/Qt2BC.cpp b/src/frontends/qt4/Qt2BC.cpp index 929ffe31c0..289ac65de9 100644 --- a/src/frontends/qt4/Qt2BC.cpp +++ b/src/frontends/qt4/Qt2BC.cpp @@ -19,6 +19,9 @@ #include #include +#include +#include + namespace lyx { namespace frontend { @@ -85,10 +88,9 @@ void Qt2BC::setWidgetEnabled(QWidget * obj, bool enabled) const } -void Qt2BC::addCheckedWidget(CheckedLineEdit * ptr) +void Qt2BC::addCheckedLineEdit(QLineEdit * input, QWidget * label) { - if (ptr) - checked_widgets.push_back(CheckedWidgetPtr(ptr)); + checked_widgets.push_back(CheckedLineEdit(input, label)); } @@ -100,12 +102,65 @@ bool Qt2BC::checkWidgets() const CheckedWidgetList::const_iterator end = checked_widgets.end(); for (; it != end; ++it) - valid &= (*it)->check(); + valid &= it->check(); // return valid status after checking ALL widgets return valid; } +////////////////////////////////////////////////////////////// +// +// CheckedLineEdit +// +////////////////////////////////////////////////////////////// + +void addCheckedLineEdit(BCView & bcview, QLineEdit * input, QWidget * label) +{ + Qt2BC * bc = static_cast(&bcview); + bc->addCheckedLineEdit(input, label); +} + + +static void setWarningColor(QWidget * widget) +{ + QPalette pal = widget->palette(); + pal.setColor(QPalette::Active, QPalette::Foreground, QColor(255, 0, 0)); + widget->setPalette(pal); +} + + + +CheckedLineEdit::CheckedLineEdit(QLineEdit * input, QWidget * label) + : input_(input), label_(label) +{} + + +bool CheckedLineEdit::check() const +{ + QValidator const * validator = input_->validator(); + if (!validator) + return true; + + QString t = input_->text(); + int p = 0; + bool const valid = validator->validate(t, p) == QValidator::Acceptable; + + // Visual feedback. + if (valid) + input_->setPalette(QPalette()); + else + setWarningColor(input_); + + if (!label_) { + if (valid) + label_->setPalette(QPalette()); + else + setWarningColor(label_); + } + + return valid; +} + } // namespace frontend } // namespace lyx diff --git a/src/frontends/qt4/Qt2BC.h b/src/frontends/qt4/Qt2BC.h index 5b72c5cdee..4189274a33 100644 --- a/src/frontends/qt4/Qt2BC.h +++ b/src/frontends/qt4/Qt2BC.h @@ -16,14 +16,30 @@ #include "BCView.h" #include "gettext.h" -#include "CheckedLineEdit.h" class QWidget; class QPushButton; +class QLineEdit; namespace lyx { namespace frontend { + +void addCheckedLineEdit(BCView & bcview, + QLineEdit * input, QWidget * label = 0); + +class CheckedLineEdit +{ +public: + CheckedLineEdit(QLineEdit * input, QWidget * label = 0); + bool check() const; + +private: + // non-owned + QLineEdit * input_; + QWidget * label_; +}; + /** General purpose button controller for up to four buttons. Controls the activation of the OK, Apply and Cancel buttons. Actually supports 4 buttons in all and it's up to the user to decide on @@ -60,15 +76,14 @@ public: /** Add a widget to the list of all widgets whose validity should * be checked explicitly when the buttons are refreshed. */ - void addCheckedWidget(CheckedLineEdit * ptr); + void addCheckedLineEdit(QLineEdit * input, QWidget * label = 0); protected: /// \return true if all CheckedWidgets are in a valid state. bool checkWidgets() const; private: - typedef boost::shared_ptr CheckedWidgetPtr; - typedef std::list CheckedWidgetList; + typedef std::list CheckedWidgetList; CheckedWidgetList checked_widgets; private: