]> git.lyx.org Git - features.git/blobdiff - src/frontends/qt4/Qt2BC.h
all CheckedWidgets are line edits...
[features.git] / src / frontends / qt4 / Qt2BC.h
index 5b72c5cdeeb46b03b54aed2291ebf6b1987c6718..4189274a339023831c0f48c6a6461bb9571c4fba 100644 (file)
 
 #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<CheckedLineEdit> CheckedWidgetPtr;
-       typedef std::list<CheckedWidgetPtr> CheckedWidgetList;
+       typedef std::list<CheckedLineEdit> CheckedWidgetList;
        CheckedWidgetList checked_widgets;
 
 private: