1.1 --- a/as_gui.h Fri Nov 28 14:20:00 2008 +0100 1.2 +++ b/as_gui.h Fri Dec 05 23:14:02 2008 +0100 1.3 @@ -1,12 +1,12 @@ 1.4 // 1.5 // OSSP asgui - Accounting system graphical user interface 1.6 -// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 1.7 -// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 1.8 -// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 1.9 -// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 1.10 +// Copyright (c) 2002-2008 The OSSP Project (http://www.ossp.org/) 1.11 +// Copyright (c) 2002-2008 Ralf S. Engelschall <rse@engelschall.com> 1.12 +// Copyright (c) 2002-2008 Michael Schloh von Bennewitz <michael@schloh.com> 1.13 +// Copyright (c) 2002-2008 Cable & Wireless Telecommunications Services GmbH 1.14 // 1.15 // This file is part of OSSP asgui, an accounting system graphical user 1.16 -// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 1.17 +// interface which can be found at http://asgui.europalab.com/. 1.18 // 1.19 // Permission to use, copy, modify, and distribute this software for 1.20 // any purpose with or without fee is hereby granted, provided that 1.21 @@ -32,7 +32,19 @@ 1.22 #ifndef AS_GUI_MWIN_H 1.23 #define AS_GUI_MWIN_H 1.24 1.25 -#include <qmainwindow.h> 1.26 +#define QT3_SUPPORT 1.27 +#include <q3mainwindow.h> 1.28 + 1.29 +//Added by qt3to4: 1.30 +#include <Q3TextStream> 1.31 +#include <Q3HBoxLayout> 1.32 +#include <QCloseEvent> 1.33 +#include <Q3Frame> 1.34 +#include <QLabel> 1.35 +#include <Q3PopupMenu> 1.36 +#include <Q3VBoxLayout> 1.37 +#include <Q3Action> 1.38 +#include <Q3ComboBox> 1.39 1.40 #ifdef HAVE_CONFIG_H 1.41 #include "ac_config.h" 1.42 @@ -46,10 +58,10 @@ 1.43 #undef _AS_VERSION_CPP_AS_HEADER_ 1.44 1.45 // Trolltech class prototypes 1.46 -class QAction; 1.47 -class QHeader; 1.48 -class QTimeEdit; 1.49 -class QComboBox; 1.50 +class Q3Action; 1.51 +class Q3Header; 1.52 +class Q3TimeEdit; 1.53 +class Q3ComboBox; 1.54 class QLineEdit; 1.55 class QLabel; 1.56 class QDate; 1.57 @@ -130,12 +142,12 @@ 1.58 } styles_t; 1.59 1.60 // Main application form window 1.61 -class Titraqform : public QMainWindow 1.62 +class Titraqform : public Q3MainWindow 1.63 { 1.64 Q_OBJECT // Generate MOC object model stubs 1.65 1.66 public: 1.67 - Titraqform(QWidget *pParent = 0, const char *kszName = 0, WFlags Flags = 0); 1.68 + Titraqform(QWidget *pParent = 0, const char *kszName = 0, Qt::WFlags Flags = 0); 1.69 ~Titraqform(void); 1.70 1.71 // Accessor methods 1.72 @@ -176,18 +188,18 @@ 1.73 Preferences *m_pPrefs; 1.74 1.75 // Main application actions 1.76 - QAction *m_pFilenewact, *m_pFileopenact; 1.77 - QAction *m_pFilesaveact, *m_pFilesaveasact; 1.78 - QAction *m_pFilecloseact, *m_pFilequitact; 1.79 - QAction *m_pAddrowact, *m_pDelrowact; 1.80 - QAction *m_pRefreshact, *m_pCutact; 1.81 - QAction *m_pCopyact, *m_pPasteact; 1.82 - QAction *m_pSyncact, *m_pPrefsact; 1.83 - QAction *m_pReportact; 1.84 + Q3Action *m_pFilenewact, *m_pFileopenact; 1.85 + Q3Action *m_pFilesaveact, *m_pFilesaveasact; 1.86 + Q3Action *m_pFilecloseact, *m_pFilequitact; 1.87 + Q3Action *m_pAddrowact, *m_pDelrowact; 1.88 + Q3Action *m_pRefreshact, *m_pCutact; 1.89 + Q3Action *m_pCopyact, *m_pPasteact; 1.90 + Q3Action *m_pSyncact, *m_pPrefsact; 1.91 + Q3Action *m_pReportact; 1.92 1.93 // Table, cells, and entries in package layout 1.94 TiTable *m_pMaintable; 1.95 - QHeader *m_pTablehead; 1.96 + Q3Header *m_pTablehead; 1.97 QStringList *m_pTaskentries; 1.98 1.99 // Edition widgets 1.100 @@ -198,11 +210,11 @@ 1.101 QLineEdit *m_pCrcedit; // Control to edit CRC 1.102 QLineEdit *m_pRevedit; // Control to edit revision 1.103 Daydatedit *m_pDateedit; // Control to edit date 1.104 - QTimeEdit *m_pStarttime; // Control to edit start time 1.105 - QTimeEdit *m_pEndtime; // Control to edit finish time 1.106 + Q3TimeEdit *m_pStarttime; // Control to edit start time 1.107 + Q3TimeEdit *m_pEndtime; // Control to edit finish time 1.108 // QTimeEdit *m_pAmount; // Control to edit total time 1.109 ASTimeEdit *m_pAmount; // Control to edit total time 1.110 - QComboBox *m_pTasks; // Control to choose a task 1.111 + Q3ComboBox *m_pTasks; // Control to choose a task 1.112 QLineEdit *m_pRemark; // Control to edit remark 1.113 1.114 protected slots: 1.115 @@ -277,25 +289,25 @@ 1.116 void closeEvent(QCloseEvent *); // Close current document in main window 1.117 1.118 // Application main window widgets 1.119 - QFrame *m_pCenframe; // Central frame 1.120 - QVBoxLayout *m_pMainlayout; // Package and control layouts 1.121 - QVBoxLayout *m_pPackagelayout; // Main table control 1.122 - QHBoxLayout *m_pEditlayout; // Lower edition widgets 1.123 + Q3Frame *m_pCenframe; // Central frame 1.124 + Q3VBoxLayout *m_pMainlayout; // Package and control layouts 1.125 + Q3VBoxLayout *m_pPackagelayout; // Main table control 1.126 + Q3HBoxLayout *m_pEditlayout; // Lower edition widgets 1.127 1.128 private: 1.129 // Owned by QMainWindow 1.130 QMenuBar *m_pMenubar; 1.131 - QPopupMenu *m_pViewpopup; // Saved for manipulating views 1.132 - QPopupMenu *m_pTbarspopup; // Saved for manipulating toolbars 1.133 - QPopupMenu *m_pColspopup; // Saved for manipulating columns 1.134 + Q3PopupMenu *m_pViewpopup; // Saved for manipulating views 1.135 + Q3PopupMenu *m_pTbarspopup; // Saved for manipulating toolbars 1.136 + Q3PopupMenu *m_pColspopup; // Saved for manipulating columns 1.137 QStatusBar *m_pStatbar; 1.138 1.139 // Belong to us 1.140 - QToolBar *m_pFiletools; 1.141 - QToolBar *m_pEdittools; 1.142 - QToolBar *m_pViewtools; 1.143 - QToolBar *m_pPrefstools; 1.144 - QToolBar *m_pWhatstools; 1.145 + Q3ToolBar *m_pFiletools; 1.146 + Q3ToolBar *m_pEdittools; 1.147 + Q3ToolBar *m_pViewtools; 1.148 + Q3ToolBar *m_pPrefstools; 1.149 + Q3ToolBar *m_pWhatstools; 1.150 QString *m_szFilename; 1.151 1.152 // Constructor helpers 1.153 @@ -313,11 +325,11 @@ 1.154 1.155 // Data processing 1.156 void loadAccounts(QFile &); // Load accounts from file 1.157 - void loadAccounts(QTextStream &); // Load accounts from stream 1.158 + void loadAccounts(Q3TextStream &); // Load accounts from stream 1.159 void loadData(QFile &); // Load personal data from file 1.160 - void loadData(QTextStream &); // Load personal data from stream 1.161 + void loadData(Q3TextStream &); // Load personal data from stream 1.162 void saveData(QFile &); // Save accounting data to file 1.163 - void saveData(QTextStream &); // Save accounting data to stream 1.164 + void saveData(Q3TextStream &); // Save accounting data to stream 1.165 const bool validateData(QFile &) const; // Validate personal data in file 1.166 const bool validateData(QString &) const; // Validate personal data from string 1.167 };