00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __NAME_ABBREV_ROOT_DLG_H
00022 #define __NAME_ABBREV_ROOT_DLG_H
00023
00024 #include <QtGui>
00025
00026 #include "sql.h"
00027
00028 #include "Root_dlg.h"
00029 #include "Name_Abbrev_wdgt.h"
00030
00031 #include "RootItem.h"
00032
00033 class NameAbbrevRootDlg : virtual public RootDlg
00034 {
00035 Q_OBJECT
00036
00037 public:
00038 NameAbbrevRootDlg(int nameWidth
00039 ,QString nameLabel
00040 ,int abbrevWidth
00041 ,QString abbrevLabel
00042 ,QMainWindow *parent = 0);
00043
00044 inline QString getName () {return na_wdgt->getName();}
00045 inline void setName (QString name) {na_wdgt->setName(name);}
00046 inline QString getAbbrev () {return na_wdgt->getAbbrev();}
00047 inline void setAbbrev (QString name) {na_wdgt->setAbbrev(name);}
00048 inline void setNameLength(int len){na_wdgt->setNameLength(len);}
00049 inline void setAbbrevLength(int len){na_wdgt->setAbbrevLength(len);}
00050 inline void disableControls(){ na_wdgt->disableControls();}
00051 inline void disableName(){na_wdgt->disableName();}
00052 inline void disableAbbrev(){na_wdgt->disableAbbrev();}
00053 public:
00054 static bool enableBtn(QString oldName
00055 ,QString newName
00056 ,QString oldAbbrev
00057 ,QString newAbbrev
00058 ,int parentID
00059 ,RootItem * rootItem
00060 ,bool (*pUniqueName)(QString, int)
00061 ,bool (*pUniqueAbbrev)(QString, int)
00062 ,RootDlg * dialog
00063 );
00064
00065 protected:
00066
00067 NameAbbrevWidget * na_wdgt;
00068 bool enableBtn(QString oldName
00069 ,QString OldAbbrev
00070 ,int parentID
00071 ,RootItem * rootItem
00072 ,bool (*pUniqueName)(QString, int)
00073 ,bool (*pUniqueAbbrev)(QString, int));
00074
00075 private:
00076
00077 private:
00078
00079 };
00080
00081 #endif