#ifndef QT2BASE_H
#define QT2BASE_H
-#ifdef __GNUG__
-#pragma interface
-#endif
#include "ViewBase.h"
#include <boost/scoped_ptr.hpp>
/** This class is an Qt2 GUI base class.
*/
-class Qt2Base : public QObject, public ViewBase
-{
+class Qt2Base : public QObject, public ViewBase {
Q_OBJECT
public:
///
- Qt2Base(QString const &);
+ Qt2Base(string const &);
///
virtual ~Qt2Base() {}
-
protected:
/// build the actual dialog
virtual void build_dialog() = 0;
virtual void show();
/// update the dialog's contents
virtual void update_contents() = 0;
+ ///
+ virtual bool isVisible() const;
/// the dialog has changed contents
virtual void changed();
virtual bool isValid();
///
- Qt2BC & bc();
+ Qt2BC & bcview();
/// are we updating ?
bool updating_;
-
protected slots:
// dialog closed from WM
void slotWMHide();
// Close button clicked
void slotClose();
-
private:
- /// Pointer to the actual instantiation of xform's form
+ /// Pointer to the actual instantiation of the Qt dialog
virtual QDialog * form() const = 0;
-
-private:
- /// dialog title, displayed by WM.
- QString title_;
};
template <class Dialog>
-class Qt2DB: public Qt2Base
-{
+class Qt2DB: public Qt2Base {
protected:
- Qt2DB(QString const &);
+ Qt2DB(string const &);
/// update the dialog
virtual void update();
template <class Dialog>
-Qt2DB<Dialog>::Qt2DB(QString const & t)
+Qt2DB<Dialog>::Qt2DB(string const & t)
: Qt2Base(t)
{}
return controller().bufferIsReadonly();
}
-protected:
- ///
- Qt2CB(QString const &);
/// The parent controller
Controller & controller();
/// The parent controller
Controller const & controller() const;
+
+protected:
+ ///
+ Qt2CB(string const &);
};
template <class Controller, class Base>
-Qt2CB<Controller, Base>::Qt2CB(QString const & t)
+Qt2CB<Controller, Base>::Qt2CB(string const & t)
: Base(t)
{}