X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt2%2FQIndex.h;h=ecd3885e99898257d4b1c9536d66be8381c6e515;hb=1229a2712d3f4fe1392616a6973e1830cf3124ef;hp=6611b05e7e26457598859b5782ee9a45c4b67491;hpb=03add3957a3807cdd9f7608aa9277c0177988a9e;p=lyx.git diff --git a/src/frontends/qt2/QIndex.h b/src/frontends/qt2/QIndex.h index 6611b05e7e..ecd3885e99 100644 --- a/src/frontends/qt2/QIndex.h +++ b/src/frontends/qt2/QIndex.h @@ -11,61 +11,30 @@ #ifndef QINDEX_H #define QINDEX_H -#include "DialogBase.h" -#include "LString.h" -#include "boost/utility.hpp" -#include "insets/insetindex.h" +#include "Qt2Base.h" -class Dialogs; -class LyXView; +class ControlIndex; class QIndexDialog; -class QIndex : public DialogBase { -public: - QIndex(LyXView *, Dialogs *); - ~QIndex(); - /// Apply changes - void apply(); - /// close the connections - void close(); - -private: - /// Create the dialog if necessary, update it and display it. - void show(); - /// Hide the dialog. - void hide(); - /// Update the dialog. - void update(); +class QIndex : + public Qt2CB > +{ + friend class QIndexDialog; + +public: + QIndex(); - /// create an Index inset - void createIndex(string const &); - /// edit an Index inset - void showIndex(InsetCommand * const); - - /// Real GUI implementation. - QIndexDialog * dialog_; +protected: + virtual bool isValid(); - /// the LyXView we belong to - LyXView * lv_; - - /** Which Dialogs do we belong to? - Used so we can get at the signals we have to connect to. - */ - Dialogs * d_; - /// pointer to the inset if any - InsetCommand * inset_; - /// insets params - InsetCommandParams params; - /// is the inset we are reading from a readonly buffer ? - bool readonly; - - /// Hide connection. - SigC::Connection h_; - /// Update connection. - SigC::Connection u_; - /// Inset hide connection. - SigC::Connection ih_; +private: + /// Apply changes + virtual void apply(); + /// update + virtual void update_contents(); + /// build the dialog + virtual void build_dialog(); }; #endif // QINDEX_H