Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

Name_Abbrev_Root_dlg.h

00001 /***************************************************************************
00002  *   Copyright (C) 2006 by Graeme Foster                                   *
00003  *   email    foster.graeme@gmail.com                                      *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
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: // methods
00038         NameAbbrevRootDlg(int nameWidth
00039                     ,QString nameLabel
00040                     ,int abbrevWidth
00041                     ,QString abbrevLabel
00042                     ,QMainWindow *parent = 0);
00043         // Encapsulation methods
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: // static members
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: // Properties
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: // Methods
00076 
00077 private:
00078 
00079 };
00080 
00081 #endif

Generated on Thu Apr 6 16:27:16 2006 for time-table by  doxygen 1.4.4