kpilot/kpilot

dbRecordEditor.h

00001 #ifndef _KPILOT_DBRECORDEDITOR_H
00002 #define _KPILOT_DBRECORDEDITOR_H
00003 /* dbRecordEditor.h                 KPilot
00004 **
00005 ** Copyright (C) 2003 Reinhold Kainhofer <reinhold@kainhofer.com>
00006 **
00007 */
00008 
00009 /*
00010 ** This program is free software; you can redistribute it and/or modify
00011 ** it under the terms of the GNU General Public License as published by
00012 ** the Free Software Foundation; either version 2 of the License, or
00013 ** (at your option) any later version.
00014 **
00015 ** This program is distributed in the hope that it will be useful,
00016 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00018 ** GNU General Public License for more details.
00019 **
00020 ** You should have received a copy of the GNU General Public License
00021 ** along with this program in a file called COPYING; if not, write to
00022 ** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
00023 ** MA 02110-1301, USA.
00024 */
00025 
00026 /*
00027 ** Bug reports and questions can be sent to kde-pim@kde.org
00028 */
00029 
00030 #include "options.h"
00031 #include <kdialogbase.h>
00032 
00033 class TQVBoxLayout;
00034 class TQHBoxLayout;
00035 class TQGridLayout;
00036 
00037 namespace KHE {
00038 class BytesEditInterface;
00039 }
00040 using namespace KHE;
00041 
00042 class TQButtonGroup;
00043 class TQCheckBox;
00044 class TQLabel;
00045 class TQLineEdit;
00046 
00047 class DBRecordEditorBase;
00048 class PilotRecord;
00049 
00053 class DBRecordEditor : public KDialogBase
00054 {
00055 Q_OBJECT
00056 public:
00057     DBRecordEditor(PilotRecord*r=0L, int n=-1, TQWidget *parent = 0);
00058     ~DBRecordEditor();
00059     
00060 protected:
00061     TQLabel* fRecordIndexLabel;
00062     TQLabel* fRecordIDLabel;
00063     TQLineEdit* fRecordIndex;
00064     TQLineEdit* fRecordID;
00065     TQButtonGroup* fFlagsGroup;
00066     TQCheckBox* fDirty;
00067     TQCheckBox* fDeleted;
00068     TQCheckBox* fBusy;
00069     TQCheckBox* fSecret;
00070     TQCheckBox* fArchived;
00071     TQWidget* fRecordData;
00072     KHE::BytesEditInterface*fRecordDataIf;
00073     
00074 protected:
00075     TQGridLayout* DBRecordEditorBaseLayout;
00076     TQGridLayout* fFlagsGroupLayout;
00077 
00078 protected:
00079 //  DBRecordEditorBase*fWidget;
00080     TQWidget*fWidget;
00081     char*fBuffer;
00082 protected slots:
00083     virtual void languageChange();
00084 protected:
00085     void initWidgets();
00086     void fillWidgets();
00087     PilotRecord*rec;
00088     int nr;
00089 protected slots:
00090     virtual void slotOk();
00091     virtual void slotCancel();
00092 };
00093 
00094 #endif