head 1.83; access; symbols AS_AFTER_RESTRUCTURING:1.35; locks; strict; comment @ * @; 1.83 date 2004.08.20.17.47.07; author ms; state Exp; branches; next 1.82; 1.82 date 2004.05.27.22.02.29; author ms; state Exp; branches; next 1.81; 1.81 date 2004.05.27.21.48.41; author ms; state Exp; branches; next 1.80; 1.80 date 2004.05.27.21.42.26; author ms; state Exp; branches; next 1.79; 1.79 date 2004.05.27.21.33.31; author ms; state Exp; branches; next 1.78; 1.78 date 2003.11.20.11.31.20; author ms; state Exp; branches; next 1.77; 1.77 date 2003.02.17.17.18.24; author ms; state Exp; branches; next 1.76; 1.76 date 2003.02.17.13.38.22; author ms; state Exp; branches; next 1.75; 1.75 date 2003.02.14.19.27.03; author ms; state Exp; branches; next 1.74; 1.74 date 2003.02.14.17.31.54; author ms; state Exp; branches; next 1.73; 1.73 date 2003.02.13.19.49.02; author ms; state Exp; branches; next 1.72; 1.72 date 2003.02.11.14.19.57; author ms; state Exp; branches; next 1.71; 1.71 date 2003.02.06.15.55.01; author ms; state Exp; branches; next 1.70; 1.70 date 2003.02.04.19.30.31; author ms; state Exp; branches; next 1.69; 1.69 date 2003.02.03.21.14.58; author ms; state Exp; branches; next 1.68; 1.68 date 2003.02.03.10.57.57; author ms; state Exp; branches; next 1.67; 1.67 date 2003.01.30.22.02.41; author ms; state Exp; branches; next 1.66; 1.66 date 2003.01.30.14.36.01; author ms; state Exp; branches; next 1.65; 1.65 date 2003.01.29.17.05.31; author ms; state Exp; branches; next 1.64; 1.64 date 2003.01.28.17.33.55; author ms; state Exp; branches; next 1.63; 1.63 date 2003.01.28.16.41.15; author ms; state Exp; branches; next 1.62; 1.62 date 2003.01.24.16.32.18; author ms; state Exp; branches; next 1.61; 1.61 date 2003.01.22.23.57.01; author ms; state Exp; branches; next 1.60; 1.60 date 2003.01.21.12.38.01; author ms; state Exp; branches; next 1.59; 1.59 date 2003.01.16.08.26.29; author ms; state Exp; branches; next 1.58; 1.58 date 2002.12.19.20.46.26; author ms; state Exp; branches; next 1.57; 1.57 date 2002.12.18.14.50.58; author ms; state Exp; branches; next 1.56; 1.56 date 2002.12.16.16.05.57; author ms; state Exp; branches; next 1.55; 1.55 date 2002.12.16.12.11.40; author ms; state Exp; branches; next 1.54; 1.54 date 2002.12.13.23.42.37; author ms; state Exp; branches; next 1.53; 1.53 date 2002.12.13.21.25.32; author ms; state Exp; branches; next 1.52; 1.52 date 2002.12.13.20.50.18; author ms; state Exp; branches; next 1.51; 1.51 date 2002.12.12.16.20.15; author ms; state Exp; branches; next 1.50; 1.50 date 2002.12.12.13.20.43; author ms; state Exp; branches; next 1.49; 1.49 date 2002.12.12.12.45.46; author ms; state Exp; branches; next 1.48; 1.48 date 2002.12.12.12.19.48; author ms; state Exp; branches; next 1.47; 1.47 date 2002.12.11.17.15.35; author ms; state Exp; branches; next 1.46; 1.46 date 2002.12.11.16.00.47; author ms; state Exp; branches; next 1.45; 1.45 date 2002.12.10.14.23.58; author ms; state Exp; branches; next 1.44; 1.44 date 2002.12.10.12.06.56; author ms; state Exp; branches; next 1.43; 1.43 date 2002.12.05.18.03.53; author ms; state Exp; branches; next 1.42; 1.42 date 2002.12.05.14.51.29; author ms; state Exp; branches; next 1.41; 1.41 date 2002.12.04.23.22.52; author ms; state Exp; branches; next 1.40; 1.40 date 2002.12.04.18.56.59; author ms; state Exp; branches; next 1.39; 1.39 date 2002.12.04.11.34.08; author ms; state Exp; branches; next 1.38; 1.38 date 2002.12.03.19.07.55; author ms; state Exp; branches; next 1.37; 1.37 date 2002.12.03.17.05.11; author ms; state Exp; branches; next 1.36; 1.36 date 2002.12.02.13.25.36; author ms; state Exp; branches; next 1.35; 1.35 date 2002.11.28.20.44.36; author ms; state Exp; branches; next 1.34; 1.34 date 2002.11.27.23.07.38; author ms; state Exp; branches; next 1.33; 1.33 date 2002.11.27.22.44.48; author ms; state Exp; branches; next 1.32; 1.32 date 2002.11.27.18.40.15; author ms; state Exp; branches; next 1.31; 1.31 date 2002.11.27.17.11.06; author ms; state Exp; branches; next 1.30; 1.30 date 2002.11.26.22.22.53; author ms; state Exp; branches; next 1.29; 1.29 date 2002.11.26.21.18.48; author ms; state Exp; branches; next 1.28; 1.28 date 2002.11.26.20.38.19; author ms; state Exp; branches; next 1.27; 1.27 date 2002.11.26.20.25.16; author ms; state Exp; branches; next 1.26; 1.26 date 2002.11.26.17.23.51; author ms; state Exp; branches; next 1.25; 1.25 date 2002.11.26.14.10.32; author ms; state Exp; branches; next 1.24; 1.24 date 2002.11.25.15.45.06; author ms; state Exp; branches; next 1.23; 1.23 date 2002.11.25.11.40.07; author ms; state Exp; branches; next 1.22; 1.22 date 2002.11.24.23.11.56; author ms; state Exp; branches; next 1.21; 1.21 date 2002.11.24.20.39.32; author ms; state Exp; branches; next 1.20; 1.20 date 2002.11.24.18.02.43; author ms; state Exp; branches; next 1.19; 1.19 date 2002.11.24.17.56.54; author ms; state Exp; branches; next 1.18; 1.18 date 2002.11.22.19.42.25; author ms; state Exp; branches; next 1.17; 1.17 date 2002.11.22.11.46.32; author ms; state Exp; branches; next 1.16; 1.16 date 2002.11.21.15.37.08; author ms; state Exp; branches; next 1.15; 1.15 date 2002.11.20.11.06.32; author ms; state Exp; branches; next 1.14; 1.14 date 2002.11.19.20.29.08; author ms; state Exp; branches; next 1.13; 1.13 date 2002.11.19.19.42.14; author ms; state Exp; branches; next 1.12; 1.12 date 2002.11.19.08.17.44; author ms; state Exp; branches; next 1.11; 1.11 date 2002.11.18.23.34.17; author ms; state Exp; branches; next 1.10; 1.10 date 2002.11.18.22.31.12; author ms; state Exp; branches; next 1.9; 1.9 date 2002.11.18.22.13.56; author ms; state Exp; branches; next 1.8; 1.8 date 2002.11.14.22.26.30; author ms; state Exp; branches; next 1.7; 1.7 date 2002.11.14.20.29.33; author ms; state Exp; branches; next 1.6; 1.6 date 2002.11.14.18.19.29; author ms; state Exp; branches; next 1.5; 1.5 date 2002.11.13.16.36.58; author ms; state Exp; branches; next 1.4; 1.4 date 2002.11.13.12.38.25; author ms; state Exp; branches; next 1.3; 1.3 date 2002.11.12.19.16.00; author ms; state Exp; branches; next 1.2; 1.2 date 2002.11.11.21.39.08; author ms; state Exp; branches; next 1.1; 1.1 date 2002.11.08.12.27.57; author ms; state Exp; branches; next ; desc @@ 1.83 log @Unload validation of personal data file from load logic, move new validation block to validateData, change all cases of preexisting validateData to new name validateRow, test for valid data from now on before calling loadData, and place read data file error strings in constants header. @ text @// // OSSP asgui - Accounting system graphical user interface // Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) // Copyright (c) 2002-2004 Ralf S. Engelschall // Copyright (c) 2002-2004 Michael Schloh von Bennewitz // Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH // // This file is part of OSSP asgui, an accounting system graphical user // interface which can be found at http://www.ossp.org/pkg/tool/asgui/. // // Permission to use, copy, modify, and distribute this software for // any purpose with or without fee is hereby granted, provided that // the above copyright notice and this permission notice appear in all // copies. // // THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. // IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF // USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT // OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // // as_gui.h: ISO C++ interface // #ifndef AS_GUI_MWIN_H #define AS_GUI_MWIN_H #include #ifdef HAVE_CONFIG_H #include "ac_config.h" #endif #include "as_except.h" // Exception classes // Version information #define _AS_VERSION_CPP_AS_HEADER_ #include "as_version.cpp" #undef _AS_VERSION_CPP_AS_HEADER_ // Trolltech class prototypes class QAction; class QHeader; class QTimeEdit; class QComboBox; class QLineEdit; class QLabel; class QDate; class QFile; // Local class prototypes class ASTimeEdit; class Daydatedit; // Might be replaced with ASTimeEdit throughout class TiTable; class Preferences; class Prefpanel; // Intentional no operation #define TITRAQ_NOP ((void)0) #ifdef HAVE_CONFIG_H #if (SIZEOF_CHAR == 1) typedef unsigned char U8; #else ?==Error: Undefined 8 bit type #endif // U8 #if (SIZEOF_SHORT == 2) typedef unsigned short U16; #elif (SIZEOF_INT == 2) typedef unsigned int U16; #elif (SIZEOF_LONG == 2) typedef unsigned long U16; #else ?==Error: Undefined 16 bit type #endif // U16 #if (SIZEOF_SHORT == 4) typedef unsigned short U32; #elif (SIZEOF_INT == 4) typedef unsigned int U32; #elif (SIZEOF_LONG == 4) typedef unsigned long U32; #else ?==Error: Undefined 32 bit type #endif // U32 #else // HAVE_CONFIG_H (not defined) typedef unsigned char U8; #if (2 == 2) typedef unsigned short U16; #elif (4 == 2) typedef unsigned int U16; #else ?==Error: Undefined 16 bit type #endif #if (2 == 4) typedef unsigned short U32; #elif (4 == 4) typedef unsigned int U32; #elif (4 == 4) typedef unsigned long U32; #else ?== Error: Undefined 32 bit type #endif #endif // HAVE_CONFIG_H // Main table size const int g_knBlocks = 32; // Styles enumeration typedef enum { TITRAQ_STYLECDE, TITRAQ_STYLESGI, TITRAQ_STYLEMOTIF, TITRAQ_STYLEMPLUS, TITRAQ_STYLEPLAT, TITRAQ_STYLEMSOFT } styles_t; // Main application form window class Titraqform : public QMainWindow { Q_OBJECT // Generate MOC object model stubs public: Titraqform(QWidget *pParent = 0, const char *kszName = 0, WFlags Flags = 0); ~Titraqform(void); // Accessor methods const QString getRowdata(void) const; // Get a whole row of data void setRowdata(QString &) const; // Set a whole row of data const int getFirstcol(void) const; // Learn which col is first const bool isOpen(void) {return (m_szFilename == NULL) ? false : true;}; // Doc state void setOpen(bool bDocopen = true) // Set state of document { if (bDocopen) { if (m_szFilename == NULL) m_szFilename = new QString(); } else if (m_szFilename != NULL) { delete m_szFilename; m_szFilename = NULL; } }; const QString *getFilename(void) // Get the current file name { if (this->isOpen()) return m_szFilename; else throw Genexcept("File name does not exist."); }; void setFilename(const QString &Fname) // Set file name { if (this->isOpen()) // If a file name exists setOpen(false); // then get rid of it first m_szFilename = new QString(Fname); }; // Utility members void loadInit(void); // Parse cmds and open initial file // Top level members Preferences *m_pPrefs; // Main application actions QAction *m_pFilenewact, *m_pFileopenact; QAction *m_pFilesaveact, *m_pFilesaveasact; QAction *m_pFilecloseact, *m_pFilequitact; QAction *m_pAddrowact, *m_pDelrowact; QAction *m_pRefreshact, *m_pCutact; QAction *m_pCopyact, *m_pPasteact; QAction *m_pSyncact, *m_pPrefsact; QAction *m_pReportact; // Table, cells, and entries in package layout TiTable *m_pMaintable; QHeader *m_pTablehead; QStringList *m_pTaskentries; // Edition widgets QLabel *m_pStatusedit; // Control to show entry status QLineEdit *m_pLineedit; // Control to line number QLineEdit *m_pUseredit; // Control to edit user name QLineEdit *m_pGuidedit; // Control to edit GUID QLineEdit *m_pCrcedit; // Control to edit CRC QLineEdit *m_pRevedit; // Control to edit revision Daydatedit *m_pDateedit; // Control to edit date QTimeEdit *m_pStarttime; // Control to edit start time QTimeEdit *m_pEndtime; // Control to edit finish time // QTimeEdit *m_pAmount; // Control to edit total time ASTimeEdit *m_pAmount; // Control to edit total time QComboBox *m_pTasks; // Control to choose a task QLineEdit *m_pRemark; // Control to edit remark protected slots: void cutEntry(void); // Cut task entries from the list void copyEntry(void); // Copy task entries from the list void pasteEntry(void); // Paste task entries to the list void addEntry(int nRows= -1); // Add task entries to the list void delEntry(int nRows= -1); // Delete task entries from the list void refreshDisplay(void); // Refresh the display of all data items void syncIiop(void); // Syncronize data with server using IIOP void syncSoap(void); // Syncronize data with server using SOAP void newDoc(void); // Make and display a new document window void openDoc(void); // Open and display an existing document void quitApp(void); // Close the current document and quit void saveFile(void); // Serialize to the current file void saveAs(void); // Serialize to a selected file void saveName(void); // Implicitly serialize to a selected file void helpContents(void); // Use the help contents void aboutTitraq(void); // Learn more about this program itself void aboutOSSP(void); // Learn more about the OSSP void aboutQt(void); // Learn more about Qt void selAll(void); // Edit menu select all void onClick(int, int, int, const QPoint &); // Table was clicked void inplaceEdit(int, int, int, const QPoint &); // Enter in place edit mode void updEdit(int, int nCol = 0); // Update edit controls void validateRow(void); // Validate current row of matrix void validateRow(int, int); // Validate specified row of matrix void updSizes(int, int, int); // Update edit sizes void calcCrc(void); // Calculate CRC of current row void calcCrc(int, int); // Calculate CRC of specified row void dataChanged(int, int); // Timesheet data changed void updateLine(const QString &); // Update line number column void updateUser(const QString &); // Update user column void updateGuid(const QString &); // Update GUID column void updateCrc(const QString &); // Update CRC column void updateRev(const QString &); // Update rev column void updateDate(const QDate &); // Update date column void updateStart(const QTime &); // Update start column void updateFinish(const QTime &); // Update finish column void updateAmount(const QTime &); // Update amount column void updateTask(const QString &); // Update task column void updateRemark(const QString &); // Update remark column void confirmEdit(void); // Confirm whole row edition void configPrefs(void); // Edit menu configure preferences void normalView(void); // View menu normal void editingView(void); // View menu editing void timingView(void); // View menu timing void showFilebar(void); // View menu show file toolbar void showEditbar(void); // View menu show edit toolbar void showViewbar(void); // View menu show view toolbar void showPrefsbar(void); // View menu show prefs toolbar void showWhatsbar(void); // View menu show whats this toolbar void showStatcol(void); // View menu show status column void showLinecol(void); // View menu show line numbers column void showUsercol(void); // View menu show Users column void showGuidcol(void); // View menu show GUIDs column void showCrccol(void); // View menu show CRC column void showRevcol(void); // View menu show Rev column void showDatecol(void); // View menu show Dates column void showStartcol(void); // View menu show Start time column void showFinishcol(void); // View menu show Finish time column void showAmountcol(void); // View menu show Amounts column void showTaskcol(void); // View menu show Tasks column void showRemarkcol(void); // View menu show Remarks column void genReport(void); // Generate a local formatted report void savePrefs(void); // Save user preferences void applyPrefs(void); // Apply preferences from applied() void applyPrefs(Prefpanel *); // Apply preferences from accept() protected: // Application main events void closeEvent(QCloseEvent *); // Close current document in main window // Application main window widgets QFrame *m_pCenframe; // Central frame QVBoxLayout *m_pMainlayout; // Package and control layouts QVBoxLayout *m_pPackagelayout; // Main table control QHBoxLayout *m_pEditlayout; // Lower edition widgets private: // Owned by QMainWindow QMenuBar *m_pMenubar; QPopupMenu *m_pViewpopup; // Saved for manipulating views QPopupMenu *m_pTbarspopup; // Saved for manipulating toolbars QPopupMenu *m_pColspopup; // Saved for manipulating columns QStatusBar *m_pStatbar; // Belong to us QToolBar *m_pFiletools; QToolBar *m_pEdittools; QToolBar *m_pViewtools; QToolBar *m_pPrefstools; QToolBar *m_pWhatstools; QString *m_szFilename; // Constructor helpers void setupPrefs(void); // Preferences void setupActions(void); // Actions void setupMenubar(void); // Menu bar void setupToolbars(void); // Tool bars void setupStatusbar(void); // Status bar void setupCentralwidget(void); // Assemble main Frame widget void setupTable(void); // Table widget void setupEditlay(void); // Editing lay void setupPieces(void); // Assemble widget pieces void setupColumns(void); // Arrange and configure columns void enableIface(bool); // [En/dis]able most ui pieces // Data processing void loadAccounts(QFile &); // Load accounts from file void loadAccounts(QTextStream &); // Load accounts from stream void loadData(QFile &); // Load personal data from file void loadData(QTextStream &); // Load personal data from stream void saveData(QFile &); // Save accounting data to file void saveData(QTextStream &); // Save accounting data to stream const bool validateData(QFile &) const; // Validate personal data in file const bool validateData(QString &) const; // Validate personal data from string }; #endif // AS_GUI_MWIN_H @ 1.82 log @The type representing 64 bit variables on most architectures is 'long long', and because this is not specified in ISO C** (14882) remove all references. @ text @d231 2 a232 2 void validateData(void); // Validate current row of matrix data void validateData(int, int); // Validate specified row of matrix data d321 2 @ 1.81 log @Modernize copyright text in source and graphic headers. @ text @a94 10 #if (SIZEOF_SHORT == 8) typedef unsigned short U64; #elif (SIZEOF_INT == 8) typedef unsigned int U64; #elif (SIZEOF_LONG == 8) typedef unsigned long U64; #else ?==Error: Undefined 64 bit type #endif // U64 a96 7 #if (4 == 8) typedef unsigned int U64; #elif (4 == 8) typedef unsigned long U64; #else ?==Error: Undefined 64 bit type #endif d98 3 a100 1 #if (4 == 2) a101 2 #elif (2 == 2) typedef unsigned short U16; d106 3 a108 1 #if (4 == 4) a111 2 #elif (2 == 4) typedef unsigned short U32; @ 1.80 log @Correct file names in source headers. @ text @d3 4 a6 4 // Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/) // Copyright (c) 2002-2003 Ralf S. Engelschall // Copyright (c) 2002-2003 Michael Schloh von Bennewitz // Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH @ 1.79 log @remove all usage of fundamental type 'long long', because it is not specified by the ISO C++ (14882) standard. @ text @d29 1 a29 1 // titraq.h: ISO C++ interface @ 1.78 log @Handle the time consuming bureaucracy of changing a company name. @ text @a100 2 #elif (SIZEOF_LONG_LONG == 8) typedef unsigned long long U64; a110 2 #elif (8 == 8) typedef unsigned long long U64; @ 1.77 log @Implemented a local report action, and inserted local reporting logic in the report menu and view toolbar using new class Reportpanel. @ text @a3 1 // Copyright (c) 2002-2003 Cable & Wireless Deutschland (http://www.cw.com/de/) d6 1 @ 1.76 log @Begin coding a new time widget that allows unnatural time values. @ text @d207 1 @ 1.75 log @Added logic to include prefs pixmap in both menu and toolbar, removed optional 'this' parameter from all calls to connect(), ripped out more header includes from monolithic interface header, made call of prefs panel an instance of class QAction, changed .bak file message text in class Prefpanel, and renamed default RPC hosts to show what a proper format is. @ text @d59 2 a60 2 // class AmountBox; // Warning: Might be replaced with QTimeEdit class Daydatedit; d223 2 a224 2 QTimeEdit *m_pAmount; // Control to edit total time // AmountBox *m_pAmount; // Control to edit total time @ 1.74 log @Moved preference data application from panel items to own method, added applyPrefs logic, and a new proxy method to handle applied signals, and reorganized file incusion in throughout to loosen source file coupling. @ text @a34 1 #include a35 13 #include #include #include #include #include #include #include #include #include #include #include #include #include d48 11 a58 1 // Method prototypes d206 1 a206 1 QAction *m_pSyncact; d276 1 d317 1 @ 1.73 log @Lots of small changes and improvements to RPC options, menus, and action, resulting in better usability and more stable RPC functionality. @ text @a55 5 #include "as_const.h" // For general constants #include "as_pref.h" // For class Preferences #include "as_amount.h" // For class AmountBox #include "as_table.h" // For class TiTable #include "as_datedit.h" // For class Daydatedit d62 7 d295 2 @ 1.72 log @Hard coded left alignment into task table items, made amount control appearance and behaviour consistent with amount table items, and split remote host name and switches out of prefs panel paths page to its own remote page. @ text @d208 1 a208 1 QAction *m_pSynciiopact, *m_pSyncsoapact; @ 1.71 log @Begin treating quit op on an edited doc as a special case to avoid loss. @ text @d225 2 a226 1 AmountBox *m_pAmount; // Control to edit total time d267 1 a267 1 void updateAmount(const QString &); // Update amount column @ 1.70 log @Implemented auto field completion for start and finish and auto subtraction for amount, added period for GUID replacement, and added version text to widget labels. @ text @d240 1 @ 1.69 log @Implemented a quality string class including CRC32 generation logic, used throghout for checksum computation, added automatic fake CRC field detection and correction on load operations, and backed out inconsistent date and time field format changes. @ text @d62 5 @ 1.68 log @Extra help for beginning users. @ text @d65 70 @ 1.67 log @Fixed dirty data double check on implicit save ops, fixed close event method, and plugged holes where no exception handling existed for an except condition. @ text @d173 1 @ 1.66 log @Day date section focus is the default value, and happily removed a hackful zero date placeholder. @ text @d167 1 @ 1.65 log @Fixed the scroll before show bug, causing a bad data screen position. @ text @d60 1 a140 1 QDate *m_pDatezero; // Hack to store empty date d147 1 a147 1 QDateEdit *m_pDateedit; // Control to edit date @ 1.64 log @Fix the initial data loading a little more, and remove the logic from the first level gui object. @ text @d119 3 a251 2 int setupCmdargs(void); // Parse the command line args void setupInitdata(int); // Opens an inital event data file @ 1.63 log @Implemented initial file loading by shell argument, and cleaned up some other small problems. @ text @d250 1 @ 1.62 log @Implemented checksum in all forms, and implemented a revision management system that is so primitive that I commented it out until further design. @ text @d249 1 @ 1.61 log @Made CORBA and/or SOAP connections options of autoconf, so remote reporting is compiled into the client only when desired. @ text @d171 2 a172 1 void validateData(int, int); // Validate one row of matrix data d174 2 @ 1.60 log @Bugfix for very inconvenient edit control update failure. @ text @d51 4 @ 1.59 log @Add GUI cod framework, graphics, and stub methods for server syncrhonization. @ text @d166 1 a166 1 void updEdit(int, int); // Update edit controls @ 1.58 log @Added full close document and disable handling, added new dimmed icons for showing disabled state, fixed status edit control pixmap redraw, fixed remaining edit pixmap on old data, fixed get/set empy Rowdata for cut/copy/paste ops, fixed member filename corruption and data loss problem, optimized addRow and pasteRow graphic drawing, added better file name handling by accessors, and streamlined widget enablement logic in slots. @ text @d125 1 d154 2 d202 1 @ 1.57 log @Fixed row shade logic and moved dirty flag to TiTable class. @ text @d51 1 d88 26 d123 2 a124 3 QAction *m_pRefreshact; QAction *m_pCutact, *m_pCopyact; QAction *m_pPasteact, *m_pWritedataact; d237 1 @ 1.56 log @Implemented joined column sorting. Implemented refreshDisplay, and add action to appropriate edit and view menus. @ text @a83 2 const bool isDirty(void) {return m_bDirt;}; // Check for changed state danger void setDirty(bool bDirty = true) {m_bDirt = bDirty;}; // Clean or dirty d140 1 a140 1 void dataChanged(void); // Timesheet data changed a198 3 // Standard members bool m_bDirt; // To track dirty and clean states @ 1.55 log @Removed hardcoded tasks, implemented dynamic account loading, renamed conf file, corrected comment and empty line handling in load ops. @ text @d98 1 d128 1 d161 1 d198 1 @ 1.54 log @Smooth out transition from closed to open document state, and add placeholding pixmap. Fixed row add and paste logic to include initialization and validation. Implement cut and past of user data. Fix cut and paste line feed bug. Disable edit controls until first document is created. @ text @d214 4 a217 2 void loadData(QFile &); // Load accounting data from file void loadData(QTextStream &); // Load accounting data from stream @ 1.53 log @Better initialization by disabling edit controls until a new document. @ text @a140 1 void updateStatus(const QString &); // Update status column @ 1.52 log @Implemented basic validation logic, reflected by pixmaps in both table and edit control. @ text @a138 1 void validateData(void); // Validation overloaded convenience method @ 1.51 log @Fix closure on clean state bug in a better way. @ text @d44 1 d108 1 a108 1 QLineEdit *m_pStatusedit; // Control to show entry status d138 2 @ 1.50 log @Implement connections for matrix text fields with edit control widgets. @ text @d138 1 a138 1 void dataChanged(int, int); // Timesheet data changed @ 1.49 log @Implement persistent toolbar preferences. @ text @d139 6 @ 1.48 log @Load column view preferences on init, and save them on exit. @ text @d198 1 a198 1 void setupFiletools(void); // Tool bar @ 1.47 log @Fix bottom control layout by detecting first viewable column and adjusting control size accordingly. @ text @d165 1 d192 1 a192 1 bool m_bDirt; // To track dirty and clean states d204 1 @ 1.46 log @Add line number and status columns. Make all columns ausblendbar. Activate column menu selectors. @ text @d87 1 @ 1.45 log @Now all data fields are in the view table as well. @ text @d106 2 @ 1.44 log @In order to prepare for missing data format implementations, replace last globals with constants, remove unused constants, and remove incomplete task truncating until a better solution is found. @ text @d106 10 a115 6 QDateEdit *m_pDateedit; // Control used to edit dates QTimeEdit *m_pStarttime; // Control used to edit start time QTimeEdit *m_pEndtime; // Control used to edit finish time AmountBox *m_pAmount; // Control used to edit total time QComboBox *m_pTasks; // Control used to choose a task QLineEdit *m_pRemark; // Control used to edit remark d150 1 d152 1 d154 2 a156 2 void showUsercol(void); // View menu show Users column void showTaskcol(void); // View menu show Tasks column d160 1 @ 1.43 log @Completed dirty data state conditionals. @ text @a60 1 const int g_knCols = 6; @ 1.42 log @Flush dirty state saving changes without considering broken build. @ text @d121 1 a121 1 void chooseFile(void); // Choose a file using a handy file dialog @ 1.41 log @Implement multirow edition including complete cut copy and paste. @ text @d132 1 @ 1.40 log @Implemented row by row editing, introduced working cut copy and paste methods. @ text @d115 5 a119 5 void cutEntry(void); // Cut a task entry from the list void copyEntry(void); // Copy a task entry from the list void pasteEntry(void); // Paste a task entry to the list void addEntry(void); // Add a task entry to the list void delEntry(void); // Delete a task entry from the list @ 1.39 log @Correct dynamic refresh behaviour of table data from edit widgets. @ text @d84 4 a87 2 const bool isDirty(void) {return m_bDirt;}; // Check for changed state danger void setDirty(bool bDirty = true) {m_bDirt = bDirty;}; // Clean or dirty @ 1.38 log @Implement rudimentary bottom widget edit connections to main table text cells. @ text @d133 1 a133 1 void updateAmount(int); // Update amount column @ 1.37 log @Added TiTable object to MOC Mapping, added normal view menu again, added ugly edition state member flag, fixed double click table header resize bug, added auto advance in place edit feature. @ text @d130 6 @ 1.36 log @Logic changes to correct the buildconf after CVS restructure. @ text @d83 4 d132 1 a173 6 // Standard methods bool isDirty(void) {return m_bDirt;}; // Check for changed state danger // Accessor methods void setDirty(bool bDirty = true) {m_bDirt = bDirty;}; // Clean or dirty @ 1.35 log @Massive build configuration preparation, added boilerplate header text, and cleaned up whitespace. @ text @d32 2 a33 2 #ifndef TITRAQMWIN_H #define TITRAQMWIN_H d50 4 a53 4 #include "titconst.h" // For general constants #include "titprefs.h" // For class Preferences #include "titamount.h" // For class AmountBox #include "titable.h" // For class TiTable d194 1 a194 1 #endif // TITRAQMWIN_H @ 1.34 log @Fixed current file save logic, smoothed edit controls, and corrected name of edition layout. @ text @d1 31 @ 1.33 log @Added eventhandler to catch illegal double clicks, minimized layout of edition controls, changes to slot arrangement. @ text @d120 1 a120 2 QHBoxLayout *m_pDatelayout; // Lower date and time widgets QHBoxLayout *m_pTasklayout; // Lower task and remark widgets @ 1.32 log @Implement in place editing, with intuitive error safety features. @ text @a75 1 QPushButton *m_pConfirmbutton; // Button used to confirm edition d94 2 a95 1 void confirmEdit(void); // Confirm recent edition @ 1.31 log @Add class TiTable just to override normal cell highlighting, and correct delete entry button label. @ text @d93 1 @ 1.30 log @Corrected add row on empty table special case, and added an ugly hack to allow for invalid zero dates. @ text @d22 1 d64 1 a64 1 QTable *m_pMaintable; @ 1.29 log @Doch, use a push button to confirm edition of a task tuple. @ text @d68 8 a75 7 QDateEdit *m_pDateedit; QTimeEdit *m_pStarttime; QTimeEdit *m_pEndtime; AmountBox *m_pAmount; QComboBox *m_pTasks; QLineEdit *m_pRemark; QPushButton *m_pConfirmbutton; @ 1.28 log @Remove all push button widgets, since the enhanced edit tool has the same functionality built in. Also remove the writeData callback, to favor a better approach. @ text @d15 1 d74 1 d92 1 @ 1.27 log @Toolbar showing and hiding on demand. @ text @a11 1 #include a73 6 // Push buttons in control layout QPushButton *m_pAddbutton; QPushButton *m_pDeletebutton; QPushButton *m_pWritebutton; QPushButton *m_pQuitbutton; a74 1 virtual void init(void); // Override init to include custom controls a79 1 void writeEntry(void); // Write the task list to a filedescriptor a115 1 QHBoxLayout *m_pControllayout; // Lower control buttons a148 1 void setupButtons(void); // Push button widgets @ 1.26 log @Add several missing edit actions, icons for them, and restructure view menu according to thl+ms mui+gui brainstorming. @ text @d130 3 @ 1.25 log @Add edit toolbar to eventually replace bottom button matrix, and correct edit control update logic to avoid needlessly updating controls from empty fields. @ text @d58 3 a60 2 QAction *m_pAddrowact, *m_pDeleterowact; QAction *m_pWritedataact; d83 3 a96 3 void cut(void); // Edit menu cut void copy(void); // Edit menu copy void paste(void); // Edit menu paste a99 1 void normalView(void); // View menu normal d102 12 d135 1 @ 1.24 log @Add AmountBox class to introduce missing functionality from QSpinBox, and implement most edit control updates. @ text @d121 2 a122 1 QToolBar *m_pToolbar; @ 1.23 log @Connection of edit signals to prototype. @ text @d19 3 a21 2 #include "titprefs.h" #include "titconst.h" d70 1 a70 1 QSpinBox *m_pAmount; @ 1.22 log @Implemented table data saving to a local file, and began new accessor method group with setDirty(). @ text @d96 1 @ 1.21 log @Improve new preference object handling. @ text @d123 1 a123 1 bool m_bDirt; // To track dirty and clean states d126 4 a129 1 bool isDirty(void); // Check for changed state danger d146 2 @ 1.20 log @Correct build config after preferences integration. @ text @d30 11 d129 1 a138 1 void setupPrefs(void); // Preferences @ 1.19 log @Add a DOM based configuration file. @ text @d19 1 a19 1 #include "prefs.h" @ 1.18 log @Added exceptions to data ops, completed main static file loading logic, and removed hard coded table limits. @ text @d19 3 d39 3 d127 1 @ 1.17 log @Start using real AS data, correct load logic, and move data operations to tidatops. @ text @d24 1 a24 1 const int g_knRows = 16; @ 1.16 log @Consistency fix, and repair slots for opening and saving to local files. @ text @d17 1 a68 1 void loadData(const QString &); // Load accounting data into main window d121 4 @ 1.15 log @Save time and resources by loading pixmaps on demand only. Removed some icons to unclutter the screen estate. @ text @d67 3 a69 3 void choose(void); // Choose a file using a handy file dialog void load(const QString &); // Load accounting data into main window void save(void); // Serialize to the current file @ 1.14 log @Added edit and view drop down menus, enhanced existing ones. @ text @a46 10 // Reusable graphics QImage *m_pCwlogo; QImage *m_pOsspicon; QImage *m_pOssplogo; QImage *m_pQticon; QImage *m_pNewicon; QImage *m_pOpenicon; QImage *m_pSaveicon; QImage *m_pWhatsicon; d71 2 a72 1 void about(void); // Learn more about this program itself a111 1 void setupIcons(void); // Icons @ 1.13 log @Radical optimization of widget initialization and refresh. Removal of excess baggage in daily table. Addition of editing section. Apply new image logic. Reworked layouts. Improved task selection. @ text @d84 8 @ 1.12 log @Add CW logo and rework message boxes under the help menu. @ text @d13 2 d48 1 a48 1 QImage *m_pCwicon; d50 1 d57 8 a70 3 // Line edit for status QLineEdit *m_pStatus; d93 2 d120 1 a120 1 void setupOutput(void); // Output widget @ 1.11 log @Put this pig to bed, after some more restructuring, handling improvements, and display optimization. @ text @d46 1 @ 1.10 log @Move methods assiting in construction of the GUI to titassist. @ text @d107 1 a107 1 void setupCentralwidget(void); // Frame widget d111 1 @ 1.9 log @Break the monolithic pig-constructor into smaller pigs. @ text @d102 1 @ 1.8 log @Actions added for push buttons, whatsthis text added for all actions, and more features added. Write button is now red. @ text @d16 3 d31 1 a31 1 ~Titraqform(); a42 2 QImage *m_pIconimage; QPixmap *m_pIconpixmap; d45 8 d73 2 a74 1 void aboutQt(void); // Learn more about this program and Qt d87 1 a87 1 // Don't destroy these, they are owned by QMainWindow d100 10 @ 1.7 log @Improve layout of widgets by removing a layout and adding attributes to the central frame. @ text @d18 1 a18 1 const int g_knRows = 18; d24 1 a24 1 Q_OBJECT // Needed for MOC object model generation d34 2 d79 3 a82 1 QStatusBar *m_pStatbar; d85 4 @ 1.6 log @Add actions, corresponding slots, use new bitmaps, add a toolbar, begin coding of data serialization logic. @ text @a69 1 QVBoxLayout *m_pTitraqformlayout; // Main form layout @ 1.5 log @First cut at a menu bar, tool bar, and status bar. @ text @d6 1 d30 5 d56 7 d65 4 d80 3 @ 1.4 log @Introduce prototypes, correct variable naming, and other cleanups. @ text @d7 3 d59 4 @ 1.3 log @Change from QDialog to QMainWindow, reframe widget layouts, add more buttons, add tool tips, handle quit action, fill table items with meaningful widgets, resize columns, add autocompletion of tasks, chew potatoes, cook rice. @ text @d1 2 a2 2 #ifndef OPKGFORM_H #define OPKGFORM_H d4 1 a6 1 #include a7 1 #include d14 2 a15 2 const int knRows = 18; const int knCols = 6; d27 5 a31 5 QTable *pMaintable; QHeader *pTablehead; QImage *pIconimage; QPixmap *pIconpixmap; QStringList *pTaskentries; d34 4 a37 4 QPushButton *pAddbutton; QPushButton *pDeletebutton; QPushButton *pWritebutton; QPushButton *pQuitbutton; d40 1 a40 1 QLineEdit *pStatus; d43 4 a46 4 virtual void init(); // Override init to include custom controls void addEntry(); void delEntry(); void writeEntry(); d49 5 a53 4 QVBoxLayout *pTitraqformlayout; // Main form layout QVBoxLayout *pMainlayout; // Package and control layouts QVBoxLayout *pPackagelayout; // Main table control QHBoxLayout *pControllayout; // Lower control buttons d58 1 a58 1 #endif // OPKGFORM_H @ 1.2 log @Flush changes ending in a more complete application frame. @ text @d4 1 a4 1 #include a8 1 #include d19 1 a19 1 class Titraqform : public QDialog d24 1 a24 2 Titraqform(QWidget *pParent = 0, const char *kszName = 0, bool bModal = false, WFlags Flags = 0); d32 1 a32 1 QStringList *pComboentries; d38 1 d45 3 d54 2 @ 1.1 log @Write the general framework for the main control window. @ text @a3 1 #include d5 8 a12 6 class QVBoxLayout; class QHBoxLayout; class QGridLayout; class QLineEdit; class QPushButton; class QTable; d14 6 d21 2 a22 2 { Q_OBJECT d26 1 a26 1 bool bModal = FALSE, WFlags Flags = 0); d29 1 d31 7 a37 2 QLineEdit *pStatusline; QPushButton *pInstallbutton; d39 4 a42 2 QPushButton *pVerifybutton; QPushButton *pCommitbutton; d45 1 a45 1 virtual void init(); d48 4 a51 4 QVBoxLayout *pTitraqformlayout; QVBoxLayout *pMainlayout; QVBoxLayout *pPackagelayout; QHBoxLayout *pControllayout; @