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

mainwindow.h

Go to the documentation of this file.
00001 /*
00002                              This file is part of the OPIE Project
00003                =.
00004              .=l.            Copyright (c)  2002 Dan Williams <drw@handhelds.org>
00005            .>+-=
00006  _;:,     .>    :=|.         This file is free software; you can
00007 .> <`_,   >  .   <=          redistribute it and/or modify it under
00008 :`=1 )Y*s>-.--   :           the terms of the GNU General Public
00009 .="- .-=="i,     .._         License as published by the Free Software
00010  - .   .-<_>     .<>         Foundation; either version 2 of the License,
00011      ._= =}       :          or (at your option) any later version.
00012     .%`+i>       _;_.
00013     .i_,=:_.      -<s.       This file is distributed in the hope that
00014      +  .  -:.       =       it will be useful, but WITHOUT ANY WARRANTY;
00015     : ..    .:,     . . .    without even the implied warranty of
00016     =_        +     =;=|`    MERCHANTABILITY or FITNESS FOR A
00017   _.=:.       :    :=>`:     PARTICULAR PURPOSE. See the GNU General
00018 ..}^=.=       =       ;      Public License for more details.
00019 ++=   -.     .`     .:
00020  :     =  ...= . :.=-        You should have received a copy of the GNU
00021  -.   .:....=;==+<;          General Public License along with this file;
00022   -_. . .   )=.  =           see the file COPYING. If not, write to the
00023     --        :-=`           Free Software Foundation, Inc.,
00024                              59 Temple Place - Suite 330,
00025                              Boston, MA 02111-1307, USA.
00026 
00027 */
00028 
00029 #ifndef MAINWINDOW_H
00030 #define MAINWINDOW_H
00031 
00032 #include <qmainwindow.h>
00033 #include <qpixmap.h>
00034 #include "cfg.h"
00035 
00036 class CBInfo;
00037 class CBInfoList;
00038 class QAction;
00039 class QListView;
00040 class QString;
00041 class QListViewItem;
00042 
00043 class MainWindow : public QMainWindow
00044 {
00045         Q_OBJECT
00046 
00047         public:
00048                 MainWindow(QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
00049                 ~MainWindow();
00050                 static QString appName() { return QString::fromLatin1("checkbook"); };
00051 
00052         // safe config
00053         void writeConfig();
00054 
00055         // open a check book
00056         void openBook(QListViewItem *curr);
00057 
00058         private:
00059                 QListView *cbList;
00060                 QString    cbDir;
00061                 QAction   *actionOpen;
00062                 QAction   *actionDelete;
00063 
00064         Cfg _cfg;
00065                 int      posName;
00066 
00067                 CBInfoList *checkbooks;
00068                 QString     tempFilename;
00069                 QPixmap     lockIcon;
00070                 QPixmap     nullIcon;
00071 
00072                 void buildList();
00073                 void addCheckbook( CBInfo * );
00074                 void buildFilename( const QString & );
00075 
00076         private slots:
00077                 void slotNew();
00078                 void slotEdit();
00079                 void slotDelete();
00080                 void slotConfigure();
00081 };
00082 
00083 #endif

Generated on Sat Nov 5 16:15:53 2005 for OPIE by  doxygen 1.4.2