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

addressbook.h

Go to the documentation of this file.
00001 /**********************************************************************
00002 ** Copyright (C) 2000 Trolltech AS.  All rights reserved.
00003 **
00004 ** This file is part of Qt Palmtop Environment.
00005 **
00006 ** This file may be distributed and/or modified under the terms of the
00007 ** GNU General Public License version 2 as published by the Free Software
00008 ** Foundation and appearing in the file LICENSE.GPL included in the
00009 ** packaging of this file.
00010 **
00011 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00012 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00013 **
00014 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00015 **
00016 ** Contact info@trolltech.com if any conditions of this licensing are
00017 ** not clear to you.
00018 **
00019 **********************************************************************/
00020 #ifndef Addressbook_H
00021 #define Addressbook_H
00022 
00023 // Remove this for OPIE releae 1.0 !
00024 // #define __DEBUG_RELEASE
00025 
00026 #include <opie2/opimmainwindow.h>
00027 
00028 #include <qvaluelist.h>
00029 #include <qstringlist.h>
00030 #include <qlineedit.h>
00031 #include "ofloatbar.h"
00032 #include "abview.h"
00033 #include "abconfig.h"
00034 
00035 class ContactEditor;
00036 class AbLabel;
00037 class AbTable;
00038 class QToolBar;
00039 class QPopupMenu;
00040 class QToolButton;
00041 class QDialog;
00042 class Ir;
00043 class QAction;
00044 class LetterPicker;
00045 class Opie::OPimRecord;
00046 
00047 class AddressbookWindow: public Opie::OPimMainWindow
00048 {
00049         Q_OBJECT
00050 public:
00051         enum EntryMode { NewEntry=0, EditEntry };
00052 
00053         static QString appName() { return QString::fromLatin1("addressbook"); }
00054         AddressbookWindow( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
00055         ~AddressbookWindow();
00056 
00057 protected:
00058         void resizeEvent( QResizeEvent * e );
00059 
00060         void editPersonal();
00061         void editEntry( EntryMode );
00062         void closeEvent( QCloseEvent *e );
00063         bool save();
00064 
00065 public slots:
00066         void flush();
00067         void reload();
00068         void appMessage(const QCString &, const QByteArray &);
00069         void setDocument( const QString & );  // Called by obex receiver and internally!
00070 #ifdef __DEBUG_RELEASE
00071         // void slotSave();
00072 #endif
00073 
00074 protected slots:
00075     int  create();
00076     bool remove( int uid );
00077     void beam( int uid );
00078     void show( int uid );
00079     void edit( int uid );
00080     void add( const Opie::OPimRecord& );
00081 
00082 private slots:
00083     void slotItemNew();
00084     void slotItemEdit();
00085     void slotItemDuplicate();
00086     void slotItemDelete();
00087     void slotItemBeam();
00088     void slotItemFind();
00089     void slotConfigure();
00090 
00091         void importvCard();
00092         void exportvCard();
00093         void slotViewBack();
00094         void slotPersonalView();
00095         void writeMail();
00096         void beamDone( Ir * );
00097         void slotSetCategory( const QString &category );
00098         void slotSetLetter( char );
00099         void slotSetFont(int);
00100 
00101         void slotShowFind( bool show );
00102         void slotFind();
00103         void slotNotFound();
00104         void slotWrapAround();
00105 
00106         void slotViewSwitched( int );
00107         void slotListView();
00108         void slotCardView();
00109 
00110 private:
00111         QToolBar *listTools;
00112         enum Panes { paneList=0, paneView, paneEdit };
00113         ContactEditor *abEditor;
00114         LetterPicker *pLabel;
00115         AbView* m_abView;
00116         QWidget *m_listContainer;
00117 
00118         // Searching stuff
00119         OFloatBar* m_searchBar;
00120         QLineEdit* m_searchEdit;
00121 
00122         QAction *m_actionPersonal, *m_actionMail;
00123 
00124         int viewMargin;
00125 
00126         bool syncing;
00127         QFont *defaultFont;
00128         int m_curFontSize;
00129 
00130         bool isLoading;
00131 
00132         AbConfig m_config;
00133 
00134         int active_view;
00135 };
00136 
00137 #endif

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