home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 3.iso / dist / fw_qt3.idb / usr / freeware / Qt / examples / addressbook / centralwidget.h.z / centralwidget.h
Encoding:
C/C++ Source or Header  |  2002-04-08  |  1.5 KB  |  61 lines

  1. /****************************************************************************
  2. ** $Id:  qt/centralwidget.h   3.0.3   edited Oct 12 12:18 $
  3. **
  4. ** Copyright ( C ) 1992-2000 Trolltech AS.  All rights reserved.
  5. **
  6. ** This file is part of an example program for Qt.  This example
  7. ** program may be used, distributed and modified without limitation.
  8. **
  9. *****************************************************************************/
  10.  
  11. #ifndef AB_CENTRALWIDGET_H
  12. #define AB_CENTRALWIDGET_H
  13.  
  14. #include <qwidget.h>
  15. #include <qstring.h>
  16.  
  17. class QTabWidget;
  18. class QListView;
  19. class QGridLayout;
  20. class QLineEdit;
  21. class QPushButton;
  22. class QListViewItem;
  23. class QCheckBox;
  24.  
  25. class ABCentralWidget : public QWidget
  26. {
  27.     Q_OBJECT
  28.  
  29. public:
  30.     ABCentralWidget( QWidget *parent, const char *name = 0 );
  31.  
  32.     void save( const QString &filename );
  33.     void load( const QString &filename );
  34.  
  35. protected slots:
  36.     void addEntry();
  37.     void changeEntry();
  38.     void itemSelected( QListViewItem* );
  39.     void selectionChanged();
  40.     void toggleFirstName();
  41.     void toggleLastName();
  42.     void toggleAddress();
  43.     void toggleEMail();
  44.     void findEntries();
  45.  
  46. protected:
  47.     void setupTabWidget();
  48.     void setupListView();
  49.  
  50.     QGridLayout *mainGrid;
  51.     QTabWidget *tabWidget;
  52.     QListView *listView;
  53.     QPushButton *add, *change, *find;
  54.     QLineEdit *iFirstName, *iLastName, *iAddress, *iEMail,
  55.         *sFirstName, *sLastName, *sAddress, *sEMail;
  56.     QCheckBox *cFirstName, *cLastName, *cAddress, *cEMail;
  57.  
  58. };
  59.  
  60. #endif
  61.