Fri, 28 Nov 2008 11:21:08 +0100
Fork project trunk at version 0.7.7 to maintain for future usage.
The original Cable & Wireless development team no longer exists.
The OSSP CVS repository is unavailable (cvs co ossp-pkg/as fails),
however http://cvs.ossp.org/dirview?d=ossp-pkg/as/as-gui is working.
1.1 --- a/.hgignore Thu Nov 27 14:21:10 2008 +0100 1.2 +++ b/.hgignore Fri Nov 28 11:21:08 2008 +0100 1.3 @@ -3,3 +3,18 @@ 1.4 *.rej 1.5 *.o 1.6 *~ 1.7 +Makefile 1.8 +as_stub.h 1.9 +as_stub.cpp 1.10 +ac_config.h 1.11 +ac_config.h.in 1.12 +ac_config.h.in~ 1.13 +configure 1.14 +configure.lineno 1.15 +config.log 1.16 +config.status 1.17 +as-gui 1.18 +as-gui.1 1.19 +as-gui.conf.5 1.20 +shtool 1.21 +autom4te.cache
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/AUTHORS Fri Nov 28 11:21:08 2008 +0100 2.3 @@ -0,0 +1,2 @@ 2.4 +Michael Schloh von Bennewitz 2.5 +michael@schloh.com
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/ChangeLog Fri Nov 28 11:21:08 2008 +0100 3.3 @@ -0,0 +1,240 @@ 3.4 +Geschichte des OSSP titraq in Vorwaerts Cronordnung 3.5 + 3.6 +040824 Corrected with-qt expression as already indicated by configure --help 3.7 + Avoid forgotten save data loss by connecting QTable's valueChanged signal 3.8 + Corrected in place edition logic to work with newer Qt library editCell() 3.9 + Corrected overlapping highlights on row edge tab and return keypresses 3.10 + Implemented return and enter keypress logic in class TiTable 3.11 + 3.12 +040820 Renamed validateData() to validateRow(), and reimplement validateData() 3.13 + Replaced account and event file open error strings into constants file 3.14 + Repaired flawed new and open file logic when the operation is cancelled 3.15 + Improved data checking to avoid opening wrong account and event files 3.16 + 3.17 +040813 Corrected with-mico expression as already indicated by configure --help 3.18 + Corrected with-esoap expression as already indicated by configure --help 3.19 + 3.20 +040812 Work around a selection bug (bad row highlights) in Qt? since 3.2.? 3.21 + Upgraded build environment to GNU shtool 2.0.0 and GNU autoconf 2.59 3.22 + Changed URL for deployment and storage of release tarballs 3.23 + 3.24 +040528 More closely adhere to C++ standard (currently ISO 14882) by 3.25 + removing all fundemental type variables of 'long long'. 3.26 + 3.27 +031120 Handle the time consuming bureaucracy of changing a company name. 3.28 + 3.29 +031118 More reliably detect X11 features like Xft and Xrender, and 3.30 + integrate pkg-config aclocal M4 macro to call pkg-config from 3.31 + within configure. Now OSSP as-gui requires Gnome pkg-config. 3.32 + 3.33 +030802 Added a check for sched_get_priority_min in librt to configure.in 3.34 + 3.35 +030428 Fixed a bug, causing a cancelled focus operation on rowadd 3.36 + 3.37 +030306 Wrote the as-events.5 manpage in POD format 3.38 + Wrote the as-accounts.5 manpage in POD format 3.39 + Bumped release to 0.7.0, due to completed documentation 3.40 + 3.41 +030305 Wrote the as-gui.1 manpage in POD format 3.42 + Wrote the as-gui.conf.5 manpage in POD format 3.43 + Made small formatting changes to documentation 3.44 + Changed names of as_gui[.*].pod to as-gui[.*].pod 3.45 + Documented conversion corrections from pod2html generated HTML 3.46 + Implemented reading and browsing glue code to new help reference 3.47 + Turned on all man and help file logic in install target of Makefile 3.48 + Added datadir variable passing in buildconf to enable new help features 3.49 + 3.50 +030228 Fixed badly-sized accounts combobox 3.51 + Changed CRC calculation to pad resulting string with '0' to 8 places 3.52 + 3.53 +030227 Implemented frame of a help contents HTML browser 3.54 + Made adjustments to report panel layout 3.55 + 3.56 +030225 Smoothed layout of report panel 3.57 + Added tab focus to all buttons in report panel 3.58 + 3.59 +030224 Fixed bug in report panel causing merging of separate account entries 3.60 + Fixed bug in report panel giving false results from unsorted tables 3.61 + Added alternative colours that look nicer on win32 OS 3.62 + Implemented a Numdialog class for use in the report panel 3.63 + Hooked in all arbitrary number inputs to report panel class 3.64 + Removed button 'both' and corresponding methods from report panel 3.65 + Added button 'print' and postscript printing logic to report panel 3.66 + Completed implementation of number dialog and report panel classes 3.67 + 3.68 +030221 Created a cholour prefs page to include row shading 3.69 + Reluctantly added coupling between TiTable and Preferences classes 3.70 + Introduced colour shading preferences and controls in prefpanel 3.71 + Completed colour preferences logic throughout rendering 3.72 + Improved colour preferences group box and widget resizing 3.73 + Fixed problem with false colours used in row shading 3.74 + Added code to enable reverting to default shading colours 3.75 + Created pixmap for colour revert button 3.76 + Finished detail and total methods from report panel class 3.77 + 3.78 +030220 Implemented vast report generation improvements 3.79 + Added three new preference values for use with reporting 3.80 + Added exception handling to report generation class 3.81 + Improved intuition of reporting by adding checkmarks to menus 3.82 + Insert starting and ending report text in case a range is chosen 3.83 + Improved button navigation of report panel dialog 3.84 + Overloaded writeHeader() to be more useful to members 3.85 + Added 'detailed listing' and 'signature line' to prefs panel 3.86 + Changed ASCII strings in panel dialogs to unicode translations 3.87 + 3.88 +030219 Cleaned up the dataops class 3.89 + Got report generation working finally 3.90 + Fixed string text of Reportpanel class 3.91 + Reluctantly added linkage from Reportpanel to both prefs and table 3.92 + 3.93 +030218 Added logic to save to a file the contents of the report display 3.94 + 3.95 +030217 Began coding new class ASTimeEdit to allow unnatural time values 3.96 + Implemented class Reportpanel for locally generated weekly reports 3.97 + Inserted new report generation into report menu and view toolbar 3.98 + Added a report action, two report pixmaps, and an iconset 3.99 + Made general fixes and improvements on class Prefpanel 3.100 + 3.101 +030214 Moved preference data application from panel items to own method 3.102 + Added applyPrefs logic, and a new proxy method to handle applied signals 3.103 + Reorganized file incusion in throughout to loosen source file coupling 3.104 + Removed optional 'this' parameter from all calls to connect() 3.105 + Ripped out more header includes from monolithic interface header 3.106 + Added pixmap for prefs panel, and added it to menu and toolbar 3.107 + Made call of prefs panel an instance of class QAction 3.108 + Changed .bak file message text in class Prefpanel 3.109 + Gave more sensible default RPC host names 3.110 + 3.111 +030213 Implemented multiple row spanning SOAP trasmissions 3.112 + Modified CORBA and SOAP methods to use preferences host names 3.113 + Added lock methods to class Panel to lock RPC transports on or off 3.114 + Added logic to limit RPC according to compile time availability 3.115 + Merged both IIOP and SOAP RPC transport actions into a single one 3.116 + Revised RPC options and menu logic to pref panel and action changes 3.117 + Modified class Panel accept operation to apply changes immediately 3.118 + Activate file extension switch, and use preference value from panel 3.119 + Remove default event file insert, and instead default to event directory 3.120 + Fixed bug in class Simplefile, trying to save to non-open file 3.121 + Save backup files based on existing logic and new user preferences 3.122 + 3.123 +030212 Finished preferences working logic in class Panel 3.124 + 3.125 +030211 Served rse request to make amount edit control widget match table one 3.126 + Served rse request to align task widgets to the left, pending user pref 3.127 + Improved prefs panel class by splitting remote host names out 3.128 + Implemented thl idea, a sorted task name map 3.129 + Began coding dynamic task placement 3.130 + 3.131 +030210 Implemented the prefs panel user interface piece, no working logic yet 3.132 + 3.133 +030208 Implemented Simplefile class with working backup method 3.134 + 3.135 +030207 Implemented preferences panel class prefpanel 3.136 + 3.137 +030206 Implemented embedding of escape characters into event data file 3.138 + Begin treating quit op on an edited doc as a special case to avoid loss 3.139 + Fixed tab completion bug in which table entry misses text after expansion 3.140 + 3.141 +030205 Add logic to save empty remark fields with surrounding double quotes 3.142 + CORBA client transmission improvements, including multiple entry allowance 3.143 + 3.144 +030204 Minor change to prematurely accept event format version 0.6 3.145 + Fix constant bug to really prematurely accept event format version 0.6 3.146 + Added dynamically bound version text to all widget label titles 3.147 + Implemented current (date|time) on '.', zero (date|time) on empty field 3.148 + Hardcoded math logic to compute start '-' finish on '.' amount entry 3.149 + Load logic now replaces period with fresh newly generated GUIDs 3.150 + Tried to fix tarball rolling file name exceptions in devtool 3.151 + Replaced __u format datatypes in Uuid class with U from master header 3.152 + Completed the AS tuple in IDL, and transmit only CORBA duped strings 3.153 + 3.154 +030203 Better implement 'please add entries' announcement to beginning users 3.155 + Improved edit control [en|dis]ablement condition, and remove pixmap 3.156 + Deny pasting of empty clipboard data, and adding of zero rows 3.157 + Backed out logic to recognize '-', '+', and '=' separator symbols 3.158 + Implemented a quality string class with a CRC32 checksum method 3.159 + Load logic now fills in '.' in CRC field with a fresh new CRC 3.160 + More widget label renaming to AS Accounting System 3.161 + 3.162 +030131 Fix logic when calling saveFile, but returning in a dirty state 3.163 + Fix some logical combinations of open and new doc save operations 3.164 + Renamed some visible widget text from to AS Accounting System 3.165 + 3.166 +030130 Made day date section focus the default value 3.167 + Remove hackful zero date value, replace with current date 3.168 + Added aggregate class User, and prefer user data from environment 3.169 + Fixed ignored prepared entry bug on new document operation 3.170 + Implemented writing and testing of a data version symbol 3.171 + Fixed missing double dirty data check on implicit saveAs ops 3.172 + Fixed close document operation with bad caption and status message 3.173 + Added exception handlers where none existed to close possible bugs 3.174 + Improved condition of empty but open timesheets by disabling edit cntrls 3.175 + Fixed open document but empty timesheet debug text spew bug 3.176 + Fixed void clipboard pointer bug 3.177 + 3.178 +030129 Fixed the autoscroll before show bug, causing wrong data position 3.179 + 3.180 +030128 Added missing MIME icon entries for synciiop and syncsoap 3.181 + Implemented initial file loading by shell argument 3.182 + 3.183 +030127 Changed date and time from ISO format to AS specific 3.184 + Added logic to dim and undim icons on (non)empty documents 3.185 + Improved intuitiveness of a newDoc operation by appending a default row 3.186 + Implemented automatic file backups using a very primitive algorhythm 3.187 + Fixed subtle unintentional split else codeblock in slot saveAs 3.188 + Added automatic appending of AS event file extension to new docs 3.189 + Added '-' and '=' as arbitrary data token separators between times 3.190 + 3.191 +030124 Added CRC and basic revision management logic 3.192 + Removed sort on load to allow easier file diffs 3.193 + Allow only reasonable fields to transmit to server 3.194 + Improved invalid data signaling in both Titable and ctrls 3.195 + Made account and event file and directory handling generic 3.196 + 3.197 +030123 Added logic to make IIOP and SOAP connections optional 3.198 + Fixed potentially disastrous bug with current file overwrite 3.199 + Fixed broken Linux build problem with -R linker arguments 3.200 + Improved RPC data transmission by selecting current row 3.201 + Made pasted rows receive new GUIDs to avoid duplicates 3.202 + 3.203 +030122 Added IIOP and SOAP connection operations 3.204 + Added menu items for remote reporting over IIOP or SOAP 3.205 + Fixed inconvenient edit control update bug 3.206 + Added UUID class, able to generate DCE standard UUIDs 3.207 + Added UUID generation ability to add entry operations 3.208 + 3.209 +021220 Added missing task tooltip and whatsthis info 3.210 + Fixed loadData problem actually in updEdit() 3.211 + Fixed sorting, and added sort direction handling 3.212 + Fixed selection and highlight of current row 3.213 + 3.214 +021219 Added full close document and disable handling 3.215 + Added new dimmed icons for showing disabled state 3.216 + Fixed status edit control pixmap redraw 3.217 + Fixed remaining edit pixmap on old data 3.218 + Fixed get/set empy Rowdata for cut/copy/paste ops 3.219 + Fixed member filename corruption and data loss problem 3.220 + Optimized addRow and pasteRow graphic drawing 3.221 + Added better file name handling by accessors 3.222 + Streamlined widget enablement logic in slots 3.223 + Corrected remaining build configuration issues 3.224 + 3.225 +021218 Reduced dependency to STL 3.226 + Changed release name from asgui to as-gui 3.227 + Finished differential shading algorythm 3.228 + Row and selection handling fixes 3.229 + Corrected pixmap refreshes 3.230 + 3.231 +021217 Added differential row shading 3.232 + Improved focus handling in edit mode 3.233 + Add file extension filter to file op dialogs 3.234 + Resolve save problems to symbolic link 3.235 + 3.236 +021216 Added protection against existing file overwriting. 3.237 + Added column sort on click with full row swapping. 3.238 + Added persistent sorting to user preferences. 3.239 + Added view refresh and new view menu items. 3.240 + Added dynamic account list loading. 3.241 + Improved dirty flag tracking. 3.242 + 3.243 +021108 Projekt Erzeugung
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/Makefile.in Fri Nov 28 11:21:08 2008 +0100 4.3 @@ -0,0 +1,230 @@ 4.4 +## 4.5 +## OSSP asgui - Accounting system graphical user interface 4.6 +## Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 4.7 +## Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 4.8 +## Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 4.9 +## Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 4.10 +## 4.11 +## This file is part of OSSP asgui, an accounting system graphical user 4.12 +## interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 4.13 +## 4.14 +## Permission to use, copy, modify, and distribute this software for 4.15 +## any purpose with or without fee is hereby granted, provided that 4.16 +## the above copyright notice and this permission notice appear in all 4.17 +## copies. 4.18 +## 4.19 +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 4.20 +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 4.21 +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 4.22 +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 4.23 +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 4.24 +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 4.25 +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 4.26 +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 4.27 +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 4.28 +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 4.29 +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 4.30 +## SUCH DAMAGE. 4.31 +## 4.32 +## Makefile.in: Autoconf Makefile template 4.33 +## 4.34 + 4.35 +@SET_MAKE@ 4.36 + 4.37 +DESTDIR = 4.38 +prefix = @prefix@ 4.39 +exec_prefix = @exec_prefix@ 4.40 +bindir = @bindir@ 4.41 +sbindir = @sbindir@ 4.42 +libdir = @libdir@ 4.43 +datadir = @datadir@ 4.44 +includedir = @includedir@ 4.45 +mandir = @mandir@ 4.46 + 4.47 +CC = @CC@ 4.48 +CXX = @CXX@ 4.49 +CFLAGS = @CFLAGS@ @DEFS@ 4.50 +CXXFLAGS = @CXXFLAGS@ @DEFS@ 4.51 +#CFLAGS = @CFLAGS@ @DEFS@ -Wl,-Bstatic 4.52 +#CXXFLAGS = @CXXFLAGS@ @DEFS@ -Wl,-Bstatic 4.53 +CPPFLAGS = @CPPFLAGS@ 4.54 +CXXCPP = @CXXCPP@ 4.55 +LDFLAGS = @LDFLAGS@ 4.56 +LIBS = @LIBS@ 4.57 + 4.58 +# CORBA-specific variables 4.59 +CORBABASE = @CORBABASE@ 4.60 +IDL = $(CORBABASE)/bin/idl 4.61 + 4.62 +# Qt-specific variables 4.63 +QTCFLAGS = @QT_CFLAGS@ 4.64 +QTLIBS = @QT_LIBS@ 4.65 +QTBASE = @QTBASE@ 4.66 +UIC = @UIC@ 4.67 +MOC = @MOC@ 4.68 + 4.69 +RM = rm -f 4.70 +STRIP = strip 4.71 +CHMOD = chmod 4.72 +RMDIR = rmdir 4.73 +SHTOOL = ./shtool 4.74 +POD2MAN = pod2man 4.75 +TRUE = true 4.76 + 4.77 +PROG_NAME = as-gui 4.78 +TARGET_PROGS = as-gui 4.79 +TARGET_MANS = as-gui.1 as-gui.conf.5 4.80 + 4.81 +SRCS = as_main.cpp as_gui.cpp as_assist.cpp as_slot.cpp as_dataop.cpp as_except.cpp as_generic.cpp as_amount.cpp as_table.cpp as_panel.cpp as_reportpanel.cpp as_helpanel.cpp as_numdial.cpp as_sfile.cpp as_pref.cpp as_user.cpp as_rand.cpp as_crc.cpp as_uuid.cpp as_version.cpp 4.82 + 4.83 +OBJS = as_main.o as_gui.o as_assist.o as_slot.o as_dataop.o as_except.o as_generic.o as_amount.o as_table.o as_panel.o as_sfile.o as_pref.o as_reportpanel.o as_helpanel.o as_numdial.o as_user.o as_rand.o as_crc.o as_uuid.o as_version.o 4.84 + 4.85 +GRAFX = gfx/ossplogo.xpm 4.86 + 4.87 +# IDL compiler generated 4.88 +IDL_SRC = as_stub.idl 4.89 +IDL_OUT = as_stub.cpp as_stub.h 4.90 +IDL_OBJ = as_stub.o 4.91 + 4.92 +# Qt meta object compiler (MOC) generated 4.93 +MOC_OUT = moc_as_gui.cpp moc_as_table.cpp moc_as_panel.cpp moc_as_reportpanel.cpp moc_as_helpanel.cpp moc_as_numdial.cpp 4.94 +MOC_OBJ = moc_as_gui.o moc_as_table.o moc_as_panel.o moc_as_reportpanel.o moc_as_helpanel.o moc_as_numdial.o 4.95 + 4.96 +.SUFFIXES: 4.97 +.SUFFIXES: .c .cc .cpp .cxx .o 4.98 +.c.o: 4.99 + $(CXX) -c $(CPPFLAGS) $(QTCFLAGS) $(CXXFLAGS) $< 4.100 + 4.101 +.cc.o: 4.102 + $(CXX) -c $(CPPFLAGS) $(QTCFLAGS) $(CXXFLAGS) $< 4.103 + 4.104 +.cpp.o: 4.105 + $(CXX) -c $(CPPFLAGS) $(QTCFLAGS) $(CXXFLAGS) $< 4.106 + 4.107 +.cxx.o: 4.108 + $(CXX) -c $(CPPFLAGS) $(QTCFLAGS) $(CXXFLAGS) $< 4.109 + 4.110 +all: Makefile $(TARGET_PROGS) 4.111 + 4.112 +# Build the program conditionally including 4.113 +# RPC stubs and skeleton objects 4.114 +ifdef CORBABASE 4.115 +$(PROG_NAME): $(OBJS) $(IDL_OBJ) $(MOC_OBJ) 4.116 + $(CXX) $(LDFLAGS) -o $@ $+ $(QTLIBS) $(LIBS) 4.117 +else 4.118 +$(PROG_NAME): $(OBJS) $(MOC_OBJ) 4.119 + $(CXX) $(LDFLAGS) -o $@ $+ $(QTLIBS) $(LIBS) 4.120 +endif 4.121 + 4.122 +moc_%.cpp: %.h 4.123 + $(MOC) $< -o $@ 4.124 + 4.125 +# Use the Trolltech uic to compile headers 4.126 +# and implementation from ui XML 4.127 +#%.h: %.ui 4.128 +# uic $< -o $@ 4.129 +#%.cpp: %.ui 4.130 +# uic -impl $*.h $< -o $@ 4.131 + 4.132 +# Run the IDL compiler over IDL source 4.133 +# but avoid a make deps spaghetti nest 4.134 +ifdef CORBABASE 4.135 +$(SRCS):$(IDL_OUT) 4.136 +$(IDL_OUT): $(IDL_SRC) 4.137 + $(IDL) --c++-suffix=cpp $< 4.138 +endif 4.139 + 4.140 +# Special treatment for help panel class, which needs the $datadir variable 4.141 +as_helpanel.o: as_helpanel.cpp 4.142 + $(CXX) -c -DTITRAQ_DOCDIR=\"$(datadir)\" $(CPPFLAGS) $(QTCFLAGS) $(CXXFLAGS) $< 4.143 + 4.144 +doc: as-gui.1 as-gui.conf.5 as-events.5 as-accounts.5 4.145 + 4.146 +as-gui.1: as-gui.pod 4.147 + VS=`$(SHTOOL) version -lc -dshort as_version.cpp`; \ 4.148 + VL=`$(SHTOOL) version -lc -dlong as_version.cpp`; \ 4.149 + D=`$(SHTOOL) version -lc -dlong as_version.cpp | sed -e 's;.*(;;' -e 's;).*;;'`; \ 4.150 + $(POD2MAN) --quotes=none \ 4.151 + --section=1 --center="AS Accounting System" \ 4.152 + --release="$$D" --date="as-gui $$VS" as-gui.pod | \ 4.153 + sed -e "s;ASGUI_VERSION_STR;$$VL;" >as-gui.1 4.154 + 4.155 +as-gui.conf.5: as-gui.conf.pod 4.156 + VS=`$(SHTOOL) version -lc -dshort as_version.cpp`; \ 4.157 + VL=`$(SHTOOL) version -lc -dlong as_version.cpp`; \ 4.158 + D=`$(SHTOOL) version -lc -dlong as_version.cpp | sed -e 's;.*(;;' -e 's;).*;;'`; \ 4.159 + $(POD2MAN) --quotes=none \ 4.160 + --section=5 --center="AS Preferences File" \ 4.161 + --release="$$D" --date="as-gui $$VS" as-gui.conf.pod | \ 4.162 + sed -e "s;ASGUI_VERSION_STR;$$VL;" >as-gui.conf.5 4.163 + 4.164 +as-events.5: as-events.pod 4.165 + VS=`$(SHTOOL) version -lc -dshort as_version.cpp`; \ 4.166 + VL=`$(SHTOOL) version -lc -dlong as_version.cpp`; \ 4.167 + D=`$(SHTOOL) version -lc -dlong as_version.cpp | sed -e 's;.*(;;' -e 's;).*;;'`; \ 4.168 + $(POD2MAN) --quotes=none \ 4.169 + --section=5 --center="AS Events File" \ 4.170 + --release="$$D" --date="as-gui $$VS" as-events.pod | \ 4.171 + sed -e "s;ASGUI_VERSION_STR;$$VL;" >as-events.5 4.172 + 4.173 +as-accounts.5: as-accounts.pod 4.174 + VS=`$(SHTOOL) version -lc -dshort as_version.cpp`; \ 4.175 + VL=`$(SHTOOL) version -lc -dlong as_version.cpp`; \ 4.176 + D=`$(SHTOOL) version -lc -dlong as_version.cpp | sed -e 's;.*(;;' -e 's;).*;;'`; \ 4.177 + $(POD2MAN) --quotes=none \ 4.178 + --section=5 --center="AS Accounts File" \ 4.179 + --release="$$D" --date="as-gui $$VS" as-accounts.pod | \ 4.180 + sed -e "s;ASGUI_VERSION_STR;$$VL;" >as-accounts.5 4.181 + 4.182 +install: all 4.183 + $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(prefix) 4.184 + $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(bindir) 4.185 + $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man1 4.186 + $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man5 4.187 + $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(datadir) 4.188 + $(SHTOOL) install -c -s -m 755 as-gui $(DESTDIR)$(bindir)/as-gui 4.189 + $(SHTOOL) install -c -m 644 as-gui.1 $(DESTDIR)$(mandir)/man1/as-gui.1 4.190 + $(SHTOOL) install -c -m 644 as-gui.conf.5 $(DESTDIR)$(mandir)/man5/as-gui.conf.5 4.191 + $(SHTOOL) install -c -m 644 as-events.5 $(DESTDIR)$(mandir)/man5/as-events.5 4.192 + $(SHTOOL) install -c -m 644 as-accounts.5 $(DESTDIR)$(mandir)/man5/as-accounts.5 4.193 + $(SHTOOL) install -c -m 644 as-gui.html $(DESTDIR)$(datadir)/as-gui.html 4.194 + 4.195 +uninstall: 4.196 + $(RM) $(DESTDIR)$(datadir)/as-gui.html 4.197 + $(RM) $(DESTDIR)$(mandir)/man5/as-accounts.5 4.198 + $(RM) $(DESTDIR)$(mandir)/man5/as-events.5 4.199 + $(RM) $(DESTDIR)$(mandir)/man5/as-gui.conf.5 4.200 + $(RM) $(DESTDIR)$(mandir)/man1/as-gui.1 4.201 + $(RM) $(DESTDIR)$(bindir)/as-gui 4.202 + $(RMDIR) $(DESTDIR)$(datadir) >/dev/null 2>&1 || $(TRUE) 4.203 + $(RMDIR) $(DESTDIR)$(mandir)/man5 >/dev/null 2>&1 || $(TRUE) 4.204 + $(RMDIR) $(DESTDIR)$(mandir)/man1 >/dev/null 2>&1 || $(TRUE) 4.205 + $(RMDIR) $(DESTDIR)$(mandir) >/dev/null 2>&1 || $(TRUE) 4.206 + $(RMDIR) $(DESTDIR)$(bindir) >/dev/null 2>&1 || $(TRUE) 4.207 + $(RMDIR) $(DESTDIR)$(prefix) >/dev/null 2>&1 || $(TRUE) 4.208 + 4.209 +clean: 4.210 + $(RM) $(TARGET_PROGS) $(OBJS) $(IDL_OBJ) $(MOC_OBJ) 4.211 +ifdef CORBABASE 4.212 + $(RM) $(IDL_OBJ) 4.213 +endif 4.214 + $(RM) as_gui_pcre.tab *.core 4.215 + 4.216 +distclean: clean 4.217 + $(RM) config.log config.status config.cache # Generated by ./configure 4.218 + $(RM) Makefile ac_config.h # Generated by ./configure 4.219 +ifdef CORBABASE 4.220 + $(RM) $(IDL_OUT) # Generated by $(IDL) 4.221 +endif 4.222 + $(RM) $(MOC_OUT) # Generated by $(MOC) 4.223 + 4.224 +realclean: distclean 4.225 + $(RM) configure ac_config.h.in* # Generated by Autoconf 4.226 + $(RM) configure.lineno # Generated by Autoconf 4.227 + $(RM) shtool # Generated by Devtool 4.228 + 4.229 +check: test 4.230 +test: as-gui 4.231 + ./as_gui_test.sh 4.232 + 4.233 +.PHONY: doc install uninstall clean distclean realclean check test
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/README Fri Nov 28 11:21:08 2008 +0100 5.3 @@ -0,0 +1,49 @@ 5.4 + ___ ___ ___ _ __ __ _ ___ __ _ _ _(_) 5.5 + / _ \/ __/ __| '_ \ / _` / __|/ _` | | | | | 5.6 + | (_) \__ \__ \ |_) | | (_| \__ \ (_| | |_| | | 5.7 + \___/|___/___/ .__/ \__,_|___/\__, |\__,_|_| 5.8 + |_| |___/ 5.9 + 5.10 + OSSP asgui -- Accounting system graphical user interface 5.11 + Version 0.7.7 (24-Aug-2004) 5.12 + 5.13 + ABSTRACT 5.14 + 5.15 + Intended to serve as both a virtual punch card and time tracker, 5.16 + OSSP asgui is the graphical user interface for the family of OSSP 5.17 + accounting system tools. 5.18 + 5.19 + COPYRIGHT AND LICENSE 5.20 + 5.21 + Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 5.22 + Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 5.23 + Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 5.24 + Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 5.25 + 5.26 + This file is part of OSSP asgui, an accounting system interface which 5.27 + can be found at http://www.ossp.org/pkg/tool/asgui/. 5.28 + 5.29 + Permission to use, copy, modify, and distribute this software for 5.30 + any purpose with or without fee is hereby granted, provided that 5.31 + the above copyright notice and this permission notice appear in all 5.32 + copies. 5.33 + 5.34 + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 5.35 + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 5.36 + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 5.37 + IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 5.38 + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 5.39 + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 5.40 + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 5.41 + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 5.42 + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 5.43 + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 5.44 + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 5.45 + SUCH DAMAGE. 5.46 + 5.47 + HOME AND DOCUMENTATION 5.48 + 5.49 + The documentation and latest release can be found on 5.50 + 5.51 + o http://www.ossp.org/pkg/tool/asgui/ 5.52 + o ftp://ftp.ossp.org/pkg/tool/asgui/
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 6.2 +++ b/TODO Fri Nov 28 11:21:08 2008 +0100 6.3 @@ -0,0 +1,250 @@ 6.4 + *************************************** 6.5 + * * 6.6 + * TODO: OSSP titraq Specification * 6.7 + * * 6.8 + *************************************** 6.9 + 6.10 +Must do 6.11 +------- 6.12 +Q_CHECK_PTR 6.13 +public/private 6.14 +Ensure rethrows from second loadData on upwards 6.15 +Report errors in all slot code 6.16 +Rework error handling in prefs 6.17 +Generally maintain Preference class 6.18 + Implement missing interface methods 6.19 +Review destruction of all members, compare with setupPrefs 6.20 +Some menus are defined QPopupMenu in header, some in code 6.21 +Memory optimization needed in tidataops 6.22 +Check all identifiers for undeutig unique scope 6.23 +Remove magic numbers from cpp files to titconst like TITRAQ_INDEXREMARK 6.24 +Some signals implemented in Titraqform really belong in satellite classes 6.25 +Write M4 macro for detecting cuserid, and prefer it in ac_assist 6.26 +configure soll ueberpruefen ob libqt[-mt] threads braucht, 6.27 + dann wenn so, soll den LIBS -pthread hardgecodet haben 6.28 +Read config location from optional --confgen autoconf location 6.29 +IDs in as_const.h much better choosing, so they make sense 6.30 +Be consistent with szQString vs QString var names 6.31 +After every result write a status bar message 6.32 +On multiple selection, no text should appear in edit ctrls 6.33 +Make consistent setEdition(), setDirty() default parameters 6.34 +Use namespace 'AS' or unique identifier 'AS' for all classnames 6.35 +Unify class mycl = class(), class mycl(), class *pMycl, auto_ptr<class *> 6.36 +Win32 code in User class is only half written, and incomplete homedir 6.37 +Verify routine consistently scans all fields on load and new entries 6.38 +Remove all exception raises from slot code 6.39 +New doc, new entry, change text in table, close... No verify save! 6.40 +Might not need classes Amount and Tableitem at all 6.41 +Mach mal mit den 'autobackup' und 'fextension' Optionen von prefs 6.42 +Check for outdated config file version 6.43 +Make status bar message, qWarning, qDebug, and Popup messages consistent 6.44 + For which purposes do messages go in each category? 6.45 +Label methods and parameters throughout as const ... const, use & 6.46 +Yank out all #include from headers, replace with class ...; protos 6.47 +Check for empty amount field in getWeektotals before Hashtasks[Convstring] += 6.48 +Accountlistbox is sorted both in assist and dataops with maps 6.49 +Verify that unviewable rows are not redrawn cerr << "Rownum" << nRow << endl; 6.50 +Also, use bool QTable::isRowHidden (int nRow) const 6.51 +Don't raise the question 'Save before quitting' when no contents were changed 6.52 + 6.53 +Bugs (? = unverified) 6.54 +--------------------- 6.55 +Overidden paintCell() might not work when called asynchronously? 6.56 +Sometimes a click on add or delete toolbar button is ignored? 6.57 +When multiple new rows are added sometimes wrong row shading? 6.58 +When sorting rows, sometimes a false extra highlight appears 6.59 +Disabled actions still show enabled icons in menu popups 6.60 +Pressing escape on task data cells does not exit edit mode 6.61 +On win32, all or some file reads and writes probably need IO_Translate? 6.62 +Method saveData(stream) must write to a new file, otherwise writes data pattern 6.63 +CRCs are being generated before parsing of "" is finished? 6.64 +Double click on column separator is broken again 6.65 +Zeitabzug moeglicherweise falsch wenn 23:00-01:00=? 6.66 +Statustext soll nicht neben Pixmaps erscheinen 6.67 +Loesch mal alle Text vom Task Editctrl, dann drueck mal Obentaste 6.68 +Memory leak in vector<QRadioButton> as_panel 6.69 +Opendoc, schau amount unten Knopf (ist dimmed) 6.70 +Reporting only works if event data is sorted by date 6.71 +Press Return then Tab many times to see invalid selections 6.72 +Does not enter edit mode for a cell when double click 6.73 +Some versions (as.de.cw.net:/v/as-old/sw), double click to 6.74 + edit a cell, add two characters, click X to close without 6.75 + leaving the cell. It should ask to save doc, but doesn't. 6.76 + 6.77 +Nice to have 6.78 +------------ 6.79 +Implement drag and drop selected row swapping 6.80 +Implement an unlimited and generic undo and redo buffer class 6.81 +Support pasting into as_gui from other app (like vim) 6.82 +Add optional automatic file personal data file backup 6.83 +Make edit control window optional through preferences 6.84 +Add customizable column ordering by click and drag 6.85 +Soll mehr intuitive, mit sekondaer/dritte Keycolumn 6.86 +CRC und Rev sollen nicht in gleiche Methode berechnet 6.87 +No need to have upd slots for non-changeable upd controls 6.88 +Before openDoc, closeEvent should be used instead of new code 6.89 +Align CRC field data to left edge of table items 6.90 +Make Simplefile class non-Qt specific 6.91 +Read and write karm format files with file extension detection 6.92 +Offer general option 'Use vim keymap' 6.93 +Text revisions 6.94 + Title case, sentence case, or lower case 6.95 + Past tense, third person, style, usage... 6.96 +Make consistent when version is shown in titlebar of all dialogs 6.97 +Runtime help system should not depend on installtime documentation 6.98 +App should start even if no accounts file is found 6.99 +Fully vimize all input widgets by subclassing them (w - back word) 6.100 +Reload accountlist on startup, but reload during 'Open Doc' as well 6.101 +Better file validation, instead of just single line validateData op 6.102 +Freetext field, for copyright or some announcement (this data isn't 6.103 + accurate enough for billing purposes). Field can be optionally 6.104 + shown above main table, but always dimmed to avoid accidental edit. 6.105 +Check for account list updates (checkbox), to allow a local user to 6.106 + query a CORBA or SOAP server for a new account list via accessors: 6.107 + U32 Account::getCrc(void) 6.108 + Acctlist Account::getData(void) 6.109 +Reimplement void QTable::swapRows, so that rows can be moved easily 6.110 +Update edit controls only after return from TiTable::createEditor() 6.111 + 6.112 +Screwey user notes ;-) 6.113 +---------------------- 6.114 +cs: 'd' should not delete at once but flag the record as deleted. Use '$' to sync (similar to mutt) 6.115 +cs: first 'TAB' should complete (if possible), second 'TAB' should open selection box (similar to bash) 6.116 +cs: line numberscould be referenced when entering accounts ala bash history ('!4' = record #4) 6.117 +mlelstv: 24:00 muss als Valideintrag im Finishfeld erlaubt 6.118 +thl: / should enable the user to search for something 6.119 +thl: using = should force a recalculation for a time field 6.120 +thl: using ~ should round a time field to the next quarter (configurable) 6.121 + 6.122 +Architectural 6.123 +------------- 6.124 +Decouple form, preferences, and RPC classes 6.125 +Remove common class behaviours (quitApp, close...) to abstract classes 6.126 + 6.127 +Win32 6.128 +----- 6.129 +Rework username, homedir, and confdaten (hive) logic 6.130 + 6.131 +Preferences 6.132 +----------- 6.133 +<option name wert> Hintergrund Functionalitaet 6.134 +<aspect name wert> Sichtliche Functionalitaet 6.135 +<session name wert> Automatisch gespeicherte 6.136 +<rule name expr cond> Amount = Finish - Start (mussen alle da z.B.) 6.137 +<alias name wert> Nutzbar lange Taskzeilen zu abstrahieren 6.138 +<macro name = 'Reuse'> 6.139 + Selectiere aktuelle und 3 vorherige Reihen 6.140 + Copy 6.141 + Geh zu letzte Reihe 6.142 + Paste 6.143 +</macro name = 'Reuse'> 6.144 +<macro name = 'Append'> 6.145 + Geh zu letzte Reihe 6.146 + Zufug Reihe 6.147 +</macro name = 'Append'> 6.148 + 6.149 +Code snippits 6.150 +------------- 6.151 +// Portable processes 6.152 +QProcess *Proc; 6.153 +Proc = new QProcess; 6.154 +Proc->setArguments("/usr/local/bin/nada"); 6.155 +bool ok = Proc->start(); 6.156 + 6.157 +> Does anyone know how to set the WhatsThis text for a QPushButton?. 6.158 +> 6.159 +> Met vriendelijke groet 6.160 +Use the static QWhatsThis::add() 6.161 + 6.162 +Document 6.163 +-------- 6.164 +Use doxygen for C++ interface documentation. 6.165 + 6.166 +Project plan 6.167 +------------ 6.168 + Prototype 6.169 + Release v0.8 Milestone 1, Alpha 6.170 + Release v0.9 Milestone 2, Beta 6.171 + Release v1.0 Milestone 3, 6.172 + Release v1.2 Milestone 4, 6.173 + 6.174 +Requirements 6.175 +------------ 6.176 + 6.177 +Deliverables 6.178 +------------ 6.179 + Binaries 6.180 + titraq Verwendung 6.181 + 6.182 + Designdocs 6.183 + titraq_design.ps Systemdiagramme 6.184 + 6.185 + Manpage 6.186 + titraq.1 Hauptinfo 6.187 + titraq.conf.5 Beschreibung des Configdatei 6.188 + 6.189 + Geliefert 6.190 + titraq.conf Ausgekommentet Beispieldatei 6.191 + 6.192 +Pseudocode 6.193 +---------- 6.194 + initialize 6.195 + parse command line 6.196 + parse titraq.conf file 6.197 + load titraq.dat file 6.198 + show control window 6.199 + wait for quit 6.200 + save titraq.dat file 6.201 + finish 6.202 + 6.203 +Test case 6.204 +--------- 6.205 + Pre: 6.206 + tar zxvf titraq-0.9.tar 6.207 + cd titraq-0.9 6.208 + ./configure 6.209 + make 6.210 + su 6.211 + make install 6.212 + 6.213 + Assume: 6.214 + OS has Qt 3.0.6 or newer multithreaded library 6.215 + 6.216 + Begin: 6.217 + $ titraq 6.218 + 6.219 + Output: 6.220 + Post: 6.221 + Procedure: 6.222 + 6.223 + 6.224 + **************************** 6.225 + * * 6.226 + * Inadequacies of as-gui * 6.227 + * * 6.228 + **************************** 6.229 + 6.230 +Architecture Inconsistencies 6.231 + o Some custom classes are thinly veiled Qt classes. Others 6.232 + are completely different, but with similar functionality. 6.233 + o Several classes are immense, and should be split into 6.234 + into easier to read pieces. 6.235 + o Some classes should be abstracted and new subclasses built. 6.236 + 6.237 +Implementation 6.238 + o Too procedural for my taste. Many methods should be merged 6.239 + or split and grouped into new classes or such. 6.240 + 6.241 +Naming 6.242 + o Hungarian notation is only used to 90% potential. 6.243 + o Inconsistent length and abbreviations. 6.244 + o Conventions suggested on Qt website not followed. 6.245 + 6.246 +Error handling 6.247 + o No standardized return values. 6.248 + o C++ exceptions used inconsistently. 6.249 + 6.250 +Memory handling 6.251 + o Smart pointers should be used in all exception code blocks. 6.252 + o A consistent policy of automatic versus dynamic pointer 6.253 + variables should be used in all classes.
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 7.2 +++ b/aclocal.m4 Fri Nov 28 11:21:08 2008 +0100 7.3 @@ -0,0 +1,657 @@ 7.4 +## 7.5 +## OSSP asgui - Accounting system graphical user interface 7.6 +## Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 7.7 +## Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 7.8 +## Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 7.9 +## Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 7.10 +## 7.11 +## This file is part of OSSP GUI, a graphical user interface 7.12 +## for OSSP which can be found at http://www.ossp.org/ 7.13 +## 7.14 +## Permission to use, copy, modify, and distribute this software for 7.15 +## any purpose with or without fee is hereby granted, provided that 7.16 +## the above copyright notice and this permission notice appear in all 7.17 +## copies. 7.18 +## 7.19 +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 7.20 +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 7.21 +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 7.22 +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 7.23 +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 7.24 +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 7.25 +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 7.26 +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 7.27 +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 7.28 +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 7.29 +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 7.30 +## SUCH DAMAGE. 7.31 +## 7.32 +## aclocal.m4: Autoconf M4 macros 7.33 +## 7.34 + 7.35 + 7.36 +dnl ## 7.37 +dnl ## Look for SIOCGIFHWADDR 7.38 +dnl ## 7.39 + 7.40 +AC_DEFUN(AC_CHECK_SIOCGIFHWADDR,[ 7.41 +AC_MSG_CHECKING(whether <sys/ioctl.h> has SIOCGIFHWADDR) 7.42 +AC_TRY_COMPILE([#include <sys/sockio.h> 7.43 +#include <sys/ioctl.h> 7.44 +], [ 7.45 + int i = SIOCGIFHWADDR; 7.46 + return 0;], 7.47 + AC_DEFINE(HAVE_SIOCGIFHWADDR, 1, [Define to 1 if <sys/ioctl.h> defines or includes SIOCGIFHWADDR.]), 7.48 + AC_MSG_RESULT([no]), 7.49 + AC_MSG_RESULT([yes])) 7.50 +])dnl 7.51 + 7.52 + 7.53 +dnl ## 7.54 +dnl ## Look for SIOCGIFCONF 7.55 +dnl ## 7.56 + 7.57 +AC_DEFUN(AC_CHECK_SIOCGIFCONF,[ 7.58 +AC_MSG_CHECKING(whether <sys/ioctl.h> has SIOCGIFCONF) 7.59 +AC_TRY_COMPILE([#include <sys/sockio.h> 7.60 +#include <sys/ioctl.h> 7.61 +], [ 7.62 + int i = SIOCGIFCONF; 7.63 + return 0;], 7.64 + AC_DEFINE(HAVE_SIOCGIFCONF, 1, [Define to 1 if <sys/ioctl.h> defines or includes SIOCGIFCONF.]), 7.65 + AC_MSG_RESULT([no]), 7.66 + AC_MSG_RESULT([yes])) 7.67 +])dnl 7.68 + 7.69 + 7.70 +dnl ## 7.71 +dnl ## Look for SIOGHWADDR 7.72 +dnl ## 7.73 + 7.74 +AC_DEFUN(AC_CHECK_SIOGHWADDR,[ 7.75 +AC_MSG_CHECKING(whether <sys/ioctl.h> has SIOGHWADDR) 7.76 +AC_TRY_COMPILE([#include <sys/sockio.h> 7.77 +#include <sys/ioctl.h> 7.78 +], [ 7.79 + int i = SIOGHWADDR; 7.80 + return 0;], 7.81 + AC_DEFINE(HAVE_SIOGHWADDR, 1, [Define to 1 if <sys/ioctl.h> defines or includes SIOGHWADDR.]), 7.82 + AC_MSG_RESULT([no]), 7.83 + AC_MSG_RESULT([yes])) 7.84 +])dnl 7.85 + 7.86 + 7.87 +dnl ## 7.88 +dnl ## Look for SIOCGENADDR 7.89 +dnl ## 7.90 + 7.91 +AC_DEFUN(AC_CHECK_SIOCGENADDR,[ 7.92 +AC_MSG_CHECKING(whether <sys/ioctl.h> has SIOCGENADDR) 7.93 +AC_TRY_COMPILE([#include <sys/sockio.h> 7.94 +#include <sys/ioctl.h> 7.95 +], [ 7.96 + int i = SIOCGENADDR; 7.97 + return 0;], 7.98 + AC_DEFINE(HAVE_SIOCGENADDR, 1, [Define to 1 if <sys/ioctl.h> defines or includes SIOCGENADDR.]), 7.99 + AC_MSG_RESULT([no]), 7.100 + AC_MSG_RESULT([yes])) 7.101 +])dnl 7.102 + 7.103 + 7.104 +dnl ## 7.105 +dnl ## Check for sa_len member of the sockaddr 7.106 +dnl ## structure found in BSD systems 7.107 +dnl ## 7.108 +dnl ## configure.in: 7.109 +dnl ## AC_STRUCT_SA_LEN 7.110 +dnl ## 7.111 + 7.112 +AC_DEFUN(AC_STRUCT_SA_LEN, 7.113 +[AC_CACHE_CHECK([for sa_len in struct sockaddr], ac_cv_struct_sa_len, 7.114 +[AC_TRY_COMPILE([ 7.115 + #include <sys/types.h> 7.116 + #include <sys/socket.h> 7.117 +], 7.118 +[ 7.119 + struct sockaddr s; 7.120 + s.sa_len; 7.121 +], 7.122 +ac_cv_struct_sa_len=yes, ac_cv_struct_sa_len=no)]) 7.123 +if test $ac_cv_struct_sa_len = yes; then 7.124 +AC_DEFINE(HAVE_SA_LEN, 1, [Define to 1 if your sockaddr has a sa_len member.]) 7.125 +fi 7.126 +]) 7.127 + 7.128 + 7.129 +dnl ## 7.130 +dnl ## Support for Platform IDs 7.131 +dnl ## 7.132 +dnl ## configure.in: 7.133 +dnl ## AC_PLATFORM(<variable>) 7.134 +dnl ## 7.135 + 7.136 +AC_DEFUN(AC_PLATFORM,[ 7.137 +if test ".$host" != .NONE && test ".$host" != .; then 7.138 + $1="$host" 7.139 +else 7.140 + $1=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess` 7.141 +fi 7.142 +$1=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub $$1` || exit 1 7.143 +AC_SUBST($1) 7.144 +if test ".$enable_subdir" != .yes; then 7.145 + echo "Platform: ${TB}${$1}${TN}" 7.146 +fi 7.147 +])dnl 7.148 + 7.149 + 7.150 +dnl ## 7.151 +dnl ## Support for Configuration Headers 7.152 +dnl ## 7.153 +dnl ## configure.in: 7.154 +dnl ## AC_HEADLINE(<short-name>, <long-name>, 7.155 +dnl ## <vers-var>, <vers-file>, 7.156 +dnl ## <copyright>) 7.157 +dnl ## 7.158 + 7.159 +AC_DEFUN(AC_HEADLINE,[dnl 7.160 +# configuration header 7.161 +if test ".`echo dummy [$]@ | grep help`" = .; then 7.162 + # bootstrapping shtool 7.163 + ac_prog=[$]0 7.164 +changequote(, )dnl 7.165 + ac_srcdir=`echo $ac_prog | sed -e 's%/[^/][^/]*$%%' -e 's%\([^/]\)/*$%\1%'` 7.166 +changequote([, ])dnl 7.167 + test ".$ac_srcdir" = ".$ac_prog" && ac_srcdir=. 7.168 + ac_shtool="$ac_srcdir/shtool" 7.169 + 7.170 + # find out terminal sequences 7.171 + TB=`$ac_shtool echo -n -e %B 2>/dev/null` 7.172 + TN=`$ac_shtool echo -n -e %b 2>/dev/null` 7.173 + 7.174 + # find out package version 7.175 + $3_STR="`$ac_shtool version -l c -d long $ac_srcdir/$4`" 7.176 + AC_SUBST($3_STR) 7.177 + 7.178 + # friendly header ;) 7.179 + if test ".$enable_headline" != .no; then 7.180 + echo "Configuring ${TB}$1${TN} ($2), Version ${TB}${$3_STR}${TN}" 7.181 + echo "$5" 7.182 + fi 7.183 + 7.184 + # additionally find out hex version 7.185 + $3_HEX="`$ac_shtool version -l c -d hex $ac_srcdir/$4`" 7.186 + AC_SUBST($3_HEX) 7.187 +fi 7.188 +])dnl 7.189 + 7.190 + 7.191 +dnl ## 7.192 +dnl ## Check whether compiler option works 7.193 +dnl ## 7.194 +dnl ## configure.in: 7.195 +dnl ## AC_COMPILER_OPTION(<name>, <display>, <option>, 7.196 +dnl ## <action-success>, <action-failure>) 7.197 +dnl ## 7.198 + 7.199 +AC_DEFUN(AC_COMPILER_OPTION,[dnl 7.200 +AC_MSG_CHECKING(whether compiler option(s) $2 work) 7.201 +AC_CACHE_VAL(ac_cv_compiler_option_$1,[ 7.202 +SAVE_CXXFLAGS="$CXXFLAGS" 7.203 +CXXFLAGS="$CXXFLAGS $3" 7.204 +AC_LANG(C++) 7.205 +AC_TRY_COMPILE([],[], ac_cv_compiler_option_$1=yes, ac_cv_compiler_option_$1=no) 7.206 +CXXFLAGS="$SAVE_CXXFLAGS" 7.207 +])dnl 7.208 +if test ".$ac_cv_compiler_option_$1" = .yes; then 7.209 + ifelse([$4], , :, [$4]) 7.210 +else 7.211 + ifelse([$5], , :, [$5]) 7.212 +fi 7.213 +AC_MSG_RESULT([$ac_cv_compiler_option_$1]) 7.214 +])dnl 7.215 + 7.216 + 7.217 +dnl ## 7.218 +dnl ## Test for the presence of the MICO ORB 7.219 +dnl ## 7.220 +dnl ## configure.in: 7.221 +dnl ## AC_TEST_MICO 7.222 +dnl ## 7.223 + 7.224 +AC_DEFUN(AC_TEST_MICO,[dnl 7.225 +AC_ARG_WITH(mico,dnl 7.226 +[ --with-mico=[DIR] prefix where MICO is installed], micodir=$withval,) 7.227 +if test $micodir; then 7.228 +AC_MSG_CHECKING(the MICO installation path) 7.229 + 7.230 +dnl ## Ensure that we have a basic path to start searching 7.231 +if test -x "$micodir"; 7.232 +then 7.233 + CORBABASE=$micodir 7.234 + AC_MSG_RESULT(${CORBABASE}) 7.235 +elif test -x "${MICODIR}"; 7.236 +then 7.237 + CORBABASE="${MICODIR}" 7.238 + AC_MSG_RESULT(${CORBABASE}) 7.239 +else 7.240 + AC_MSG_RESULT(not found) 7.241 + AC_MSG_ERROR([Neither \$MICODIR nor --with-mico=[DIR] paths exist]) 7.242 +fi 7.243 + 7.244 +dnl ## Append paths of libs and headers 7.245 +LIBS="$LIBS -lmico -lmicocoss -lssl -lcrypto" 7.246 +LDFLAGS="$LDFLAGS -L${CORBABASE}/lib" 7.247 +CPPFLAGS="$CPPFLAGS -I${CORBABASE}/include" 7.248 +CXXCPP="$CXXCPP -I${CORBABASE}/include" 7.249 +CXXFLAGS="$CXXFLAGS" 7.250 +AC_DEFINE(HAVE_MICO, 1, [Define to 1 if building with the MICO ORB.]) 7.251 +fi 7.252 +]) 7.253 + 7.254 + 7.255 +dnl ## 7.256 +dnl ## Test for the presence of EasySOAP 7.257 +dnl ## 7.258 +dnl ## configure.in: 7.259 +dnl ## AC_TEST_ESOAP 7.260 +dnl ## 7.261 + 7.262 +AC_DEFUN(AC_TEST_ESOAP,[dnl 7.263 +AC_ARG_WITH(esoap,dnl 7.264 +[ --with-easysoap=[DIR] prefix where EasySOAP is installed], esoapdir=$withval,) 7.265 +if test $esoapdir; then 7.266 +AC_MSG_CHECKING(the EasySOAP installation path) 7.267 + 7.268 +dnl ## Ensure that we have a basic path to start searching 7.269 +if test -x "$esoapdir"; 7.270 +then 7.271 + SOAPBASE=$esoapdir 7.272 + AC_MSG_RESULT(${SOAPBASE}) 7.273 +elif test -x "${ESOAPDIR}"; 7.274 +then 7.275 + SOAPBASE="${ESOAPDIR}" 7.276 + AC_MSG_RESULT(${SOAPBASE}) 7.277 +else 7.278 + AC_MSG_RESULT(not found) 7.279 + AC_MSG_ERROR([Neither \$ESOAPDIR nor --with-easysoap=[DIR] paths exist]) 7.280 +fi 7.281 + 7.282 +dnl ## Append paths of libs and headers 7.283 +LIBS="$LIBS -leasysoap -lexpat -lssl -lcrypto" 7.284 +LDFLAGS="$LDFLAGS -L${SOAPBASE}/lib" 7.285 +CPPFLAGS="$CPPFLAGS -I${SOAPBASE}/include" 7.286 +CXXCPP="$CXXCPP -I${SOAPBASE}/include" 7.287 +CXXFLAGS="$CXXFLAGS" 7.288 +AC_DEFINE(HAVE_ESOAP, 1, [Define to 1 if building with EasySOAP.]) 7.289 +fi 7.290 +]) 7.291 + 7.292 + 7.293 +dnl ## 7.294 +dnl ## Check the Qt implementation path 7.295 +dnl ## 7.296 +dnl ## configure.in: 7.297 +dnl ## AC_CHECK_QT 7.298 +dnl ## 7.299 + 7.300 +AC_DEFUN(AC_CHECK_QT,[dnl 7.301 +AC_ARG_WITH(qt,dnl 7.302 +[ --with-qt=[DIR] prefix where Qt is installed], qtdir=$withval,) 7.303 +AC_MSG_CHECKING(the Qt installation path) 7.304 + 7.305 +dnl ## Ensure that we have a basic path to start searching 7.306 +if test -x "$qtdir"; 7.307 +then 7.308 + QTBASE=$qtdir 7.309 + AC_MSG_RESULT(${QTBASE}) 7.310 +elif test -x "${QTDIR}"; 7.311 +then 7.312 + QTBASE="${QTDIR}" 7.313 + AC_MSG_RESULT(${QTBASE}) 7.314 +else 7.315 + AC_MSG_RESULT(not found) 7.316 + AC_MSG_ERROR([Neither \$QTDIR nor --with-qt=[DIR] paths exist]) 7.317 +fi 7.318 + 7.319 +dnl ## Now search for libs and headers 7.320 +changequote(, )dnl 7.321 +for file in x `find $QTBASE/include -name "qapplication.h" -print`; do 7.322 + test .$file = .x && continue 7.323 + c_dir=`echo $file | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'` 7.324 +done 7.325 + 7.326 +dnl ## Scan to find out which Qt library to link against 7.327 +dnl ## FIXME Merge static and dynamic library search blocks 7.328 +dnl ## FIXME Remove this qt-mt check and do --enable-threads instead 7.329 +for file in x `find $QTBASE/lib -name "libqt.so" -print`; do 7.330 + test .$file = .x && continue 7.331 + l_dir=`echo $file | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'` 7.332 + lib=`echo $file | sed -e 's;^.*/\(.*\)$;\1;' -e 's;lib\(.*\)\.so;\1;'` 7.333 +done 7.334 + 7.335 +dnl ## If we have a multithreaded shared library, then it's better 7.336 +for file in x `find $QTBASE/lib -name "libqt-mt.so" -print`; do 7.337 + test .$file = .x && continue 7.338 + l_dir=`echo $file | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'` 7.339 + lib=`echo $file | sed -e 's;^.*/\(.*\)$;\1;' -e 's;lib\(.*\)\.so;\1;'` 7.340 +done 7.341 + 7.342 +dnl ## If we have static libraries, then prefer to use those 7.343 +for file in x `find $QTBASE/lib -name "libqt.a" -print`; do 7.344 + test .$file = .x && continue 7.345 + l_dir=`echo $file | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'` 7.346 + lib=`echo $file | sed -e 's;^.*/\(.*\)$;\1;' -e 's;lib\(.*\)\.a;\1;'` 7.347 +done 7.348 + 7.349 +dnl ## But the static multithreaded library is preferred above all 7.350 +for file in x `find $QTBASE/lib -name "libqt-mt.a" -print`; do 7.351 + test .$file = .x && continue 7.352 + l_dir=`echo $file | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'` 7.353 + lib=`echo $file | sed -e 's;^.*/\(.*\)$;\1;' -e 's;lib\(.*\)\.a;\1;'` 7.354 +done 7.355 +changequote([, ])dnl 7.356 + 7.357 +dnl ## Append paths of libs and headers 7.358 +if test ".$lib" != .; then 7.359 + LIBS="$LIBS -l$lib" 7.360 +fi 7.361 +LDFLAGS="$LDFLAGS -L$l_dir" 7.362 +CPPFLAGS="$CPPFLAGS -DQT_THREAD_SUPPORT" 7.363 +CXXCPP="$CXXCPP -DQT_THREAD_SUPPORT" 7.364 +CXXFLAGS="$CXXFLAGS -I$c_dir" 7.365 +]) 7.366 + 7.367 + 7.368 +dnl ## 7.369 +dnl ## UIC check, should come after the Qt check 7.370 +dnl ## 7.371 +dnl ## configure.in: 7.372 +dnl ## AC_CHECK_UIC 7.373 +dnl ## 7.374 + 7.375 +AC_DEFUN(AC_CHECK_UIC,[dnl 7.376 +AC_MSG_CHECKING(UIC location) 7.377 +if test -x ${QTBASE}/bin/uic 7.378 +then 7.379 + UIC=${QTBASE}/bin/uic 7.380 + AC_MSG_RESULT(${QTBASE}/bin/uic) 7.381 +else 7.382 + UIC=uic 7.383 + AC_MSG_RESULT(assumed present) 7.384 +fi 7.385 +]) 7.386 + 7.387 + 7.388 +dnl ## 7.389 +dnl ## MOC check, should come after the Qt check 7.390 +dnl ## 7.391 +dnl ## configure.in: 7.392 +dnl ## AC_CHECK_MOC 7.393 +dnl ## 7.394 + 7.395 +AC_DEFUN(AC_CHECK_MOC,[dnl 7.396 +AC_MSG_CHECKING(MOC location) 7.397 +if test -x ${QTBASE}/bin/moc 7.398 +then 7.399 + MOC=${QTBASE}/bin/moc 7.400 + AC_MSG_RESULT(${QTBASE}/bin/moc) 7.401 +else 7.402 + MOC=moc 7.403 + AC_MSG_RESULT(assumed present) 7.404 +fi 7.405 +]) 7.406 + 7.407 + 7.408 +dnl ## PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) 7.409 +dnl ## defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page 7.410 +dnl ## also defines GSTUFF_PKG_ERRORS on error 7.411 +AC_DEFUN(PKG_CHECK_MODULES, [ 7.412 + succeeded=no 7.413 + 7.414 + if test -z "$PKG_CONFIG"; then 7.415 + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) 7.416 + fi 7.417 + 7.418 + if test "$PKG_CONFIG" = "no" ; then 7.419 + echo "*** The pkg-config script could not be found. Make sure it is" 7.420 + echo "*** in your path, or set the PKG_CONFIG environment variable" 7.421 + echo "*** to the full path to pkg-config." 7.422 + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." 7.423 + else 7.424 + PKG_CONFIG_MIN_VERSION=0.9.0 7.425 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then 7.426 + AC_MSG_CHECKING(for $2) 7.427 + 7.428 + if $PKG_CONFIG --exists "$2" ; then 7.429 + AC_MSG_RESULT(yes) 7.430 + succeeded=yes 7.431 + 7.432 + AC_MSG_CHECKING($1_CFLAGS) 7.433 + $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` 7.434 + AC_MSG_RESULT($$1_CFLAGS) 7.435 + 7.436 + AC_MSG_CHECKING($1_LIBS) 7.437 + $1_LIBS=`$PKG_CONFIG --libs "$2"` 7.438 + AC_MSG_RESULT($$1_LIBS) 7.439 + else 7.440 + $1_CFLAGS="" 7.441 + $1_LIBS="" 7.442 + ## If we have a custom action on failure, don't print errors, but 7.443 + ## do set a variable so people can do so. 7.444 + $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 7.445 + ifelse([$4], ,echo $$1_PKG_ERRORS,) 7.446 + fi 7.447 + 7.448 + AC_SUBST($1_CFLAGS) 7.449 + AC_SUBST($1_LIBS) 7.450 + else 7.451 + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." 7.452 + echo "*** See http://www.freedesktop.org/software/pkgconfig" 7.453 + fi 7.454 + fi 7.455 + 7.456 + if test $succeeded = yes; then 7.457 + ifelse([$3], , :, [$3]) 7.458 + else 7.459 + ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) 7.460 + fi 7.461 +]) 7.462 + 7.463 + 7.464 +dnl ## 7.465 +dnl ## Debugging Support 7.466 +dnl ## 7.467 +dnl ## configure.in: 7.468 +dnl ## AC_CHECK_DEBUGGING 7.469 +dnl ## 7.470 + 7.471 +AC_DEFUN(AC_CHECK_DEBUGGING,[dnl 7.472 +AC_ARG_ENABLE(debug,dnl 7.473 +[ --enable-debug build for debugging (default=no)], 7.474 +[dnl 7.475 +if test ".$ac_cv_prog_gcc" = ".yes"; then 7.476 + case "$CXXFLAGS" in 7.477 + *-O* ) ;; 7.478 + * ) CXXFLAGS="$CXXFLAGS -O2" ;; 7.479 + esac 7.480 + case "$CXXFLAGS" in 7.481 + *-g* ) ;; 7.482 + * ) CXXFLAGS="$CXXFLAGS -g" ;; 7.483 + esac 7.484 + case "$CXXFLAGS" in 7.485 + *-pipe* ) ;; 7.486 + * ) AC_COMPILER_OPTION(pipe, -pipe, -pipe, CXXFLAGS="$CXXFLAGS -pipe") ;; 7.487 + esac 7.488 + AC_COMPILER_OPTION(defdbg, -DDEBUG, -DDEBUG, CXXFLAGS="$CXXFLAGS -DDEBUG") 7.489 +dnl AC_COMPILER_OPTION(ggdb3, -ggdb3, -ggdb3, CXXFLAGS="$CXXFLAGS -ggdb3") 7.490 + CXXFLAGS="$CXXFLAGS -pedantic" 7.491 + CXXFLAGS="$CXXFLAGS -Wall" 7.492 + WMORE="-Wshadow -Wpointer-arith -Wcast-align -Winline" 7.493 + WMORE="$WMORE -Wmissing-prototypes -Wmissing-declarations -Wnested-externs" 7.494 + AC_COMPILER_OPTION(wmore, -W<xxx>, $WMORE, CXXFLAGS="$CXXFLAGS $WMORE") 7.495 + AC_COMPILER_OPTION(wnolonglong, -Wno-long-long, -Wno-long-long, CXXFLAGS="$CXXFLAGS -Wno-long-long") 7.496 +else 7.497 + case "$CXXFLAGS" in 7.498 + *-g* ) ;; 7.499 + * ) CXXFLAGS="$CXXFLAGS -g" ;; 7.500 + esac 7.501 +fi 7.502 +msg="enabled" 7.503 +dnl AC_DEFINE(DEBUG, 1, [Define to 1 if you want to enable debugging]) 7.504 +],[ 7.505 +if test ".$ac_cv_prog_gcc" = ".yes"; then 7.506 +case "$CXXFLAGS" in 7.507 + *-pipe* ) ;; 7.508 + * ) AC_COMPILER_OPTION(pipe, -pipe, -pipe, CXXFLAGS="$CXXFLAGS -pipe") ;; 7.509 +esac 7.510 +fi 7.511 +case "$CXXFLAGS" in 7.512 + *-g* ) CXXFLAGS=`echo "$CXXFLAGS" |\ 7.513 + sed -e 's/ -g / /g' -e 's/ -g$//' -e 's/^-g //g' -e 's/^-g$//'` ;; 7.514 +esac 7.515 +case "$CXXFLAGS" in 7.516 + *-g* ) CXXFLAGS=`echo "$CXXFLAGS" |\ 7.517 + sed -e 's/ -g / /g' -e 's/ -g$//' -e 's/^-g //g' -e 's/^-g$//'` ;; 7.518 +esac 7.519 + 7.520 +CXXFLAGS="$CXXFLAGS -DQT_NO_DEBUG" 7.521 +msg=disabled 7.522 +])dnl 7.523 +AC_MSG_CHECKING(for compilation debug mode) 7.524 +AC_MSG_RESULT([$msg]) 7.525 +if test ".$msg" = .enabled; then 7.526 + enable_shared=no 7.527 +fi 7.528 +]) 7.529 + 7.530 +define(AC_IFALLYES,[dnl 7.531 +ac_rc=yes 7.532 +for ac_spec in $1; do 7.533 + ac_type=`echo "$ac_spec" | sed -e 's/:.*$//'` 7.534 + ac_item=`echo "$ac_spec" | sed -e 's/^.*://'` 7.535 + case $ac_type in 7.536 + header [)] 7.537 + ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'` 7.538 + ac_var="ac_cv_header_$ac_item" 7.539 + ;; 7.540 + file [)] 7.541 + ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'` 7.542 + ac_var="ac_cv_file_$ac_item" 7.543 + ;; 7.544 + func [)] ac_var="ac_cv_func_$ac_item" ;; 7.545 + lib [)] ac_var="ac_cv_lib_$ac_item" ;; 7.546 + define [)] ac_var="ac_cv_define_$ac_item" ;; 7.547 + typedef [)] ac_var="ac_cv_typedef_$ac_item" ;; 7.548 + custom [)] ac_var="$ac_item" ;; 7.549 + esac 7.550 + eval "ac_val=\$$ac_var" 7.551 + if test ".$ac_val" != .yes; then 7.552 + ac_rc=no 7.553 + break 7.554 + fi 7.555 +done 7.556 +if test ".$ac_rc" = .yes; then 7.557 + : 7.558 + $2 7.559 +else 7.560 + : 7.561 + $3 7.562 +fi 7.563 +]) 7.564 + 7.565 + 7.566 +dnl ## 7.567 +dnl ## Check for an external/extension library. 7.568 +dnl ## - is aware of <libname>-config style scripts 7.569 +dnl ## - searches under standard paths include, lib, etc. 7.570 +dnl ## - searches under subareas like .libs, etc. 7.571 +dnl ## 7.572 +dnl ## configure.in: 7.573 +dnl ## AC_CHECK_EXTLIB(<realname>, <libname>, <func>, <header>, 7.574 +dnl ## [<success-action> [, <fail-action>]]) 7.575 +dnl ## Makefile.in: 7.576 +dnl ## CFLAGS = @CFLAGS@ 7.577 +dnl ## LDFLAGS = @LDFLAGS@ 7.578 +dnl ## LIBS = @LIBS@ 7.579 +dnl ## shell: 7.580 +dnl ## $ ./configure --with-<libname>[=DIR] 7.581 +dnl ## 7.582 + 7.583 +AC_DEFUN(AC_CHECK_EXTLIB,[dnl 7.584 +AC_ARG_WITH($2, [dnl 7.585 +[ --with-]m4_substr([$2[[=DIR]] ], 0, 19)[build with external $1 library (default=no)]], [dnl 7.586 + if test ".$with_$2" = .yes; then 7.587 + # via config script 7.588 + $2_version=`($2-config --version) 2>/dev/null` 7.589 + if test ".$$2_version" != .; then 7.590 + CFLAGS="$CFLAGS `$2-config --cflags`" 7.591 + LDFLAGS="$LDFLAGS `$2-config --ldflags`" 7.592 + fi 7.593 + else 7.594 + if test -d "$with_$2"; then 7.595 + found=0 7.596 + # via config script 7.597 + for dir in $with_$2/bin $with_$2; do 7.598 + if test -f "$dir/$2-config"; then 7.599 + $2_version=`($dir/$2-config --version) 2>/dev/null` 7.600 + if test ".$$2_version" != .; then 7.601 + CFLAGS="$CFLAGS `$dir/$2-config --cflags`" 7.602 + LDFLAGS="$LDFLAGS `$dir/$2-config --ldflags`" 7.603 + found=1 7.604 + break 7.605 + fi 7.606 + fi 7.607 + done 7.608 + # via standard paths 7.609 + if test ".$found" = .0; then 7.610 + for dir in $with_$2/include/$2 $with_$2/include $with_$2; do 7.611 + if test -f "$dir/$4"; then 7.612 + CFLAGS="$CFLAGS -I$dir" 7.613 + found=1 7.614 + break 7.615 + fi 7.616 + done 7.617 + for dir in $with_$2/lib/$2 $with_$2/lib $with_$2; do 7.618 + if test -f "$dir/lib$2.a" -o -f "$dir/lib$2.so"; then 7.619 + LDFLAGS="$LDFLAGS -L$dir" 7.620 + found=1 7.621 + break 7.622 + fi 7.623 + done 7.624 + fi 7.625 + # in any subarea 7.626 + if test ".$found" = .0; then 7.627 +changequote(, )dnl 7.628 + for file in x `find $with_$2 -name "$4" -type f -print`; do 7.629 + test .$file = .x && continue 7.630 + dir=`echo $file | sed -e 's;[[^/]]*$;;' -e 's;\(.\)/$;\1;'` 7.631 + CFLAGS="$CFLAGS -I$dir" 7.632 + done 7.633 + for file in x `find $with_$2 -name "lib$2.[[aso]]" -type f -print`; do 7.634 + test .$file = .x && continue 7.635 + dir=`echo $file | sed -e 's;[[^/]]*$;;' -e 's;\(.\)/$;\1;'` 7.636 + LDFLAGS="$LDFLAGS -L$dir" 7.637 + done 7.638 +changequote([, ])dnl 7.639 + fi 7.640 + fi 7.641 + fi 7.642 + AC_HAVE_HEADERS($4) 7.643 + AC_CHECK_LIB($2, $3) 7.644 + AC_IFALLYES(header:$4 lib:$2_$3, with_$2=yes, with_$2=no) 7.645 + if test ".$with_$2" = .no; then 7.646 + AC_ERROR([Unable to find $1 library]) 7.647 + fi 7.648 + ], [dnl 7.649 +if test ".$with_$2" = .; then 7.650 + with_$2=no 7.651 +fi 7.652 + ])dnl 7.653 +AC_MSG_CHECKING(whether to build against external $1 library) 7.654 +if test ".$with_$2" = .yes; then 7.655 + ifelse([$5], , :, [$5]) 7.656 +else 7.657 + ifelse([$6], , :, [$6]) 7.658 +fi 7.659 +AC_MSG_RESULT([$with_$2]) 7.660 +])dnl
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 8.2 +++ b/as-accounts.5 Fri Nov 28 11:21:08 2008 +0100 8.3 @@ -0,0 +1,194 @@ 8.4 +.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 8.5 +.\" 8.6 +.\" Standard preamble: 8.7 +.\" ======================================================================== 8.8 +.de Sh \" Subsection heading 8.9 +.br 8.10 +.if t .Sp 8.11 +.ne 5 8.12 +.PP 8.13 +\fB\\$1\fR 8.14 +.PP 8.15 +.. 8.16 +.de Sp \" Vertical space (when we can't use .PP) 8.17 +.if t .sp .5v 8.18 +.if n .sp 8.19 +.. 8.20 +.de Vb \" Begin verbatim text 8.21 +.ft CW 8.22 +.nf 8.23 +.ne \\$1 8.24 +.. 8.25 +.de Ve \" End verbatim text 8.26 +.ft R 8.27 +.fi 8.28 +.. 8.29 +.\" Set up some character translations and predefined strings. \*(-- will 8.30 +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left 8.31 +.\" double quote, and \*(R" will give a right double quote. | will give a 8.32 +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to 8.33 +.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' 8.34 +.\" expand to `' in nroff, nothing in troff, for use with C<>. 8.35 +.tr \(*W-|\(bv\*(Tr 8.36 +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' 8.37 +.ie n \{\ 8.38 +. ds -- \(*W- 8.39 +. ds PI pi 8.40 +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch 8.41 +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch 8.42 +. ds L" "" 8.43 +. ds R" "" 8.44 +. ds C` 8.45 +. ds C' 8.46 +'br\} 8.47 +.el\{\ 8.48 +. ds -- \|\(em\| 8.49 +. ds PI \(*p 8.50 +. ds L" `` 8.51 +. ds R" '' 8.52 +'br\} 8.53 +.\" 8.54 +.\" If the F register is turned on, we'll generate index entries on stderr for 8.55 +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index 8.56 +.\" entries marked with X<> in POD. Of course, you'll have to process the 8.57 +.\" output yourself in some meaningful fashion. 8.58 +.if \nF \{\ 8.59 +. de IX 8.60 +. tm Index:\\$1\t\\n%\t"\\$2" 8.61 +.. 8.62 +. nr % 0 8.63 +. rr F 8.64 +.\} 8.65 +.\" 8.66 +.\" For nroff, turn off justification. Always turn off hyphenation; it makes 8.67 +.\" way too many mistakes in technical documents. 8.68 +.hy 0 8.69 +.if n .na 8.70 +.\" 8.71 +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). 8.72 +.\" Fear. Run. Save yourself. No user-serviceable parts. 8.73 +. \" fudge factors for nroff and troff 8.74 +.if n \{\ 8.75 +. ds #H 0 8.76 +. ds #V .8m 8.77 +. ds #F .3m 8.78 +. ds #[ \f1 8.79 +. ds #] \fP 8.80 +.\} 8.81 +.if t \{\ 8.82 +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) 8.83 +. ds #V .6m 8.84 +. ds #F 0 8.85 +. ds #[ \& 8.86 +. ds #] \& 8.87 +.\} 8.88 +. \" simple accents for nroff and troff 8.89 +.if n \{\ 8.90 +. ds ' \& 8.91 +. ds ` \& 8.92 +. ds ^ \& 8.93 +. ds , \& 8.94 +. ds ~ ~ 8.95 +. ds / 8.96 +.\} 8.97 +.if t \{\ 8.98 +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" 8.99 +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' 8.100 +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' 8.101 +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' 8.102 +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' 8.103 +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' 8.104 +.\} 8.105 +. \" troff and (daisy-wheel) nroff accents 8.106 +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' 8.107 +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' 8.108 +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] 8.109 +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' 8.110 +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' 8.111 +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] 8.112 +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] 8.113 +.ds ae a\h'-(\w'a'u*4/10)'e 8.114 +.ds Ae A\h'-(\w'A'u*4/10)'E 8.115 +. \" corrections for vroff 8.116 +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' 8.117 +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' 8.118 +. \" for low resolution devices (crt and lpr) 8.119 +.if \n(.H>23 .if \n(.V>19 \ 8.120 +\{\ 8.121 +. ds : e 8.122 +. ds 8 ss 8.123 +. ds o a 8.124 +. ds d- d\h'-1'\(ga 8.125 +. ds D- D\h'-1'\(hy 8.126 +. ds th \o'bp' 8.127 +. ds Th \o'LP' 8.128 +. ds ae ae 8.129 +. ds Ae AE 8.130 +.\} 8.131 +.rm #[ #] #H #V #F C 8.132 +.\" ======================================================================== 8.133 +.\" 8.134 +.IX Title "AS-ACCOUNTS 5" 8.135 +.TH AS-ACCOUNTS 5 "as-gui 0.7.2" "06-Mar-2003" "AS Accounts File" 8.136 +.SH "NAME" 8.137 +\&\fBas\-accounts\fR \- accounting system accounts document format 8.138 +.SH "DESCRIPTION" 8.139 +.IX Header "DESCRIPTION" 8.140 +The \fBas-gui\fR application specifies a user entry as including many individual 8.141 +pieces of information (see as\-events.5). One of these is the account, 8.142 +describing a task on which the user worked. While the account field may 8.143 +contain free text, there are a number of atomic values which are typical in 8.144 +the work atmosphere. The \fBas-gui\fR client reads a file of such values to offer 8.145 +the user a listing in which to choose from. This file is called the 8.146 +\&\fBas-accounts\fR file, and is typically named \fIaccounts\fR. Its name and location 8.147 +are arbitrary and may be changed through the user preferences. 8.148 +.SH "FILE FORMAT" 8.149 +.IX Header "FILE FORMAT" 8.150 +The \fBas-accounts\fR file contains \s-1ASCII\s0 text. The first line consists of an 8.151 +identifier to associate the file type and version. Following text may contain 8.152 +white space, comments, and data tuples. 8.153 +.SH "GRAMMAR" 8.154 +.IX Header "GRAMMAR" 8.155 +\&\fBaccounts\fR ::= \fBaccid\fR \fBacclist\fR 8.156 +.PP 8.157 +\&\fBaccid\fR ::= \*(L"%!AS\-ACCOUNTS\-\*(R" [0\-9] '.' [0\-9] 8.158 +.PP 8.159 +\&\fBacclist\fR ::= \fBacclist\fR | \fBacctuple\fR | \fBcomment\fR | \s-1EMPTY\s0 8.160 +.PP 8.161 +\&\fBcomment\fR ::= ($#.*) 8.162 +.PP 8.163 +\&\fBacctuple\fR ::= \fBacctype\fR \fBaccfull\fR | \fBacctype\fR \fBaccfull\fR \fBcomment\fR 8.164 +.PP 8.165 +\&\fBaccfull\fR ::= \fBaccfull\fR | \fBaccpart\fR 8.166 +.PP 8.167 +\&\fBaccpart\fR ::= \fBaccsep\fR \fBacctext\fR 8.168 +.PP 8.169 +\&\fBacctype\fR ::= [\s-1RM\s0] 8.170 +.PP 8.171 +\&\fBaccsep\fR ::= '/' 8.172 +.PP 8.173 +\&\fBacctext\fR ::= [a\-zA\-Z0\-9_\-]* 8.174 +.SH "EXAMPLE" 8.175 +.IX Header "EXAMPLE" 8.176 +A typical \fBas-accounts\fR file might look like this: 8.177 +.PP 8.178 +%!AS\-ACCOUNTS\-0.6 8.179 +.PP 8.180 +## Internet Services (\s-1IS\s0) department ## 8.181 +.PP 8.182 +# General 8.183 +.PP 8.184 +R /is/common/meeting # Specify type 8.185 +.PP 8.186 +R /is/common/meeting/weekly # A weekly meeting 8.187 +.PP 8.188 +# Special 8.189 +.PP 8.190 +R /is/sales/absence/illness # Approved absence (illness) 8.191 +.PP 8.192 +R /is/sales/absence/vacation # Approved absence (vacation) 8.193 +.SH "SEE ALSO" 8.194 +.IX Header "SEE ALSO" 8.195 +\&\fIas\-gui\fR\|(1), 8.196 +\&\fIas\-gui.conf\fR\|(5), 8.197 +\&\fIas\-events\fR\|(5)
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 9.2 +++ b/as-accounts.pod Fri Nov 28 11:21:08 2008 +0100 9.3 @@ -0,0 +1,103 @@ 9.4 +## 9.5 +## OSSP asgui - Accounting system graphical user interface 9.6 +## Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 9.7 +## Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 9.8 +## Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 9.9 +## Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 9.10 +## 9.11 +## This file is part of OSSP asgui, an accounting system graphical user 9.12 +## interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 9.13 +## 9.14 +## Permission to use, copy, modify, and distribute this software for 9.15 +## any purpose with or without fee is hereby granted, provided that 9.16 +## the above copyright notice and this permission notice appear in all 9.17 +## copies. 9.18 +## 9.19 +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 9.20 +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 9.21 +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 9.22 +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 9.23 +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 9.24 +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 9.25 +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 9.26 +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 9.27 +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 9.28 +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 9.29 +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 9.30 +## SUCH DAMAGE. 9.31 +## 9.32 +## as-accounts.pod: Plain old documentation file 9.33 +## 9.34 + 9.35 +=pod 9.36 + 9.37 +=head1 NAME 9.38 + 9.39 +B<as-accounts> - accounting system accounts document format 9.40 + 9.41 +=head1 DESCRIPTION 9.42 + 9.43 +The B<as-gui> application specifies a user entry as including many individual 9.44 +pieces of information (see as-events.5). One of these is the account, 9.45 +describing a task on which the user worked. While the account field may 9.46 +contain free text, there are a number of atomic values which are typical in 9.47 +the work atmosphere. The B<as-gui> client reads a file of such values to offer 9.48 +the user a listing in which to choose from. This file is called the 9.49 +B<as-accounts> file, and is typically named F<accounts>. Its name and location 9.50 +are arbitrary and may be changed through the user preferences. 9.51 + 9.52 +=head1 FILE FORMAT 9.53 + 9.54 +The B<as-accounts> file contains ASCII text. The first line consists of an 9.55 +identifier to associate the file type and version. Following text may contain 9.56 +white space, comments, and data tuples. 9.57 + 9.58 +=head1 GRAMMAR 9.59 + 9.60 +B<accounts> ::= B<accid> B<acclist> 9.61 + 9.62 +B<accid> ::= "%!AS-ACCOUNTS-" [0-9] '.' [0-9] 9.63 + 9.64 +B<acclist> ::= B<acclist> | B<acctuple> | B<comment> | EMPTY 9.65 + 9.66 +B<comment> ::= ($#.*) 9.67 + 9.68 +B<acctuple> ::= B<acctype> B<accfull> | B<acctype> B<accfull> B<comment> 9.69 + 9.70 +B<accfull> ::= B<accfull> | B<accpart> 9.71 + 9.72 +B<accpart> ::= B<accsep> B<acctext> 9.73 + 9.74 +B<acctype> ::= [RM] 9.75 + 9.76 +B<accsep> ::= '/' 9.77 + 9.78 +B<acctext> ::= [a-zA-Z0-9_-]* 9.79 + 9.80 +=head1 EXAMPLE 9.81 + 9.82 +A typical B<as-accounts> file might look like this: 9.83 + 9.84 +%!AS-ACCOUNTS-0.6 9.85 + 9.86 +## Internet Services (IS) department ## 9.87 + 9.88 +# General 9.89 + 9.90 +R /is/common/meeting # Specify type 9.91 + 9.92 +R /is/common/meeting/weekly # A weekly meeting 9.93 + 9.94 +# Special 9.95 + 9.96 +R /is/sales/absence/illness # Approved absence (illness) 9.97 + 9.98 +R /is/sales/absence/vacation # Approved absence (vacation) 9.99 + 9.100 +=head1 SEE ALSO 9.101 + 9.102 +as-gui(1), 9.103 +as-gui.conf(5), 9.104 +as-events(5) 9.105 + 9.106 +=cut
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 10.2 +++ b/as-events.5 Fri Nov 28 11:21:08 2008 +0100 10.3 @@ -0,0 +1,233 @@ 10.4 +.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 10.5 +.\" 10.6 +.\" Standard preamble: 10.7 +.\" ======================================================================== 10.8 +.de Sh \" Subsection heading 10.9 +.br 10.10 +.if t .Sp 10.11 +.ne 5 10.12 +.PP 10.13 +\fB\\$1\fR 10.14 +.PP 10.15 +.. 10.16 +.de Sp \" Vertical space (when we can't use .PP) 10.17 +.if t .sp .5v 10.18 +.if n .sp 10.19 +.. 10.20 +.de Vb \" Begin verbatim text 10.21 +.ft CW 10.22 +.nf 10.23 +.ne \\$1 10.24 +.. 10.25 +.de Ve \" End verbatim text 10.26 +.ft R 10.27 +.fi 10.28 +.. 10.29 +.\" Set up some character translations and predefined strings. \*(-- will 10.30 +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left 10.31 +.\" double quote, and \*(R" will give a right double quote. | will give a 10.32 +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to 10.33 +.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' 10.34 +.\" expand to `' in nroff, nothing in troff, for use with C<>. 10.35 +.tr \(*W-|\(bv\*(Tr 10.36 +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' 10.37 +.ie n \{\ 10.38 +. ds -- \(*W- 10.39 +. ds PI pi 10.40 +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch 10.41 +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch 10.42 +. ds L" "" 10.43 +. ds R" "" 10.44 +. ds C` 10.45 +. ds C' 10.46 +'br\} 10.47 +.el\{\ 10.48 +. ds -- \|\(em\| 10.49 +. ds PI \(*p 10.50 +. ds L" `` 10.51 +. ds R" '' 10.52 +'br\} 10.53 +.\" 10.54 +.\" If the F register is turned on, we'll generate index entries on stderr for 10.55 +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index 10.56 +.\" entries marked with X<> in POD. Of course, you'll have to process the 10.57 +.\" output yourself in some meaningful fashion. 10.58 +.if \nF \{\ 10.59 +. de IX 10.60 +. tm Index:\\$1\t\\n%\t"\\$2" 10.61 +.. 10.62 +. nr % 0 10.63 +. rr F 10.64 +.\} 10.65 +.\" 10.66 +.\" For nroff, turn off justification. Always turn off hyphenation; it makes 10.67 +.\" way too many mistakes in technical documents. 10.68 +.hy 0 10.69 +.if n .na 10.70 +.\" 10.71 +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). 10.72 +.\" Fear. Run. Save yourself. No user-serviceable parts. 10.73 +. \" fudge factors for nroff and troff 10.74 +.if n \{\ 10.75 +. ds #H 0 10.76 +. ds #V .8m 10.77 +. ds #F .3m 10.78 +. ds #[ \f1 10.79 +. ds #] \fP 10.80 +.\} 10.81 +.if t \{\ 10.82 +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) 10.83 +. ds #V .6m 10.84 +. ds #F 0 10.85 +. ds #[ \& 10.86 +. ds #] \& 10.87 +.\} 10.88 +. \" simple accents for nroff and troff 10.89 +.if n \{\ 10.90 +. ds ' \& 10.91 +. ds ` \& 10.92 +. ds ^ \& 10.93 +. ds , \& 10.94 +. ds ~ ~ 10.95 +. ds / 10.96 +.\} 10.97 +.if t \{\ 10.98 +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" 10.99 +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' 10.100 +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' 10.101 +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' 10.102 +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' 10.103 +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' 10.104 +.\} 10.105 +. \" troff and (daisy-wheel) nroff accents 10.106 +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' 10.107 +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' 10.108 +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] 10.109 +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' 10.110 +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' 10.111 +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] 10.112 +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] 10.113 +.ds ae a\h'-(\w'a'u*4/10)'e 10.114 +.ds Ae A\h'-(\w'A'u*4/10)'E 10.115 +. \" corrections for vroff 10.116 +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' 10.117 +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' 10.118 +. \" for low resolution devices (crt and lpr) 10.119 +.if \n(.H>23 .if \n(.V>19 \ 10.120 +\{\ 10.121 +. ds : e 10.122 +. ds 8 ss 10.123 +. ds o a 10.124 +. ds d- d\h'-1'\(ga 10.125 +. ds D- D\h'-1'\(hy 10.126 +. ds th \o'bp' 10.127 +. ds Th \o'LP' 10.128 +. ds ae ae 10.129 +. ds Ae AE 10.130 +.\} 10.131 +.rm #[ #] #H #V #F C 10.132 +.\" ======================================================================== 10.133 +.\" 10.134 +.IX Title "AS-EVENTS 5" 10.135 +.TH AS-EVENTS 5 "as-gui 0.7.2" "06-Mar-2003" "AS Events File" 10.136 +.SH "NAME" 10.137 +\&\fBas\-events\fR \- accounting system events document format 10.138 +.SH "DESCRIPTION" 10.139 +.IX Header "DESCRIPTION" 10.140 +The \fBas-gui\fR application takes input from the user and may store its data to 10.141 +a file on the local filesystem. Among other functions, a user can enter time, 10.142 +amounts, remarks, and other values. This data tuple is termed an \fIevent\fR, and 10.143 +may either be transmitted to a \fB\s-1AS\s0\fR server or stored to a local file. Should 10.144 +it be stored to a local file, the file name is arbitrary and is shown in the 10.145 +title bar of \fBas-gui\fR. Typically, the file is called \fIevents.as\fR. In most 10.146 +cases the postfix \fB.as\fR is appended to the file name, although this behaviour 10.147 +can be turned on or off through the user preferences. 10.148 +.SH "FILE FORMAT" 10.149 +.IX Header "FILE FORMAT" 10.150 +The \fBas-events\fR file contains \s-1ASCII\s0 text. The first line consists of an 10.151 +identifier to associate the file type and version. Following text may contain 10.152 +white space, comments, and data tuples. 10.153 +.SH "GRAMMAR" 10.154 +.IX Header "GRAMMAR" 10.155 +\&\fBevents.as\fR ::= \fBeventsid\fR \fBtuplelist\fR 10.156 +.PP 10.157 +\&\fBeventsid\fR ::= \*(L"%!AS\-EVENTS\-\*(R" [0\-9] '.' [0\-9] 10.158 +.PP 10.159 +\&\fBtuplelist\fR ::= \fBtuplelist\fR | \fBtuple\fR | \fBcomment\fR | \s-1EMPTY\s0 10.160 +.PP 10.161 +\&\fBtuple\fR ::= \fBuser\fR \fBuuid\fR \fBcrc\fR \fBrevision\fR \fBdate\fR \fBbegin\fR \fBend\fR \fBamount\fR \fBaccount\fR \fBremark\fR 10.162 +.PP 10.163 +\&\fBcomment\fR ::= ($#.*) 10.164 +.PP 10.165 +(* user field *) 10.166 +.PP 10.167 +\&\fBuser\fR ::= [a\-zA\-Z][a\-zA\-Z0\-9]+ 10.168 +.PP 10.169 +(* uuid field *) 10.170 +.PP 10.171 +\&\fBuuid\fR ::= \fBhexoctet\fR '\-' \fBhexquartet\fR '\-' \fBhexquartet\fR '\-' \fBhexquartet\fR '\-' \fBhextwelvetet\fR 10.172 +.PP 10.173 +(* crc field *) 10.174 +.PP 10.175 +\&\fBcrc\fR ::= \fBhexoctet\fR 10.176 +.PP 10.177 +\&\fBhextwelvetet\fR ::= \fBhexoctet\fR | \fBhexquartet\fR 10.178 +.PP 10.179 +\&\fBhexoctet\fR ::= \fBhexquartet\fR | \fBhexquartet\fR 10.180 +.PP 10.181 +\&\fBhexquartet\fR ::= \fBhexdigit\fR | \fBhexdigit\fR | \fBhexdigit\fR | \fBhexdigit\fR 10.182 +.PP 10.183 +\&\fBhexdigit\fR ::= \fBa\-zA\-Z0\-9\fR 10.184 +.PP 10.185 +(* revision field *) 10.186 +.PP 10.187 +\&\fBrevision\fR ::= [0\-9] 10.188 +.PP 10.189 +(* date field *) 10.190 +.PP 10.191 +\&\fBdate\fR ::= [0\-9][0\-9][0\-9][0\-9] '\-' [01][0\-9] '\-' [0123][0\-9] 10.192 +.PP 10.193 +(* time fields *) 10.194 +.PP 10.195 +\&\fBbegin\fR ::= \fBtimeval\fR 10.196 +.PP 10.197 +\&\fBend\fR ::= \fBendval\fR 10.198 +.PP 10.199 +\&\fBamount\fR ::= \fBtimeval\fR 10.200 +.PP 10.201 +\&\fBtimeval\fR ::= \fBhourval\fR ':' \fBminuteval\fR 10.202 +.PP 10.203 +\&\fBendval\fR ::= \fBhourinc\fR ':' \fBminuteval\fR 10.204 +.PP 10.205 +\&\fBhourval\fR ::= [01][0\-9] 10.206 +.PP 10.207 +\&\fBhourinc\fR ::= \fBhourval\fR | 2[0\-4] 10.208 +.PP 10.209 +\&\fBminval\fR ::= [0\-5][0\-9] 10.210 +.PP 10.211 +(* account field *) 10.212 +.PP 10.213 +\&\fBaccount\fR ::= \fBaccount\fR | \fBaccpart\fR 10.214 +.PP 10.215 +\&\fBaccpart\fR ::= \fBaccsep\fR \fBacctext\fR 10.216 +.PP 10.217 +\&\fBaccsep\fR ::= '/' 10.218 +.PP 10.219 +\&\fBacctext\fR ::= [a\-zA\-Z0\-9_\-]* 10.220 +.PP 10.221 +(* remark field *) 10.222 +.PP 10.223 +\&\fBremark\fR ::= '\*(L"' .* '\*(R"' 10.224 +.SH "EXAMPLE" 10.225 +.IX Header "EXAMPLE" 10.226 +A typical \fBas-events\fR file might look like this: 10.227 +.PP 10.228 +%!AS\-EVENTS\-0.6 10.229 +harvey 0ccf1d42\-743b\-43df\-9b5d\-202451b3c26f e8f212b6 0 2002\-09\-30 00:00 00:00 02:00 /it/development/meeting/weekly \*(L"Code review\*(R" 10.230 +harvey 9c497382\-ae88\-4a1a\-91b5\-202451b3c26f c8637e9a 0 2002\-09\-30 00:00 00:00 00:30 /it/common/office/communication \*(L"Conference call\*(R" 10.231 +harvey e230eae7\-367f\-4c35\-bee1\-202451b3c26f 02cb1abb 0 2002\-09\-30 00:00 00:00 00:30 /sales/travel/customer \*(L"Simontech visit\*(R" 10.232 +.SH "SEE ALSO" 10.233 +.IX Header "SEE ALSO" 10.234 +\&\fIas\-gui\fR\|(1), 10.235 +\&\fIas\-gui.conf\fR\|(5), 10.236 +\&\fIas\-accounts\fR\|(5),
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 11.2 +++ b/as-events.pod Fri Nov 28 11:21:08 2008 +0100 11.3 @@ -0,0 +1,142 @@ 11.4 +## 11.5 +## OSSP asgui - Accounting system graphical user interface 11.6 +## Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 11.7 +## Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 11.8 +## Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 11.9 +## Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 11.10 +## 11.11 +## This file is part of OSSP asgui, an accounting system graphical user 11.12 +## interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 11.13 +## 11.14 +## Permission to use, copy, modify, and distribute this software for 11.15 +## any purpose with or without fee is hereby granted, provided that 11.16 +## the above copyright notice and this permission notice appear in all 11.17 +## copies. 11.18 +## 11.19 +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 11.20 +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 11.21 +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 11.22 +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 11.23 +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 11.24 +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 11.25 +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 11.26 +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 11.27 +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 11.28 +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 11.29 +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 11.30 +## SUCH DAMAGE. 11.31 +## 11.32 +## as-events.pod: Plain old documentation file 11.33 +## 11.34 + 11.35 +=pod 11.36 + 11.37 +=head1 NAME 11.38 + 11.39 +B<as-events> - accounting system events document format 11.40 + 11.41 +=head1 DESCRIPTION 11.42 + 11.43 +The B<as-gui> application takes input from the user and may store its data to 11.44 +a file on the local filesystem. Among other functions, a user can enter time, 11.45 +amounts, remarks, and other values. This data tuple is termed an I<event>, and 11.46 +may either be transmitted to a B<AS> server or stored to a local file. Should 11.47 +it be stored to a local file, the file name is arbitrary and is shown in the 11.48 +title bar of B<as-gui>. Typically, the file is called F<events.as>. In most 11.49 +cases the postfix B<.as> is appended to the file name, although this behaviour 11.50 +can be turned on or off through the user preferences. 11.51 + 11.52 +=head1 FILE FORMAT 11.53 + 11.54 +The B<as-events> file contains ASCII text. The first line consists of an 11.55 +identifier to associate the file type and version. Following text may contain 11.56 +white space, comments, and data tuples. 11.57 + 11.58 +=head1 GRAMMAR 11.59 + 11.60 +B<events.as> ::= B<eventsid> B<tuplelist> 11.61 + 11.62 +B<eventsid> ::= "%!AS-EVENTS-" [0-9] '.' [0-9] 11.63 + 11.64 +B<tuplelist> ::= B<tuplelist> | B<tuple> | B<comment> | EMPTY 11.65 + 11.66 +B<tuple> ::= B<user> B<uuid> B<crc> B<revision> B<date> B<begin> B<end> B<amount> B<account> B<remark> 11.67 + 11.68 +B<comment> ::= ($#.*) 11.69 + 11.70 +(* user field *) 11.71 + 11.72 +B<user> ::= [a-zA-Z][a-zA-Z0-9]+ 11.73 + 11.74 +(* uuid field *) 11.75 + 11.76 +B<uuid> ::= B<hexoctet> '-' B<hexquartet> '-' B<hexquartet> '-' B<hexquartet> '-' B<hextwelvetet> 11.77 + 11.78 +(* crc field *) 11.79 + 11.80 +B<crc> ::= B<hexoctet> 11.81 + 11.82 +B<hextwelvetet> ::= B<hexoctet> | B<hexquartet> 11.83 + 11.84 +B<hexoctet> ::= B<hexquartet> | B<hexquartet> 11.85 + 11.86 +B<hexquartet> ::= B<hexdigit> | B<hexdigit> | B<hexdigit> | B<hexdigit> 11.87 + 11.88 +B<hexdigit> ::= B<a-zA-Z0-9> 11.89 + 11.90 +(* revision field *) 11.91 + 11.92 +B<revision> ::= [0-9] 11.93 + 11.94 +(* date field *) 11.95 + 11.96 +B<date> ::= [0-9][0-9][0-9][0-9] '-' [01][0-9] '-' [0123][0-9] 11.97 + 11.98 +(* time fields *) 11.99 + 11.100 +B<begin> ::= B<timeval> 11.101 + 11.102 +B<end> ::= B<endval> 11.103 + 11.104 +B<amount> ::= B<timeval> 11.105 + 11.106 +B<timeval> ::= B<hourval> ':' B<minuteval> 11.107 + 11.108 +B<endval> ::= B<hourinc> ':' B<minuteval> 11.109 + 11.110 +B<hourval> ::= [01][0-9] 11.111 + 11.112 +B<hourinc> ::= B<hourval> | 2[0-4] 11.113 + 11.114 +B<minval> ::= [0-5][0-9] 11.115 + 11.116 +(* account field *) 11.117 + 11.118 +B<account> ::= B<account> | B<accpart> 11.119 + 11.120 +B<accpart> ::= B<accsep> B<acctext> 11.121 + 11.122 +B<accsep> ::= '/' 11.123 + 11.124 +B<acctext> ::= [a-zA-Z0-9_-]* 11.125 + 11.126 +(* remark field *) 11.127 + 11.128 +B<remark> ::= '"' .* '"' 11.129 + 11.130 +=head1 EXAMPLE 11.131 + 11.132 +A typical B<as-events> file might look like this: 11.133 + 11.134 +%!AS-EVENTS-0.6 11.135 +harvey 0ccf1d42-743b-43df-9b5d-202451b3c26f e8f212b6 0 2002-09-30 00:00 00:00 02:00 /it/development/meeting/weekly "Code review" 11.136 +harvey 9c497382-ae88-4a1a-91b5-202451b3c26f c8637e9a 0 2002-09-30 00:00 00:00 00:30 /it/common/office/communication "Conference call" 11.137 +harvey e230eae7-367f-4c35-bee1-202451b3c26f 02cb1abb 0 2002-09-30 00:00 00:00 00:30 /sales/travel/customer "Simontech visit" 11.138 + 11.139 +=head1 SEE ALSO 11.140 + 11.141 +as-gui(1), 11.142 +as-gui.conf(5), 11.143 +as-accounts(5), 11.144 + 11.145 +=cut
12.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 12.2 +++ b/as-gui.conf.pod Fri Nov 28 11:21:08 2008 +0100 12.3 @@ -0,0 +1,105 @@ 12.4 +## 12.5 +## OSSP asgui - Accounting system graphical user interface 12.6 +## Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 12.7 +## Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 12.8 +## Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 12.9 +## Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 12.10 +## 12.11 +## This file is part of OSSP asgui, an accounting system graphical user 12.12 +## interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 12.13 +## 12.14 +## Permission to use, copy, modify, and distribute this software for 12.15 +## any purpose with or without fee is hereby granted, provided that 12.16 +## the above copyright notice and this permission notice appear in all 12.17 +## copies. 12.18 +## 12.19 +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 12.20 +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 12.21 +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 12.22 +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 12.23 +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12.24 +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 12.25 +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 12.26 +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 12.27 +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 12.28 +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 12.29 +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 12.30 +## SUCH DAMAGE. 12.31 +## 12.32 +## as-gui.conf.pod: Plain old documentation file 12.33 +## 12.34 + 12.35 +=pod 12.36 + 12.37 +=head1 NAME 12.38 + 12.39 +B<as-gui.conf> - as-gui configuration file 12.40 + 12.41 +=head1 DESCRIPTION 12.42 + 12.43 +The B<as-gui> accounting system graphical client allows for easy yet flexible 12.44 +accounting of time and tasks. It caters to a variety of user interface tastes 12.45 +by offering a variety of parameterized options. 12.46 + 12.47 +Many such options influence direct rendering of the graphical representation 12.48 +of all data and the controls which operate on the data. However, other options 12.49 +control communication with the B<AS> server, local report formatting, or 12.50 +backup storage. 12.51 + 12.52 +Features such as macro processing, rulesets, account aliases, and session 12.53 +tuning will be stored as well (when these future preferences are finally 12.54 +implemented). 12.55 + 12.56 +Because of the many possibilities offered, there exists a system to manage the 12.57 +preferences involved. The system depends on the preferences file F<~/.as-gui>, 12.58 +reading data from it when starting and running B<as-gui>, and storing data to 12.59 +it when finally terminating. 12.60 + 12.61 +The file F<~/.as-gui> is stored in XML format, and is parsed internally by 12.62 +B<as-gui>. There is no need to edit this file, although there is also no harm 12.63 +in doing so. Please remember that all parameters may change during runtime, so 12.64 +it is wisest to edit after quitting the B<as-gui> application. 12.65 + 12.66 +Attenzione! During runtime, all parameters are user-defined and are accessible 12.67 +by selecting the 'Preferences...' subitem under the 'Edit' menu. 12.68 + 12.69 +=head1 EXAMPLES 12.70 + 12.71 +Entries taken from a preferences file: 12.72 + 12.73 +=over 4 12.74 + 12.75 +=item B<Location of events file> 12.76 + 12.77 +<option key="asfile" value="~/.as/events" /> 12.78 + 12.79 +=item B<Location of accounts file> 12.80 + 12.81 +<option key="accounts" value="~/.as/accounts" /> 12.82 + 12.83 +=item B<Visibility indicator of the amount column> 12.84 + 12.85 +<option key="amountcolshow" value="true" /> 12.86 + 12.87 +=item B<Width in pixels of the amount column> 12.88 + 12.89 +<option key="amountcolwidth" value="60" /> 12.90 + 12.91 +=item B<Flag to enable automatic file backups> 12.92 + 12.93 +<option key="autobackup" value="true" /> 12.94 + 12.95 +=back 12.96 + 12.97 +=head1 SEE ALSO 12.98 + 12.99 +as-gui(1), 12.100 +as-events(5), 12.101 +as-accounts(5) 12.102 + 12.103 +=head1 AUTHOR 12.104 + 12.105 +Michael Schloh von Bennewitz 12.106 +(michael@schloh.com) 12.107 + 12.108 +=cut
13.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 13.2 +++ b/as-gui.html Fri Nov 28 11:21:08 2008 +0100 13.3 @@ -0,0 +1,238 @@ 13.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 13.5 +<html xmlns="http://www.w3.org/1999/xhtml"> 13.6 +<head> 13.7 +<title>as-gui help reference</title> 13.8 +<link rev="made" href="mailto:ms@dt4.dev.de.cw.net" /> 13.9 +</head> 13.10 + 13.11 +<body style="background-color: white"> 13.12 + 13.13 +<p><a name="__index__"></a></p> 13.14 +<!-- INDEX BEGIN --> 13.15 + 13.16 +<h1><a name="top">AS-GUI</a></h1> 13.17 +<ul> 13.18 + <li><a href="#name">NAME</a></li> 13.19 + <li><a href="#version">VERSION</a></li> 13.20 + <li><a href="#synopsis">SYNOPSIS</a></li> 13.21 + <li><a href="#description">DESCRIPTION</a></li> 13.22 + <li><a href="#x11_options">X11 OPTIONS</a></li> 13.23 + <li><a href="#qt_options">Qt OPTIONS</a></li> 13.24 + <li><a href="#environment">ENVIRONMENT</a></li> 13.25 + <li><a href="#return_values">RETURN VALUES</a></li> 13.26 + <li><a href="#examples">EXAMPLES</a></li> 13.27 + <li><a href="#files">FILES</a></li> 13.28 + <li><a href="#bugs">BUGS</a></li> 13.29 + <li><a href="#see_also">SEE ALSO</a></li> 13.30 + <li><a href="#author">AUTHOR</a></li> 13.31 +</ul> 13.32 +<!-- INDEX END --> 13.33 + 13.34 +<hr /><hr /> 13.35 +<h2><a name="name">NAME</a></h2> 13.36 +<p><strong>as-gui</strong> - accounting system graphical client</p> 13.37 +<p> 13.38 +</p> 13.39 +<hr /> 13.40 +<h2><a name="version">VERSION</a></h2> 13.41 +<p>as-gui 0.7.2 (06-Mar-2003)</p> 13.42 +<p> 13.43 +</p> 13.44 +<hr /> 13.45 +<h2><a name="synopsis">SYNOPSIS</a></h2> 13.46 +<p><strong>as-gui</strong> 13.47 +[<em>X11_options</em>] 13.48 +[<em>Qt_options</em>] 13.49 +[file]</p> 13.50 +<p> 13.51 +</p> 13.52 +<hr /> 13.53 +<h2><a name="description">DESCRIPTION</a></h2> 13.54 +<p>The <strong>as-gui</strong> application tracks the time a person spends on a number of 13.55 +predefined tasks. This is the graphical client to the <strong>Accounting System</strong> 13.56 +server (<strong>AS</strong>). Although the two can interact through means of interprocess 13.57 +communication mechanisms, <strong>as-gui</strong> is a generic stand-alone tool which can be 13.58 +used with no <strong>AS</strong> server.</p> 13.59 +<p>When logging to a local file, <strong>as-gui</strong> takes input and waits until receiving 13.60 +a save request from the user. Then, the time sheet will save its data entries 13.61 +to the associated file name (as shown in the title bar).</p> 13.62 +<p>Logging to a remote <strong>AS</strong> server follows a similar input scheme, but at least 13.63 +one <strong>AS</strong> server must be specified in the preferences. A simple 'syncronize 13.64 +with server' operation does the rest.</p> 13.65 +<p> 13.66 +</p> 13.67 +<hr /> 13.68 +<h2><a name="x11_options">X11 OPTIONS</a></h2> 13.69 +<p>The following <em>X11 options</em> are passed directly to the X11 subsystem, and 13.70 +allow for the typical customization of a X11 application.</p> 13.71 +<dl> 13.72 +<dt><strong><a name="item_%2ddisplay_display"><strong>-display display</strong></a></strong><br /> 13.73 +</dt> 13.74 +<dd> 13.75 +Sets the X display (host:server.screen). The default value is $DISPLAY. 13.76 +</dd> 13.77 +<br> 13.78 +<dt><strong><a name="item_%2dgeometry_geometry"><strong>-geometry geometry</strong></a></strong><br /> 13.79 +</dt> 13.80 +<dd> 13.81 +Sets the client geometry (width x height + xoffset + yoffset) of the main widget. 13.82 +</dd> 13.83 +<br> 13.84 +<dt><strong><a name="item_%2dfn_font%2c_%2dfont_font"><strong>-fn font</strong>, <strong>-font font</strong></a></strong><br /> 13.85 +</dt> 13.86 +<dd> 13.87 +Defines the application font. The font should be specified using a X logical 13.88 +font description. 13.89 +</dd> 13.90 +<br> 13.91 +<dt><strong><a name="item_%2dbg_color%2c_%2dbackground_color"><strong>-bg color</strong>, <strong>-background color</strong></a></strong><br /> 13.92 +</dt> 13.93 +<dd> 13.94 +Sets the default background color and an application palette (light and dark 13.95 +shades are calculated). 13.96 +</dd> 13.97 +<br> 13.98 +<dt><strong><a name="item_%2dfg_color%2c_%2dforeground_color"><strong>-fg color</strong>, <strong>-foreground color</strong></a></strong><br /> 13.99 +</dt> 13.100 +<dd> 13.101 +Sets the default foreground color. 13.102 +</dd> 13.103 +<br> 13.104 +<dt><strong><a name="item_%2dbtn_color%2c_%2dbutton_color"><strong>-btn color</strong>, <strong>-button color</strong></a></strong><br /> 13.105 +</dt> 13.106 +<dd> 13.107 +Sets the default button color. 13.108 +</dd> 13.109 +<br> 13.110 +<dt><strong><a name="item_%2dname_name"><strong>-name name</strong></a></strong><br /> 13.111 +</dt> 13.112 +<dd> 13.113 +Sets the application name. 13.114 +</dd> 13.115 +<br> 13.116 +<dt><strong><a name="item_%2dtitle_title"><strong>-title title</strong></a></strong><br /> 13.117 +</dt> 13.118 +<dd> 13.119 +Sets the application title (caption). 13.120 +</dd> 13.121 +<br> 13.122 +<dt><strong><a name="item_%2dvisual_truecolor"><strong>-visual TrueColor</strong></a></strong><br /> 13.123 +</dt> 13.124 +<dd> 13.125 +Forces the application to use a TrueColor visual on an 8-bit display. 13.126 +</dd> 13.127 +<br> 13.128 +<dt><strong><a name="item_%2dncols_count"><strong>-ncols count</strong></a></strong><br /> 13.129 +</dt> 13.130 +<dd> 13.131 +Limits the number of colors allocated in the color cube on an 8-bit display, 13.132 +if the application is using the QApplication::ManyColor color specification. 13.133 +If count is 216 then a 6x6x6 color cube is used (i.e. 6 levels of red, 6 of 13.134 +green, and 6 of blue). For other values, a cube approximately proportional to 13.135 +a 2x3x1 cube is used. 13.136 +</dd> 13.137 +<br> 13.138 +<dt><strong><a name="item_%2dcmap"><strong>-cmap</strong></a></strong><br /> 13.139 +</dt> 13.140 +<dd> 13.141 +Causes the application to install a private color map on an 8-bit display. 13.142 +</dd> 13.143 +<br></dl> 13.144 +<p> 13.145 +</p> 13.146 +<hr /> 13.147 +<h2><a name="qt_options">Qt OPTIONS</a></h2> 13.148 +<p>The following <em>Qt options</em> are used when rendering the graphics of the Qt 13.149 +widget library. They are not compatible with other X11 or Win32 applications, 13.150 +unless they were first linked with the Qt widget library.</p> 13.151 +<dl> 13.152 +<dt><strong><a name="item_%2dsession_session"><strong>-session session</strong></a></strong><br /> 13.153 +</dt> 13.154 +<dd> 13.155 +Restores the application from an earlier session. 13.156 +</dd> 13.157 +<br> 13.158 +<dt><strong><a name="item_%2dwidgetcount"><strong>-widgetcount</strong></a></strong><br /> 13.159 +</dt> 13.160 +<dd> 13.161 +Prints debug message at the end about number of widgets left undestroyed and 13.162 +maximum number of widgets existed at the same time. 13.163 +</dd> 13.164 +<br></dl> 13.165 +<p> 13.166 +</p> 13.167 +<hr /> 13.168 +<h2><a name="environment">ENVIRONMENT</a></h2> 13.169 +<p><code>USER</code> The user name to use when accounting.</p> 13.170 +<p><code>HOME</code> The full path of the user's home directory.</p> 13.171 +<p> 13.172 +</p> 13.173 +<hr /> 13.174 +<h2><a name="return_values">RETURN VALUES</a></h2> 13.175 +<p><code>0</code> The application exited sucessfully.</p> 13.176 +<p><code>>0 or <0</code> At least one error ocurred.</p> 13.177 +<p> 13.178 +</p> 13.179 +<hr /> 13.180 +<h2><a name="examples">EXAMPLES</a></h2> 13.181 +<p>Try out some of these examples to customize <strong>as-gui</strong> from the command 13.182 +line. Remember that options can be mixed.</p> 13.183 +<p>Initially editing the document 'figo.as': 13.184 +<br> $ as-gui figo.as</p> 13.185 +<p>Showing lovely blue shades in most widgets: 13.186 +<br> $ as-gui -bg lightblue -fg darkblue</p> 13.187 +<p>Starting with a title bar that reads 'Yours here': 13.188 +<br> $ as-gui -title 'Yours here'</p> 13.189 +<p>Displaying graphics output on the host borchert: 13.190 +<br> $ as-gui -display borchert:0.0</p> 13.191 +<p>A slim window slightly left of the top right corner: 13.192 +<br> $ as-gui -geometry 761x347-120+0</p> 13.193 +<p> 13.194 +</p> 13.195 +<hr /> 13.196 +<h2><a name="files">FILES</a></h2> 13.197 +<dl> 13.198 +<dt><strong><a name="item_%7e%2f%2eas%2dgui">~/.as-gui</a></strong><br /> 13.199 +</dt> 13.200 +<dd> 13.201 +User preferences file. 13.202 +</dd> 13.203 +<br> 13.204 +<dt><strong><a name="item_as%2dgui%2ehtml">as-gui.html</a></strong><br /> 13.205 +</dt> 13.206 +<dd> 13.207 +Help reference. 13.208 +</dd> 13.209 +<p></p></dl> 13.210 +<p> 13.211 +</p> 13.212 +<hr /> 13.213 +<h2><a name="bugs">BUGS</a></h2> 13.214 +<p>Sometimes a click on a widget (like a toolbar button) is seemingly ignored.</p> 13.215 +<p>Consistent row shading is not always maintained. This means that the sharp 13.216 +colour difference between one row and the next may not correctly follow the 13.217 +chosen sort order. Press 'refresh' to work around this problem.</p> 13.218 +<p>The row highlight may be wrong after resorting the entire time sheet. Press 13.219 +the arrow keys a few times to find the currently selected row if this happens.</p> 13.220 +<p>Double clicking on column separators should automatically expand or shrink 13.221 +the corresponding column to the exact size needed. Broken.</p> 13.222 +<p>Local reports only take datewise sorting into account. Attention! This is not 13.223 +a bug, and local reports are almost always only useful when sorted by date.</p> 13.224 +<p> 13.225 +</p> 13.226 +<hr /> 13.227 +<h2><a name="see_also">SEE ALSO</a></h2> 13.228 +<p>as-gui(1), 13.229 +<br>as-events(5), 13.230 +<br>as-accounts(5), 13.231 +<br>as-gui.conf(5) 13.232 +<p> 13.233 +</p> 13.234 +<hr /> 13.235 +<h2><a name="author">AUTHOR</a></h2> 13.236 +<p>Michael Schloh von Bennewitz 13.237 +<br>michael@schloh.com</p> 13.238 + 13.239 +</body> 13.240 + 13.241 +</html>
14.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 14.2 +++ b/as-gui.pod Fri Nov 28 11:21:08 2008 +0100 14.3 @@ -0,0 +1,242 @@ 14.4 +## 14.5 +## OSSP asgui - Accounting system graphical user interface 14.6 +## Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 14.7 +## Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 14.8 +## Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 14.9 +## Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 14.10 +## 14.11 +## This file is part of OSSP asgui, an accounting system graphical user 14.12 +## interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 14.13 +## 14.14 +## Permission to use, copy, modify, and distribute this software for 14.15 +## any purpose with or without fee is hereby granted, provided that 14.16 +## the above copyright notice and this permission notice appear in all 14.17 +## copies. 14.18 +## 14.19 +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 14.20 +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 14.21 +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 14.22 +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 14.23 +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 14.24 +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 14.25 +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 14.26 +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 14.27 +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 14.28 +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 14.29 +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 14.30 +## SUCH DAMAGE. 14.31 +## 14.32 +## as-gui.pod: Plain old documentation file 14.33 +## 14.34 + 14.35 +=pod 14.36 + 14.37 +=head1 NAME 14.38 + 14.39 +B<as-gui> - accounting system graphical client 14.40 + 14.41 +=head1 VERSION 14.42 + 14.43 +as-gui ASGUI_VERSION_STR 14.44 + 14.45 +=head1 SYNOPSIS 14.46 + 14.47 +B<as-gui> 14.48 +[I<X11_options>] 14.49 +[I<Qt_options>] 14.50 +[file] 14.51 + 14.52 +=head1 DESCRIPTION 14.53 + 14.54 +The B<as-gui> application tracks the time a person spends on a number of 14.55 +predefined tasks. This is the graphical client to the B<Accounting System> 14.56 +server (B<AS>). Although the two can interact through means of interprocess 14.57 +communication mechanisms, B<as-gui> is a generic stand-alone tool which can be 14.58 +used with no B<AS> server. 14.59 + 14.60 +When logging to a local file, B<as-gui> takes input and waits until receiving 14.61 +a save request from the user. Then, the time sheet will save its data entries 14.62 +to the associated file name (as shown in the title bar). 14.63 + 14.64 +Logging to a remote B<AS> server follows a similar input scheme, but at least 14.65 +one B<AS> server must be specified in the preferences. A simple 'syncronize 14.66 +with server' operation does the rest. 14.67 + 14.68 +=head1 X11 OPTIONS 14.69 + 14.70 +The following I<X11 options> are passed directly to the X11 subsystem, and 14.71 +allow for the typical customization of a X11 application. 14.72 + 14.73 +=over 4 14.74 + 14.75 +=item B<-display display> 14.76 + 14.77 +Sets the X display (host:server.screen). The default value is $DISPLAY. 14.78 + 14.79 +=item B<-geometry geometry> 14.80 + 14.81 +Sets the client geometry (width x height + xoffset + yoffset) of the main widget. 14.82 + 14.83 +=item B<-fn font>, B<-font font> 14.84 + 14.85 +Defines the application font. The font should be specified using a X logical 14.86 +font description. 14.87 + 14.88 +=item B<-bg color>, B<-background color> 14.89 + 14.90 +Sets the default background color and an application palette (light and dark 14.91 +shades are calculated). 14.92 + 14.93 +=item B<-fg color>, B<-foreground color> 14.94 + 14.95 +Sets the default foreground color. 14.96 + 14.97 +=item B<-btn color>, B<-button color> 14.98 + 14.99 +Sets the default button color. 14.100 + 14.101 +=item B<-name name> 14.102 + 14.103 +Sets the application name. 14.104 + 14.105 +=item B<-title title> 14.106 + 14.107 +Sets the application title (caption). 14.108 + 14.109 +=item B<-visual TrueColor> 14.110 + 14.111 +Forces the application to use a TrueColor visual on an 8-bit display. 14.112 + 14.113 +=item B<-ncols count> 14.114 + 14.115 +Limits the number of colors allocated in the color cube on an 8-bit display, 14.116 +if the application is using the QApplication::ManyColor color specification. 14.117 +If count is 216 then a 6x6x6 color cube is used (i.e. 6 levels of red, 6 of 14.118 +green, and 6 of blue). For other values, a cube approximately proportional to 14.119 +a 2x3x1 cube is used. 14.120 + 14.121 +=item B<-cmap> 14.122 + 14.123 +Causes the application to install a private color map on an 8-bit display. 14.124 + 14.125 +=back 14.126 + 14.127 +=head1 Qt OPTIONS 14.128 + 14.129 +The following I<Qt options> are used when rendering the graphics of the Qt 14.130 +widget library. They are not compatible with other X11 or Win32 applications, 14.131 +unless they were first linked with the Qt widget library. 14.132 + 14.133 +=over 4 14.134 + 14.135 +=item B<-session session> 14.136 + 14.137 +Restores the application from an earlier session. 14.138 + 14.139 +=item B<-widgetcount> 14.140 + 14.141 +Prints debug message at the end about number of widgets left undestroyed and 14.142 +maximum number of widgets existed at the same time. 14.143 + 14.144 +=back 14.145 + 14.146 +=head1 ENVIRONMENT 14.147 + 14.148 +C<USER> The user name to use when accounting. 14.149 + 14.150 +C<HOME> The full path of the user's home directory. 14.151 + 14.152 +=head1 RETURN VALUES 14.153 + 14.154 +C<0> The application exited sucessfully. 14.155 + 14.156 +C<E<gt>0 or E<lt>0> At least one error ocurred. 14.157 + 14.158 +=head1 EXAMPLES 14.159 + 14.160 +Try out some of these examples to customize B<as-gui> from the command 14.161 +line. Remember that options can be mixed. 14.162 + 14.163 +Initially editing the document 'figo.as': 14.164 + 14.165 +=over 4 14.166 + 14.167 +$ as-gui figo.as 14.168 + 14.169 +=back 14.170 + 14.171 +Showing lovely blue shades in most widgets: 14.172 + 14.173 +=over 4 14.174 + 14.175 +$ as-gui -bg lightblue -fg darkblue 14.176 + 14.177 +=back 14.178 + 14.179 +Starting with a title bar that reads 'Yours here': 14.180 + 14.181 +=over 4 14.182 + 14.183 +$ as-gui -title 'Yours here' 14.184 + 14.185 +=back 14.186 + 14.187 +Displaying graphics output on the host borchert: 14.188 + 14.189 +=over 4 14.190 + 14.191 +$ as-gui -display borchert:0.0 14.192 + 14.193 +=back 14.194 + 14.195 +A slim window slightly left of the top right corner: 14.196 + 14.197 +=over 4 14.198 + 14.199 +$ as-gui -geometry 761x347-120+0 14.200 + 14.201 +=back 14.202 + 14.203 +=head1 FILES 14.204 + 14.205 +=over 4 14.206 + 14.207 +=item ~/.as-gui 14.208 + 14.209 +User preferences file. 14.210 + 14.211 +=item as-gui.html 14.212 + 14.213 +Help reference. 14.214 + 14.215 +=back 14.216 + 14.217 +=head1 BUGS 14.218 + 14.219 +Sometimes a click on a widget (like a toolbar button) is seemingly ignored. 14.220 + 14.221 +Consistent row shading is not always maintained. This means that the sharp 14.222 +colour difference between one row and the next may not correctly follow the 14.223 +chosen sort order. Press 'refresh' to work around this problem. 14.224 + 14.225 +The row highlight may be wrong after resorting the entire time sheet. Press 14.226 +the arrow keys a few times to find the currently selected row if this happens. 14.227 + 14.228 +Double clicking on column separators should automatically expand or shrink 14.229 +the corresponding column to the exact size needed. Broken. 14.230 + 14.231 +Local reports only take datewise sorting into account. Attention! This is not 14.232 +a bug, and local reports are almost always only useful when sorted by date. 14.233 + 14.234 +=head1 SEE ALSO 14.235 + 14.236 +as-gui.conf(5), 14.237 +as-events(5), 14.238 +as-accounts(5) 14.239 + 14.240 +=head1 AUTHOR 14.241 + 14.242 +Michael Schloh von Bennewitz 14.243 +(michael@schloh.com) 14.244 + 14.245 +=cut
15.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 15.2 +++ b/as_amount.cpp Fri Nov 28 11:21:08 2008 +0100 15.3 @@ -0,0 +1,70 @@ 15.4 +// 15.5 +// OSSP asgui - Accounting system graphical user interface 15.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 15.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 15.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 15.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 15.10 +// 15.11 +// This file is part of OSSP asgui, an accounting system graphical user 15.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 15.13 +// 15.14 +// Permission to use, copy, modify, and distribute this software for 15.15 +// any purpose with or without fee is hereby granted, provided that 15.16 +// the above copyright notice and this permission notice appear in all 15.17 +// copies. 15.18 +// 15.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 15.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 15.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 15.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 15.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 15.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 15.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 15.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 15.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 15.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 15.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 15.30 +// SUCH DAMAGE. 15.31 +// 15.32 +// as_amount.cpp: ISO C++ implementation 15.33 +// 15.34 + 15.35 +//#include <qregexp.h> 15.36 + 15.37 +//#include "as_amount.h" 15.38 +//#include "as_const.h" 15.39 + 15.40 + 15.41 +//// Sets a text formatted representation 15.42 +//void AmountBox::setText(const QString &Strval) 15.43 +//{ 15.44 +// int nTotal = 0; // The total amount of minutes 15.45 +// QRegExp Strexpr("(\\d+):(\\d+)"); // Pattern in amount text 15.46 +// QString Stramount = QRegExp::escape(Strval); // Incoming string escaped 15.47 +// 15.48 +// if (Strval.isEmpty()) { // Shortcircuit in the 15.49 +// this->setValue(0); // case of empty string 15.50 +// } 15.51 +// else { // Do the real work then 15.52 +// Strexpr.search(Stramount); 15.53 +// nTotal = Strexpr.cap(Strexpr.numCaptures() - 1).toInt() * TITRAQ_MINSINHOUR; 15.54 +// nTotal += Strexpr.cap(Strexpr.numCaptures()).toInt(); 15.55 +// this->setValue(nTotal); 15.56 +// } 15.57 +//} 15.58 + 15.59 +//// Return a text formatted representation 15.60 +//QString AmountBox::text(void) const 15.61 +//{ 15.62 +// QString Strfirst, Strsecond; 15.63 +// int nHours = 0; 15.64 +// int nMins = this->value(); 15.65 +// 15.66 +// nHours = nMins / TITRAQ_MINSINHOUR; // Calculate total hours 15.67 +// nMins = nMins % TITRAQ_MINSINHOUR; // Calculate total minutes 15.68 +// Strfirst = trUtf8("%1:").arg(nHours); // Format the first part 15.69 +// Strsecond = trUtf8("%1").arg(nMins); // Format the second part 15.70 +// 15.71 +// // Pad the resulting concatination before sending it out the back 15.72 +// return Strfirst.rightJustify(3, '0') + Strsecond.rightJustify(2, '0'); 15.73 +//}
16.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 16.2 +++ b/as_amount.h Fri Nov 28 11:21:08 2008 +0100 16.3 @@ -0,0 +1,55 @@ 16.4 +// 16.5 +// OSSP asgui - Accounting system graphical user interface 16.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 16.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 16.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 16.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 16.10 +// 16.11 +// This file is part of OSSP asgui, an accounting system graphical user 16.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 16.13 +// 16.14 +// Permission to use, copy, modify, and distribute this software for 16.15 +// any purpose with or without fee is hereby granted, provided that 16.16 +// the above copyright notice and this permission notice appear in all 16.17 +// copies. 16.18 +// 16.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 16.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 16.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 16.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 16.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 16.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 16.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 16.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 16.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 16.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 16.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 16.30 +// SUCH DAMAGE. 16.31 +// 16.32 +// as_amount.h: ISO C++ interface 16.33 +// 16.34 + 16.35 +#ifndef AMOUNTBOX_H 16.36 +#define AMOUNTBOX_H 16.37 + 16.38 +#include <qdatetimeedit.h> 16.39 + 16.40 + 16.41 +class ASTimeEdit : public QTimeEdit 16.42 +{ 16.43 +public: 16.44 + ASTimeEdit(QWidget *pParent = 0, const char *szName = 0) : QTimeEdit(pParent, szName) 16.45 + { 16.46 + this->setTime(QTime::QTime(0, 0)); 16.47 + this->setDisplay(QTimeEdit::Hours | QTimeEdit::Minutes); 16.48 + this->setAutoAdvance(true); 16.49 +// this->setMaxValue(); 16.50 +// this->setSuffix(trUtf8(" Mins")); 16.51 +// this->setButtonSymbols(QSpinBox::PlusMinus); 16.52 +// this->setSpecialValueText(trUtf8("In progress")); 16.53 + }; 16.54 +// void setText(const QString &); // Sets a text formatted representation 16.55 +// QString text(void) const; // Return a text formatted representation 16.56 +}; 16.57 + 16.58 +#endif // AMOUNTBOX_H
17.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 17.2 +++ b/as_assist.cpp Fri Nov 28 11:21:08 2008 +0100 17.3 @@ -0,0 +1,1103 @@ 17.4 +// 17.5 +// OSSP asgui - Accounting system graphical user interface 17.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 17.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 17.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 17.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 17.10 +// 17.11 +// This file is part of OSSP asgui, an accounting system graphical user 17.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 17.13 +// 17.14 +// Permission to use, copy, modify, and distribute this software for 17.15 +// any purpose with or without fee is hereby granted, provided that 17.16 +// the above copyright notice and this permission notice appear in all 17.17 +// copies. 17.18 +// 17.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 17.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 17.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 17.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 17.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 17.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 17.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 17.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 17.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 17.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 17.30 +// SUCH DAMAGE. 17.31 +// 17.32 +// as_assist.cpp: ISO C++ implementation 17.33 +// 17.34 + 17.35 +// Qt style headers 17.36 +#include <qcdestyle.h> 17.37 +#include <qsgistyle.h> 17.38 +#include <qmotifstyle.h> 17.39 +#include <qmotifplusstyle.h> 17.40 +#include <qplatinumstyle.h> 17.41 +#include <qwindowsstyle.h> 17.42 + 17.43 +// Qt general headers 17.44 +#include <qtooltip.h> 17.45 +#include <qwhatsthis.h> 17.46 +#include <qstringlist.h> 17.47 +#include <qpopupmenu.h> 17.48 +#include <qcombobox.h> 17.49 +#include <qlistbox.h> 17.50 +#include <qstatusbar.h> 17.51 +#include <qmenubar.h> 17.52 +#include <qcursor.h> 17.53 +#include <qaction.h> 17.54 +#include <qrect.h> 17.55 +#include <qdir.h> 17.56 + 17.57 +// User interface 17.58 +#include "as_amount.h" // AmountBox class 17.59 +#include "as_user.h" // User class 17.60 +#include "as_const.h" // Application constants 17.61 +#include "as_table.h" // Class TiTable 17.62 +#include "as_pref.h" // Class Preferences 17.63 +#include "as_panel.h" // Class Prefpanel 17.64 +#include "as_datedit.h" // Class Daydateedit 17.65 + 17.66 +// Icon pixel maps 17.67 +#include "as_gfx/filenew.xpm" // static const char *s_kpcFilenew_xpm[] 17.68 +#include "as_gfx/fileopen.xpm" // static const char *s_kpcFileopen_xpm[] 17.69 +#include "as_gfx/filesave.xpm" // static const char *s_kpcFilesave_xpm[] 17.70 +#include "as_gfx/filesaved.xpm" // static const char *s_kpcDfilesave_xpm[] 17.71 +#include "as_gfx/cut.xpm" // static const char *s_kpcCut_xpm[] 17.72 +#include "as_gfx/cutd.xpm" // static const char *s_kpcDcut_xpm[] 17.73 +#include "as_gfx/copy.xpm" // static const char *s_kpcCopy_xpm[] 17.74 +#include "as_gfx/copyd.xpm" // static const char *s_kpcDcopy_xpm[] 17.75 +#include "as_gfx/paste.xpm" // static const char *s_kpcPaste_xpm[] 17.76 +#include "as_gfx/pasted.xpm" // static const char *s_kpcDcaste_xpm[] 17.77 +#include "as_gfx/rowadd.xpm" // static const char *s_kpcRowadd_xpm[] 17.78 +#include "as_gfx/rowdel.xpm" // static const char *s_kpcRowdel_xpm[] 17.79 +#include "as_gfx/rowaddd.xpm" // static const char *s_kpcDrowadd_xpm[] 17.80 +#include "as_gfx/rowdeld.xpm" // static const char *s_kpcDrowdel_xpm[] 17.81 +#include "as_gfx/osspicon.xpm" // static const char *s_kpcOsspicon_xpm[] 17.82 +#include "as_gfx/whatsthis.xpm" // static const char *s_kpcWhatsthis_xpm[] 17.83 +#include "as_gfx/statok.xpm" // static const char *s_kpcStatokay_xpm[] 17.84 +#include "as_gfx/staterr.xpm" // static const char *s_kpcStaterror_xpm[] 17.85 +#include "as_gfx/statwrn.xpm" // static const char *s_kpcStatwarn_xpm[] 17.86 +#include "as_gfx/statvoid.xpm" // static const char *s_kpcStatvoid_xpm[] 17.87 +#include "as_gfx/refresh.xpm" // static const char *s_kpcRefresh_xpm[] 17.88 +#include "as_gfx/refreshd.xpm" // static const char *s_kpcDrefresh_xpm[] 17.89 +#include "as_gfx/sync.xpm" // static const char *s_kpcSync_xpm[] 17.90 +#include "as_gfx/syncd.xpm" // static const char *s_kpcDsync_xpm[] 17.91 +#include "as_gfx/report.xpm" // static const char *s_kpcReport_xpm[] 17.92 +#include "as_gfx/reportd.xpm" // static const char *s_kpcDreport_xpm[] 17.93 +#include "as_gfx/prefs.xpm" // static const char *s_kpcPrefs_xpm[] 17.94 + 17.95 + 17.96 +// 17.97 +// Construct the preferences 17.98 +// 17.99 +void Titraqform::setupPrefs(void) 17.100 +{ 17.101 + // Can't bootstrap until we know who is using our tool, so find out 17.102 + User Localuser = User(); 17.103 + QString Username = Localuser.getName(); 17.104 + QString Homedir = Localuser.getHomedir(); 17.105 + 17.106 + // Bootstrap a user preferences object from operating system info 17.107 + m_pPrefs = new Preferences(Homedir + QChar('/') + 17.108 + QString::fromLocal8Bit(TITRAQ_PREFNAME), 17.109 + QString::fromLocal8Bit(TITRAQ_APPTITLE), 17.110 + QString::fromLocal8Bit(TITRAQ_PREFVER)); 17.111 + if (!m_pPrefs->fileState()) { // No file was found, so assume a null state 17.112 + if (!Homedir.isEmpty()) 17.113 + m_pPrefs->setString(TITRAQ_PREFHOME, Homedir); 17.114 + else 17.115 + m_pPrefs->setString(TITRAQ_PREFHOME, TITRAQ_DEFHOME); 17.116 + if (!Username.isEmpty()) 17.117 + m_pPrefs->setString(TITRAQ_PREFUSER, Username); 17.118 + else 17.119 + m_pPrefs->setString(TITRAQ_PREFUSER, TITRAQ_DEFUSER); 17.120 + 17.121 + m_pPrefs->setNumber(TITRAQ_PREFSTYLE, TITRAQ_STYLECDE); 17.122 + m_pPrefs->setString(TITRAQ_PREFACCOUNTS, TITRAQ_DEFACCOUNTS); 17.123 + m_pPrefs->setString(TITRAQ_PREFASDIR, TITRAQ_DEFASDIR); 17.124 + m_pPrefs->setString(TITRAQ_PREFVIEW, TITRAQ_DEFVIEW); 17.125 + m_pPrefs->setNumber(TITRAQ_PREFSORTCOL, TITRAQ_DEFSORTCOL); 17.126 + m_pPrefs->setBool(TITRAQ_PREFSORTDIR, TITRAQ_DEFSORTDIR); 17.127 + m_pPrefs->setString(TITRAQ_PREFREMOTELOG, TITRAQ_DEFREMOTELOG); 17.128 + m_pPrefs->setString(TITRAQ_PREFLOCALLOG, TITRAQ_DEFLOCALLOG); 17.129 + m_pPrefs->setString(TITRAQ_PREFCORBHOST, TITRAQ_DEFCORBHOST); 17.130 + m_pPrefs->setString(TITRAQ_PREFSOAPHOST, TITRAQ_DEFSOAPHOST); 17.131 + m_pPrefs->setBool(TITRAQ_PREFCORBON, TITRAQ_DEFCORBON); 17.132 + m_pPrefs->setBool(TITRAQ_PREFSOAPON, TITRAQ_DEFSOAPON); 17.133 + m_pPrefs->setBool(TITRAQ_PREFBAKON, TITRAQ_DEFBAKON); 17.134 + m_pPrefs->setBool(TITRAQ_PREFEXTENDON, TITRAQ_DEFEXTENDON); 17.135 + m_pPrefs->setBool(TITRAQ_PREFDETAILON, TITRAQ_DEFDETAILON); 17.136 + m_pPrefs->setBool(TITRAQ_PREFSIGNATON, TITRAQ_DEFSIGNATON); 17.137 + m_pPrefs->setNumber(TITRAQ_PREFREPORTYPE, TITRAQ_DEFREPORTYPE); 17.138 + m_pPrefs->setNumber(TITRAQ_PREFREPORTWEEKS, TITRAQ_DEFREPORTWEEKS); 17.139 + m_pPrefs->setNumber(TITRAQ_PREFREPORTMONTHS, TITRAQ_DEFREPORTMONTHS); 17.140 + m_pPrefs->setNumber(TITRAQ_PREFLIGHTRED, TITRAQ_DEFLIGHTRED); 17.141 + m_pPrefs->setNumber(TITRAQ_PREFLIGHTGREEN, TITRAQ_DEFLIGHTGREEN); 17.142 + m_pPrefs->setNumber(TITRAQ_PREFLIGHTBLUE, TITRAQ_DEFLIGHTBLUE); 17.143 + m_pPrefs->setNumber(TITRAQ_PREFDARKRED, TITRAQ_DEFDARKRED); 17.144 + m_pPrefs->setNumber(TITRAQ_PREFDARKGREEN, TITRAQ_DEFDARKGREEN); 17.145 + m_pPrefs->setNumber(TITRAQ_PREFDARKBLUE, TITRAQ_DEFDARKBLUE); 17.146 + m_pPrefs->flush(); // Write the new conf file 17.147 + QTextStream cerr(stderr, IO_WriteOnly); 17.148 + cerr << trUtf8("Created new preferences file ") << Homedir << QChar('/') 17.149 + << QString::fromLocal8Bit(TITRAQ_PREFNAME) << endl; 17.150 + } 17.151 + 17.152 + // Use the preferred configuration values to initialize titraq 17.153 + switch (m_pPrefs->getNumber(TITRAQ_PREFSTYLE, TITRAQ_STYLECDE)) { 17.154 + case TITRAQ_STYLECDE: 17.155 + qApp->setStyle(new QCDEStyle); 17.156 + break; 17.157 + case TITRAQ_STYLESGI: 17.158 + qApp->setStyle(new QSGIStyle); 17.159 + break; 17.160 + case TITRAQ_STYLEMOTIF: 17.161 + qApp->setStyle(new QMotifStyle); 17.162 + break; 17.163 + case TITRAQ_STYLEMPLUS: 17.164 + qApp->setStyle(new QMotifPlusStyle); 17.165 + break; 17.166 + case TITRAQ_STYLEPLAT: 17.167 + qApp->setStyle(new QPlatinumStyle); 17.168 + break; 17.169 + case TITRAQ_STYLEMSOFT: 17.170 + qApp->setStyle(new QWindowsStyle); 17.171 + break; 17.172 + default: 17.173 + qApp->setStyle(new QCDEStyle); 17.174 + break; 17.175 + } 17.176 +} 17.177 + 17.178 +// 17.179 +// Construct various actions 17.180 +// 17.181 +void Titraqform::setupActions(void) 17.182 +{ 17.183 + QIconSet Saveiset, Cutiset, Copyiset, Pasteiset; 17.184 + QIconSet Rowaddiset, Rowdeliset, Refreshiset; 17.185 + QIconSet Synciset, Reportiset; 17.186 + 17.187 + // Construct iconsets to use later for multistate action images 17.188 + Saveiset.setPixmap(QPixmap(s_kpcFilesave_xpm), QIconSet::Automatic, QIconSet::Normal); 17.189 + Saveiset.setPixmap(QPixmap(s_kpcDfilesave_xpm), QIconSet::Automatic, QIconSet::Disabled); 17.190 + Cutiset.setPixmap(QPixmap(s_kpcCut_xpm), QIconSet::Automatic, QIconSet::Normal); 17.191 + Cutiset.setPixmap(QPixmap(s_kpcDcut_xpm), QIconSet::Automatic, QIconSet::Disabled); 17.192 + Copyiset.setPixmap(QPixmap(s_kpcCopy_xpm), QIconSet::Automatic, QIconSet::Normal); 17.193 + Copyiset.setPixmap(QPixmap(s_kpcDcopy_xpm), QIconSet::Automatic, QIconSet::Disabled); 17.194 + Pasteiset.setPixmap(QPixmap(s_kpcPaste_xpm), QIconSet::Automatic, QIconSet::Normal); 17.195 + Pasteiset.setPixmap(QPixmap(s_kpcDpaste_xpm), QIconSet::Automatic, QIconSet::Disabled); 17.196 + Rowaddiset.setPixmap(QPixmap(s_kpcRowadd_xpm), QIconSet::Automatic, QIconSet::Normal); 17.197 + Rowaddiset.setPixmap(QPixmap(s_kpcDrowadd_xpm), QIconSet::Automatic, QIconSet::Disabled); 17.198 + Rowdeliset.setPixmap(QPixmap(s_kpcRowdel_xpm), QIconSet::Automatic, QIconSet::Normal); 17.199 + Rowdeliset.setPixmap(QPixmap(s_kpcDrowdel_xpm), QIconSet::Automatic, QIconSet::Disabled); 17.200 + Refreshiset.setPixmap(QPixmap(s_kpcRefresh_xpm), QIconSet::Automatic, QIconSet::Normal); 17.201 + Refreshiset.setPixmap(QPixmap(s_kpcDrefresh_xpm), QIconSet::Automatic, QIconSet::Disabled); 17.202 + Synciset.setPixmap(QPixmap(s_kpcSync_xpm), QIconSet::Automatic, QIconSet::Normal); 17.203 + Synciset.setPixmap(QPixmap(s_kpcDsync_xpm), QIconSet::Automatic, QIconSet::Disabled); 17.204 + Reportiset.setPixmap(QPixmap(s_kpcReport_xpm), QIconSet::Automatic, QIconSet::Normal); 17.205 + Reportiset.setPixmap(QPixmap(s_kpcDreport_xpm), QIconSet::Automatic, QIconSet::Disabled); 17.206 + 17.207 + // First associate the graphics with MIME types 17.208 + QMimeSourceFactory::defaultFactory()->setPixmap("osspicon", QPixmap(s_kpcOsspicon_xpm)); 17.209 + QMimeSourceFactory::defaultFactory()->setPixmap("filenew", QPixmap(s_kpcFilenew_xpm)); 17.210 + QMimeSourceFactory::defaultFactory()->setPixmap("fileopen", QPixmap(s_kpcFileopen_xpm)); 17.211 + QMimeSourceFactory::defaultFactory()->setPixmap("filesave", QPixmap(s_kpcFilesave_xpm)); 17.212 + QMimeSourceFactory::defaultFactory()->setPixmap("cut", QPixmap(s_kpcCut_xpm)); 17.213 + QMimeSourceFactory::defaultFactory()->setPixmap("copy", QPixmap(s_kpcCopy_xpm)); 17.214 + QMimeSourceFactory::defaultFactory()->setPixmap("paste", QPixmap(s_kpcPaste_xpm)); 17.215 + QMimeSourceFactory::defaultFactory()->setPixmap("rowadd", QPixmap(s_kpcRowadd_xpm)); 17.216 + QMimeSourceFactory::defaultFactory()->setPixmap("rowdel", QPixmap(s_kpcRowdel_xpm)); 17.217 + QMimeSourceFactory::defaultFactory()->setPixmap("refresh", QPixmap(s_kpcRefresh_xpm)); 17.218 + QMimeSourceFactory::defaultFactory()->setPixmap("syncrpc", QPixmap(s_kpcSync_xpm)); 17.219 + QMimeSourceFactory::defaultFactory()->setPixmap("locreport", QPixmap(s_kpcReport_xpm)); 17.220 + QMimeSourceFactory::defaultFactory()->setPixmap("prefs", QPixmap(s_kpcPrefs_xpm)); 17.221 + 17.222 + // File new action 17.223 + m_pFilenewact = new QAction(trUtf8("New File"), QPixmap(s_kpcFilenew_xpm), trUtf8("&New"), CTRL+Key_N, this, "New"); 17.224 + if (m_pFilenewact == NULL) // Sanity check 17.225 + throw Genexcept("Main window file new action creation failed."); 17.226 + connect(m_pFilenewact, SIGNAL(activated()), SLOT(newDoc())); 17.227 + const char *kszFilenewtext = "<p><img source=\"filenew\"> " 17.228 + "Click this button to make a " 17.229 + "<em>blank file</em>. You can also " 17.230 + "select the <b>New</b> command from " 17.231 + "the <b>File</b> menu.</p>"; 17.232 + m_pFilenewact->setWhatsThis(kszFilenewtext); 17.233 + 17.234 + // File open action 17.235 + m_pFileopenact = new QAction(trUtf8("Open File"), QPixmap(s_kpcFileopen_xpm), trUtf8("&Open..."), CTRL+Key_O, this, "Open"); 17.236 + if (m_pFileopenact == NULL) // Sanity check 17.237 + throw Genexcept("Main window file open action creation failed."); 17.238 + connect(m_pFileopenact, SIGNAL(activated()), SLOT(openDoc())); 17.239 + const char *kszFileopentext = "<p><img source=\"fileopen\"> " 17.240 + "Click this button to open a " 17.241 + "<em>new file</em>. You can also select " 17.242 + "the <b>Open</b> command from the " 17.243 + "<b>File</b> menu.</p>"; 17.244 + m_pFileopenact->setWhatsThis(kszFileopentext); 17.245 + 17.246 + // File save current action 17.247 + m_pFilesaveact = new QAction(trUtf8("Save File"), Saveiset, trUtf8("&Save"), CTRL+Key_S, this, "Save"); 17.248 + if (m_pFilesaveact == NULL) // Sanity check 17.249 + throw Genexcept("Main window file save action creation failed."); 17.250 + connect(m_pFilesaveact, SIGNAL(activated()), SLOT(saveFile())); 17.251 + const char *kszFilesavetext = "<p><img source=\"filesave\"> " 17.252 + "Click this button to <em>save</em> " 17.253 + "the file you are editing. You will be " 17.254 + "prompted for a file name. You can also " 17.255 + "select the<b> Save</b> command from " 17.256 + "the <b>File</b> menu.</p>"; 17.257 + m_pFilesaveact->setWhatsThis(kszFilesavetext); 17.258 + 17.259 + // File save selected action 17.260 + m_pFilesaveasact = new QAction(trUtf8("Save File As"), trUtf8("Save &As..."), 0, this, "SaveAs"); 17.261 + if (m_pFilesaveasact == NULL) // Sanity check 17.262 + throw Genexcept("Main window file save as action creation failed."); 17.263 + connect(m_pFilesaveasact, SIGNAL(activated()), SLOT(saveAs())); 17.264 + m_pFilesaveasact->setWhatsThis(kszFilesavetext); 17.265 + 17.266 + // File close current action 17.267 + m_pFilecloseact = new QAction(trUtf8("Close"), trUtf8("&Close"), CTRL+Key_W, this, "Close"); 17.268 + if (m_pFilecloseact == NULL) // Sanity check 17.269 + throw Genexcept("Main window file close action creation failed."); 17.270 + connect(m_pFilecloseact, SIGNAL(activated()), SLOT(close())); 17.271 + 17.272 + // File quit action 17.273 + m_pFilequitact = new QAction(trUtf8("Exit"), trUtf8("E&xit"), CTRL+Key_Q, this, "Exit"); 17.274 + if (m_pFilequitact == NULL) // Sanity check 17.275 + throw Genexcept("Main window file quit action creation failed."); 17.276 + connect(m_pFilequitact, SIGNAL(activated()), SLOT(quitApp())); 17.277 + 17.278 + // Cut action 17.279 + m_pCutact = new QAction(trUtf8("Cut"), Cutiset, trUtf8("&Cut"), CTRL+Key_X, this, "Cut"); 17.280 + if (m_pCutact == NULL) // Sanity check 17.281 + throw Genexcept("Main window cut edit action creation failed."); 17.282 + connect(m_pCutact, SIGNAL(activated()), SLOT(cutEntry())); 17.283 + const char *kszCuttext = "<p><img source=\"cut\"> " 17.284 + "Click this button to cut an <em>entry</em>. " 17.285 + "You can also select the <b>Cut</b> command " 17.286 + "from the <b>Edit</b> menu.</p>"; 17.287 + m_pCutact->setWhatsThis(kszCuttext); 17.288 + 17.289 + // Copy action 17.290 + m_pCopyact = new QAction(trUtf8("Copy"), Copyiset, trUtf8("&Copy"), CTRL+Key_C, this, "Copy"); 17.291 + if (m_pCopyact == NULL) // Sanity check 17.292 + throw Genexcept("Main window copy edit action creation failed."); 17.293 + connect(m_pCopyact, SIGNAL(activated()), SLOT(copyEntry())); 17.294 + const char *kszCopytext = "<p><img source=\"copy\"> " 17.295 + "Click this button to copy an <em>entry</em>. " 17.296 + "You can also select the <b>Copy</b> command " 17.297 + "from the <b>Edit</b> menu.</p>"; 17.298 + m_pCopyact->setWhatsThis(kszCopytext); 17.299 + 17.300 + // Paste action 17.301 + m_pPasteact = new QAction(trUtf8("Paste"), Pasteiset, trUtf8("&Paste"), CTRL+Key_V, this, "Paste"); 17.302 + if (m_pPasteact == NULL) // Sanity check 17.303 + throw Genexcept("Main window paste edit action creation failed."); 17.304 + connect(m_pPasteact, SIGNAL(activated()), SLOT(pasteEntry())); 17.305 + const char *kszPastetext = "<p><img source=\"paste\"> " 17.306 + "Click this button to paste an <em>entry</em>. " 17.307 + "You can also select the <b>Paste</b> command " 17.308 + "from the <b>Edit</b> menu.</p>"; 17.309 + m_pPasteact->setWhatsThis(kszPastetext); 17.310 + 17.311 + // Add data row action 17.312 + m_pAddrowact = new QAction(trUtf8("Add Entry"), Rowaddiset, trUtf8("&Add entry"), Key_Insert, this, "Addentry"); 17.313 + if (m_pAddrowact == NULL) // Sanity check 17.314 + throw Genexcept("Main window add entry action creation failed."); 17.315 + connect(m_pAddrowact, SIGNAL(activated()), SLOT(addEntry())); 17.316 + const char *kszAddrowtext = "<p><img source=\"rowadd\"> " 17.317 + "Click this button to add a <em>new entry</em>. " 17.318 + "You can also select the <b>Add</b> command " 17.319 + "from the <b>Edit</b> menu.</p>"; 17.320 + m_pAddrowact->setWhatsThis(kszAddrowtext); 17.321 + 17.322 + // Delete data row action 17.323 + m_pDelrowact = new QAction(trUtf8("Delete Entry"), Rowdeliset, trUtf8("&Delete entry"), Key_Delete, this, "Delentry"); 17.324 + if (m_pDelrowact == NULL) // Sanity check 17.325 + throw Genexcept("Main window delete entry action creation failed."); 17.326 + connect(m_pDelrowact, SIGNAL(activated()), SLOT(delEntry())); 17.327 + const char *kszDelrowtext = "<p><img source=\"rowdel\"> " 17.328 + "Click this button to delete a <em>entry</em>. " 17.329 + "You can also select the <b>Delete</b> command " 17.330 + "from the <b>Edit</b> menu.</p>"; 17.331 + m_pDelrowact->setWhatsThis(kszDelrowtext); 17.332 + 17.333 + // Refresh data display action 17.334 + m_pRefreshact = new QAction(trUtf8("Refresh Display"), Refreshiset, trUtf8("&Refresh display"), CTRL+Key_R, this, "Refresh"); 17.335 + if (m_pRefreshact == NULL) // Sanity check 17.336 + throw Genexcept("Main window refresh action creation failed."); 17.337 + connect(m_pRefreshact, SIGNAL(activated()), SLOT(refreshDisplay())); 17.338 + const char *kszRefreshtext = "<p><img source=\"refresh\"> " 17.339 + "Click this button to <em>refresh the display</em>. " 17.340 + "You can also select the <b>Refresh</b> command " 17.341 + "from the <b>View</b> menu.</p>"; 17.342 + m_pRefreshact->setWhatsThis(kszRefreshtext); 17.343 + 17.344 + // Syncronize data with remote server over IIOP or SOAP action 17.345 + m_pSyncact = new QAction(trUtf8("Synchronize with server"), Synciset, trUtf8("&Synchronize"), CTRL+Key_E, this, "Synchronize"); 17.346 + if (m_pSyncact == NULL) // Sanity check 17.347 + throw Genexcept("Main window synchronize RPC action creation failed."); 17.348 + connect(m_pSyncact, SIGNAL(activated()), SLOT(syncIiop())); 17.349 + connect(m_pSyncact, SIGNAL(activated()), SLOT(syncSoap())); 17.350 + const char *kszSynctext = "<p><img source=\"syncrpc\"> " 17.351 + "Click this button to <em>synchronize the data</em>. " 17.352 + "Your changed entries will be sent to the server. " 17.353 + "You can also select the <b>Synchronize</b> command " 17.354 + "from the <b>Report</b> menu.</p>"; 17.355 + m_pSyncact->setWhatsThis(kszSynctext); 17.356 + 17.357 + // Local report generation action 17.358 + m_pReportact = new QAction(trUtf8("Generate a local report"), Reportiset, trUtf8("&Report"), CTRL+Key_T, this, "LocalReport"); 17.359 + if (m_pReportact == NULL) // Sanity check 17.360 + throw Genexcept("Main window local report action creation failed."); 17.361 + connect(m_pReportact, SIGNAL(activated()), SLOT(genReport())); 17.362 + const char *kszReporttext = "<p><img source=\"locreport\"> " 17.363 + "Click this button to <em>report your data</em>. " 17.364 + "A local report will be generated for you to view. " 17.365 + "You can also select the <b>Local Report</b> command " 17.366 + "from the <b>Report</b> menu.</p>"; 17.367 + m_pReportact->setWhatsThis(kszReporttext); 17.368 + 17.369 + // Offer a formatted preferences panel for intuitive prefs object editing 17.370 + m_pPrefsact = new QAction(trUtf8("Edit the preferences"), QPixmap(s_kpcPrefs_xpm), trUtf8("P&references..."), CTRL+Key_F, this, "Prefspanel"); 17.371 + if (m_pPrefsact == NULL) // Sanity check 17.372 + throw Genexcept("Main window preferences panel action creation failed."); 17.373 + connect(m_pPrefsact, SIGNAL(activated()), SLOT(configPrefs())); 17.374 + const char *kszPrefstext = "<p><img source=\"prefs\"> " 17.375 + "Click this button to <em>edit the preferences</em>. " 17.376 + "You can then apply, accept, or cancel your changes. " 17.377 + "You can also select the <b>Preferences</b> command " 17.378 + "from the <b>Edit</b> menu.</p>"; 17.379 + m_pPrefsact->setWhatsThis(kszPrefstext); 17.380 +} 17.381 + 17.382 +// 17.383 +// Construct the menu bar 17.384 +// 17.385 +void Titraqform::setupMenubar(void) 17.386 +{ 17.387 + int nMenuid = 0; // Used to store id during menu item creation 17.388 + 17.389 + m_pMenubar = menuBar(); // Grab menu bar owned by QMainWindow 17.390 + if (m_pMenubar == NULL) // Sanity check 17.391 + throw Genexcept("Main window menu bar nonexistant."); 17.392 + 17.393 +// // Make an easter egg ;-) 17.394 +// QToolTip::add(m_pMenubar, QRect(0, 0, 2, 2), trUtf8("Easter Egg")); 17.395 + 17.396 + // Construct and populate the file menu with actions 17.397 + QPopupMenu *pFilepopup = new QPopupMenu(this); 17.398 + if (pFilepopup == NULL) // Sanity check 17.399 + throw Genexcept("Main window file popup creation failed."); 17.400 + m_pMenubar->insertItem(trUtf8("&File"), pFilepopup); 17.401 + m_pFilenewact->addTo(pFilepopup); 17.402 + m_pFileopenact->addTo(pFilepopup); 17.403 + pFilepopup->insertSeparator(); 17.404 + m_pFilecloseact->addTo(pFilepopup); 17.405 + pFilepopup->insertSeparator(); 17.406 + m_pFilesaveact->addTo(pFilepopup); 17.407 + m_pFilesaveasact->addTo(pFilepopup); 17.408 + pFilepopup->insertSeparator(); 17.409 + m_pFilequitact->addTo(pFilepopup); 17.410 + 17.411 + // Construct and populate the edit menu with subitems 17.412 + QPopupMenu *pEditpopup = new QPopupMenu(this); 17.413 + if (pEditpopup == NULL) // Sanity check 17.414 + throw Genexcept("Main window edit popup creation failed."); 17.415 + m_pMenubar->insertItem(trUtf8("&Edit"), pEditpopup); 17.416 + m_pCutact->addTo(pEditpopup); 17.417 + m_pCopyact->addTo(pEditpopup); 17.418 + m_pPasteact->addTo(pEditpopup); 17.419 + pEditpopup->insertSeparator(); 17.420 + m_pAddrowact->addTo(pEditpopup); 17.421 + m_pDelrowact->addTo(pEditpopup); 17.422 + pEditpopup->insertSeparator(); 17.423 + m_pPrefsact->addTo(pEditpopup); 17.424 + 17.425 + // Construct the view menu and submenus 17.426 + m_pViewpopup = new QPopupMenu(this); 17.427 + m_pTbarspopup = new QPopupMenu(this); 17.428 + m_pColspopup = new QPopupMenu(this); 17.429 + 17.430 + // Give the new menus krass attributes 17.431 + m_pTbarspopup->insertTearOffHandle(); 17.432 + m_pTbarspopup->setCheckable(true); 17.433 + m_pColspopup->insertTearOffHandle(); 17.434 + m_pColspopup->setCheckable(true); 17.435 + 17.436 + // Major sanity check wrapped in one call 17.437 + if (!(m_pViewpopup && m_pTbarspopup && m_pColspopup)) 17.438 + throw Genexcept("Main window view popups creation failed."); 17.439 + 17.440 + // Populate the view menu with subitems 17.441 + m_pMenubar->insertItem(trUtf8("&View"), m_pViewpopup); 17.442 + m_pViewpopup->insertItem(trUtf8("&Normal"), this, SLOT(normalView())); 17.443 + nMenuid = m_pViewpopup->insertItem(trUtf8("&Editing"), this, SLOT(editingView())); 17.444 + m_pViewpopup->setItemEnabled(nMenuid, false); 17.445 + nMenuid = m_pViewpopup->insertItem(trUtf8("&Timing"), this, SLOT(timingView())); 17.446 + m_pViewpopup->setItemEnabled(nMenuid, false); 17.447 + m_pViewpopup->insertSeparator(); 17.448 + m_pRefreshact->addTo(m_pViewpopup); // Refresh action 17.449 + m_pViewpopup->insertSeparator(); 17.450 + m_pViewpopup->insertItem(trUtf8("&Toolbars"), m_pTbarspopup); 17.451 + nMenuid = m_pTbarspopup->insertItem(trUtf8("&File"), this, SLOT(showFilebar())); 17.452 + m_pTbarspopup->setItemChecked(nMenuid, true); 17.453 + nMenuid = m_pTbarspopup->insertItem(trUtf8("&Edit"), this, SLOT(showEditbar())); 17.454 + m_pTbarspopup->setItemChecked(nMenuid, true); 17.455 + nMenuid = m_pTbarspopup->insertItem(trUtf8("&View"), this, SLOT(showViewbar())); 17.456 + m_pTbarspopup->setItemChecked(nMenuid, true); 17.457 + nMenuid = m_pTbarspopup->insertItem(trUtf8("&Prefs"), this, SLOT(showPrefsbar())); 17.458 + m_pTbarspopup->setItemChecked(nMenuid, true); 17.459 + nMenuid = m_pTbarspopup->insertItem(trUtf8("&Whats"), this, SLOT(showWhatsbar())); 17.460 + m_pTbarspopup->setItemChecked(nMenuid, true); 17.461 + m_pViewpopup->insertItem(trUtf8("&Columns"), m_pColspopup); 17.462 + nMenuid = m_pColspopup->insertItem(trUtf8("&Status"), this, SLOT(showStatcol())); 17.463 + m_pColspopup->setItemChecked(nMenuid, true); 17.464 + nMenuid = m_pColspopup->insertItem(trUtf8("&Line"), this, SLOT(showLinecol())); 17.465 + m_pColspopup->setItemChecked(nMenuid, true); 17.466 + nMenuid = m_pColspopup->insertItem(trUtf8("&User"), this, SLOT(showUsercol())); 17.467 + m_pColspopup->setItemChecked(nMenuid, true); 17.468 + nMenuid = m_pColspopup->insertItem(trUtf8("&GUID"), this, SLOT(showGuidcol())); 17.469 + m_pColspopup->setItemChecked(nMenuid, true); 17.470 + nMenuid = m_pColspopup->insertItem(trUtf8("&CRC"), this, SLOT(showCrccol())); 17.471 + m_pColspopup->setItemChecked(nMenuid, true); 17.472 + nMenuid = m_pColspopup->insertItem(trUtf8("&Rev"), this, SLOT(showRevcol())); 17.473 + m_pColspopup->setItemChecked(nMenuid, true); 17.474 + nMenuid = m_pColspopup->insertItem(trUtf8("&Date"), this, SLOT(showDatecol())); 17.475 + m_pColspopup->setItemChecked(nMenuid, true); 17.476 + nMenuid = m_pColspopup->insertItem(trUtf8("&Start"), this, SLOT(showStartcol())); 17.477 + m_pColspopup->setItemChecked(nMenuid, true); 17.478 + nMenuid = m_pColspopup->insertItem(trUtf8("&Finish"), this, SLOT(showFinishcol())); 17.479 + m_pColspopup->setItemChecked(nMenuid, true); 17.480 + nMenuid = m_pColspopup->insertItem(trUtf8("&Amount"), this, SLOT(showAmountcol())); 17.481 + m_pColspopup->setItemChecked(nMenuid, true); 17.482 + nMenuid = m_pColspopup->insertItem(trUtf8("&Task"), this, SLOT(showTaskcol())); 17.483 + m_pColspopup->setItemChecked(nMenuid, true); 17.484 + nMenuid = m_pColspopup->insertItem(trUtf8("&Remark"), this, SLOT(showRemarkcol())); 17.485 + m_pColspopup->setItemChecked(nMenuid, true); 17.486 + 17.487 + // Construct and populate the report menu with subitems 17.488 + QPopupMenu *pReportpopup = new QPopupMenu(this); 17.489 + if (pReportpopup == NULL) // Sanity check 17.490 + throw Genexcept("Main window report popup creation failed."); 17.491 + m_pMenubar->insertItem(trUtf8("&Report"), pReportpopup); 17.492 +#if defined HAVE_MICO || defined HAVE_ESOAP 17.493 + m_pSyncact->addTo(pReportpopup); 17.494 + m_pSyncact->setEnabled(m_pPrefs->getBool(TITRAQ_PREFCORBON, TITRAQ_DEFCORBON) 17.495 + | m_pPrefs->getBool(TITRAQ_PREFSOAPON, TITRAQ_DEFSOAPON)); 17.496 +#endif // defined HAVE_MICO || defined HAVE_ESOAP 17.497 + m_pReportact->addTo(pReportpopup); 17.498 + 17.499 + // Pad spacing to force help menu to appear far right 17.500 + m_pMenubar->insertSeparator(); 17.501 + 17.502 + // Construct and populate the help menu with subitems 17.503 + QPopupMenu *pHelppopup = new QPopupMenu(this); 17.504 + if (pHelppopup == NULL) // Sanity check 17.505 + throw Genexcept("Main window help popup creation failed."); 17.506 + m_pMenubar->insertItem(trUtf8("&Help"), pHelppopup); 17.507 + pHelppopup->insertItem(trUtf8("&Contents"), this, SLOT(helpContents()), Key_F1); 17.508 + pHelppopup->insertSeparator(); 17.509 + pHelppopup->insertItem(trUtf8("About &as-gui"), this, SLOT(aboutTitraq())); 17.510 + pHelppopup->insertItem(trUtf8("About &OSSP"), this, SLOT(aboutOSSP())); 17.511 + pHelppopup->insertItem(trUtf8("About &Qt"), this, SLOT(aboutQt())); 17.512 + pHelppopup->insertSeparator(); 17.513 + pHelppopup->insertItem(QPixmap(s_kpcWhatsthis_xpm), trUtf8("What's &This"), this, SLOT(whatsThis()), SHIFT+Key_F1); 17.514 +} 17.515 + 17.516 +// 17.517 +// Construct the tool bars 17.518 +// 17.519 +void Titraqform::setupToolbars(void) 17.520 +{ 17.521 + // Construct and populate the file tool bar 17.522 + m_pFiletools = new QToolBar("Toolfile", this, DockTop); 17.523 + if (m_pFiletools == NULL) // Sanity check 17.524 + throw Genexcept("File tool bar creation failed."); 17.525 + m_pFiletools->setLabel(trUtf8("File Ops")); 17.526 + m_pFiletools->setOpaqueMoving(false); 17.527 + m_pFiletools->setCloseMode(QDockWindow::Never); 17.528 + m_pFilenewact->addTo(m_pFiletools); 17.529 + m_pFileopenact->addTo(m_pFiletools); 17.530 + m_pFilesaveact->addTo(m_pFiletools); 17.531 + 17.532 + // Construct and populate the edit tool bar 17.533 + m_pEdittools = new QToolBar("Tooledit", this, DockTop); 17.534 + if (m_pEdittools == NULL) // Sanity check 17.535 + throw Genexcept("Edit tool bar creation failed."); 17.536 + m_pEdittools->setLabel(trUtf8("Edit Ops")); 17.537 + m_pEdittools->setOpaqueMoving(false); 17.538 + m_pEdittools->setCloseMode(QDockWindow::Never); 17.539 + m_pCutact->addTo(m_pEdittools); 17.540 + m_pCopyact->addTo(m_pEdittools); 17.541 + m_pPasteact->addTo(m_pEdittools); 17.542 + m_pEdittools->addSeparator(); 17.543 + m_pAddrowact->addTo(m_pEdittools); 17.544 + m_pDelrowact->addTo(m_pEdittools); 17.545 + 17.546 + // Construct and populate the view tool bar 17.547 + m_pViewtools = new QToolBar("Toolview", this, DockTop); 17.548 + if (m_pViewtools == NULL) // Sanity check 17.549 + throw Genexcept("View tool bar creation failed."); 17.550 + m_pViewtools->setLabel(trUtf8("View Ops")); 17.551 + m_pViewtools->setOpaqueMoving(false); 17.552 + m_pViewtools->setCloseMode(QDockWindow::Never); 17.553 + m_pRefreshact->addTo(m_pViewtools); 17.554 + m_pReportact->addTo(m_pViewtools); 17.555 + m_pSyncact->addTo(m_pViewtools); 17.556 + 17.557 + // Construct and populate the lonely preferences tool bar 17.558 + m_pPrefstools = new QToolBar("Preferences", this, DockTop); 17.559 + if (m_pPrefstools == NULL) // Sanity check 17.560 + throw Genexcept("Prefs tool bar creation failed."); 17.561 + m_pPrefstools->setLabel(trUtf8("Preferences editor")); 17.562 + m_pPrefstools->setOpaqueMoving(false); 17.563 + m_pPrefstools->setCloseMode(QDockWindow::Never); 17.564 + m_pPrefsact->addTo(m_pPrefstools); 17.565 + 17.566 + // Construct and populate the lonely whatsthis tool bar 17.567 + m_pWhatstools = new QToolBar("Toolwhats", this, DockTop); 17.568 + if (m_pWhatstools == NULL) // Sanity check 17.569 + throw Genexcept("Whats this tool bar creation failed."); 17.570 + m_pWhatstools->setLabel(trUtf8("Whats this")); 17.571 + m_pWhatstools->setOpaqueMoving(false); 17.572 + m_pWhatstools->setCloseMode(QDockWindow::Never); 17.573 + QWhatsThis::whatsThisButton(m_pWhatstools); // Preconfigured whats this button 17.574 +} 17.575 + 17.576 +// 17.577 +// Construct the central frame 17.578 +// 17.579 +void Titraqform::setupCentralwidget(void) 17.580 +{ 17.581 + // Create a central frame and associated layout for QMainWindow 17.582 + m_pCenframe = new QFrame(this, "Centralframe"); 17.583 + if (m_pCenframe == NULL) // Sanity check 17.584 + throw Genexcept("Main window central frame creation failed."); 17.585 + m_pCenframe->setFrameShape(QFrame::StyledPanel); 17.586 + m_pCenframe->setFrameShadow(QFrame::Sunken); 17.587 + this->setCentralWidget(m_pCenframe); 17.588 + 17.589 + // Layout controls for table, editing widgets 17.590 + m_pMainlayout = new QVBoxLayout(m_pCenframe, TITRAQ_MARGIN, TITRAQ_SPACING, "Mainlayout"); // For layouts 17.591 + m_pPackagelayout = new QVBoxLayout(0, 0, TITRAQ_SPACING, "Packagelayout"); // For table 17.592 + m_pEditlayout = new QHBoxLayout(0, 0, TITRAQ_SPACING, "Editlayout"); // For edits 17.593 + 17.594 + // Major sanity check wrapped in one call 17.595 + if (!(m_pMainlayout && m_pPackagelayout && m_pEditlayout)) 17.596 + throw Genexcept("Main window layout creation failed."); 17.597 + 17.598 + // Specify ordering of the layouts 17.599 + m_pMainlayout->addLayout(m_pPackagelayout); 17.600 + m_pMainlayout->addLayout(m_pEditlayout); 17.601 +} 17.602 + 17.603 +// 17.604 +// Construct the status bar 17.605 +// 17.606 +void Titraqform::setupStatusbar(void) 17.607 +{ 17.608 + m_pStatbar = statusBar(); // Grab status bar owned by QMainWindow 17.609 + if (m_pStatbar == NULL) // Sanity check 17.610 + throw Genexcept("Main window status bar nonexistant."); 17.611 +} 17.612 + 17.613 +// 17.614 +// Construct the table 17.615 +// 17.616 +void Titraqform::setupTable(void) 17.617 +{ 17.618 + // Create, configure, and setup the table itself 17.619 + m_pMaintable = new TiTable(m_pPrefs, m_pCenframe, "Maintable"); 17.620 + if (m_pMaintable == NULL) // Sanity check 17.621 + throw Genexcept("Main window table creation failed."); 17.622 + m_pMaintable->setNumCols(TITRAQ_IDXTAIL); 17.623 + m_pMaintable->setDirty(false); // Reset data to clean state 17.624 + m_pMaintable->setReadOnly(true); // Table is read only 17.625 + m_pMaintable->setColumnMovingEnabled(false); // Ctrl-drag disabled 17.626 + m_pMaintable->setSelectionMode(QTable::MultiRow); // Multi row selection 17.627 + m_pMaintable->setFocusStyle(QTable::FollowStyle); // How cells are drawn 17.628 + m_pMaintable->setLeftMargin(0); // Get rid of the vertical header 17.629 + m_pMaintable->verticalHeader()->hide(); // by hiding it with a margin of 0 17.630 + m_pMaintable->horizontalHeader()->setResizeEnabled(true); 17.631 + m_pMaintable->horizontalHeader()->setClickEnabled(true); // Allow click signals 17.632 + m_pMaintable->horizontalHeader()->setTracking(false); // No continuous tracking 17.633 + m_pMaintable->setColumnStretchable(TITRAQ_IDXTAIL - 1, true); 17.634 + 17.635 + // Allow for user determined data sorting and use saved values 17.636 + m_pMaintable->setSortcol((int)m_pPrefs->getNumber(TITRAQ_PREFSORTCOL, TITRAQ_DEFSORTCOL)); 17.637 + m_pMaintable->setSortdir(m_pPrefs->getBool(TITRAQ_PREFSORTDIR, TITRAQ_DEFSORTDIR)); 17.638 + m_pMaintable->setSorting(true); 17.639 + 17.640 + // Table header row 17.641 + m_pTablehead = m_pMaintable->horizontalHeader(); 17.642 + m_pMaintable->setHScrollBarMode(QScrollView::AlwaysOff); 17.643 + m_pTablehead->setLabel(TITRAQ_IDXSTATUS, QObject::trUtf8("Stat"), 17.644 + m_pPrefs->getNumber(TITRAQ_PREFSTATCOLWIDTH, TITRAQ_DEFSTATCOLWIDTH)); 17.645 + m_pMaintable->setColumnReadOnly (TITRAQ_IDXSTATUS, true); 17.646 + m_pTablehead->setLabel(TITRAQ_IDXLINE, QObject::trUtf8("Line"), 17.647 + m_pPrefs->getNumber(TITRAQ_PREFLCOLWIDTH, TITRAQ_DEFLCOLWIDTH)); 17.648 + m_pMaintable->setColumnReadOnly (TITRAQ_IDXLINE, true); 17.649 + m_pTablehead->setLabel(TITRAQ_IDXUSER, QObject::trUtf8("User"), 17.650 + m_pPrefs->getNumber(TITRAQ_PREFUCOLWIDTH, TITRAQ_DEFUCOLWIDTH)); 17.651 + m_pTablehead->setLabel(TITRAQ_IDXGUID, QObject::trUtf8("GUID"), 17.652 + m_pPrefs->getNumber(TITRAQ_PREFGCOLWIDTH, TITRAQ_DEFGCOLWIDTH)); 17.653 + m_pMaintable->setColumnReadOnly (TITRAQ_IDXGUID, true); 17.654 + m_pTablehead->setLabel(TITRAQ_IDXCRC, QObject::trUtf8("CRC"), 17.655 + m_pPrefs->getNumber(TITRAQ_PREFCCOLWIDTH, TITRAQ_DEFCCOLWIDTH)); 17.656 + m_pMaintable->setColumnReadOnly (TITRAQ_IDXCRC, true); 17.657 + m_pTablehead->setLabel(TITRAQ_IDXREV, QObject::trUtf8("Rev"), 17.658 + m_pPrefs->getNumber(TITRAQ_PREFREVCOLWIDTH, TITRAQ_DEFREVCOLWIDTH)); 17.659 + m_pMaintable->setColumnReadOnly (TITRAQ_IDXREV, true); 17.660 + m_pTablehead->setLabel(TITRAQ_IDXDATE, QObject::trUtf8("Date"), 17.661 + m_pPrefs->getNumber(TITRAQ_PREFDCOLWIDTH, TITRAQ_DEFDCOLWIDTH)); 17.662 + m_pTablehead->setLabel(TITRAQ_IDXSTART, QObject::trUtf8("Begin"), 17.663 + m_pPrefs->getNumber(TITRAQ_PREFSTARTCOLWIDTH, TITRAQ_DEFSTARTCOLWIDTH)); 17.664 + m_pTablehead->setLabel(TITRAQ_IDXFINISH, QObject::trUtf8("End"), 17.665 + m_pPrefs->getNumber(TITRAQ_PREFFCOLWIDTH, TITRAQ_DEFFCOLWIDTH)); 17.666 + m_pTablehead->setLabel(TITRAQ_IDXAMOUNT, QObject::trUtf8("Amount"), 17.667 + m_pPrefs->getNumber(TITRAQ_PREFACOLWIDTH, TITRAQ_DEFACOLWIDTH)); 17.668 + m_pTablehead->setLabel(TITRAQ_IDXTASK, QObject::trUtf8("Task"), 17.669 + m_pPrefs->getNumber(TITRAQ_PREFTCOLWIDTH, TITRAQ_DEFTCOLWIDTH)); 17.670 + m_pTablehead->setLabel(TITRAQ_IDXREMARK, QObject::trUtf8("Remark")); 17.671 + 17.672 + m_pPackagelayout->addWidget(m_pMaintable); // Finally add the damn table 17.673 + 17.674 + // Table update signals 17.675 + connect(m_pMaintable, SIGNAL(currentChanged(int, int)), SLOT(updEdit(int, int))); 17.676 + connect(m_pMaintable, SIGNAL(clicked(int, int, int, const QPoint&)), SLOT(onClick(int, int, int, const QPoint&))); 17.677 + connect(m_pMaintable, SIGNAL(doubleClicked(int, int, int, const QPoint&)), SLOT(inplaceEdit(int, int, int, const QPoint&))); 17.678 + connect(m_pTablehead, SIGNAL(sizeChange(int, int, int)), SLOT(updSizes(int, int, int))); 17.679 + connect(m_pMaintable, SIGNAL(textEdited(int, int)), SLOT(dataChanged(int, int))); 17.680 + connect(m_pMaintable, SIGNAL(valueChanged(int, int)), SLOT(dataChanged(int, int))); 17.681 +} 17.682 + 17.683 +// 17.684 +// Construct the bottom edit widgets 17.685 +// 17.686 +void Titraqform::setupEditlay(void) 17.687 +{ 17.688 +// QSpacerItem Pad(TITRAQ_SPACING / 2, 0, QSizePolicy::Fixed); 17.689 +// m_pEditlayout->addWidget(&Pad); // Padd left side of control layout 17.690 + 17.691 + // Make the status edit 17.692 + m_pStatusedit = new QLabel(m_pCenframe, "Status"); 17.693 + if (m_pStatusedit == NULL) // Sanity check 17.694 + throw Genexcept("Main window status edit creation failed."); 17.695 + m_pStatusedit->setPixmap(QPixmap(s_kpcStatvoid_xpm)); // Placeholder 17.696 + 17.697 + 17.698 + // Whatsthis info for the item status edit 17.699 + const char *kszStatustext = "The <em>item status</em> shows a green " 17.700 + "symbol for valid entries, a yellow symbol " 17.701 + "for warning, and a red symbol for flawed entries."; 17.702 + QWhatsThis::add(m_pStatusedit, kszStatustext); 17.703 + QToolTip::add(m_pStatusedit, trUtf8("Status Indicator")); 17.704 + m_pEditlayout->addWidget(m_pStatusedit); // Finally add the item status edit 17.705 + 17.706 + // Make the line number edit 17.707 + m_pLineedit = new QLineEdit(m_pCenframe, "Lineno"); 17.708 + if (m_pLineedit == NULL) // Sanity check 17.709 + throw Genexcept("Main window line number edit creation failed."); 17.710 + m_pLineedit->setFrameShape(QLineEdit::LineEditPanel); 17.711 + m_pLineedit->setFrameShadow(QLineEdit::Sunken); 17.712 + m_pLineedit->setFrame(true); 17.713 + m_pLineedit->setReadOnly(true); 17.714 + m_pLineedit->setEnabled(false); 17.715 + m_pLineedit->setAlignment(Qt::AlignRight); 17.716 + 17.717 + // Whatsthis info for the line number edit 17.718 + const char *kszLinenotext = "The <em>line number</em> helps identify " 17.719 + "an entry when a warning or error message " 17.720 + "appears."; 17.721 + QWhatsThis::add(m_pLineedit, kszLinenotext); 17.722 + QToolTip::add(m_pLineedit, trUtf8("Line Number")); 17.723 + m_pEditlayout->addWidget(m_pLineedit); // Finally add the line number edit 17.724 + 17.725 + // Make the user edit 17.726 + m_pUseredit = new QLineEdit(m_pCenframe, "User"); 17.727 + if (m_pUseredit == NULL) // Sanity check 17.728 + throw Genexcept("Main window user edit creation failed."); 17.729 + m_pUseredit->setFrameShape(QLineEdit::LineEditPanel); 17.730 + m_pUseredit->setFrameShadow(QLineEdit::Sunken); 17.731 + m_pUseredit->setFrame(true); 17.732 + m_pUseredit->setReadOnly(false); 17.733 + m_pUseredit->setEnabled(false); 17.734 + 17.735 + // Whatsthis info for the user edit 17.736 + const char *kszUsertext = "Edit the <em>user name</em> by clicking " 17.737 + "on this control and typing the user name " 17.738 + "you want to account."; 17.739 + QWhatsThis::add(m_pUseredit, kszUsertext); 17.740 + QToolTip::add(m_pUseredit, trUtf8("User Name")); 17.741 + m_pEditlayout->addWidget(m_pUseredit); // Finally add the user edit 17.742 + 17.743 + // Make the GUID edit 17.744 + m_pGuidedit = new QLineEdit(m_pCenframe, "Guid"); 17.745 + if (m_pGuidedit == NULL) // Sanity check 17.746 + throw Genexcept("Main window GUID edit creation failed."); 17.747 + m_pGuidedit->setFrameShape(QLineEdit::LineEditPanel); 17.748 + m_pGuidedit->setFrameShadow(QLineEdit::Sunken); 17.749 + m_pGuidedit->setFrame(true); 17.750 + m_pGuidedit->setReadOnly(true); 17.751 + m_pGuidedit->setEnabled(false); 17.752 + 17.753 + // Whatsthis info for the GUID edit 17.754 + const char *kszGuidtext = "Edit the <em>GUID</em> by clicking " 17.755 + "on this control and typing the GUID " 17.756 + "corresponding to this account item."; 17.757 + QWhatsThis::add(m_pGuidedit, kszGuidtext); 17.758 + QToolTip::add(m_pGuidedit, trUtf8("GUID")); 17.759 + m_pEditlayout->addWidget(m_pGuidedit); // Finally add the GUID edit 17.760 + 17.761 + // Make the CRC edit 17.762 + m_pCrcedit = new QLineEdit(m_pCenframe, "Crc"); 17.763 + if (m_pCrcedit == NULL) // Sanity check 17.764 + throw Genexcept("Main window CRC edit creation failed."); 17.765 + m_pCrcedit->setFrameShape(QLineEdit::LineEditPanel); 17.766 + m_pCrcedit->setFrameShadow(QLineEdit::Sunken); 17.767 + m_pCrcedit->setFrame(true); 17.768 + m_pCrcedit->setReadOnly(true); 17.769 + m_pCrcedit->setEnabled(false); 17.770 + 17.771 + // Whatsthis info for the CRC edit 17.772 + const char *kszCrctext = "Edit the <em>CRC</em> by clicking " 17.773 + "on this control and typing the new " 17.774 + "value for this account item."; 17.775 + QWhatsThis::add(m_pCrcedit, kszCrctext); 17.776 + QToolTip::add(m_pCrcedit, trUtf8("CRC")); 17.777 + m_pEditlayout->addWidget(m_pCrcedit); // Finally add the CRC edit 17.778 + 17.779 + // Make the revision edit 17.780 + m_pRevedit = new QLineEdit(m_pCenframe, "Revision"); 17.781 + if (m_pRevedit == NULL) // Sanity check 17.782 + throw Genexcept("Main window revision edit creation failed."); 17.783 + m_pRevedit->setFrameShape(QLineEdit::LineEditPanel); 17.784 + m_pRevedit->setFrameShadow(QLineEdit::Sunken); 17.785 + m_pRevedit->setFrame(true); 17.786 + m_pRevedit->setReadOnly(true); 17.787 + m_pRevedit->setEnabled(false); 17.788 + 17.789 + // Whatsthis info for the revision edit 17.790 + const char *kszRevtext = "Edit the <em>revision</em> by clicking " 17.791 + "on this control and typing the new value " 17.792 + "for this account type."; 17.793 + QWhatsThis::add(m_pRevedit, kszRevtext); 17.794 + QToolTip::add(m_pRevedit, trUtf8("Revision")); 17.795 + m_pEditlayout->addWidget(m_pRevedit); // Finally add the revision edit 17.796 + 17.797 + // Make the date selector 17.798 + m_pDateedit = new Daydatedit(QDate::currentDate(), m_pCenframe, "Date"); 17.799 + if (m_pDateedit == NULL) // Sanity check 17.800 + throw Genexcept("Main window date edit creation failed."); // Spew errors 17.801 + 17.802 + // Configure attributes 17.803 + m_pDateedit->setOrder(QDateEdit::YMD); 17.804 + m_pDateedit->setAutoAdvance(true); 17.805 + m_pDateedit->setSeparator(trUtf8("-")); 17.806 + m_pDateedit->setEnabled(false); 17.807 + 17.808 + // Whatsthis info for the date editor 17.809 + const char *kszDateedit = "Edit the <em>task date</em> by clicking on " 17.810 + "the year, month, or day, and then changing their " 17.811 + "values with the arrow buttons."; 17.812 + QWhatsThis::add(m_pDateedit, kszDateedit); 17.813 + QToolTip::add(m_pDateedit, trUtf8("Task Date")); 17.814 + m_pEditlayout->addWidget(m_pDateedit); // Finally add the date editor 17.815 + 17.816 + // Make the start time selector 17.817 + m_pStarttime = new QTimeEdit(m_pCenframe, "StartTime"); 17.818 + if (m_pStarttime == NULL) // Sanity check 17.819 + throw Genexcept("Main window start time creation failed."); // Spew errors 17.820 + 17.821 + // Configure attributes 17.822 + m_pStarttime->setDisplay(QTimeEdit::Hours | QTimeEdit::Minutes); 17.823 + m_pStarttime->setAutoAdvance(true); 17.824 + m_pStarttime->setEnabled(false); 17.825 + 17.826 + // Whatsthis info for the time editor 17.827 + const char *kszStarttime = "Edit the <em>task starting time</em> by clicking on " 17.828 + "the hour and minute, and then changing their " 17.829 + "values with the arrow buttons."; 17.830 + QWhatsThis::add(m_pStarttime, kszStarttime); 17.831 + QToolTip::add(m_pStarttime, trUtf8("Task Starting Time")); 17.832 + m_pEditlayout->addWidget(m_pStarttime); // Finally add the start editor 17.833 + 17.834 + // Make the end time selector 17.835 + m_pEndtime = new QTimeEdit(m_pCenframe, "EndTime"); 17.836 + if (m_pEndtime == NULL) // Sanity check 17.837 + throw Genexcept("Main window end time creation failed."); // Spew errors 17.838 + 17.839 + // Configure attributes 17.840 + m_pEndtime->setDisplay(QTimeEdit::Hours | QTimeEdit::Minutes); 17.841 + m_pEndtime->setAutoAdvance(true); 17.842 + m_pEndtime->setEnabled(false); 17.843 + 17.844 + // Whatsthis info for the time editor 17.845 + const char *kszEndtime = "Edit the <em>task ending time</em> by clicking on " 17.846 + "the hour and minute, and then changing their " 17.847 + "values with the arrow buttons."; 17.848 + QWhatsThis::add(m_pEndtime, kszEndtime); 17.849 + QToolTip::add(m_pEndtime, trUtf8("Task Ending Time")); 17.850 + m_pEditlayout->addWidget(m_pEndtime); // Finally add the end editor 17.851 + 17.852 +// // Make the total time amount selector 17.853 +// m_pAmount = new QTimeEdit(m_pCenframe, "TotalAmount"); 17.854 +// if (m_pAmount == NULL) // Sanity check 17.855 +// throw Genexcept("Main window amount creation failed."); // Spew errors 17.856 +// 17.857 +// // Configure attributes 17.858 +// m_pAmount->setDisplay(QTimeEdit::Hours | QTimeEdit::Minutes); 17.859 +// m_pAmount->setAutoAdvance(true); 17.860 +// m_pAmount->setEnabled(false); 17.861 + 17.862 + // Make the amount selector 17.863 + m_pAmount = new ASTimeEdit(m_pCenframe, "TotalAmount"); 17.864 + if (m_pAmount == NULL) // Sanity check 17.865 + throw Genexcept("Main window amount creation failed."); // Spew errors 17.866 + 17.867 + // Whatsthis info for the amount editor 17.868 + const char *kszAmount = "Edit the <em>task amount</em> by clicking on " 17.869 + "the amount, and then changing its " 17.870 + "value with the arrow buttons."; 17.871 + QWhatsThis::add(m_pAmount, kszAmount); 17.872 + QToolTip::add(m_pAmount, trUtf8("Task Amount")); 17.873 + m_pAmount->setEnabled(false); // Don't enable until it's ready 17.874 + m_pEditlayout->addWidget(m_pAmount); // Finally add the amount editor 17.875 + 17.876 + // Construct a stringlist just to hold task values 17.877 + m_pTaskentries = new QStringList; 17.878 + if (m_pTaskentries == NULL) // Sanity check 17.879 + throw Genexcept("Main window task entries creation failed."); 17.880 + 17.881 + // Populate the stringlist with fresh accounts, taken from filename in prefs 17.882 + QString Asdir = m_pPrefs->getString(TITRAQ_PREFACCOUNTS, TITRAQ_DEFACCOUNTS); 17.883 + if (Asdir.startsWith(TITRAQ_HOMEDIRTOK)) 17.884 + Asdir = QDir::homeDirPath() + Asdir.remove(0, QString(TITRAQ_HOMEDIRTOK).length() - 1); 17.885 + QFile Filetemp(Asdir); 17.886 + this->loadAccounts(Filetemp); // Load account helper method 17.887 + 17.888 + // Make the combobox task edit 17.889 + m_pTasks = new QComboBox(true, m_pCenframe, "Tasks"); 17.890 + if (m_pTasks == NULL) // Sanity check 17.891 + throw Genexcept("Main window task edit creation failed."); 17.892 + m_pTasks->insertStringList(*m_pTaskentries); 17.893 + m_pTasks->setCurrentText(NULL); 17.894 + m_pTasks->setSizeLimit(TITRAQ_ACCTBOXHEIGHT); 17.895 + m_pTasks->setAutoCompletion(true); 17.896 + m_pTasks->setDuplicatesEnabled(false); 17.897 + m_pTasks->setEnabled(false); 17.898 +// m_pTasks->setEditable(false); // Only idiots define noneditable and autocompletion 17.899 + 17.900 + // Add an auto scroll bar if possible under current GUI style 17.901 + if (m_pTasks->listBox()) { // Motif style has no list box 17.902 + int nPopupwidth = m_pTasks->listBox()->maxItemWidth(); 17.903 + nPopupwidth += m_pTasks->listBox()->horizontalScrollBar()->height(); 17.904 + m_pTasks->listBox()->setFixedWidth(nPopupwidth); 17.905 + m_pTasks->listBox()->setHScrollBarMode(QScrollView::Auto); 17.906 + m_pTasks->listBox()->sort(); 17.907 + } 17.908 + 17.909 + // Whatsthis info for the task editor 17.910 + const char *kszTasktext = "Choose a <em>task account</em> by clicking on " 17.911 + "this box, and choosing whichever item most " 17.912 + "closely resembles your task."; 17.913 + QWhatsThis::add(m_pTasks, kszTasktext); 17.914 + QToolTip::add(m_pTasks, trUtf8("Task Selector")); 17.915 + m_pEditlayout->addWidget(m_pTasks); // Finally add the task edit 17.916 + 17.917 + // Make the Remark line 17.918 + m_pRemark = new QLineEdit(m_pCenframe, "Remark"); 17.919 + if (m_pRemark == NULL) // Sanity check 17.920 + throw Genexcept("Main window remark line creation failed."); 17.921 + m_pRemark->setFrameShape(QLineEdit::LineEditPanel); 17.922 + m_pRemark->setFrameShadow(QLineEdit::Sunken); 17.923 + m_pRemark->setFrame(true); 17.924 + m_pRemark->setReadOnly(false); 17.925 + m_pRemark->setEnabled(false); 17.926 + 17.927 + // Whatsthis info for the remark line 17.928 + const char *kszRemarktext = "Edit the <em>task remarks</em> by clicking on " 17.929 + "this line control and typing the remarks you " 17.930 + "have about the task."; 17.931 + QWhatsThis::add(m_pRemark, kszRemarktext); 17.932 + QToolTip::add(m_pRemark, trUtf8("Remark Line")); 17.933 + m_pEditlayout->addWidget(m_pRemark); // Finally add the remark line 17.934 + 17.935 + // Start edit controls off at right size 17.936 + this->updSizes(TITRAQ_IDXALLCTRLS, -1, -1); 17.937 + 17.938 + // Validate data just as it is being entered 17.939 + connect(m_pDateedit, SIGNAL(valueChanged(const QDate &)), SLOT(validateRow(void))); 17.940 + connect(m_pStarttime, SIGNAL(valueChanged(const QTime &)), SLOT(validateRow(void))); 17.941 + connect(m_pEndtime, SIGNAL(valueChanged(const QTime &)), SLOT(validateRow(void))); 17.942 + connect(m_pAmount, SIGNAL(valueChanged(const QTime &)), SLOT(validateRow(void))); 17.943 + connect(m_pTasks, SIGNAL(textChanged(const QString &)), SLOT(validateRow(void))); 17.944 + connect(m_pRemark, SIGNAL(textChanged(const QString &)), SLOT(validateRow(void))); 17.945 + 17.946 + // Signals sent between table cells and corresponding edit control widgets 17.947 + connect(m_pLineedit, SIGNAL(textChanged(const QString &)), SLOT(updateLine(const QString &))); 17.948 + connect(m_pUseredit, SIGNAL(textChanged(const QString &)), SLOT(updateUser(const QString &))); 17.949 + connect(m_pGuidedit, SIGNAL(textChanged(const QString &)), SLOT(updateGuid(const QString &))); 17.950 + connect(m_pCrcedit, SIGNAL(textChanged(const QString &)), SLOT(updateCrc(const QString &))); 17.951 + connect(m_pRevedit, SIGNAL(textChanged(const QString &)), SLOT(updateRev(const QString &))); 17.952 + connect(m_pDateedit, SIGNAL(valueChanged(const QDate &)), SLOT(updateDate(const QDate &))); 17.953 + connect(m_pStarttime, SIGNAL(valueChanged(const QTime &)), SLOT(updateStart(const QTime &))); 17.954 + connect(m_pEndtime, SIGNAL(valueChanged(const QTime &)), SLOT(updateFinish(const QTime &))); 17.955 + connect(m_pAmount, SIGNAL(valueChanged(const QTime &)), SLOT(updateAmount(const QTime &))); 17.956 + connect(m_pTasks, SIGNAL(textChanged(const QString &)), SLOT(updateTask(const QString &))); 17.957 + connect(m_pRemark, SIGNAL(textChanged(const QString &)), SLOT(updateRemark(const QString &))); 17.958 + 17.959 + // Correctly update checksum and revision fields also 17.960 + connect(m_pUseredit, SIGNAL(textChanged(const QString &)), SLOT(calcCrc(void))); 17.961 + connect(m_pDateedit, SIGNAL(valueChanged(const QDate &)), SLOT(calcCrc(void))); 17.962 + connect(m_pStarttime, SIGNAL(valueChanged(const QTime &)), SLOT(calcCrc(void))); 17.963 + connect(m_pEndtime, SIGNAL(valueChanged(const QTime &)), SLOT(calcCrc(void))); 17.964 + connect(m_pAmount, SIGNAL(valueChanged(const QTime &)), SLOT(calcCrc(void))); 17.965 + connect(m_pTasks, SIGNAL(textChanged(const QString &)), SLOT(calcCrc(void))); 17.966 + connect(m_pRemark, SIGNAL(textChanged(const QString &)), SLOT(calcCrc(void))); 17.967 +} 17.968 + 17.969 +// 17.970 +// Arrange and configure columns 17.971 +// 17.972 +void Titraqform::setupColumns(void) 17.973 +{ 17.974 + // Handle column view handling presets and defaults 17.975 + if (!m_pPrefs->getBool(TITRAQ_PREFSTATCOLON, TITRAQ_DEFSTATCOLON)) 17.976 + showStatcol(); 17.977 + if (!m_pPrefs->getBool(TITRAQ_PREFLCOLON, TITRAQ_DEFLCOLON)) 17.978 + showLinecol(); 17.979 + if (!m_pPrefs->getBool(TITRAQ_PREFUCOLON, TITRAQ_DEFUCOLON)) 17.980 + showUsercol(); 17.981 + if (!m_pPrefs->getBool(TITRAQ_PREFGCOLON, TITRAQ_DEFGCOLON)) 17.982 + showGuidcol(); 17.983 + if (!m_pPrefs->getBool(TITRAQ_PREFCCOLON, TITRAQ_DEFCCOLON)) 17.984 + showCrccol(); 17.985 + if (!m_pPrefs->getBool(TITRAQ_PREFREVCOLON, TITRAQ_DEFREVCOLON)) 17.986 + showRevcol(); 17.987 + if (!m_pPrefs->getBool(TITRAQ_PREFDCOLON, TITRAQ_DEFDCOLON)) 17.988 + showDatecol(); 17.989 + if (!m_pPrefs->getBool(TITRAQ_PREFSTARTCOLON, TITRAQ_DEFSTARTCOLON)) 17.990 + showStartcol(); 17.991 + if (!m_pPrefs->getBool(TITRAQ_PREFFCOLON, TITRAQ_DEFFCOLON)) 17.992 + showFinishcol(); 17.993 + if (!m_pPrefs->getBool(TITRAQ_PREFACOLON, TITRAQ_DEFACOLON)) 17.994 + showAmountcol(); 17.995 + if (!m_pPrefs->getBool(TITRAQ_PREFTCOLON, TITRAQ_DEFTCOLON)) 17.996 + showTaskcol(); 17.997 + if (!m_pPrefs->getBool(TITRAQ_PREFREMCOLON, TITRAQ_DEFREMCOLON)) 17.998 + showRemarkcol(); 17.999 + 17.1000 + // Handle tool bar view handling presets and defaults 17.1001 + if (!m_pPrefs->getBool(TITRAQ_PREFFILEBAR, TITRAQ_DEFFILEBAR)) { 17.1002 + m_pFiletools->hide(); 17.1003 + m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXFILEBAR), false); 17.1004 + } 17.1005 + if (!m_pPrefs->getBool(TITRAQ_PREFEDITBAR, TITRAQ_DEFEDITBAR)) { 17.1006 + m_pEdittools->hide(); 17.1007 + m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXEDITBAR), false); 17.1008 + } 17.1009 + if (!m_pPrefs->getBool(TITRAQ_PREFVIEWBAR, TITRAQ_DEFVIEWBAR)) { 17.1010 + m_pViewtools->hide(); 17.1011 + m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXVIEWBAR), false); 17.1012 + } 17.1013 + if (!m_pPrefs->getBool(TITRAQ_PREFPREFBAR, TITRAQ_DEFPREFBAR)) { 17.1014 + m_pPrefstools->hide(); 17.1015 + m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXPREFBAR), false); 17.1016 + } 17.1017 + if (!m_pPrefs->getBool(TITRAQ_PREFWHATBAR, TITRAQ_DEFWHATBAR)) { 17.1018 + m_pWhatstools->hide(); 17.1019 + m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXWHATBAR), false); 17.1020 + } 17.1021 +} 17.1022 + 17.1023 +// 17.1024 +// [En|dis]able most ui pieces to suit or restrict user 17.1025 +// 17.1026 +void Titraqform::enableIface(bool bTurned) 17.1027 +{ 17.1028 + // FIXME: Does not belong here, so relocate 17.1029 + if (bTurned) // Turn off the interface 17.1030 + m_pDateedit->setDayfocus(); // Default focus is on day 17.1031 + else { // Turn on the interface 17.1032 + m_pMaintable->setNumRows(0); // Remove table data 17.1033 + m_pStatusedit->setPixmap(QPixmap(s_kpcStatvoid_xpm)); 17.1034 + } 17.1035 + 17.1036 + // Enable or disable the widgets 17.1037 + m_pMaintable->setEnabled(bTurned); 17.1038 + m_pLineedit->setEnabled(bTurned); 17.1039 + m_pUseredit->setEnabled(bTurned); 17.1040 + m_pGuidedit->setEnabled(bTurned); 17.1041 + m_pCrcedit->setEnabled(bTurned); 17.1042 + m_pRevedit->setEnabled(bTurned); 17.1043 + m_pDateedit->setEnabled(bTurned); 17.1044 + m_pStarttime->setEnabled(bTurned); 17.1045 + m_pEndtime->setEnabled(bTurned); 17.1046 + m_pAmount->setEnabled(bTurned); 17.1047 + m_pTasks->setEnabled(bTurned); 17.1048 + m_pRemark->setEnabled(bTurned); 17.1049 + 17.1050 + // Enable or disable the actions 17.1051 + m_pFilesaveact->setEnabled(bTurned); 17.1052 + m_pFilesaveasact->setEnabled(bTurned); 17.1053 + m_pFilecloseact->setEnabled(bTurned); 17.1054 + m_pAddrowact->setEnabled(bTurned); 17.1055 + m_pDelrowact->setEnabled(bTurned); 17.1056 + m_pRefreshact->setEnabled(bTurned); 17.1057 + m_pCutact->setEnabled(bTurned); 17.1058 + m_pCopyact->setEnabled(bTurned); 17.1059 + m_pPasteact->setEnabled(bTurned); 17.1060 + m_pReportact->setEnabled(bTurned); 17.1061 +#if defined HAVE_MICO || defined HAVE_ESOAP 17.1062 + if (bTurned) 17.1063 + m_pSyncact->setEnabled(m_pPrefs->getBool(TITRAQ_PREFCORBON, TITRAQ_DEFCORBON) 17.1064 + | m_pPrefs->getBool(TITRAQ_PREFSOAPON, TITRAQ_DEFSOAPON)); 17.1065 + else 17.1066 + m_pSyncact->setEnabled(false); 17.1067 +#endif // defined HAVE_MICO || defined HAVE_ESOAP 17.1068 + 17.1069 + // Unconditional settings 17.1070 + m_pMaintable->setDirty(false); // Reset to clean data 17.1071 +} 17.1072 + 17.1073 +// 17.1074 +// Parse command line arguments for an existing filename, and 17.1075 +// open it to edit the intended (but optional) initial data 17.1076 +// 17.1077 +void Titraqform::loadInit(void) 17.1078 +{ 17.1079 + // If the user gives a filename argument to the shell, then open that file 17.1080 + int nNumargs = qApp->argc(); // Holds the number of cmd arguments 17.1081 + int nValid = 0; // Holds the return value 17.1082 + QFile Initial; // Initial event data file 17.1083 + 17.1084 + if (nNumargs > 1) { // Warm up a nice cascade, to set my mind on four weeks of vacation 17.1085 + for (int nIter = 1; nIter < nNumargs; nIter++) { // Salad in New Zealand 17.1086 + if (QChar(*qApp->argv()[nIter]) != '-') { // Bunuelos in Colombia 17.1087 + try { 17.1088 + this->setFilename(qApp->argv()[nIter]); // Store inital filename 17.1089 + Initial.setName(*this->getFilename()); // Initial file to load 17.1090 + if (Initial.exists(*getFilename()) && validateData(Initial)) { 17.1091 + this->loadData(Initial); // Pass to helper method 17.1092 + enableIface(true); // Turn on the lights 17.1093 + m_pStatbar->message(trUtf8("Loaded document ") + *this->getFilename()); 17.1094 + } 17.1095 + else // The inital file name does not correspond to a file 17.1096 + m_pStatbar->message(trUtf8(QString("The file ") + *this->getFilename() + QString(" does not exist."))); 17.1097 + } 17.1098 + catch (Genexcept& Genex) { 17.1099 + Genex.reportErr(); 17.1100 + } 17.1101 + } 17.1102 + } 17.1103 + } 17.1104 + else 17.1105 + m_pStatbar->message(trUtf8("Ready")); // Signal a ready condition 17.1106 +}
18.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 18.2 +++ b/as_const.h Fri Nov 28 11:21:08 2008 +0100 18.3 @@ -0,0 +1,286 @@ 18.4 +// 18.5 +// OSSP asgui - Accounting system graphical user interface 18.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 18.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 18.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 18.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 18.10 +// 18.11 +// This file is part of OSSP asgui, an accounting system graphical user 18.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 18.13 +// 18.14 +// Permission to use, copy, modify, and distribute this software for 18.15 +// any purpose with or without fee is hereby granted, provided that 18.16 +// the above copyright notice and this permission notice appear in all 18.17 +// copies. 18.18 +// 18.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 18.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 18.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 18.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 18.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 18.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 18.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 18.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 18.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 18.30 +// SUCH DAMAGE. 18.31 +// 18.32 +// as_const.h: ISO C++ interface 18.33 +// 18.34 + 18.35 +#ifndef TITCONST_H 18.36 +#define TITCONST_H 18.37 + 18.38 + 18.39 +// General preferences 18.40 +#define TITRAQ_PREFNAME ".asgui" 18.41 +#define TITRAQ_APPTITLE "AS Accounting System" 18.42 +#define TITRAQ_STR_ID "OSSPASGUI" /* APPID */ 18.43 +#define TITRAQ_UID_ID 0x84fae747e1a64016bf049e98bbc4bd96 /* UUID */ 18.44 +#define TITRAQ_PREFVER "0.6" 18.45 +#define TITRAQ_PREFHOME "homedir" 18.46 +#define TITRAQ_DEFHOME "." 18.47 +#define TITRAQ_PREFUSER "user" 18.48 +#define TITRAQ_DEFUSER "username" 18.49 +#define TITRAQ_PREFASDIR "asdir" 18.50 +#define TITRAQ_DEFASDIR "~/.as/" 18.51 +#define TITRAQ_PREFACCOUNTS "accounts" 18.52 +#define TITRAQ_DEFACCOUNTS "~/.as/accounts" 18.53 +#define TITRAQ_PREFSTYLE "uistyle" 18.54 +#define TITRAQ_PREFVIEW "view" 18.55 +#define TITRAQ_DEFVIEW "normal" 18.56 +#define TITRAQ_PREFREMOTELOG "logremote" 18.57 +#define TITRAQ_DEFREMOTELOG "no" 18.58 +#define TITRAQ_PREFLOCALLOG "loglocal" 18.59 +#define TITRAQ_DEFLOCALLOG "no" 18.60 +#define TITRAQ_PREFCORBHOST "corbahost" 18.61 +#define TITRAQ_DEFCORBHOST "localhost:8914" 18.62 +#define TITRAQ_PREFSOAPHOST "soaphost" 18.63 +#define TITRAQ_DEFSOAPHOST "localhost/cgi-bin/asdbserv" 18.64 +#define TITRAQ_PREFCORBON "corbaenable" 18.65 +#define TITRAQ_DEFCORBON 0 18.66 +#define TITRAQ_PREFSOAPON "soapenable" 18.67 +#define TITRAQ_DEFSOAPON 0 18.68 +#define TITRAQ_PREFBAKON "autobackup" 18.69 +#define TITRAQ_DEFBAKON 1 18.70 +#define TITRAQ_PREFEXTENDON "filextension" 18.71 +#define TITRAQ_DEFEXTENDON 1 18.72 +#define TITRAQ_PREFDETAILON "detailisting" 18.73 +#define TITRAQ_DEFDETAILON 0 18.74 +#define TITRAQ_PREFSIGNATON "signatureline" 18.75 +#define TITRAQ_DEFSIGNATON 0 18.76 +#define TITRAQ_PREFREPORTYPE "reportperiod" 18.77 +#define TITRAQ_DEFREPORTYPE TITRAQ_REPORTWEEK 18.78 +#define TITRAQ_PREFREPORTWEEKS "reportweeks" 18.79 +#define TITRAQ_DEFREPORTWEEKS 1 18.80 +#define TITRAQ_PREFREPORTMONTHS "reportmonths" 18.81 +#define TITRAQ_DEFREPORTMONTHS 1 18.82 +#define TITRAQ_PREFLIGHTRED "lightred" 18.83 +#define TITRAQ_DEFLIGHTRED 248 18.84 +#define TITRAQ_PREFLIGHTGREEN "lightgreen" 18.85 +#define TITRAQ_DEFLIGHTGREEN 248 18.86 +#define TITRAQ_PREFLIGHTBLUE "lightblue" 18.87 +#define TITRAQ_DEFLIGHTBLUE 240 18.88 +#define TITRAQ_PREFDARKRED "darkred" 18.89 +#define TITRAQ_DEFDARKRED 224 18.90 +#define TITRAQ_PREFDARKGREEN "darkgreen" 18.91 +#define TITRAQ_DEFDARKGREEN 224 18.92 +#define TITRAQ_PREFDARKBLUE "darkblue" 18.93 +#define TITRAQ_DEFDARKBLUE 216 18.94 +#define TITRAQ_PREFLTALTRED "lightred" 18.95 +#define TITRAQ_DEFLTALTRED 240 18.96 +#define TITRAQ_PREFLTALTGREEN "lightgreen" 18.97 +#define TITRAQ_DEFLTALTGREEN 240 18.98 +#define TITRAQ_PREFLTALTBLUE "lightblue" 18.99 +#define TITRAQ_DEFLTALTBLUE 212 18.100 +#define TITRAQ_PREFDKALTRED "darkred" 18.101 +#define TITRAQ_DEFDKALTRED 214 18.102 +#define TITRAQ_PREFDKALTGREEN "darkgreen" 18.103 +#define TITRAQ_DEFDKALTGREEN 210 18.104 +#define TITRAQ_PREFDKALTBLUE "darkblue" 18.105 +#define TITRAQ_DEFDKALTBLUE 160 18.106 + 18.107 +// Column show preferences 18.108 +#define TITRAQ_PREFSTATCOLON "statcolshow" 18.109 +#define TITRAQ_DEFSTATCOLON true 18.110 +#define TITRAQ_PREFLCOLON "linecolshow" 18.111 +#define TITRAQ_DEFLCOLON false 18.112 +#define TITRAQ_PREFUCOLON "usercolshow" 18.113 +#define TITRAQ_DEFUCOLON false 18.114 +#define TITRAQ_PREFGCOLON "guidcolshow" 18.115 +#define TITRAQ_DEFGCOLON false 18.116 +#define TITRAQ_PREFCCOLON "crccolshow" 18.117 +#define TITRAQ_DEFCCOLON false 18.118 +#define TITRAQ_PREFREVCOLON "revcolshow" 18.119 +#define TITRAQ_DEFREVCOLON false 18.120 +#define TITRAQ_PREFDCOLON "datecolshow" 18.121 +#define TITRAQ_DEFDCOLON true 18.122 +#define TITRAQ_PREFSTARTCOLON "startcolshow" 18.123 +#define TITRAQ_DEFSTARTCOLON false 18.124 +#define TITRAQ_PREFFCOLON "finishcolshow" 18.125 +#define TITRAQ_DEFFCOLON false 18.126 +#define TITRAQ_PREFACOLON "amountcolshow" 18.127 +#define TITRAQ_DEFACOLON true 18.128 +#define TITRAQ_PREFTCOLON "taskcolshow" 18.129 +#define TITRAQ_DEFTCOLON true 18.130 +#define TITRAQ_PREFREMCOLON "remarkcolshow" 18.131 +#define TITRAQ_DEFREMCOLON true 18.132 + 18.133 +// Frame geometry preferences 18.134 +#define TITRAQ_PREFFRAMELAY "framelayout" 18.135 +#define TITRAQ_PREFFRAMEWIDTH "framewidth" 18.136 +#define TITRAQ_DEFFRAMEWIDTH 640 18.137 +#define TITRAQ_PREFFRAMEHEIGHT "frameheight" 18.138 +#define TITRAQ_DEFFRAMEHEIGHT 400 18.139 + 18.140 +// Column width preferences 18.141 +#define TITRAQ_PREFSTATCOLWIDTH "statcolwidth" 18.142 +#define TITRAQ_DEFSTATCOLWIDTH 24 18.143 +#define TITRAQ_PREFLCOLWIDTH "linecolwidth" 18.144 +#define TITRAQ_DEFLCOLWIDTH 32 18.145 +#define TITRAQ_PREFUCOLWIDTH "usercolwidth" 18.146 +#define TITRAQ_DEFUCOLWIDTH 32 18.147 +#define TITRAQ_PREFGCOLWIDTH "guidcolwidth" 18.148 +#define TITRAQ_DEFGCOLWIDTH 254 18.149 +#define TITRAQ_PREFCCOLWIDTH "crccolwidth" 18.150 +#define TITRAQ_DEFCCOLWIDTH 84 18.151 +#define TITRAQ_PREFREVCOLWIDTH "revcolwidth" 18.152 +#define TITRAQ_DEFREVCOLWIDTH 32 18.153 +#define TITRAQ_PREFDCOLWIDTH "datecolwidth" 18.154 +#define TITRAQ_DEFDCOLWIDTH 98 18.155 +#define TITRAQ_PREFSTARTCOLWIDTH "startcolwidth" 18.156 +#define TITRAQ_DEFSTARTCOLWIDTH 60 18.157 +#define TITRAQ_PREFFCOLWIDTH "finishcolwidth" 18.158 +#define TITRAQ_DEFFCOLWIDTH 60 18.159 +#define TITRAQ_PREFACOLWIDTH "amountcolwidth" 18.160 +#define TITRAQ_DEFACOLWIDTH 60 18.161 +#define TITRAQ_PREFTCOLWIDTH "taskcolwidth" 18.162 +#define TITRAQ_DEFTCOLWIDTH 148 18.163 +#define TITRAQ_PREFREMCOLWIDTH "remarkcolwidth" 18.164 +#define TITRAQ_DEFREMCOLWIDTH 120 18.165 + 18.166 +// Column appearance preferences 18.167 +#define TITRAQ_PREFFILEBAR "filetoolbar" 18.168 +#define TITRAQ_DEFFILEBAR true 18.169 +#define TITRAQ_PREFEDITBAR "edittoolbar" 18.170 +#define TITRAQ_DEFEDITBAR true 18.171 +#define TITRAQ_PREFVIEWBAR "viewtoolbar" 18.172 +#define TITRAQ_DEFVIEWBAR true 18.173 +#define TITRAQ_PREFPREFBAR "preftoolbar" 18.174 +#define TITRAQ_DEFPREFBAR true 18.175 +#define TITRAQ_PREFWHATBAR "whattoolbar" 18.176 +#define TITRAQ_DEFWHATBAR true 18.177 + 18.178 +// Other value preferences 18.179 +#define TITRAQ_PREFSORTCOL "sortordering" 18.180 +#define TITRAQ_DEFSORTCOL TITRAQ_IDXDATE 18.181 +#define TITRAQ_PREFSORTDIR "sortascending" 18.182 +#define TITRAQ_DEFSORTDIR true 18.183 + 18.184 +// Other value constants 18.185 +#define TITRAQ_DATAVERSIONMAJ 0 18.186 +#define TITRAQ_DATAVERSIONMIN 6 18.187 + 18.188 +// Environment string constants 18.189 +#define TITRAQ_ENVUSERNAME "USER" 18.190 +#define TITRAQ_ENVHOMEDIR "HOME" 18.191 + 18.192 +// Falsified incoming ORB initilization arguments 18.193 +#define TITRAQ_ORBINIT "-ORBGIOPVersion 1.2 -ORBIIOPVersion 1.2 -ORBInitRef" 18.194 +#define TITRAQ_COSSPART1 "NameService=corbaloc::" 18.195 +#define TITRAQ_COSSPART2 "/NameService" 18.196 +#define TITRAQ_SOAPSPACE "http://soap.europalab.com/asdb" 18.197 +#define TITRAQ_PREFIXHTTP "http://" 18.198 + 18.199 +// Style string constants 18.200 +#define TITRAQ_STRCDE "CDE" 18.201 +#define TITRAQ_STRSGI "SGI" 18.202 +#define TITRAQ_STRMOTIF "Motif" 18.203 +#define TITRAQ_STRMPLUS "MotifPlus" 18.204 +#define TITRAQ_STRPLAT "Platinum" 18.205 +#define TITRAQ_STRMSOFT "Windows" 18.206 + 18.207 +// Other string constants 18.208 +#define TITRAQ_SEPARATORTOK " " 18.209 +#define TITRAQ_HOMEDIRTOK "~/" 18.210 +#define TITRAQ_FEXTENSION ".as" 18.211 +#define TITRAQ_REFHELP "as-gui.html" 18.212 +#define TITRAQ_DATAPATTERN "%!AS-EVENTS-" 18.213 +#define TITRAQ_SAVEFIRST "The timesheet contains unsaved changes.\nDo you want to save the changes or discard them?" 18.214 +#define TITRAQ_OVERWRITE "A file already exists with the chosen name.\nDo you want to overwrite it with new data?" 18.215 +#define TITRAQ_NOPATTERNFOUND "This data file appears to be invalid,\nbecause the AS data symbol\n " 18.216 +#define TITRAQ_WASNOTFOUNDIN "\nwas not found inside of it." 18.217 +#define TITRAQ_BADVERSIONMAJ "Incompatible data format. Please\neither upgrade this application or\nthe data you are using with it." 18.218 +#define TITRAQ_BADVERSIONMIN "Incompatible data format. Please either\nupgrade this application or downgrade\nthe data you are using with it." 18.219 +#define TITRAQ_INCOMPATDATA "Error: incompatible data format." 18.220 +#define TITRAQ_INVALIDDATA "Error: invalid data format." 18.221 +#define TITRAQ_SAVECANCELLED "Warning: save operation failed, because the user cancelled." 18.222 +#define TITRAQ_READPFILFAIL "Could not open personal data file for reading." 18.223 +#define TITRAQ_READAFILFAIL "Could not open account file at %1 for reading." 18.224 + 18.225 +// Indexes of table columns 18.226 +#define TITRAQ_IDXALLCTRLS -1 18.227 +#define TITRAQ_IDXSTATUS 0 18.228 +#define TITRAQ_IDXLINE 1 18.229 +#define TITRAQ_IDXUSER 2 18.230 +#define TITRAQ_IDXGUID 3 18.231 +#define TITRAQ_IDXCRC 4 18.232 +#define TITRAQ_IDXREV 5 18.233 +#define TITRAQ_IDXDATE 6 18.234 +#define TITRAQ_IDXSTART 7 18.235 +#define TITRAQ_IDXFINISH 8 18.236 +#define TITRAQ_IDXAMOUNT 9 18.237 +#define TITRAQ_IDXTASK 10 18.238 +#define TITRAQ_IDXREMARK 11 18.239 +#define TITRAQ_IDXTAIL 12 18.240 + 18.241 +// Indexes of col popup menu items 18.242 +#define TITRAQ_IDXSTATCOL 1 18.243 +#define TITRAQ_IDXLCOL 2 18.244 +#define TITRAQ_IDXUCOL 3 18.245 +#define TITRAQ_IDXGCOL 4 18.246 +#define TITRAQ_IDXCCOL 5 18.247 +#define TITRAQ_IDXREVCOL 6 18.248 +#define TITRAQ_IDXDCOL 7 18.249 +#define TITRAQ_IDXSTARTCOL 8 18.250 +#define TITRAQ_IDXFCOL 9 18.251 +#define TITRAQ_IDXACOL 10 18.252 +#define TITRAQ_IDXTCOL 11 18.253 +#define TITRAQ_IDXREMCOL 12 18.254 + 18.255 +// Indexes of popup menu submenus 18.256 +#define TITRAQ_IDXFILEBAR 1 18.257 +#define TITRAQ_IDXEDITBAR 2 18.258 +#define TITRAQ_IDXVIEWBAR 3 18.259 +#define TITRAQ_IDXPREFBAR 4 18.260 +#define TITRAQ_IDXWHATBAR 5 18.261 + 18.262 +// Indexes of character tokens in strings 18.263 +#define TITRAQ_IDXSTATERROR 0 18.264 +#define TITRAQ_IDXSTATCOLOR 1 18.265 + 18.266 +// Offsets 18.267 +#define TITRAQ_OFFSETYEAR 4 18.268 +#define TITRAQ_OFFSETMONTH 7 18.269 +#define TITRAQ_OFFSETHOUR 2 18.270 + 18.271 +// Report periods 18.272 +#define TITRAQ_REPORTWEEK 0 18.273 +#define TITRAQ_REPORTMONTH 1 18.274 +#define TITRAQ_POPUPMSECS 200 18.275 + 18.276 +// Values 18.277 +#define TITRAQ_MARGIN 10 // Default layout margin 18.278 +#define TITRAQ_SPACING 6 // Default layout spacing 18.279 +#define TITRAQ_NUMBLOCKS 32 // Block size of a timesheet 18.280 +#define TITRAQ_MAXAMOUNT 960 // Maximum valid amount 18.281 +#define TITRAQ_MINAMOUNT 0 // Minimum valid amount 18.282 +#define TITRAQ_STEPAMOUNT 15 // Line step interval 18.283 +#define TITRAQ_MINSINHOUR 60 // Only idiots don't know this 18.284 +#define TITRAQ_BRIGHT 'H' // For coloring rows 18.285 +#define TITRAQ_DARK 'D' // For coloring rows 18.286 +#define TITRAQ_BIGMAGIC 700000 // For unreasonably large numbers 18.287 +#define TITRAQ_ACCTBOXHEIGHT 24 // Number rows in account combobox 18.288 + 18.289 +#endif // TITCONST_H
19.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 19.2 +++ b/as_crc.cpp Fri Nov 28 11:21:08 2008 +0100 19.3 @@ -0,0 +1,148 @@ 19.4 +// 19.5 +// OSSP asgui - Accounting system graphical user interface 19.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 19.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 19.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 19.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 19.10 +// 19.11 +// This file is part of OSSP asgui, an accounting system graphical user 19.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 19.13 +// 19.14 +// Permission to use, copy, modify, and distribute this software for 19.15 +// any purpose with or without fee is hereby granted, provided that 19.16 +// the above copyright notice and this permission notice appear in all 19.17 +// copies. 19.18 +// 19.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 19.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 19.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 19.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 19.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 19.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 19.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 19.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 19.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 19.30 +// SUCH DAMAGE. 19.31 +// 19.32 +// as_crc.cpp: ISO C++ implementation 19.33 +// 19.34 + 19.35 +#include "as_crc.h" 19.36 + 19.37 + 19.38 +// 19.39 +// Calculate a CRC32 value, as devised by Mark ADLER 19.40 +// Returns 0xffffffff on empty or zero length strings 19.41 +// 19.42 +U32 Qualistring::getCrc(void) 19.43 +{ 19.44 + U32 Hash = 0xffffffff; 19.45 + unsigned int unLen = 0; 19.46 + const char *pText = this->ascii(); 19.47 + 19.48 + unLen = this->length(); 19.49 + 19.50 + while (unLen-- > 0) 19.51 + Hash = m_pkHash[(Hash ^ *pText++) & 0xff] ^ (Hash >> 8); 19.52 + 19.53 + Hash ^= 0xffffffff; 19.54 + return Hash; 19.55 +} 19.56 + 19.57 +// 19.58 +// Overloaded equals operator, use with regular QString objects 19.59 +// 19.60 +Qualistring &Qualistring::operator=(const QString &Convertin) 19.61 +{ 19.62 + this->setAscii((const char *)Convertin); // This hack is a big loop 19.63 + return *this; // to move data inefficiently 19.64 +} 19.65 + 19.66 +// 19.67 +// Reflect the bits of Ref, just like a mirror 19.68 +// 19.69 +U32 Qualistring::mirrorBits(U32 Ref, U8 Bytes) 19.70 +{ 19.71 + U32 unMirror = 0; 19.72 + 19.73 + // Swap bits starting at 1 and moving up to Bytes 19.74 + for(int nIter = 1; nIter < (Bytes + 1); nIter++) { 19.75 + if (Ref & 1) 19.76 + unMirror |= 1 << (Bytes - nIter); 19.77 + Ref >>= 1; 19.78 + } 19.79 + return unMirror; 19.80 +} 19.81 + 19.82 +// 19.83 +// Initialize the hash table for fast CRC32 value generation 19.84 +// 19.85 +void Qualistring::initCrc(void) 19.86 +{ 19.87 + const unsigned long unPolynomial = 0x04c11db7; 19.88 + 19.89 + // Match 256 values representing the ASCII character codes 19.90 + for(int nOuter = 0; nOuter <= 0xFF; nOuter++) { 19.91 + m_pkHash[nOuter] = mirrorBits(nOuter, 8) << 24; 19.92 + for (int nInner = 0; nInner < 8; nInner++) 19.93 + m_pkHash[nOuter] = (m_pkHash[nOuter] << 1) ^ (m_pkHash[nOuter] & (1 << 31) ? unPolynomial : 0); 19.94 + m_pkHash[nOuter] = mirrorBits(m_pkHash[nOuter], 32); 19.95 + } 19.96 + 19.97 +/* m_pkHash[256] = { 19.98 + 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L, 19.99 + 0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L, 19.100 + 0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L, 19.101 + 0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL, 19.102 + 0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L, 19.103 + 0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L, 19.104 + 0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L, 19.105 + 0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL, 19.106 + 0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L, 19.107 + 0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL, 19.108 + 0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L, 19.109 + 0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L, 19.110 + 0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L, 19.111 + 0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL, 19.112 + 0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL, 19.113 + 0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L, 19.114 + 0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL, 19.115 + 0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L, 19.116 + 0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L, 19.117 + 0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L, 19.118 + 0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL, 19.119 + 0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L, 19.120 + 0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L, 19.121 + 0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL, 19.122 + 0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L, 19.123 + 0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L, 19.124 + 0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L, 19.125 + 0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L, 19.126 + 0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L, 19.127 + 0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL, 19.128 + 0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL, 19.129 + 0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L, 19.130 + 0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L, 19.131 + 0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL, 19.132 + 0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL, 19.133 + 0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L, 19.134 + 0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL, 19.135 + 0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L, 19.136 + 0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL, 19.137 + 0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L, 19.138 + 0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL, 19.139 + 0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L, 19.140 + 0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L, 19.141 + 0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL, 19.142 + 0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L, 19.143 + 0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L, 19.144 + 0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L, 19.145 + 0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L, 19.146 + 0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L, 19.147 + 0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L, 19.148 + 0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL, 19.149 + 0x2d02ef8dL 19.150 + };*/ 19.151 +}
20.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 20.2 +++ b/as_crc.h Fri Nov 28 11:21:08 2008 +0100 20.3 @@ -0,0 +1,60 @@ 20.4 +// 20.5 +// OSSP asgui - Accounting system graphical user interface 20.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 20.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 20.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 20.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 20.10 +// 20.11 +// This file is part of OSSP asgui, an accounting system graphical user 20.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 20.13 +// 20.14 +// Permission to use, copy, modify, and distribute this software for 20.15 +// any purpose with or without fee is hereby granted, provided that 20.16 +// the above copyright notice and this permission notice appear in all 20.17 +// copies. 20.18 +// 20.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 20.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 20.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 20.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 20.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 20.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 20.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 20.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 20.30 +// SUCH DAMAGE. 20.31 +// 20.32 +// as_crc.h: ISO C++ interface 20.33 +// 20.34 + 20.35 +#ifndef CRC_H 20.36 +#define CRC_H 20.37 + 20.38 +#include <string> // For copy constructor using string 20.39 +#include <qstring.h> // For deriving from QString 20.40 + 20.41 +#include "as_gui.h" // General definitions like U32 typedefs 20.42 + 20.43 + 20.44 +class Qualistring : public QString 20.45 +{ 20.46 +private: 20.47 + U32 m_pkHash[256]; // Used for CRC32 value generation 20.48 + 20.49 +private: 20.50 + U32 mirrorBits(U32, U8); // Helper method, mirror a bitstream 20.51 + void initCrc(void); // Helper method, fill hash table 20.52 + 20.53 +public: // Constructors 20.54 + Qualistring(void) : QString() {initCrc();}; // Default 20.55 + Qualistring(const QString &kCopy) : QString(kCopy) {initCrc();}; // Copy 20.56 + Qualistring(const char *pkcCopy) : QString(pkcCopy) {initCrc();}; // Copy 20.57 + Qualistring(const std::string &kCopy) : QString(kCopy) {initCrc();}; // Copy 20.58 + 20.59 + U32 getCrc(void); // Generate and return a CRC32 20.60 + Qualistring &operator=(const QString &); // Overload equals operator 20.61 +}; 20.62 + 20.63 +#endif // CRC_H
21.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 21.2 +++ b/as_dataop.cpp Fri Nov 28 11:21:08 2008 +0100 21.3 @@ -0,0 +1,628 @@ 21.4 +// 21.5 +// OSSP asgui - Accounting system graphical user interface 21.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 21.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 21.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 21.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 21.10 +// 21.11 +// This file is part of OSSP asgui, an accounting system graphical user 21.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 21.13 +// 21.14 +// Permission to use, copy, modify, and distribute this software for 21.15 +// any purpose with or without fee is hereby granted, provided that 21.16 +// the above copyright notice and this permission notice appear in all 21.17 +// copies. 21.18 +// 21.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 21.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 21.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 21.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 21.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 21.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 21.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 21.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 21.30 +// SUCH DAMAGE. 21.31 +// 21.32 +// as_dataops.cpp: ISO C++ implementation 21.33 +// 21.34 + 21.35 +// System headers 21.36 +#include <map> 21.37 +#include <string> 21.38 + 21.39 +// Qt general headers 21.40 +#include <qregexp.h> // Portable regular expressions 21.41 +#include <qdatetime.h> 21.42 +#include <qmessagebox.h> 21.43 +#include <qtextstream.h> 21.44 +#include <qpopupmenu.h> 21.45 +#include <qfile.h> 21.46 + 21.47 +// User interface 21.48 +#include "as_const.h" // Application constants 21.49 +#include "as_tableitem.h" // For class RtTableItem 21.50 +#include "as_crc.h" // For quality strings 21.51 +#include "as_uuid.h" // UUID classes 21.52 +#include "as_table.h" // TiTable class 21.53 + 21.54 +// Icon pixel maps 21.55 +#include "as_gfx/statok.xpm" // static const char *s_kpcStatokay_xpm[] 21.56 +#include "as_gfx/staterr.xpm" // static const char *s_kpcStaterror_xpm[] 21.57 +#include "as_gfx/statwrn.xpm" // static const char *s_kpcStatwarn_xpm[] 21.58 + 21.59 + 21.60 +// 21.61 +// Convenience method to load accounts from a file 21.62 +// 21.63 +void Titraqform::loadAccounts(QFile &Fileobj) 21.64 +{ 21.65 + if (Fileobj.isOpen()) { // Check state of file 21.66 + Fileobj.flush(); // Begin processing file cleanly 21.67 + QTextStream Account(&Fileobj); // Convert data to stream 21.68 + this->loadAccounts(Account); // Pass off to do the real work 21.69 + } 21.70 + else { 21.71 + if (!Fileobj.open(IO_ReadOnly)) { // Try to open file 21.72 + QString Readerrstr; 21.73 + Readerrstr = trUtf8(TITRAQ_READAFILFAIL).arg(Fileobj.name()); 21.74 + throw Genexcept(Readerrstr.ascii()); 21.75 + } 21.76 + else 21.77 + Fileobj.flush(); // Begin processing file cleanly 21.78 + QTextStream Account(&Fileobj); // Convert data to stream 21.79 + this->loadAccounts(Account); // Pass off to do the real work 21.80 + Fileobj.close(); // Finish fileop by closing 21.81 + } 21.82 +} 21.83 + 21.84 +// 21.85 +// Load accounts themselves data from a stream 21.86 +// 21.87 +void Titraqform::loadAccounts(QTextStream &Tstream) 21.88 +{ 21.89 + using namespace std; // Needed for hash tables with hmap 21.90 + map<string, int> Hashnames; // Hashtable for storing names 21.91 + map<int, string> Hashnums; // Hashtable for storing repetitions 21.92 + map<string, int>::iterator Nameiter; // The hashtable name iterator 21.93 + map<int, string>::iterator Numiter; // The hashtable number iterator 21.94 + 21.95 + QString Line; // Used for linewise editing and whitespace eating 21.96 + 21.97 + // Eat lines until reading the start accounts token 21.98 + while (!Line.startsWith(trUtf8("%!AS-ACCOUNTS")) && !Tstream.atEnd()) { 21.99 + Line = QString(""); // Empty line for later inspection 21.100 + Line = Tstream.readLine(); // Get a new line to examine 21.101 + } 21.102 + 21.103 + // Strip out extra line feeds in stream 21.104 + while (Line.isEmpty() && !Tstream.atEnd()) { 21.105 + Tstream.skipWhiteSpace(); // Strip and get 21.106 + Line = Tstream.readLine(); // the new line 21.107 + if (Line.at(0) == QChar('#')) // Remove comments 21.108 + Line = QString(""); 21.109 + } 21.110 + 21.111 + // Set the accounts choices by linewise reading from the input 21.112 + // stream and parsing the corresponding account fields out of it 21.113 + while (!Line.isEmpty()) { 21.114 + QString Temp; // For reading from stream 21.115 + QTextStream Asline(&Line, IO_ReadOnly); // Convert a single line 21.116 + 21.117 + Asline.skipWhiteSpace(); // Remove whitespaces 21.118 + Asline >> Temp; // Copy revision indicator 21.119 + 21.120 + if (Temp == QString(QChar('R'))) { // Copy the account field 21.121 + Asline >> Temp; // to temporary for transfer 21.122 + string Convstring = Temp; // Convert to string (can't cast?) 21.123 + Hashnames[Convstring] += Hashnames[Convstring]; 21.124 + } 21.125 + 21.126 + Line = QString(""); // Clear line for next round 21.127 + while (Line.isEmpty() && !Tstream.atEnd()) { 21.128 + Tstream.skipWhiteSpace(); // Strip and get 21.129 + Line = Tstream.readLine(); // the new line 21.130 + if (Line.at(0) == QChar('#')) // Remove comments 21.131 + Line = QString(""); 21.132 + } 21.133 + } 21.134 + 21.135 +// Hashnames.insert(map<string, int>::value_type((string)QString, int)); 21.136 + for (Nameiter = Hashnames.begin(); Nameiter != Hashnames.end(); Nameiter++) 21.137 + Hashnums[Nameiter->second] += Nameiter->first + '\n'; 21.138 + 21.139 +// FIXME: Put this in loadData, to load custom and most used task names before 21.140 +// FIXME: default listings are sorted and inserted 21.141 + for (Numiter = Hashnums.begin(); Numiter != Hashnums.end(); Numiter++) { 21.142 + 21.143 + // Count the number of lines of sorted task names 21.144 + int nNumlines = QString(Numiter->second).contains('\n'); 21.145 + 21.146 + // Iterate through the lines of task names, feeding them into the menu 21.147 + for (int nIter = 0; nIter < nNumlines; nIter++) 21.148 + *m_pTaskentries << QString(Numiter->second).section('\n', nIter, nIter); 21.149 + } 21.150 +} 21.151 + 21.152 +// 21.153 +// Convenience method to load personal data from a file 21.154 +// 21.155 +void Titraqform::loadData(QFile &Fileobj) 21.156 +{ 21.157 + if (Fileobj.isOpen()) { // Check state of file 21.158 + Fileobj.flush(); // Begin processing file cleanly 21.159 + QTextStream Asentry(&Fileobj); // Convert data to stream 21.160 + this->loadData(Asentry); // Pass off to do the real work 21.161 + } 21.162 + else { 21.163 + if (!Fileobj.open(IO_ReadOnly)) // Try to open file 21.164 + throw Genexcept(trUtf8(TITRAQ_READPFILFAIL)); 21.165 + else 21.166 + Fileobj.flush(); // Begin processing file cleanly 21.167 + QTextStream Asentry(&Fileobj); // Convert data to stream 21.168 + this->loadData(Asentry); // Pass off to do the real work 21.169 + Fileobj.close(); // Finish fileop by closing 21.170 + } 21.171 +} 21.172 + 21.173 +// 21.174 +// Load personal data from a stream 21.175 +// 21.176 +void Titraqform::loadData(QTextStream &Tstream) 21.177 +{ 21.178 + bool bValid = true; // Used to warn on globally invalid accounting data 21.179 + int nIter = 0; // Iterator used in loop and also as a count 21.180 + QString Line; // Used for linewise editing and whitespace eating 21.181 + QString Bitbucket; // Used for null device until we find a better way 21.182 + 21.183 + QPixmap Statokay(s_kpcStatokay_xpm); 21.184 + QPixmap Statwarn(s_kpcStatwarn_xpm); 21.185 + QPixmap Staterror(s_kpcStaterror_xpm); 21.186 + 21.187 + // Strip out extra line feeds at stream start 21.188 + while (Line.isEmpty() && !Tstream.atEnd()) { 21.189 + Tstream.skipWhiteSpace(); // Strip and get 21.190 + Line = Tstream.readLine(); // the new line 21.191 + if (Line.at(0) == QChar('#')) // Remove comments 21.192 + Line = QString(""); 21.193 + } 21.194 + 21.195 + // Strip out extra line feeds after reading the data symbol 21.196 + Line = QString(""); // Reset our line 21.197 + while (Line.isEmpty() && !Tstream.atEnd()) { 21.198 + Tstream.skipWhiteSpace(); // Strip and get 21.199 + Line = Tstream.readLine(); // the new line 21.200 + if (Line.at(0) == QChar('#')) // Remove comments 21.201 + Line = QString(""); 21.202 + } 21.203 + 21.204 +// // Going into data churning, so prepare date and time parsing and conversion 21.205 +// Converdate.setSeparator(trUtf8(".")); 21.206 +// Convertime.setSeparator(trUtf8(":")); 21.207 + 21.208 + // Optimize viewing by repainting cells only once after processing 21.209 + m_pMaintable->setUpdatesEnabled(false); 21.210 + 21.211 + // Set the table text by linewise reading from the input stream 21.212 + // and parsing date, time, account, and other columns out of it 21.213 + while (!Line.isEmpty()) { 21.214 + bool bValid = true; // Warns on linewise invalid accounting data 21.215 + QString User, Guid, Crc, Rev; // Valid admin fields 21.216 + QString Date, Start, Finish, Account, Amount, Remark; // Valid user fields 21.217 + QTextStream Asline(&Line, IO_ReadOnly); // Convert a single line now 21.218 + 21.219 + if (nIter % g_knBlocks == 0) // Add blocks of rows to optimize loading 21.220 + m_pMaintable->setNumRows(m_pMaintable->numRows() + g_knBlocks); 21.221 + 21.222 + Asline.skipWhiteSpace(); // Remove whitespaces 21.223 + Asline >> User; // Copy the user field 21.224 + if (!User.isEmpty()) 21.225 + m_pMaintable->setText(nIter, TITRAQ_IDXUSER, User); 21.226 + else 21.227 + bValid = false; 21.228 + 21.229 + Asline.skipWhiteSpace(); // Remove whitespaces 21.230 + Asline >> Guid; // Copy the GUID field 21.231 + // Postpone actual text delivery, to autoinsert GUIDs! 21.232 + 21.233 + Asline.skipWhiteSpace(); // Remove whitespaces 21.234 + Asline >> Crc; // Copy the CRC field 21.235 + // Postpone actual text delivery, to autoinsert CRCs! 21.236 + 21.237 + Asline.skipWhiteSpace(); // Remove whitespaces 21.238 + Asline >> Rev; // Copy the rev field 21.239 + if (!Rev.isEmpty()) 21.240 + m_pMaintable->setText(nIter, TITRAQ_IDXREV, Rev); 21.241 + else 21.242 + bValid = false; 21.243 + 21.244 + Asline.skipWhiteSpace(); // Remove whitespaces 21.245 + Asline >> Date; // Copy the date field 21.246 + if (!Date.isEmpty()) 21.247 + m_pMaintable->setText(nIter, TITRAQ_IDXDATE, Date); 21.248 + else 21.249 + bValid = false; 21.250 + 21.251 + Asline.skipWhiteSpace(); // Remove whitespaces 21.252 + Asline >> Start; // Copy the start field 21.253 + if (!Start.isEmpty()) 21.254 + m_pMaintable->setText(nIter, TITRAQ_IDXSTART, Start); 21.255 + else 21.256 + bValid = false; 21.257 + 21.258 + Asline.skipWhiteSpace(); // Remove whitespaces 21.259 + Asline >> Finish; // Copy the finish field 21.260 + if (!Finish.isEmpty()) 21.261 + m_pMaintable->setText(nIter, TITRAQ_IDXFINISH, Finish); 21.262 + else 21.263 + bValid = false; 21.264 + 21.265 + Asline.skipWhiteSpace(); // Remove whitespaces 21.266 + Asline >> Amount; // Copy the amount field 21.267 + if (!Amount.isEmpty()) 21.268 + m_pMaintable->setText(nIter, TITRAQ_IDXAMOUNT, Amount); 21.269 + else 21.270 + bValid = false; 21.271 + 21.272 + Asline.skipWhiteSpace(); // Remove whitespaces 21.273 + Asline >> Account; // Copy the account field 21.274 + if (!Account.isEmpty()) { 21.275 + QTableItem *pOld = m_pMaintable->item(nIter, TITRAQ_IDXTASK); 21.276 + delete(pOld); // Get rid of the old before going with the new 21.277 + RtTableItem *pSwapitem = new RtTableItem(m_pMaintable, QTableItem::WhenCurrent, Account); 21.278 + pSwapitem->setAlignment(AlignLeft | AlignVCenter); 21.279 + m_pMaintable->setItem(nIter, TITRAQ_IDXTASK, pSwapitem); 21.280 + } 21.281 + else 21.282 + bValid = false; 21.283 + 21.284 + Asline.skipWhiteSpace(); // Remove whitespaces 21.285 + Remark = Asline.read(); // Copy the remark field 21.286 + 21.287 + QRegExp Quoted("\"(.*[^\\\\])\""); // Get rid of 21.288 + Quoted.search(Remark); // surrounding double 21.289 + Remark = Quoted.cap(Quoted.numCaptures()); // quotes, and 21.290 + Remark.replace(QRegExp("\\\\(.)"), QString("\\1")); // escape backslashes 21.291 + 21.292 + if (!Remark.isEmpty()) 21.293 + m_pMaintable->setText(nIter, TITRAQ_IDXREMARK, Remark); 21.294 + 21.295 + if (bValid) { // Show a bitmap to signal valid or error state 21.296 + m_pMaintable->setText(nIter, TITRAQ_IDXSTATUS, QString(QChar('O'))); 21.297 + m_pMaintable->setPixmap(nIter, TITRAQ_IDXSTATUS, Statokay); 21.298 + } 21.299 + else { 21.300 + m_pMaintable->setText(nIter, TITRAQ_IDXSTATUS, QString(QChar('E'))); 21.301 + m_pMaintable->setPixmap(nIter, TITRAQ_IDXSTATUS, Staterror); 21.302 + } 21.303 + 21.304 + // Set the GUID text here, in case we need to generate a fresh value 21.305 + if (!Guid.isEmpty()) { 21.306 + if (Guid != ".") // This means, generate a fresh GUID value 21.307 + m_pMaintable->setText(nIter, TITRAQ_IDXGUID, Guid); 21.308 + else { 21.309 + AS::Uuid Guidi; // For GUID production 21.310 + Guidi.genId(); 21.311 + m_pMaintable->setText(nIter, TITRAQ_IDXGUID, Guidi.getString()); 21.312 + } 21.313 + } 21.314 + else // if isEmpty() 21.315 + bValid = false; 21.316 + 21.317 + // Set the CRC text here, in case we need to generate a fresh value 21.318 + if (!Crc.isEmpty()) { 21.319 + if (Crc != ".") // This means, generate a fresh CRC value 21.320 + m_pMaintable->setText(nIter, TITRAQ_IDXCRC, "0x" + Crc); 21.321 + else { 21.322 + // Make our long tuple to run through the CRC32 generator 21.323 + Qualistring Testuple = User + Guid + Rev + Date + Start; 21.324 + Testuple += Finish + Amount + Account + Remark; 21.325 + U32 Valcrc = Testuple.getCrc(); // Finally set the checksum to its new value 21.326 + QString Crcstr = QString::number(Valcrc, 16).rightJustify(8, '0'); 21.327 + m_pMaintable->setText(nIter, TITRAQ_IDXCRC, "0x" + Crcstr); 21.328 + } 21.329 + } 21.330 + else // if isEmpty() 21.331 + bValid = false; 21.332 + 21.333 + nIter++; // The big increment 21.334 + Line = QString(""); // Clear line for next round 21.335 + 21.336 + while (Line.isEmpty() && !Tstream.atEnd()) { // Strip and get 21.337 + Tstream.skipWhiteSpace(); // Remove white 21.338 + Line = Tstream.readLine(); // the new line 21.339 + if (Line.at(0) == QChar('#')) // Remove comments 21.340 + Line = QString(""); 21.341 + } 21.342 + } 21.343 + 21.344 +// // Start sorting order and direction correctly according to user preferences 21.345 +// int nSortcol = (int)m_pPrefs->getNumber(TITRAQ_PREFSORTCOL, TITRAQ_DEFSORTCOL); 21.346 +// bool bSortdir = m_pPrefs->getBool(TITRAQ_PREFSORTDIR, TITRAQ_DEFSORTDIR); 21.347 +// m_pMaintable->setSortdir(!bSortdir); // Hack! Fake sortdir so we start right 21.348 +// m_pMaintable->sortColumn(nSortcol, bSortdir); 21.349 + 21.350 + // Write nonsaving line numbers for all rows 21.351 + for (int nIter = m_pMaintable->numRows() - 1; nIter >= 0; nIter--) 21.352 + m_pMaintable->setText(nIter, TITRAQ_IDXLINE, QString::number(nIter).rightJustify(4, QChar('0'))); 21.353 + 21.354 + m_pMaintable->setUpdatesEnabled(true); // Update and repaint 21.355 + m_pMaintable->setNumRows(nIter); // No excess rows 21.356 + m_pMaintable->setCurrentCell(nIter - 1, 0); // Move focus to last row 21.357 + m_pMaintable->ensureCellVisible(nIter - 1, 0); // Scroll please 21.358 + 21.359 + if (!bValid) 21.360 + throw Genexcept("Warning: invalid accounting data."); 21.361 +} 21.362 + 21.363 +// 21.364 +// Convenience method to save accounting data to a file 21.365 +// 21.366 +void Titraqform::saveData(QFile &Fileobj) 21.367 +{ 21.368 + if (Fileobj.isOpen()) { // Check state of file 21.369 + Fileobj.flush(); // Begin processing file cleanly 21.370 + QTextStream Asentry(&Fileobj); // Convert data to stream 21.371 + this->saveData(Asentry); // Pass off to do the real work 21.372 + } 21.373 + else { 21.374 + if (!Fileobj.open(IO_WriteOnly)) // Try to open file 21.375 + throw Genexcept(trUtf8(TITRAQ_READPFILFAIL)); 21.376 + QTextStream Asentry(&Fileobj); // Convert data to stream 21.377 + this->saveData(Asentry); // Pass off to do the real work 21.378 + Fileobj.close(); // Finish fileop by closing 21.379 + } 21.380 +} 21.381 + 21.382 +// 21.383 +// Save accounting data to a stream 21.384 +// 21.385 +void Titraqform::saveData(QTextStream &Tstream) 21.386 +{ 21.387 + const int nRows = m_pMaintable->numRows(); // Max rows used in loop 21.388 + QString Tempfield; // Current field string 21.389 + QString Strsearch; // String to strip search 21.390 + QRegExp Stripper("\\s*$"); // Pattern to strip off 21.391 + 21.392 + // Start by prepending the AS data format version symbol 21.393 + Tstream << TITRAQ_DATAPATTERN << TITRAQ_DATAVERSIONMAJ 21.394 + << QChar('.') << TITRAQ_DATAVERSIONMIN << endl; 21.395 + 21.396 + // Linewise save from the main table date, time, account, and others 21.397 + for (int nIter = 0; nIter < nRows; nIter++) { 21.398 + Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXUSER); // Load user field text 21.399 + if (Tempfield != NULL) 21.400 + Tstream << Tempfield; // Save user field text 21.401 + 21.402 + Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXGUID); // Load GUID field text 21.403 + if (Tempfield != NULL) 21.404 + Tstream << trUtf8(" ") << Tempfield; // Save GUID field text 21.405 + 21.406 + Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXCRC); // Load CRC field text 21.407 + Tempfield.remove("0x"); 21.408 + if (Tempfield != NULL) 21.409 + Tstream << trUtf8(" ") << Tempfield; // Save CRC field text 21.410 + 21.411 + Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXREV); // Load rev field text 21.412 + if (Tempfield != NULL) 21.413 + Tstream << trUtf8(" ") << Tempfield; // Save rev field text 21.414 + 21.415 + Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXDATE); // Load date field text 21.416 + if (Tempfield != NULL) 21.417 + Tstream << trUtf8(" ") << Tempfield; // Save date field text 21.418 + 21.419 + Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXSTART); // Load start field text 21.420 + if (Tempfield != NULL) 21.421 + Tstream << trUtf8(" ") << Tempfield; // Save start field text 21.422 + 21.423 + Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXFINISH); // Load end field text 21.424 + if (Tempfield != NULL) 21.425 + Tstream << trUtf8(" ") << Tempfield; // Save end field text 21.426 + 21.427 + Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXAMOUNT); // Load amount field text 21.428 + if (Tempfield != NULL) 21.429 + Tstream << trUtf8(" ") << Tempfield; // Save amount 21.430 + 21.431 + Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXTASK); // Load acct field text 21.432 + if (Tempfield != NULL) 21.433 + Tstream << trUtf8(" ") << Tempfield; // Save acct field text 21.434 + 21.435 + Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXREMARK); // Load remark field text 21.436 + Tstream << trUtf8(" \""); // Save beginning double quote 21.437 + if (Tempfield != NULL) { 21.438 + Strsearch = QRegExp::escape(Tempfield); // Incoming string escaped 21.439 + Stripper.search(Strsearch); 21.440 + Tempfield.truncate(Stripper.pos()); // Cut off whitespace 21.441 + Tempfield.replace(QChar('\\'), QString("\\\\")); // Escape back slashes 21.442 + Tempfield.replace(QChar('\"'), QString("\\\"")); // Escape double quotes 21.443 + Tstream << Tempfield; // Save remark field text 21.444 + } 21.445 + Tstream << trUtf8("\""); // Save ending double quote 21.446 + 21.447 + Tstream << endl; // Append a newline 21.448 + } 21.449 +} 21.450 + 21.451 +// 21.452 +// Convenience method to validate AS data in a file 21.453 +// 21.454 +const bool Titraqform::validateData(QFile &Filin) const 21.455 +{ 21.456 + QString Firstline; // Will contain the first line of text 21.457 + bool bRet = false; // Set the initial return value 21.458 + 21.459 + if (Filin.isOpen()) { // Check open state of file 21.460 + Filin.flush(); // Not sure if this is needed 21.461 + Filin.reset(); // Set the file index position to 0 21.462 + Filin.readLine(Firstline, QString(TITRAQ_DATAPATTERN).length() + 2L); 21.463 + } 21.464 + else { 21.465 + if (!Filin.open(IO_ReadOnly)) // Try to open file 21.466 + throw Genexcept(trUtf8(TITRAQ_READPFILFAIL)); 21.467 + else { // File is now open 21.468 + Filin.readLine(Firstline, QString(TITRAQ_DATAPATTERN).length() + 2L); 21.469 + Filin.close(); // Remember to close 21.470 + } 21.471 + } 21.472 + 21.473 + try { // Pass off to worker method 21.474 + bRet = this->validateData(Firstline); 21.475 + } 21.476 + catch (Genexcept &) { 21.477 + throw; // Rethrow onwards 21.478 + } 21.479 + return bRet; 21.480 +} 21.481 + 21.482 +// 21.483 +// Validate the AS data pattern in a line 21.484 +// 21.485 +const bool Titraqform::validateData(QString &Linin) const 21.486 +{ 21.487 + bool bRet = false; // Initial return value 21.488 + 21.489 + // Ensure that the right data version pattern precedes the data 21.490 + QString Datapattern = QString(TITRAQ_DATAPATTERN); 21.491 + if (!Linin.startsWith(Datapattern)) { // Incompatible data format 21.492 + QMessageBox Problema(QString(TITRAQ_APPTITLE) + ' ' + asgui_version.v_short, 21.493 + TITRAQ_NOPATTERNFOUND + QString(TITRAQ_DATAPATTERN) + TITRAQ_WASNOTFOUNDIN, 21.494 + QMessageBox::Critical, QMessageBox::Ok | QMessageBox::Escape, 21.495 + QMessageBox::NoButton, QMessageBox::NoButton); 21.496 + Problema.exec(); // Give the user the bad news 21.497 + throw Genexcept(TITRAQ_INVALIDDATA); 21.498 + } 21.499 + else if (Linin.section(Datapattern, 1).section('.', 0, 0).toInt() != TITRAQ_DATAVERSIONMAJ) { 21.500 + QMessageBox Problema(QString(TITRAQ_APPTITLE) + ' ' + asgui_version.v_short, 21.501 + TITRAQ_BADVERSIONMAJ, QMessageBox::Warning, QMessageBox::Ok | QMessageBox::Escape, 21.502 + QMessageBox::NoButton, QMessageBox::NoButton); 21.503 + Problema.exec(); // Give the user the bad news 21.504 + throw Genexcept(TITRAQ_INCOMPATDATA); 21.505 + } 21.506 + else if (Linin.section(Datapattern, 1).section('.', 1, 1).toInt() > TITRAQ_DATAVERSIONMIN) { 21.507 + QMessageBox Problema(QString(TITRAQ_APPTITLE) + ' ' + asgui_version.v_short, 21.508 + TITRAQ_BADVERSIONMIN, QMessageBox::Warning, QMessageBox::Ok | QMessageBox::Escape, 21.509 + QMessageBox::NoButton, QMessageBox::NoButton); 21.510 + Problema.exec(); // Give the user the bad news 21.511 + throw Genexcept(TITRAQ_INCOMPATDATA); 21.512 + } 21.513 + else 21.514 + bRet = true; 21.515 + 21.516 + return bRet; // Not reached in case of failure 21.517 +} 21.518 + 21.519 +// 21.520 +// Get a whole row of data 21.521 +// 21.522 +const QString Titraqform::getRowdata(void) const 21.523 +{ 21.524 + QString Rowdata, Tempstring; // For output string 21.525 + QTableSelection Select = m_pMaintable->selection(0); // Highlighted text 21.526 + int nTotal = Select.bottomRow() - Select.topRow() + 1; // Total row select 21.527 + 21.528 + // Calculate rows to delete from selection highlight 21.529 + for (int nIter = 0; nIter < nTotal; ++nIter) { 21.530 + // Build the row data string one field at a time, adding seps inbetween 21.531 + Tempstring = m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXLINE); 21.532 + if (!Tempstring.isEmpty()) 21.533 + Rowdata += Tempstring; 21.534 + Tempstring = m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXUSER); 21.535 + if (!Tempstring.isEmpty()) 21.536 + Rowdata += TITRAQ_SEPARATORTOK + Tempstring; 21.537 + Tempstring = m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXGUID); 21.538 + if (!Tempstring.isEmpty()) 21.539 + Rowdata += TITRAQ_SEPARATORTOK + Tempstring; 21.540 + Tempstring = m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXCRC); 21.541 + if (!Tempstring.isEmpty()) 21.542 + Rowdata += TITRAQ_SEPARATORTOK + Tempstring; 21.543 + Tempstring = m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXREV); 21.544 + if (!Tempstring.isEmpty()) 21.545 + Rowdata += TITRAQ_SEPARATORTOK + Tempstring; 21.546 + Tempstring = m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXDATE); 21.547 + if (!Tempstring.isEmpty()) 21.548 + Rowdata += TITRAQ_SEPARATORTOK + Tempstring; 21.549 + Tempstring = m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXSTART); 21.550 + if (!Tempstring.isEmpty()) 21.551 + Rowdata += TITRAQ_SEPARATORTOK + Tempstring; 21.552 + Tempstring = m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXFINISH); 21.553 + if (!Tempstring.isEmpty()) 21.554 + Rowdata += TITRAQ_SEPARATORTOK + Tempstring; 21.555 + Tempstring = m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXAMOUNT); 21.556 + if (!Tempstring.isEmpty()) 21.557 + Rowdata += TITRAQ_SEPARATORTOK + Tempstring; 21.558 + Tempstring = m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXTASK); 21.559 + if (!Tempstring.isEmpty()) 21.560 + Rowdata += TITRAQ_SEPARATORTOK + Tempstring; 21.561 + Tempstring = m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXREMARK); 21.562 + if (!Tempstring.isEmpty()) 21.563 + Rowdata += TITRAQ_SEPARATORTOK + Tempstring; 21.564 + Rowdata += trUtf8("\n"); // Finish off line 21.565 + } 21.566 + 21.567 + return Rowdata; 21.568 +} 21.569 + 21.570 +// 21.571 +// Set a whole row of data 21.572 +// 21.573 +void Titraqform::setRowdata(QString &Rowdata) const 21.574 +{ 21.575 + int nRows = Rowdata.contains(QChar('\n')); // Set so many rows 21.576 + int nCurrentrow = m_pMaintable->currentRow(); // Current table row 21.577 + QTableItem *pItem = NULL; // Old item to change out 21.578 + QString Line, User, Guid, Crc, Rev; // Admin fields in table 21.579 + QString Date, Start, Finish, Amount, Task, Remark; // Viewable fields in table 21.580 + QTextStream Datastream(&Rowdata, IO_ReadOnly); // Convert data to stream 21.581 + 21.582 + for (int nIter = 0; nIter < nRows; ++nIter) { 21.583 + QString Singlerow = Datastream.readLine(); // For linewise operation 21.584 + QTextStream Rowstream(&Singlerow, IO_ReadOnly); // Convert row to stream 21.585 + 21.586 + Rowstream >> Line >> User >> Guid >> Crc >> Rev; // Stream data fields 21.587 + Rowstream >> Date >> Start >> Finish >> Amount >> Task; // to corresponding vars 21.588 + Remark = Rowstream.readLine(); // Remark is a whole line 21.589 + 21.590 + // Set the table row data one field at a time, skipping seps inbetween 21.591 + // Importantly, do not copy over the GUID, which must be unique each row 21.592 + m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXLINE, Line); 21.593 + m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXUSER, User); 21.594 + m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXCRC, Crc); 21.595 + m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXREV, Rev); 21.596 + m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXDATE, Date); 21.597 + m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXSTART, Start); 21.598 + m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXFINISH, Finish); 21.599 + m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXAMOUNT, Amount); 21.600 + 21.601 +// // FIXME: Why doesn't this code change the RtTableItem text in place? 21.602 +// RtTableItem *pTask = NULL; // Derived and special 21.603 +// pItem = m_pMaintable->item(nCurrentrow + nIter, TITRAQ_IDXTASK); 21.604 +// pTask = static_cast<RtTableItem *>(pItem); 21.605 +// pTask->setText(Task); 21.606 + 21.607 + // Change out old item and replace with new task data 21.608 + pItem = m_pMaintable->item(nCurrentrow + nIter, TITRAQ_IDXTASK); 21.609 + delete(pItem); // Get rid of the old before going with the new 21.610 + RtTableItem *pSwapitem = new RtTableItem(m_pMaintable, QTableItem::WhenCurrent, Task); 21.611 + pSwapitem->setAlignment(AlignLeft | AlignVCenter); 21.612 + m_pMaintable->setItem(nCurrentrow + nIter, TITRAQ_IDXTASK, pSwapitem); 21.613 + 21.614 + // Continue with field processing business as usual 21.615 + m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXREMARK, Remark.simplifyWhiteSpace()); 21.616 + } 21.617 +} 21.618 + 21.619 +// 21.620 +// Discover which column is the first in view 21.621 +// 21.622 +const int Titraqform::getFirstcol(void) const 21.623 +{ 21.624 + int nIter = 0; // Is both iterator in loop and column number returned 21.625 + 21.626 + // Use column selector menu popup as sole key to determining column state 21.627 + while (nIter < TITRAQ_IDXTAIL && !m_pColspopup->isItemChecked(m_pColspopup->idAt(++nIter))) 21.628 + TITRAQ_NOP; 21.629 + 21.630 + return nIter - 1; // Return one less to account for start of item offset 21.631 +}
22.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 22.2 +++ b/as_datedit.h Fri Nov 28 11:21:08 2008 +0100 22.3 @@ -0,0 +1,49 @@ 22.4 +// 22.5 +// OSSP asgui - Accounting system graphical user interface 22.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 22.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 22.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 22.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 22.10 +// 22.11 +// This file is part of OSSP asgui, an accounting system graphical user 22.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 22.13 +// 22.14 +// Permission to use, copy, modify, and distribute this software for 22.15 +// any purpose with or without fee is hereby granted, provided that 22.16 +// the above copyright notice and this permission notice appear in all 22.17 +// copies. 22.18 +// 22.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 22.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 22.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 22.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 22.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 22.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 22.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 22.30 +// SUCH DAMAGE. 22.31 +// 22.32 +// as_datedit.h: ISO C++ interface 22.33 +// 22.34 + 22.35 +#ifndef DATEDIT_H 22.36 +#define DATEDIT_H 22.37 + 22.38 +#include <qdatetimeedit.h> 22.39 + 22.40 +#define TITRAQ_DAYSECTION 2 22.41 + 22.42 +class Daydatedit : public QDateEdit 22.43 +{ 22.44 +public: 22.45 + Daydatedit(QWidget *pParent = 0, const char *m_kszName = NULL) : 22.46 + QDateEdit(pParent, m_kszName) {}; 22.47 + Daydatedit(const QDate &Date, QWidget *pParent = 0, const char *m_kszName = NULL) : 22.48 + QDateEdit(Date, pParent, m_kszName) {}; 22.49 + bool setDayfocus(void) {return setFocusSection(TITRAQ_DAYSECTION);}; 22.50 +}; 22.51 + 22.52 +#endif // DATEDIT_H
23.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 23.2 +++ b/as_except.cpp Fri Nov 28 11:21:08 2008 +0100 23.3 @@ -0,0 +1,47 @@ 23.4 +// 23.5 +// OSSP asgui - Accounting system graphical user interface 23.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 23.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 23.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 23.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 23.10 +// 23.11 +// This file is part of OSSP asgui, an accounting system graphical user 23.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 23.13 +// 23.14 +// Permission to use, copy, modify, and distribute this software for 23.15 +// any purpose with or without fee is hereby granted, provided that 23.16 +// the above copyright notice and this permission notice appear in all 23.17 +// copies. 23.18 +// 23.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 23.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 23.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 23.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 23.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 23.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 23.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 23.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23.30 +// SUCH DAMAGE. 23.31 +// 23.32 +// as_except.cpp: ISO C++ implementation 23.33 +// 23.34 + 23.35 +#include "as_except.h" 23.36 + 23.37 + 23.38 +// Report general exception 23.39 +void Genexcept::reportErr(void) 23.40 +{ 23.41 + QTextOStream Errstream(stderr); 23.42 + 23.43 + // Basically, print the message and exit 23.44 + Errstream << szMessage << endl; 23.45 +} 23.46 + 23.47 +// Destroy general exception 23.48 +Genexcept::~Genexcept(void) 23.49 +{ 23.50 +}
24.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 24.2 +++ b/as_except.h Fri Nov 28 11:21:08 2008 +0100 24.3 @@ -0,0 +1,52 @@ 24.4 +// 24.5 +// OSSP asgui - Accounting system graphical user interface 24.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 24.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 24.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 24.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 24.10 +// 24.11 +// This file is part of OSSP asgui, an accounting system graphical user 24.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 24.13 +// 24.14 +// Permission to use, copy, modify, and distribute this software for 24.15 +// any purpose with or without fee is hereby granted, provided that 24.16 +// the above copyright notice and this permission notice appear in all 24.17 +// copies. 24.18 +// 24.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 24.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 24.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 24.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 24.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 24.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24.30 +// SUCH DAMAGE. 24.31 +// 24.32 +// as_except.h: ISO C++ interface 24.33 +// 24.34 + 24.35 +#ifndef TITRAQEXCEPT_H 24.36 +#define TITRAQEXCEPT_H 24.37 + 24.38 +#include <qtextstream.h> 24.39 + 24.40 + 24.41 +// General string-based exceptions 24.42 +// FIXME: Rewrite according to 24.43 +// OSSP error handling policy 24.44 +class Genexcept 24.45 +{ 24.46 +private: 24.47 + char *szMessage; 24.48 + 24.49 +public: 24.50 + Genexcept(const char *szInmess) {szMessage = (char *)szInmess;}; 24.51 + void reportErr(void); 24.52 + ~Genexcept(void); 24.53 +}; 24.54 + 24.55 +#endif // TITRAQEXCEPT_H
25.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 25.2 +++ b/as_generic.cpp Fri Nov 28 11:21:08 2008 +0100 25.3 @@ -0,0 +1,72 @@ 25.4 +// 25.5 +// OSSP asgui - Accounting system graphical user interface 25.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 25.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 25.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 25.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 25.10 +// 25.11 +// This file is part of OSSP asgui, an accounting system graphical user 25.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 25.13 +// 25.14 +// Permission to use, copy, modify, and distribute this software for 25.15 +// any purpose with or without fee is hereby granted, provided that 25.16 +// the above copyright notice and this permission notice appear in all 25.17 +// copies. 25.18 +// 25.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 25.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 25.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 25.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 25.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 25.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 25.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25.30 +// SUCH DAMAGE. 25.31 +// 25.32 +// as_generic.cpp: ISO C++ implementation 25.33 +// 25.34 + 25.35 +#include <qobject.h> 25.36 + 25.37 +#include "as_generic.h" 25.38 + 25.39 + 25.40 +// Construct a Prototype object 25.41 +Prototype::Prototype() 25.42 +{ 25.43 + // For display of a prototype implementation 25.44 + QString Namever = QString("AS Accounting System"); 25.45 + m_pProtomsg = new QMessageBox(Namever, 25.46 + QObject::trUtf8("This method is not implemented yet."), 25.47 + QMessageBox::NoIcon, QMessageBox::Ok | QMessageBox::Default, 25.48 + QMessageBox::Cancel | QMessageBox::Escape, QMessageBox::NoButton, 25.49 + NULL, "Prototypemsg", true, Qt::WStyle_NormalBorder); 25.50 +} 25.51 + 25.52 +// Destroy a Prototype object 25.53 +Prototype::~Prototype() 25.54 +{ 25.55 + // Destroy our QMessageBox 25.56 + delete m_pProtomsg; 25.57 +} 25.58 + 25.59 +// Display a message box, acting as an implementation prototype 25.60 +void Prototype::doMbox() 25.61 +{ 25.62 + int nRet; // Return value 25.63 + 25.64 + // Launch our QMessageBox 25.65 + nRet = m_pProtomsg->exec(); 25.66 + 25.67 + // Handle message box modality 25.68 + switch (nRet) { 25.69 + case QMessageBox::Ok: 25.70 + break; 25.71 + case QMessageBox::Cancel: 25.72 + default: // Just for sanity 25.73 + break; 25.74 + } 25.75 +}
26.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 26.2 +++ b/as_generic.h Fri Nov 28 11:21:08 2008 +0100 26.3 @@ -0,0 +1,52 @@ 26.4 +// 26.5 +// OSSP asgui - Accounting system graphical user interface 26.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 26.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 26.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 26.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 26.10 +// 26.11 +// This file is part of OSSP asgui, an accounting system graphical user 26.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 26.13 +// 26.14 +// Permission to use, copy, modify, and distribute this software for 26.15 +// any purpose with or without fee is hereby granted, provided that 26.16 +// the above copyright notice and this permission notice appear in all 26.17 +// copies. 26.18 +// 26.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 26.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 26.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 26.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 26.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 26.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 26.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26.30 +// SUCH DAMAGE. 26.31 +// 26.32 +// generic.h: ISO C++ interface 26.33 +// 26.34 + 26.35 +#ifndef GENERIC_H 26.36 +#define GENERIC_H 26.37 + 26.38 +#include <qmessagebox.h> 26.39 + 26.40 + 26.41 +// Prototype stubs for unimplemented methods, widgets, and features 26.42 +class Prototype 26.43 +{ 26.44 +public: 26.45 + Prototype(); 26.46 + void doMbox(); 26.47 + ~Prototype(void); 26.48 + 26.49 +protected: 26.50 + 26.51 +private: 26.52 + QMessageBox *m_pProtomsg; // Display prototype implementation 26.53 +}; 26.54 + 26.55 +#endif // GENERIC_H
27.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 27.2 +++ b/as_gfx/copy.xpm Fri Nov 28 11:21:08 2008 +0100 27.3 @@ -0,0 +1,93 @@ 27.4 +/* XPM */ 27.5 +static const char *s_kpcCopy_xpm[] = { 27.6 +"22 22 68 1", 27.7 +" c None", 27.8 +". c #343434", 27.9 +"+ c #2D2D2D", 27.10 +"@ c #232323", 27.11 +"# c #000000", 27.12 +"$ c #444444", 27.13 +"% c #FDFDFD", 27.14 +"& c #FCFCFC", 27.15 +"* c #D2D2D2", 27.16 +"= c #3C3C3C", 27.17 +"- c #2B2B2B", 27.18 +"; c #EEEEEE", 27.19 +"> c #EDEDED", 27.20 +", c #EFEFEF", 27.21 +"' c #F3F3F3", 27.22 +") c #F5F5F5", 27.23 +"! c #CECECE", 27.24 +"~ c #979797", 27.25 +"{ c #3A3A3A", 27.26 +"] c #595959", 27.27 +"^ c #E1E1E1", 27.28 +"/ c #EAEAEA", 27.29 +"( c #C8C8C8", 27.30 +"_ c #A1A1A1", 27.31 +": c #959595", 27.32 +"< c #515151", 27.33 +"[ c #D7D7D7", 27.34 +"} c #BFBFBF", 27.35 +"| c #F8F8F8", 27.36 +"1 c #4E4E4E", 27.37 +"2 c #C0C0C0", 27.38 +"3 c #BABABA", 27.39 +"4 c #C2C2C2", 27.40 +"5 c #B1B1B1", 27.41 +"6 c #F4F4F4", 27.42 +"7 c #CBCBCB", 27.43 +"8 c #4D4D4D", 27.44 +"9 c #DCDCDC", 27.45 +"0 c #E4E4E4", 27.46 +"a c #F1F1F1", 27.47 +"b c #C7C7C7", 27.48 +"c c #DFDFDF", 27.49 +"d c #C9C9C9", 27.50 +"e c #ECECEC", 27.51 +"f c #E9E9E9", 27.52 +"g c #D6D6D6", 27.53 +"h c #A9A9A9", 27.54 +"i c #D9D9D9", 27.55 +"j c #C3C3C3", 27.56 +"k c #E7E7E7", 27.57 +"l c #9F9F9F", 27.58 +"m c #D3D3D3", 27.59 +"n c #BEBEBE", 27.60 +"o c #E2E2E2", 27.61 +"p c #999999", 27.62 +"q c #B4B4B4", 27.63 +"r c #DDDDDD", 27.64 +"s c #AFAFAF", 27.65 +"t c #D8D8D8", 27.66 +"u c #919191", 27.67 +"v c #ABABAB", 27.68 +"w c #B0B0B0", 27.69 +"x c #808080", 27.70 +"y c #969696", 27.71 +"z c #ACACAC", 27.72 +"A c #A6A6A6", 27.73 +"B c #CACACA", 27.74 +"C c #202020", 27.75 +" ", 27.76 +" .++++++@#$ ", 27.77 +" +%&&&&&*##= ", 27.78 +" -;>;,')!#~#{ ", 27.79 +" .++++++@#]^/(#_:#{ ", 27.80 +" +%&&&&&*##<[}##### ", 27.81 +" +||||||!#~#123245# ", 27.82 +" +6'''''7#_:#8!90!# ", 27.83 +" +a,,,,,b#####3!cd# ", 27.84 +" +efffffg4445#h4ij# ", 27.85 +" +k000000000!#l3mn# ", 27.86 +" +occcccccccd#pq!3# ", 27.87 +" +riiiiiiiiij#:sbq# ", 27.88 +" +tmmmmmmmmmn#uvjw# ", 27.89 +" +m!!!!!!!!!3#xyzA# ", 27.90 +" +!bbbbbbbbbq###### ", 27.91 +" +Bjjjjjjjjjw## ", 27.92 +" CnzzzzzzzzzA# ", 27.93 +" ############# ", 27.94 +" ", 27.95 +" ", 27.96 +" "};
28.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 28.2 +++ b/as_gfx/copyd.xpm Fri Nov 28 11:21:08 2008 +0100 28.3 @@ -0,0 +1,81 @@ 28.4 +/* XPM */ 28.5 +static const char *s_kpcDcopy_xpm[] = { 28.6 +"22 22 56 1", 28.7 +" c None", 28.8 +". c #9A9A9A", 28.9 +"+ c #969696", 28.10 +"@ c #919191", 28.11 +"# c #808080", 28.12 +"$ c #9D9D9D", 28.13 +"% c #FEFEFE", 28.14 +"& c #E9E9E9", 28.15 +"* c #999999", 28.16 +"= c #959595", 28.17 +"- c #F7F7F7", 28.18 +"; c #F6F6F6", 28.19 +"> c #F9F9F9", 28.20 +", c #FAFAFA", 28.21 +"' c #E7E7E7", 28.22 +") c #CBCBCB", 28.23 +"! c #989898", 28.24 +"~ c #ACACAC", 28.25 +"{ c #F0F0F0", 28.26 +"] c #F5F5F5", 28.27 +"^ c #E4E4E4", 28.28 +"/ c #D0D0D0", 28.29 +"( c #CACACA", 28.30 +"_ c #A8A8A8", 28.31 +": c #EBEBEB", 28.32 +"< c #DFDFDF", 28.33 +"[ c #FCFCFC", 28.34 +"} c #A7A7A7", 28.35 +"| c #E0E0E0", 28.36 +"1 c #DDDDDD", 28.37 +"2 c #E1E1E1", 28.38 +"3 c #D8D8D8", 28.39 +"4 c #E5E5E5", 28.40 +"5 c #A6A6A6", 28.41 +"6 c #EEEEEE", 28.42 +"7 c #F2F2F2", 28.43 +"8 c #F8F8F8", 28.44 +"9 c #E3E3E3", 28.45 +"0 c #EFEFEF", 28.46 +"a c #F4F4F4", 28.47 +"b c #D4D4D4", 28.48 +"c c #ECECEC", 28.49 +"d c #F3F3F3", 28.50 +"e c #CFCFCF", 28.51 +"f c #F1F1F1", 28.52 +"g c #CCCCCC", 28.53 +"h c #DADADA", 28.54 +"i c #D7D7D7", 28.55 +"j c #C8C8C8", 28.56 +"k c #D5D5D5", 28.57 +"l c #C0C0C0", 28.58 +"m c #D6D6D6", 28.59 +"n c #D3D3D3", 28.60 +"o c #676767", 28.61 +"p c #626262", 28.62 +"q c #909090", 28.63 +" ", 28.64 +" .++++++@#$ ", 28.65 +" +%%%%%%&##* ", 28.66 +" =-;-->,'#)#! ", 28.67 +" .++++++@#~{]^#/(#! ", 28.68 +" +%%%%%%&##_:<##### ", 28.69 +" +[[[[[['#)#}|1|23# ", 28.70 +" +,>>>>>4#/(#5'67'# ", 28.71 +" +8-----9#####1'0^# ", 28.72 +" +;aaaaa:2223#b2c2# ", 28.73 +" +d777777777'#e1&<# ", 28.74 +" +f000000000^#gh'1# ", 28.75 +" +6ccccccccc2#(i9h# ", 28.76 +" +c&&&&&&&&&<#jk23# ", 28.77 +" +&'''''''''1#l)mn# ", 28.78 +" +'999999999h###### ", 28.79 +" +42222222223#op ", 28.80 +" q<mmmmmmmmmn#p ", 28.81 +" ############# ", 28.82 +" ", 28.83 +" ", 28.84 +" "};
29.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 29.2 +++ b/as_gfx/cut.xpm Fri Nov 28 11:21:08 2008 +0100 29.3 @@ -0,0 +1,57 @@ 29.4 +/* XPM */ 29.5 +static const char *s_kpcCut_xpm[] = { 29.6 +"22 22 32 1", 29.7 +" c None", 29.8 +". c #000000", 29.9 +"+ c #DFDFDF", 29.10 +"@ c #DCDCDC", 29.11 +"# c #D5D5D5", 29.12 +"$ c #C4C4C4", 29.13 +"% c #B2B2B2", 29.14 +"& c #D4D4D4", 29.15 +"* c #B3B3B3", 29.16 +"= c #9D9D9D", 29.17 +"- c #666666", 29.18 +"; c #646464", 29.19 +"> c #434343", 29.20 +", c #DEDEDE", 29.21 +"' c #7D7D7D", 29.22 +") c #787878", 29.23 +"! c #A6A6A6", 29.24 +"~ c #D6D6D6", 29.25 +"{ c #676767", 29.26 +"] c #9E9E9E", 29.27 +"^ c #949494", 29.28 +"/ c #C2C2C2", 29.29 +"( c #A5A5A5", 29.30 +"_ c #AFAFAF", 29.31 +": c #7B7B7B", 29.32 +"< c #B0B0B0", 29.33 +"[ c #C1C1C1", 29.34 +"} c #CBCBCB", 29.35 +"| c #D3D3D3", 29.36 +"1 c #CECECE", 29.37 +"2 c #C5C5C5", 29.38 +"3 c #C7C7C7", 29.39 +" ", 29.40 +" ", 29.41 +" ... ", 29.42 +" ..... ....... ", 29.43 +" ...... .+@#$%. ", 29.44 +" .. .. .+@&*=. ", 29.45 +" .. ... .+@&*=. ", 29.46 +" ... ..-.+@&*=. ", 29.47 +" .....;.+@&*=. ", 29.48 +" ...>.+@&*=. ", 29.49 +" ...,')*=.. ", 29.50 +" ..!~){].. ", 29.51 +" ...^/(.]_. ", 29.52 +" .....:..<[}. ", 29.53 +" .. ... .}||. ", 29.54 +" .. ... .|&|. ", 29.55 +" .. .. .|&|. ", 29.56 +" ...... .123. ", 29.57 +" ...... ..... ", 29.58 +" .... ", 29.59 +" ", 29.60 +" "};
30.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 30.2 +++ b/as_gfx/cutd.xpm Fri Nov 28 11:21:08 2008 +0100 30.3 @@ -0,0 +1,60 @@ 30.4 +/* XPM */ 30.5 +static const char *s_kpcDcut_xpm[] = { 30.6 +"22 22 35 1", 30.7 +" c None", 30.8 +". c #646464", 30.9 +"+ c #808080", 30.10 +"@ c #666666", 30.11 +"# c #686868", 30.12 +"$ c #6B6B6B", 30.13 +"% c #EFEFEF", 30.14 +"& c #EEEEEE", 30.15 +"* c #EAEAEA", 30.16 +"= c #E2E2E2", 30.17 +"- c #D8D8D8", 30.18 +"; c #D9D9D9", 30.19 +"> c #CECECE", 30.20 +", c #6A6A6A", 30.21 +"' c #696969", 30.22 +") c #656565", 30.23 +"! c #676767", 30.24 +"~ c #A6A6A6", 30.25 +"{ c #B2B2B2", 30.26 +"] c #A1A1A1", 30.27 +"^ c #BEBEBE", 30.28 +"/ c #BCBCBC", 30.29 +"( c #CBCBCB", 30.30 +"_ c #EBEBEB", 30.31 +": c #B3B3B3", 30.32 +"< c #CFCFCF", 30.33 +"[ c #C1C1C1", 30.34 +"} c #E1E1E1", 30.35 +"| c #D2D2D2", 30.36 +"1 c #D7D7D7", 30.37 +"2 c #E0E0E0", 30.38 +"3 c #E5E5E5", 30.39 +"4 c #E9E9E9", 30.40 +"5 c #E7E7E7", 30.41 +"6 c #E3E3E3", 30.42 +" ", 30.43 +" ", 30.44 +" .++@ ", 30.45 +" .++++# +++++++ ", 30.46 +" +++$++ +%&*=-+ ", 30.47 +" ++ ++ +%&*;>+. ", 30.48 +" ++ ,+' +%&*;>+) ", 30.49 +" !++ ++~+%&*;>+) ", 30.50 +" !++++{+%&*;>+) ", 30.51 +" !++]+%&*;>+) ", 30.52 +" #++%^/;>+@ ", 30.53 +" !+(_/:<++@ ", 30.54 +" )+++[}|+<1+ ", 30.55 +" .+++++{++-23+ ", 30.56 +" .++ +++ )+344+ ", 30.57 +" ++ ,+$ +4*4+ ", 30.58 +" ++ ++ +4*4+ ", 30.59 +" +++,++ +5=6+ ", 30.60 +" !++++, +++++ ", 30.61 +" !++$ ", 30.62 +" ", 30.63 +" "};
31.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 31.2 +++ b/as_gfx/cwlogo.xpm Fri Nov 28 11:21:08 2008 +0100 31.3 @@ -0,0 +1,85 @@ 31.4 +/* 31.5 +** OSSP asgui - Accounting system graphical user interface 31.6 +** Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 31.7 +** Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 31.8 +** Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 31.9 +** Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 31.10 +** 31.11 +** This file is part of OSSP asgui, an accounting system graphical user 31.12 +** interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 31.13 +** 31.14 +** Permission to use, copy, modify, and distribute this software for 31.15 +** any purpose with or without fee is hereby granted, provided that 31.16 +** the above copyright notice and this permission notice appear in all 31.17 +** copies. 31.18 +** 31.19 +** THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 31.20 +** WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 31.21 +** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 31.22 +** IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 31.23 +** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31.24 +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 31.25 +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 31.26 +** USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 31.27 +** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 31.28 +** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 31.29 +** OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31.30 +** SUCH DAMAGE. 31.31 +** 31.32 +** cwlogo.xpm: X pixmap image 31.33 +*/ 31.34 + 31.35 +/* XPM */ 31.36 +static const char *s_kpcCwlogo_xpm[] = { 31.37 +"42 43 8 1", 31.38 +" c None", 31.39 +". c #004BF3", 31.40 +"+ c #000DCB", 31.41 +"@ c #0000AD", 31.42 +"# c #000090", 31.43 +"$ c #00006D", 31.44 +"% c #002FE3", 31.45 +"& c #0068FF", 31.46 +" .+@@@#@@@@+. ", 31.47 +" +$$$$$#$$$$% ", 31.48 +" .... ", 31.49 +" .%+@####$$% .@+%. ", 31.50 +" %#$$$$##@@@@% +$$$$@. ", 31.51 +" .@@%........%%. .....%+@@. ", 31.52 +" .%+###$$$$$$$$% #$$$#. ", 31.53 +" +@#$$$##@@+++%%%%. %+@@@. ", 31.54 +" .$$#+%.&.%%++@@ .. ", 31.55 +" %.%++@#$$$$$$#. .#$$#@+ ", 31.56 +" .+@$$$$##@+%..&&&..... %+@#$@ +@%. ", 31.57 +" .$$#@%%%% .@##########+ .. +$$$% ", 31.58 +" .+%.%+@#$+ .###@@@@@###+ .+@. ", 31.59 +" .+#$$$$@+. ....%%%%%% .. ", 31.60 +" @$$#++%..+@##$$$$$$$$# .###@ ", 31.61 +" %+%.. @$###@+%%%%%%. @#$# .. ", 31.62 +" %@#$#. ...%%+@@##. @@++%.. #$#@. ", 31.63 +"%$$@+%.++@##$$$$####. #$$$$$##@% %@#$$.", 31.64 +".%..+#$$$$#@++.. %%+#$$+ %+ ", 31.65 +".+@$$#@+%%. +@#########@@@+. .%. ", 31.66 +"+$#+%..+#$$. .#############$$+ ", 31.67 +" .%@#$$$#@% ..%%. .%%%%.. ", 31.68 +"%#$$#@+%%%+@##$$$# @$$$$##@++%% ", 31.69 +"%#+..%@$$$$$#@++%. .%%++@#$$$$$% ", 31.70 +" +$$#@%+%..++@@@######@@% ..%++. ", 31.71 +" %@%%%% @$$$#########$+ ", 31.72 +" .+#$$$ .%.&&&&&..&... .#+. ", 31.73 +" %#$$#@+%.%%++@###$#$$#% %#@++% .$$$#. ", 31.74 +" %#+..%@#$$$$$##@@@@@@@ .#$$$$% .@#. ", 31.75 +" .+#$$$#++%%%%%%% .++%..%%+. ", 31.76 +" .$$@+...+@##$$$$. +$$$@ ", 31.77 +" ..+##$$$$#@@+%. ..+. ", 31.78 +" @$#@++%%%+++@@@@#@@@@ ", 31.79 +" %%..+@#$$$$$$$$$$$$$# .#@+. ", 31.80 +" #$$$@+%%.......... .#$$$# ", 31.81 +" +@.%%+% .#$$$$$$#$##@ %++ ", 31.82 +" @$$$@ +@+++++@@@#@ ", 31.83 +" +@@+..%%%%%+++% .%.. ", 31.84 +" #$$$$$$$$$# #$$$@ ", 31.85 +" .@@+%+%%%.%. %++@+ ", 31.86 +" +@@@@@@% ", 31.87 +" #$#$$$$+ ", 31.88 +" ...... "};
32.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 32.2 +++ b/as_gfx/filenew.xpm Fri Nov 28 11:21:08 2008 +0100 32.3 @@ -0,0 +1,99 @@ 32.4 +/* XPM */ 32.5 +static const char *s_kpcFilenew_xpm[] = { 32.6 +"22 22 74 1", 32.7 +" c None", 32.8 +". c #000000", 32.9 +"+ c #FCFCFC", 32.10 +"@ c #FAFAFA", 32.11 +"# c #E8E8E8", 32.12 +"$ c #ADADAD", 32.13 +"% c #212121", 32.14 +"& c #F8F8F8", 32.15 +"* c #E6E6E6", 32.16 +"= c #ACACAC", 32.17 +"- c #4E4E4E", 32.18 +"; c #747474", 32.19 +"> c #F7F7F7", 32.20 +", c #F5F5F5", 32.21 +"' c #E4E4E4", 32.22 +") c #AAAAAA", 32.23 +"! c #4D4D4D", 32.24 +"~ c #DCDCDC", 32.25 +"{ c #6E6E6E", 32.26 +"] c #F4F4F4", 32.27 +"^ c #F2F2F2", 32.28 +"/ c #E1E1E1", 32.29 +"( c #A7A7A7", 32.30 +"_ c #D0D0D0", 32.31 +": c #686868", 32.32 +"< c #F1F1F1", 32.33 +"[ c #F0F0F0", 32.34 +"} c #EEEEEE", 32.35 +"| c #DDDDDD", 32.36 +"1 c #A6A6A6", 32.37 +"2 c #4C4C4C", 32.38 +"3 c #C4C4C4", 32.39 +"4 c #626262", 32.40 +"5 c #EDEDED", 32.41 +"6 c #EBEBEB", 32.42 +"7 c #A8A8A8", 32.43 +"8 c #575757", 32.44 +"9 c #A2A2A2", 32.45 +"0 c #515151", 32.46 +"a c #E9E9E9", 32.47 +"b c #B7B7B7", 32.48 +"c c #3E3E3E", 32.49 +"d c #2B2B2B", 32.50 +"e c #252525", 32.51 +"f c #1D1D1D", 32.52 +"g c #E7E7E7", 32.53 +"h c #E5E5E5", 32.54 +"i c #E0E0E0", 32.55 +"j c #CFCFCF", 32.56 +"k c #B4B4B4", 32.57 +"l c #A3A3A3", 32.58 +"m c #9E9E9E", 32.59 +"n c #9D9D9D", 32.60 +"o c #767676", 32.61 +"p c #E3E3E3", 32.62 +"q c #DFDFDF", 32.63 +"r c #D5D5D5", 32.64 +"s c #D1D1D1", 32.65 +"t c #9C9C9C", 32.66 +"u c #DBDBDB", 32.67 +"v c #A5A5A5", 32.68 +"w c #D8D8D8", 32.69 +"x c #D4D4D4", 32.70 +"y c #9F9F9F", 32.71 +"z c #CDCDCD", 32.72 +"A c #9A9A9A", 32.73 +"B c #C9C9C9", 32.74 +"C c #979797", 32.75 +"D c #CBCBCB", 32.76 +"E c #C6C6C6", 32.77 +"F c #949494", 32.78 +"G c #C2C2C2", 32.79 +"H c #929292", 32.80 +"I c #838383", 32.81 +" ", 32.82 +" ", 32.83 +" ......... ", 32.84 +" .++++@#$%. ", 32.85 +" .@@@@&*=-;. ", 32.86 +" .&>>>,')!~{. ", 32.87 +" .,]]]^/(!__:. ", 32.88 +" .<[[[}|123334. ", 32.89 +" .}5556~7899990. ", 32.90 +" .6aaa#~bcdeeef. ", 32.91 +" .ghhh'ijklmnno. ", 32.92 +" .p////q~rsjjjt. ", 32.93 +" .i|||||~~uuuuv. ", 32.94 +" .uwwwwwwwwwww9. ", 32.95 +" .wxxxxxxxxxxxy. ", 32.96 +" .rsssssssssssn. ", 32.97 +" .szzzzzzzzzzzA. ", 32.98 +" .zBBBBBBBBBBBC. ", 32.99 +" .DEEEEEEEEEEEF. ", 32.100 +" .GHHHHHHHHHHHI. ", 32.101 +" ............... ", 32.102 +" "};
33.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 33.2 +++ b/as_gfx/fileopen.xpm Fri Nov 28 11:21:08 2008 +0100 33.3 @@ -0,0 +1,131 @@ 33.4 +/* XPM */ 33.5 +static const char *s_kpcFileopen_xpm[] = { 33.6 +"22 22 106 2", 33.7 +" c None", 33.8 +". c #000000", 33.9 +"+ c #ABABAB", 33.10 +"@ c #A3D4A0", 33.11 +"# c #6D8E6B", 33.12 +"$ c #FCFCFC", 33.13 +"% c #FBFBFB", 33.14 +"& c #A9A9A9", 33.15 +"* c #F6F6F6", 33.16 +"= c #F5F5F5", 33.17 +"- c #A6A6A6", 33.18 +"; c #A2A2A2", 33.19 +"> c #EFEFEF", 33.20 +", c #F0F0F0", 33.21 +"' c #F1F1F1", 33.22 +") c #5F7C5E", 33.23 +"! c #617E5F", 33.24 +"~ c #9B9B9B", 33.25 +"{ c #E7E7E7", 33.26 +"] c #E8E8E8", 33.27 +"^ c #EAEAEA", 33.28 +"/ c #9E9E9E", 33.29 +"( c #5C775B", 33.30 +"_ c #8BB589", 33.31 +": c #8DB88B", 33.32 +"< c #617D5F", 33.33 +"[ c #969696", 33.34 +"} c #DFDFDF", 33.35 +"| c #E0E0E0", 33.36 +"1 c #E3E3E3", 33.37 +"2 c #9A9A9A", 33.38 +"3 c #86AE84", 33.39 +"4 c #88B186", 33.40 +"5 c #8AB488", 33.41 +"6 c #8DB88A", 33.42 +"7 c #607D5F", 33.43 +"8 c #909090", 33.44 +"9 c #D6D6D6", 33.45 +"0 c #D7D7D7", 33.46 +"a c #DBDBDB", 33.47 +"b c #959595", 33.48 +"c c #567054", 33.49 +"d c #83AA80", 33.50 +"e c #85AD83", 33.51 +"f c #87B085", 33.52 +"g c #8AB387", 33.53 +"h c #8CB68A", 33.54 +"i c #898989", 33.55 +"j c #CDCDCD", 33.56 +"k c #CFCFCF", 33.57 +"l c #BBBBBB", 33.58 +"m c #7DA27A", 33.59 +"n c #7FA57D", 33.60 +"o c #82A97F", 33.61 +"p c #84AC82", 33.62 +"q c #87AF84", 33.63 +"r c #89B287", 33.64 +"s c #5F7B5D", 33.65 +"t c #838383", 33.66 +"u c #C4C4C4", 33.67 +"v c #A1A1A1", 33.68 +"w c #4F674E", 33.69 +"x c #799D76", 33.70 +"y c #7CA17A", 33.71 +"z c #7EA47C", 33.72 +"A c #81A77E", 33.73 +"B c #83AA81", 33.74 +"C c #7D7D7D", 33.75 +"D c #739570", 33.76 +"E c #769973", 33.77 +"F c #789C76", 33.78 +"G c #7BA079", 33.79 +"H c #7DA37B", 33.80 +"I c #80A77D", 33.81 +"J c #5E7A5D", 33.82 +"K c #B2B2B2", 33.83 +"L c #939393", 33.84 +"M c #485F47", 33.85 +"N c #6F906D", 33.86 +"O c #729470", 33.87 +"P c #759773", 33.88 +"Q c #779B75", 33.89 +"R c #7A9E78", 33.90 +"S c #8B8B8B", 33.91 +"T c #485E46", 33.92 +"U c #6E906D", 33.93 +"V c #71936F", 33.94 +"W c #739772", 33.95 +"X c #769A74", 33.96 +"Y c #6B6B6B", 33.97 +"Z c #848484", 33.98 +"` c #485D46", 33.99 +" . c #70926E", 33.100 +".. c #546D52", 33.101 +"+. c #465C46", 33.102 +"@. c #6C8D6A", 33.103 +"#. c #505050", 33.104 +"$. c #465B45", 33.105 +"%. c #6C8C69", 33.106 +"&. c #4D654C", 33.107 +"*. c #465B44", 33.108 +"=. c #6B8A69", 33.109 +"-. c #4B624A", 33.110 +";. c #455A44", 33.111 +">. c #698968", 33.112 +",. c #4A6149", 33.113 +" ", 33.114 +" . . . . ", 33.115 +" . + . . @ # . . ", 33.116 +" . $ % & . . @ # . . . . ", 33.117 +" . * = = * - . . @ # . @ # . . ", 33.118 +" . . . ; > > > , ' ; . . @ @ @ @ # . . ", 33.119 +". ) ! . . ~ { { { { ] ^ / . . # @ @ @ # . ", 33.120 +". ( _ : < . . [ } } } } | 1 2 . . # @ @ . ", 33.121 +" . 3 4 5 6 7 . . 8 9 9 9 9 0 a b . . @ . ", 33.122 +" . c d e f g h ) . . i j j j j k l . @ . ", 33.123 +" . m n o p q r _ s . . t u u u v . @ . ", 33.124 +" . w x y z A B 3 4 5 s . . C l 2 . @ . ", 33.125 +" . D E F G H I d e f g J . K L . @ . ", 33.126 +" . M N O P Q R m n o p q . & S . @ . ", 33.127 +" . . T U V W X x y z A . Y Z . @ . ", 33.128 +" . . ` # .D E F G ... C . @ . ", 33.129 +" . . +.@.N O P Q . #.. @ . ", 33.130 +" . . $.%.U V &.. . @ . ", 33.131 +" . . *.=.# -.. @ . ", 33.132 +" . . ;.>.@.,.. ", 33.133 +" . . . . ", 33.134 +" "};
34.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 34.2 +++ b/as_gfx/filesave.xpm Fri Nov 28 11:21:08 2008 +0100 34.3 @@ -0,0 +1,67 @@ 34.4 +/* XPM */ 34.5 +static const char *s_kpcFilesave_xpm[] = { 34.6 +"22 22 42 1", 34.7 +" c None", 34.8 +". c #151515", 34.9 +"+ c #000000", 34.10 +"@ c #080808", 34.11 +"# c #4C4C4C", 34.12 +"$ c #7E9B3E", 34.13 +"% c #89B22A", 34.14 +"& c #FFFFFF", 34.15 +"* c #85AF21", 34.16 +"= c #5E8300", 34.17 +"- c #424242", 34.18 +"; c #3A5004", 34.19 +"> c #787878", 34.20 +", c #78A800", 34.21 +"' c #689000", 34.22 +") c #3B3B3B", 34.23 +"! c #86B023", 34.24 +"~ c #394F00", 34.25 +"{ c #668E00", 34.26 +"] c #2C3713", 34.27 +"^ c #1E2A00", 34.28 +"/ c #303A1A", 34.29 +"( c #202D00", 34.30 +"_ c #6C6C6C", 34.31 +": c #858585", 34.32 +"< c #A6A6A6", 34.33 +"[ c #1D2A00", 34.34 +"} c #737373", 34.35 +"| c #A0A0A0", 34.36 +"1 c #B2B2B2", 34.37 +"2 c #727272", 34.38 +"3 c #A8A8A8", 34.39 +"4 c #B7B7B7", 34.40 +"5 c #AAAAAA", 34.41 +"6 c #B8B8B8", 34.42 +"7 c #343434", 34.43 +"8 c #BABABA", 34.44 +"9 c #75A400", 34.45 +"0 c #628800", 34.46 +"a c #1D1D1D", 34.47 +"b c #1C2600", 34.48 +"c c #425B00", 34.49 +" ", 34.50 +" .++++++++++++++@ ", 34.51 +" #$%&&&&&&&&&&&&*=+ ", 34.52 +" -%;&>>>>>>>&>>&,'+ ", 34.53 +" )!~&&&&&&&&&&&&,{+ ", 34.54 +" )!,&>>>>>>>&>>&,{+ ", 34.55 +" )!,&&&&&&&&&&&&,{+ ", 34.56 +" )!,&>>>&>>>&>>&,{+ ", 34.57 +" )!,&&&&&&&&&&&&,{+ ", 34.58 +" )!,&&&&&&&&&&&&,{+ ", 34.59 +" )!,,,,,,,,,,,,,,{+ ", 34.60 +" )!,]++++++++++^,{+ ", 34.61 +" )!,+/(((((_:<[+,{+ ", 34.62 +" )!,+((((((}|1(+,{+ ", 34.63 +" )!,+((((((234(+,{+ ", 34.64 +" )!,+((((((:56(+,{+ ", 34.65 +" 7*,+((((((<18(+90+ ", 34.66 +" a='+bbbbbbbbbb+0c+ ", 34.67 +" +++++++++++++++++ ", 34.68 +" ", 34.69 +" ", 34.70 +" "};
35.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 35.2 +++ b/as_gfx/filesaved.xpm Fri Nov 28 11:21:08 2008 +0100 35.3 @@ -0,0 +1,65 @@ 35.4 +/* XPM */ 35.5 +static const char *s_kpcDfilesave_xpm[] = { 35.6 +"22 22 40 1", 35.7 +" c None", 35.8 +". c #878787", 35.9 +"+ c #808080", 35.10 +"@ c #636363", 35.11 +"# c #9C9C9C", 35.12 +"$ c #B6B6B6", 35.13 +"% c #B7B7B7", 35.14 +"& c #FFFFFF", 35.15 +"* c #B4B4B4", 35.16 +"= c #A0A0A0", 35.17 +"- c #747474", 35.18 +"; c #A1A1A1", 35.19 +"> c #959595", 35.20 +", c #BCBCBC", 35.21 +"' c #AAAAAA", 35.22 +") c #A4A4A4", 35.23 +"! c #9D9D9D", 35.24 +"~ c #939393", 35.25 +"{ c #A3A3A3", 35.26 +"] c #929292", 35.27 +"^ c #8A8A8A", 35.28 +"/ c #8B8B8B", 35.29 +"( c #C2C2C2", 35.30 +"_ c #D3D3D3", 35.31 +": c #B9B9B9", 35.32 +"< c #D0D0D0", 35.33 +"[ c #D9D9D9", 35.34 +"} c #D4D4D4", 35.35 +"| c #DBDBDB", 35.36 +"1 c #D5D5D5", 35.37 +"2 c #DCDCDC", 35.38 +"3 c #9A9A9A", 35.39 +"4 c #DDDDDD", 35.40 +"5 c #A9A9A9", 35.41 +"6 c #A2A2A2", 35.42 +"7 c #838383", 35.43 +"8 c #898989", 35.44 +"9 c #969696", 35.45 +"0 c #767676", 35.46 +"a c #686868", 35.47 +" ", 35.48 +" .+++++++++++++++@ ", 35.49 +" #$%&&&&&&&&&&&&*=- ", 35.50 +" ;%>&,,,,,,,&,,&')+ ", 35.51 +" !*~&&&&&&&&&&&&'{+ ", 35.52 +" !*'&,,,,,,,&,,&'{+ ", 35.53 +" !*'&&&&&&&&&&&&'{+ ", 35.54 +" !*'&,,,&,,,&,,&'{+ ", 35.55 +" !*'&&&&&&&&&&&&'{+ ", 35.56 +" !*'&&&&&&&&&&&&'{+ ", 35.57 +" !*''''''''''''''{+ ", 35.58 +" !*']++++++++++^'{+ ", 35.59 +" !*'+>/////$(_^+'{+ ", 35.60 +" !*'+//////:<[/+'{+ ", 35.61 +" !*'+//////:}|/+'{+ ", 35.62 +" !*'+//////(12/+'{+ ", 35.63 +" 3*'+//////_[4/+56+ ", 35.64 +" 7=)+8888888888+690 ", 35.65 +" @-++++++++++++++0a ", 35.66 +" ", 35.67 +" ", 35.68 +" "};
36.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 36.2 +++ b/as_gfx/osspicon.xpm Fri Nov 28 11:21:08 2008 +0100 36.3 @@ -0,0 +1,175 @@ 36.4 +/* 36.5 +** OSSP asgui - Accounting system graphical user interface 36.6 +** Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 36.7 +** Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 36.8 +** Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 36.9 +** Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 36.10 +** 36.11 +** This file is part of OSSP asgui, an accounting system graphical user 36.12 +** interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 36.13 +** 36.14 +** Permission to use, copy, modify, and distribute this software for 36.15 +** any purpose with or without fee is hereby granted, provided that 36.16 +** the above copyright notice and this permission notice appear in all 36.17 +** copies. 36.18 +** 36.19 +** THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 36.20 +** WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 36.21 +** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 36.22 +** IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 36.23 +** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 36.24 +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 36.25 +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 36.26 +** USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 36.27 +** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 36.28 +** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 36.29 +** OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36.30 +** SUCH DAMAGE. 36.31 +** 36.32 +** osspicon.xpm: X pixmap image 36.33 +*/ 36.34 + 36.35 +/* XPM */ 36.36 +static const char *s_kpcOsspicon_xpm[] = { 36.37 +"22 22 119 2", 36.38 +" c None", 36.39 +". c #F4F4F4", 36.40 +"+ c #FDFDFD", 36.41 +"@ c #C1C1C1", 36.42 +"# c #ECECEC", 36.43 +"$ c #FFFFFF", 36.44 +"% c #FAFAFA", 36.45 +"& c #F5F5F5", 36.46 +"* c #F3F3F3", 36.47 +"= c #F9F9F9", 36.48 +"- c #DEDEDE", 36.49 +"; c #E4E4E4", 36.50 +"> c #B1B1B1", 36.51 +", c #D7D7D7", 36.52 +"' c #FCFCFC", 36.53 +") c #F7F7F7", 36.54 +"! c #F1F1F1", 36.55 +"~ c #EBEBEB", 36.56 +"{ c #818181", 36.57 +"] c #EEEEEE", 36.58 +"^ c #F2F2F2", 36.59 +"/ c #C0C0C0", 36.60 +"( c #F6F6F6", 36.61 +"_ c #D5D5D5", 36.62 +": c #FBFBFB", 36.63 +"< c #FEFEFE", 36.64 +"[ c #767676", 36.65 +"} c #A5A5A5", 36.66 +"| c #D4D4D4", 36.67 +"1 c #CCCCCC", 36.68 +"2 c #D9D9D9", 36.69 +"3 c #E0E0E0", 36.70 +"4 c #E6E6E6", 36.71 +"5 c #E5E5E5", 36.72 +"6 c #E2E2E2", 36.73 +"7 c #CBCBCB", 36.74 +"8 c #E7E7E7", 36.75 +"9 c #CFCFCF", 36.76 +"0 c #C6C6C6", 36.77 +"a c #C4C4C4", 36.78 +"b c #9E9E9E", 36.79 +"c c #B7B7B7", 36.80 +"d c #999999", 36.81 +"e c #C3C3C3", 36.82 +"f c #B4B4B4", 36.83 +"g c #9B9B9B", 36.84 +"h c #D2D2D2", 36.85 +"i c #898989", 36.86 +"j c #BDBDBD", 36.87 +"k c #B6B6B6", 36.88 +"l c #EDEDED", 36.89 +"m c #F8F8F8", 36.90 +"n c #C8C8C8", 36.91 +"o c #F0F0F0", 36.92 +"p c #C9C9C9", 36.93 +"q c #A8A8A8", 36.94 +"r c #929292", 36.95 +"s c #D3D3D3", 36.96 +"t c #B2B2B2", 36.97 +"u c #EFEFEF", 36.98 +"v c #D0D0D0", 36.99 +"w c #DADADA", 36.100 +"x c #DBDBDB", 36.101 +"y c #BCBCBC", 36.102 +"z c #BEBEBE", 36.103 +"A c #9A9A9A", 36.104 +"B c #848484", 36.105 +"C c #D6D6D6", 36.106 +"D c #ACACAC", 36.107 +"E c #BFBFBF", 36.108 +"F c #C7C7C7", 36.109 +"G c #B8B8B8", 36.110 +"H c #D1D1D1", 36.111 +"I c #B9B9B9", 36.112 +"J c #DFDFDF", 36.113 +"K c #A6A6A6", 36.114 +"L c #A9A9A9", 36.115 +"M c #CDCDCD", 36.116 +"N c #B5B5B5", 36.117 +"O c #948A8A", 36.118 +"P c #8C4040", 36.119 +"Q c #955151", 36.120 +"R c #EEEDED", 36.121 +"S c #8D6060", 36.122 +"T c #8F3B3B", 36.123 +"U c #884949", 36.124 +"V c #AAAAAA", 36.125 +"W c #D6D1D1", 36.126 +"X c #AC2E2E", 36.127 +"Y c #B74F4F", 36.128 +"Z c #CCBFBF", 36.129 +"` c #984D4D", 36.130 +" . c #C93232", 36.131 +".. c #9D3333", 36.132 +"+. c #A08585", 36.133 +"@. c #956868", 36.134 +"#. c #AE2C2C", 36.135 +"$. c #CA3333", 36.136 +"%. c #B32E2E", 36.137 +"&. c #B82E2E", 36.138 +"*. c #CB3333", 36.139 +"=. c #9B3535", 36.140 +"-. c #9F6363", 36.141 +";. c #B64141", 36.142 +">. c #CC3333", 36.143 +",. c #CECECE", 36.144 +"'. c #E9E9E9", 36.145 +"). c #F1EDED", 36.146 +"!. c #D4C5C5", 36.147 +"~. c #B93030", 36.148 +"{. c #DBD7D7", 36.149 +"]. c #A82D2D", 36.150 +"^. c #9A3636", 36.151 +"/. c #A3A3A3", 36.152 +"(. c #A1A1A1", 36.153 +"_. c #A49898", 36.154 +":. c #7E2222", 36.155 +"<. c #823434", 36.156 +"[. c #773333", 36.157 +" ", 36.158 +" . + @ # $ % & ", 36.159 +" * + $ $ = - ; > , $ $ ' ) ", 36.160 +"! $ $ $ $ $ ~ { ] $ $ ^ % / ( ( ( ( _ ", 36.161 +" : $ $ $ $ ) & & < $ ! [ } | $ $ $ $ 1 ", 36.162 +" ^ $ < 2 3 $ @ 4 + $ $ 5 - 6 = $ $ $ $ 7 ", 36.163 +" ' 8 9 0 < < $ 3 a < $ $ $ $ 7 ", 36.164 +" ^ * b # c d e f : & - ) $ 7 ", 36.165 +" g h - ( 6 i = j k | $ 7 ", 36.166 +" l m $ $ & n o _ l ( p j q - p c r ", 36.167 +" ! $ $ $ 3 ( s ! $ t u * + + . j ", 36.168 +" ~ $ $ $ : v w 9 + $ + $ $ _ x ; $ $ $ y ", 36.169 +" + $ $ $ $ ( } ' $ $ $ $ 6 n j $ $ $ y ", 36.170 +" & $ $ = z A B & . C ^ $ t n 8 $ $ $ y ", 36.171 +" x D E , ) F G H $ f ! m $ + & I ", 36.172 +" J 2 n K & a z L x M N O P Q R S T U ", 36.173 +" < a o $ V o & + < ( W X Y Z ` ...", 36.174 +" < $ + $ $ h , w $ < +.@.#.$.%.&.*.=.", 36.175 +" < $ $ $ $ 3 n c $ < -.;. .>.>.>.>.=.", 36.176 +" < $ $ $ $ V ,.'.$ $ ).!.~.>.>.>.>.=.", 36.177 +" ' + + + + D ) < < < < {.].>.>.>.>.^.", 36.178 +" q /./././.r (.c c c c _.:.<.<.<.<.[."};
37.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 37.2 +++ b/as_gfx/ossplogo.xpm Fri Nov 28 11:21:08 2008 +0100 37.3 @@ -0,0 +1,275 @@ 37.4 +/* 37.5 +** OSSP asgui - Accounting system graphical user interface 37.6 +** Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 37.7 +** Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 37.8 +** Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 37.9 +** Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 37.10 +** 37.11 +** This file is part of OSSP asgui, an accounting system graphical user 37.12 +** interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 37.13 +** 37.14 +** Permission to use, copy, modify, and distribute this software for 37.15 +** any purpose with or without fee is hereby granted, provided that 37.16 +** the above copyright notice and this permission notice appear in all 37.17 +** copies. 37.18 +** 37.19 +** THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 37.20 +** WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 37.21 +** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 37.22 +** IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 37.23 +** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 37.24 +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 37.25 +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 37.26 +** USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 37.27 +** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 37.28 +** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 37.29 +** OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 37.30 +** SUCH DAMAGE. 37.31 +** 37.32 +** ossplogo.xpm: X pixmap image 37.33 +*/ 37.34 + 37.35 +/* XPM */ 37.36 +static const char *s_kpcOssplogo_xpm[] = { 37.37 +"40 40 201 2", 37.38 +" c None", 37.39 +". c #EAEAEA", 37.40 +"+ c #EFEFEF", 37.41 +"@ c #D5D5D5", 37.42 +"# c #F8F8F8", 37.43 +"$ c #F2F2F2", 37.44 +"% c #E0E0E0", 37.45 +"& c #EDEDED", 37.46 +"* c #F9F9F9", 37.47 +"= c #FEFEFE", 37.48 +"- c #F0F0F0", 37.49 +"; c #7A7A7A", 37.50 +"> c #F5F5F5", 37.51 +", c #FFFFFF", 37.52 +"' c #FBFBFB", 37.53 +") c #F4F4F4", 37.54 +"! c #EBEBEB", 37.55 +"~ c #FAFAFA", 37.56 +"{ c #B3B3B3", 37.57 +"] c #D7D7D7", 37.58 +"^ c #D3D3D3", 37.59 +"/ c #F6F6F6", 37.60 +"( c #FDFDFD", 37.61 +"_ c #EEEEEE", 37.62 +": c #E1E1E1", 37.63 +"< c #F7F7F7", 37.64 +"[ c #D2D2D2", 37.65 +"} c #F1F1F1", 37.66 +"| c #9E9E9E", 37.67 +"1 c #939393", 37.68 +"2 c #A9A9A9", 37.69 +"3 c #ECECEC", 37.70 +"4 c #E4E4E4", 37.71 +"5 c #BABABA", 37.72 +"6 c #929292", 37.73 +"7 c #AFAFAF", 37.74 +"8 c #BBBBBB", 37.75 +"9 c #ADADAD", 37.76 +"0 c #B2B2B2", 37.77 +"a c #DCDCDC", 37.78 +"b c #C6C6C6", 37.79 +"c c #E2E2E2", 37.80 +"d c #D6D6D6", 37.81 +"e c #7C7C7C", 37.82 +"f c #BCBCBC", 37.83 +"g c #DBDBDB", 37.84 +"h c #A7A7A7", 37.85 +"i c #979797", 37.86 +"j c #E8E8E8", 37.87 +"k c #727272", 37.88 +"l c #909090", 37.89 +"m c #818181", 37.90 +"n c #B4B4B4", 37.91 +"o c #949494", 37.92 +"p c #ACACAC", 37.93 +"q c #F3F3F3", 37.94 +"r c #838383", 37.95 +"s c #E5E5E5", 37.96 +"t c #DADADA", 37.97 +"u c #999999", 37.98 +"v c #DFDFDF", 37.99 +"w c #7F7F7F", 37.100 +"x c #AEAEAE", 37.101 +"y c #D1D1D1", 37.102 +"z c #D4D4D4", 37.103 +"A c #E7E7E7", 37.104 +"B c #E3E3E3", 37.105 +"C c #808080", 37.106 +"D c #C2C2C2", 37.107 +"E c #969696", 37.108 +"F c #E9E9E9", 37.109 +"G c #CBCBCB", 37.110 +"H c #A3A3A3", 37.111 +"I c #D0D0D0", 37.112 +"J c #6E6E6E", 37.113 +"K c #A0A0A0", 37.114 +"L c #8A8A8A", 37.115 +"M c #717171", 37.116 +"N c #7E7E7E", 37.117 +"O c #989898", 37.118 +"P c #CDCDCD", 37.119 +"Q c #DDDDDD", 37.120 +"R c #B8B8B8", 37.121 +"S c #A4A4A4", 37.122 +"T c #8F8F8F", 37.123 +"U c #626262", 37.124 +"V c #C1C1C1", 37.125 +"W c #CFCFCF", 37.126 +"X c #919191", 37.127 +"Y c #9F9F9F", 37.128 +"Z c #A2A2A2", 37.129 +"` c #9A9A9A", 37.130 +" . c #848484", 37.131 +".. c #C5C5C5", 37.132 +"+. c #BEBEBE", 37.133 +"@. c #C4C4C4", 37.134 +"#. c #888888", 37.135 +"$. c #FCFCFC", 37.136 +"%. c #BFBFBF", 37.137 +"&. c #9C9C9C", 37.138 +"*. c #8B8B8B", 37.139 +"=. c #6C6C6C", 37.140 +"-. c #CCCCCC", 37.141 +";. c #CACACA", 37.142 +">. c #CECECE", 37.143 +",. c #8C8C8C", 37.144 +"'. c #ABABAB", 37.145 +"). c #B5B5B5", 37.146 +"!. c #696969", 37.147 +"~. c #7D7D7D", 37.148 +"{. c #6F6F6F", 37.149 +"]. c #828282", 37.150 +"^. c #C8C8C8", 37.151 +"/. c #A5A5A5", 37.152 +"(. c #6B6B6B", 37.153 +"_. c #D8D8D8", 37.154 +":. c #8F8B8B", 37.155 +"<. c #9E8F8F", 37.156 +"[. c #917676", 37.157 +"}. c #937878", 37.158 +"|. c #C9C2C2", 37.159 +"1. c #B8AFAF", 37.160 +"2. c #9A8585", 37.161 +"3. c #8D7070", 37.162 +"4. c #9C8585", 37.163 +"5. c #847E7E", 37.164 +"6. c #B9B9B9", 37.165 +"7. c #E6E6E6", 37.166 +"8. c #9D9D9D", 37.167 +"9. c #D9D9D9", 37.168 +"0. c #816E6E", 37.169 +"a. c #852727", 37.170 +"b. c #982727", 37.171 +"c. c #9D2828", 37.172 +"d. c #9B6B6B", 37.173 +"e. c #AFA7A7", 37.174 +"f. c #712626", 37.175 +"g. c #8E2626", 37.176 +"h. c #9C2929", 37.177 +"i. c #6F2323", 37.178 +"j. c #6A6A6A", 37.179 +"k. c #BEB5B5", 37.180 +"l. c #952E2E", 37.181 +"m. c #C53131", 37.182 +"n. c #B62E2E", 37.183 +"o. c #C6AEAE", 37.184 +"p. c #D9D8D8", 37.185 +"q. c #873A3A", 37.186 +"r. c #BF3030", 37.187 +"s. c #C93232", 37.188 +"t. c #7B3030", 37.189 +"u. c #C3C3C3", 37.190 +"v. c #DEDEDE", 37.191 +"w. c #868686", 37.192 +"x. c #D0CBCB", 37.193 +"y. c #8B3131", 37.194 +"z. c #A76565", 37.195 +"A. c #A38787", 37.196 +"B. c #8E6E6E", 37.197 +"C. c #8A3333", 37.198 +"D. c #CC3333", 37.199 +"E. c #C73131", 37.200 +"F. c #773939", 37.201 +"G. c #9B9B9B", 37.202 +"H. c #8F7F7F", 37.203 +"I. c #968B8B", 37.204 +"J. c #9B8D8D", 37.205 +"K. c #8A2828", 37.206 +"L. c #C23131", 37.207 +"M. c #A82C2C", 37.208 +"N. c #9E2828", 37.209 +"O. c #AF2B2B", 37.210 +"P. c #D8D4D4", 37.211 +"Q. c #773333", 37.212 +"R. c #922626", 37.213 +"S. c #902A2A", 37.214 +"T. c #AA2A2A", 37.215 +"U. c #CB3333", 37.216 +"V. c #CA3232", 37.217 +"W. c #898989", 37.218 +"X. c #DCD8D8", 37.219 +"Y. c #873737", 37.220 +"Z. c #B52E2E", 37.221 +"`. c #BD3232", 37.222 +" + c #C83131", 37.223 +".+ c #F3F2F2", 37.224 +"++ c #A37A7A", 37.225 +"@+ c #BC9090", 37.226 +"#+ c #B88080", 37.227 +"$+ c #C03131", 37.228 +"%+ c #C1B0B0", 37.229 +"&+ c #A22E2E", 37.230 +"*+ c #D0CACA", 37.231 +"=+ c #913131", 37.232 +"-+ c #CAC5C5", 37.233 +";+ c #882E2E", 37.234 +">+ c #772424", 37.235 +",+ c #9F2727", 37.236 +"'+ c #A42929", 37.237 +")+ c #A12828", 37.238 +"!+ c #703333", 37.239 +" . . . . . ", 37.240 +" . . . . . . . ", 37.241 +" . + @ . # $ ", 37.242 +" % & * = - ; > , = ' ) & ", 37.243 +" ! ~ , , , = { ] ^ / ' , , , ( > _ ", 37.244 +" : & * = , , , , , < [ } ~ | 1 2 ' , , , , = # } ", 37.245 +"3 * = , , , , , , , , , 4 5 6 7 # , , , , , , = 8 ", 37.246 +" * , , , , , , , , , , 9 4 ( , , , = ) ' ~ 0 a > > > > > > > _ ", 37.247 +" _ , , , , , , , , , , b ) c . # , , , , d e f g h _ , , , , , , , > i ", 37.248 +" : ~ , , , , , , , , , j k j = ( ( , , , , ' l m n * , , , , , , , > o ", 37.249 +" _ , , , , , ' > ( , ' p $ , , , , , , , q r s , , , , , , , , > o ", 37.250 +" c ' , , = t | u a = = v w x y $ , , , , , * z A B - ( , , , , , , , , > o ", 37.251 +" + , , 3 C c B D E E : , , , , , ( F G & = , , , , , , , , > 1 ", 37.252 +" 4 ' , $ H I ( q > ( , , G J K ~ , , , , , , , , > 1 ", 37.253 +" - , = v L / g M N O P q h ) , , ~ ) * , , , > 1 ", 37.254 +" v Q R S T U v V % W X ; _ , 3 Y 6 Z % , , > 1 ", 37.255 +" b 4 ] ! $ * < ` u M - , g ...f d , , > 1 ", 37.256 +" & ~ , , , , , = +. g @. . v s $ ! ` 4 W a & q : #.", 37.257 +" B _ / $., , , , , d { ` & ' / %. F ' $.+ x 9 ` X ` B & 8 &.E *.=.", 37.258 +" < , , , , , , ( Z s , & 6 ^ ( , s 1 t : t B # = / j a @ o ", 37.259 +" & , , , , , , = 2 j , < %.z + / = , v O 3 $.= , , , , , = # *.", 37.260 +" : , , , , , , , Q -. > , , ( ' $.= , , + K ;.>.! , , , , , , * ,.", 37.261 +" $., , , , , , ( 3 # . '.v ( , , , , , , , , = & } c f # , , , , , * ,.", 37.262 +" $ , , , , , , , , , $.{ ).~ , , , , , , , , , ! : g | + , , , , , * ,.", 37.263 +" B , , , , , , , , ( ) 2 !.3 , , , , , , , , ~ ` ~.o S } , , , , , * ,.", 37.264 +" v $., , , , , # P O k {.].% , , / A _ ' , , 3 ,.^.@ v ' , , , , , * ,.", 37.265 +" > ( } F * ' /.(. B , q O L E D = , : 1 A = ( , , , , , , * ,.", 37.266 +" g p ~.=.D # 6 . , } T @.I P = , c ` & ' ' = , , = $.~ / ,.", 37.267 +" u f g c ~ _.L W & c @ : % Z W Q ^._.s ^ :.<.[.}.|.( _ 1.2.3.4.5.", 37.268 +" + * ~ 6.0 e ` 7.( ) Y +.Z 1 8.9.< d h O 6 0.a.b.c.d.# e.f.g.c.h.i.", 37.269 +" * , & j. P * , F .v - F 3 * , ( > 3 j k.l.m.n.o.~ p.q.r.s.m.t.", 37.270 +" * , * u.v.} * = , 7.w.F > $., , , , , < * x.y.m.r.z.A.B.C.r.D.E.F.", 37.271 +" * , , = $.( , , , > G.@.V y = , , , $ H.I.J.K.m.D.L.M.N.O.E.D.E.F.", 37.272 +" * , , , , , , , , , > / . | ) , , , P.Q.R.S.T.s.D.D.U.V.U.D.D.E.F.", 37.273 +" * , , , , , , , , , A z v.W.! , , , X.Y.Z.`. +D.D.D.D.D.D.D.D.E.F.", 37.274 +" * , , , , , , , , $.6 *.E Z - , , , .+++@+#+$+D.D.D.D.D.D.D.D.E.F.", 37.275 +" * , , , , , , , , - C G % B ' , , , = * $.%+&+V.D.D.D.D.D.D.D.E.F.", 37.276 +" * , , , , , , , , s r s = = , , , , , , , *+=+E.D.D.D.D.D.D.D.E.F.", 37.277 +" # = = = = = = = = j W.! = = = = = = = = = -+;+m.D.D.D.D.D.D.D.E.F.", 37.278 +" 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 >+,+'+'+'+'+'+'+'+)+!+"};
38.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 38.2 +++ b/as_gfx/paste.xpm Fri Nov 28 11:21:08 2008 +0100 38.3 @@ -0,0 +1,164 @@ 38.4 +/* XPM */ 38.5 +static const char *s_kpcPaste_xpm[] = { 38.6 +"22 22 139 2", 38.7 +" c None", 38.8 +". c #000000", 38.9 +"+ c #4B4B4B", 38.10 +"@ c #929292", 38.11 +"# c #B6B6B6", 38.12 +"$ c #B5B5B5", 38.13 +"% c #B4B4B4", 38.14 +"& c #8B8B8B", 38.15 +"* c #434343", 38.16 +"= c #493E26", 38.17 +"- c #8E784B", 38.18 +"; c #382F1D", 38.19 +"> c #B1B1B1", 38.20 +", c #AAAAAA", 38.21 +"' c #A8A8A8", 38.22 +") c #A7A7A7", 38.23 +"! c #505050", 38.24 +"~ c #342C19", 38.25 +"{ c #8B723C", 38.26 +"] c #493918", 38.27 +"^ c #9B8351", 38.28 +"/ c #AB8C4A", 38.29 +"( c #A9A9A9", 38.30 +"_ c #373737", 38.31 +": c #A68536", 38.32 +"< c #5B471D", 38.33 +"[ c #B19559", 38.34 +"} c #A58338", 38.35 +"| c #4E3E19", 38.36 +"1 c #4A3A18", 38.37 +"2 c #A88436", 38.38 +"3 c #413315", 38.39 +"4 c #AF9357", 38.40 +"5 c #A38136", 38.41 +"6 c #A38034", 38.42 +"7 c #A17E34", 38.43 +"8 c #9C7A32", 38.44 +"9 c #987832", 38.45 +"0 c #967631", 38.46 +"a c #977732", 38.47 +"b c #987831", 38.48 +"c c #9B7A31", 38.49 +"d c #A27F34", 38.50 +"e c #372A12", 38.51 +"f c #A38134", 38.52 +"g c #A48136", 38.53 +"h c #A58134", 38.54 +"i c #A48236", 38.55 +"j c #A28034", 38.56 +"k c #343434", 38.57 +"l c #2D2D2D", 38.58 +"m c #262626", 38.59 +"n c #0A0A0A", 38.60 +"o c #AF9256", 38.61 +"p c #A48234", 38.62 +"q c #A68336", 38.63 +"r c #A88536", 38.64 +"s c #AA8637", 38.65 +"t c #AB8737", 38.66 +"u c #A78336", 38.67 +"v c #FCFCFC", 38.68 +"w c #D2D2D2", 38.69 +"x c #303030", 38.70 +"y c #AE9256", 38.71 +"z c #A18034", 38.72 +"A c #A78537", 38.73 +"B c #A98537", 38.74 +"C c #AB8738", 38.75 +"D c #F7F7F7", 38.76 +"E c #F6F6F6", 38.77 +"F c #CDCDCD", 38.78 +"G c #969696", 38.79 +"H c #AD9156", 38.80 +"I c #A17F33", 38.81 +"J c #A58136", 38.82 +"K c #A88537", 38.83 +"L c #AA8737", 38.84 +"M c #F2F2F2", 38.85 +"N c #F0F0F0", 38.86 +"O c #C8C8C8", 38.87 +"P c #9E9E9E", 38.88 +"Q c #939393", 38.89 +"R c #AC9155", 38.90 +"S c #9F7E33", 38.91 +"T c #A17F34", 38.92 +"U c #A68236", 38.93 +"V c #A78436", 38.94 +"W c #A98637", 38.95 +"X c #A07E34", 38.96 +"Y c #ECECEC", 38.97 +"Z c #E9E9E9", 38.98 +"` c #C2C2C2", 38.99 +" . c #AB9056", 38.100 +".. c #9E7C33", 38.101 +"+. c #A17E33", 38.102 +"@. c #A98536", 38.103 +"#. c #E6E6E6", 38.104 +"$. c #E3E3E3", 38.105 +"%. c #D0D0D0", 38.106 +"&. c #BDBDBD", 38.107 +"*. c #ABABAB", 38.108 +"=. c #AA8F55", 38.109 +"-. c #9D7B33", 38.110 +";. c #9F7D33", 38.111 +">. c #A28136", 38.112 +",. c #A58236", 38.113 +"'. c #9D7C33", 38.114 +"). c #DFDFDF", 38.115 +"!. c #DCDCDC", 38.116 +"~. c #C7C7C7", 38.117 +"{. c #AA8F54", 38.118 +"]. c #9C7B32", 38.119 +"^. c #9F7C33", 38.120 +"/. c #A07E33", 38.121 +"(. c #D9D9D9", 38.122 +"_. c #D4D4D4", 38.123 +":. c #C0C0C0", 38.124 +"<. c #A88D53", 38.125 +"[. c #9A7932", 38.126 +"}. c #9D7C32", 38.127 +"|. c #A28134", 38.128 +"1. c #A58336", 38.129 +"2. c #9B7B33", 38.130 +"3. c #D3D3D3", 38.131 +"4. c #CECECE", 38.132 +"5. c #BABABA", 38.133 +"6. c #8A723C", 38.134 +"7. c #977731", 38.135 +"8. c #9C7B33", 38.136 +"9. c #9B7A32", 38.137 +"0. c #B3B3B3", 38.138 +"a. c #3B2F13", 38.139 +"b. c #433616", 38.140 +"c. c #3C3013", 38.141 +"d. c #332810", 38.142 +"e. c #342A10", 38.143 +"f. c #362A12", 38.144 +"g. c #202020", 38.145 +"h. c #AEAEAE", 38.146 +" ", 38.147 +" . . . . . ", 38.148 +" . . + @ # $ % & * . . ", 38.149 +" = - ; @ > , ' ' ) ! ~ { ] ", 38.150 +" . ^ / . ( + _ _ _ _ _ . : < . ", 38.151 +" . [ } | . . . . . . . 1 2 3 . ", 38.152 +" . 4 5 6 7 8 9 0 a 0 b c d e . ", 38.153 +" . 4 f g h 5 f i j k l l l m . n ", 38.154 +" . o j p q r s t u l v v v w . . x ", 38.155 +" . y z 5 q A B C j l D E E F . G . x ", 38.156 +" . H I j J q K L 7 l M N N O . P Q . x ", 38.157 +" . R S T f U V W X l Y Z Z ` . . . . . ", 38.158 +" . ...+.j p q @...l #.$.$.%.&.&.&.*.. ", 38.159 +" . =.-.;.T >.,.V '.l ).!.!.!.!.!.!.~.. ", 38.160 +" . {.].^./.j g q '.l (._._._._._._.:.. . ", 38.161 +" . <.[.}.S T |.1.2.l 3.4.4.4.4.4.4.5.. . ", 38.162 +" . 6.7.8.;.X j p 9.l F ~.~.~.~.~.~.0.. . ", 38.163 +" a.b.c.d.e.e.f.d.g.:.h.h.h.h.h.h.' . . ", 38.164 +" . . . . . . . . . . . . . . . . . ", 38.165 +" . . . . . . . ", 38.166 +" ", 38.167 +" "};
39.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 39.2 +++ b/as_gfx/pasted.xpm Fri Nov 28 11:21:08 2008 +0100 39.3 @@ -0,0 +1,104 @@ 39.4 +/* XPM */ 39.5 +static const char *s_kpcDpaste_xpm[] = { 39.6 +"22 22 79 1", 39.7 +" c None", 39.8 +". c #727272", 39.9 +"+ c #808080", 39.10 +"@ c #737373", 39.11 +"# c #A5A5A5", 39.12 +"$ c #C9C9C9", 39.13 +"% c #DBDBDB", 39.14 +"& c #DADADA", 39.15 +"* c #C5C5C5", 39.16 +"= c #A1A1A1", 39.17 +"- c #646464", 39.18 +"; c #9B9B9B", 39.19 +"> c #B6B6B6", 39.20 +", c #959595", 39.21 +"' c #D8D8D8", 39.22 +") c #D5D5D5", 39.23 +"! c #D4D4D4", 39.24 +"~ c #D3D3D3", 39.25 +"{ c #A8A8A8", 39.26 +"] c #939393", 39.27 +"^ c #B1B1B1", 39.28 +"/ c #989898", 39.29 +"( c #767676", 39.30 +"_ c #BBBBBB", 39.31 +": c #BDBDBD", 39.32 +"< c #B7B7B7", 39.33 +"[ c #9E9E9E", 39.34 +"} c #777777", 39.35 +"| c #C2C2C2", 39.36 +"1 c #999999", 39.37 +"2 c #C1C1C1", 39.38 +"3 c #B5B5B5", 39.39 +"4 c #B3B3B3", 39.40 +"5 c #B2B2B2", 39.41 +"6 c #929292", 39.42 +"7 c #9A9A9A", 39.43 +"8 c #969696", 39.44 +"9 c #858585", 39.45 +"0 c #B8B8B8", 39.46 +"a c #FEFEFE", 39.47 +"b c #E9E9E9", 39.48 +"c c #FBFBFB", 39.49 +"d c #E6E6E6", 39.50 +"e c #CBCBCB", 39.51 +"f c #949494", 39.52 +"g c #C0C0C0", 39.53 +"h c #F9F9F9", 39.54 +"i c #F8F8F8", 39.55 +"j c #E4E4E4", 39.56 +"k c #CFCFCF", 39.57 +"l c #B4B4B4", 39.58 +"m c #F6F6F6", 39.59 +"n c #F4F4F4", 39.60 +"o c #E1E1E1", 39.61 +"p c #F3F3F3", 39.62 +"q c #F1F1F1", 39.63 +"r c #E8E8E8", 39.64 +"s c #DEDEDE", 39.65 +"t c #BFBFBF", 39.66 +"u c #EFEFEF", 39.67 +"v c #EEEEEE", 39.68 +"w c #E3E3E3", 39.69 +"x c #656565", 39.70 +"y c #ECECEC", 39.71 +"z c #EAEAEA", 39.72 +"A c #E0E0E0", 39.73 +"B c #676767", 39.74 +"C c #BEBEBE", 39.75 +"D c #E7E7E7", 39.76 +"E c #DDDDDD", 39.77 +"F c #D9D9D9", 39.78 +"G c #909090", 39.79 +"H c #919191", 39.80 +"I c #D7D7D7", 39.81 +"J c #626262", 39.82 +"K c #636363", 39.83 +"L c #6A6A6A", 39.84 +"M c #696969", 39.85 +"N c #666666", 39.86 +" ", 39.87 +" .+++@ ", 39.88 +" .+#$%&&*=+@ ", 39.89 +" -;>,$')!!~{]^/- ", 39.90 +" (_:+!#;;;;;+<[} ", 39.91 +" +|<1+++++++/<,+ ", 39.92 +" +2>3345^5^5436+ ", 39.93 +" +23>>>3>37888]+9 ", 39.94 +" +23><<00<8aaab++, ", 39.95 +" +23><<0038cccd+e+f ", 39.96 +" +g33><<038hiij+k$+f ", 39.97 +" +gl33<<038mnno+++++ ", 39.98 +" +gl33><<l8pqqrsss)+- ", 39.99 +" +tll3>><l8uvvvvvvw+x ", 39.100 +" +t4ll3><l8yzzzzzzA+B ", 39.101 +" +C44l33>48bDDDDDDE+B ", 39.102 +" }^54l33>48dwwwwwwF+B ", 39.103 +" -]8]GHH6GGAIIIIII!+B ", 39.104 +" J@++++++++++++++++- ", 39.105 +" KBLMBBNB- ", 39.106 +" ", 39.107 +" "};
40.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 40.2 +++ b/as_gfx/prefs.xpm Fri Nov 28 11:21:08 2008 +0100 40.3 @@ -0,0 +1,104 @@ 40.4 +/* XPM */ 40.5 +static const char *s_kpcPrefs_xpm[] = { 40.6 +"22 22 79 1", 40.7 +" c None", 40.8 +". c #000000", 40.9 +"+ c #4E5A31", 40.10 +"@ c #96B15E", 40.11 +"# c #8FAD4D", 40.12 +"$ c #43551C", 40.13 +"% c #B4DA62", 40.14 +"& c #A7D444", 40.15 +"* c #72912F", 40.16 +"= c #96BD3C", 40.17 +"- c #68832B", 40.18 +"; c #344315", 40.19 +"> c #454547", 40.20 +", c #D9D9DF", 40.21 +"' c #D6D6DD", 40.22 +") c #D3D3DA", 40.23 +"! c #424244", 40.24 +"~ c #CDCDD6", 40.25 +"{ c #828288", 40.26 +"] c #343437", 40.27 +"^ c #3C3C3F", 40.28 +"/ c #909096", 40.29 +"( c #CBCBD4", 40.30 +"_ c #858589", 40.31 +": c #434345", 40.32 +"< c #682121", 40.33 +"[ c #CA3F3F", 40.34 +"} c #CA2727", 40.35 +"| c #670000", 40.36 +"1 c #CDCDD5", 40.37 +"2 c #D1D1D9", 40.38 +"3 c #D4D4DC", 40.39 +"4 c #DEDEE4", 40.40 +"5 c #E9E9EA", 40.41 +"6 c #E6E6E9", 40.42 +"7 c #5C5C5C", 40.43 +"8 c #FF3232", 40.44 +"9 c #FE0000", 40.45 +"0 c #AE0000", 40.46 +"a c #858585", 40.47 +"b c #989898", 40.48 +"c c #B4B4B4", 40.49 +"d c #CECECE", 40.50 +"e c #E0E0E0", 40.51 +"f c #DFDFDF", 40.52 +"g c #9A9A9A", 40.53 +"h c #E30000", 40.54 +"i c #9E0000", 40.55 +"j c #444446", 40.56 +"k c #D4D4D4", 40.57 +"l c #919191", 40.58 +"m c #500000", 40.59 +"n c #939398", 40.60 +"o c #B1B1B9", 40.61 +"p c #A7A7AF", 40.62 +"q c #A3A3AB", 40.63 +"r c #A3A3AA", 40.64 +"s c #ABABB1", 40.65 +"t c #B6B6B8", 40.66 +"u c #ADADAF", 40.67 +"v c #494949", 40.68 +"w c #D8D8DF", 40.69 +"x c #98989E", 40.70 +"y c #919198", 40.71 +"z c #A1A1A8", 40.72 +"A c #4E4E51", 40.73 +"B c #323234", 40.74 +"C c #404043", 40.75 +"D c #ACACB4", 40.76 +"E c #9A9AA1", 40.77 +"F c #303032", 40.78 +"G c #4A552D", 40.79 +"H c #87A054", 40.80 +"I c #7E9944", 40.81 +"J c #3B4C19", 40.82 +"K c #93AE5C", 40.83 +"L c #AFD45F", 40.84 +"M c #A1CC42", 40.85 +"N c #6F8B2D", 40.86 +" ", 40.87 +" .. ", 40.88 +" +@#$ ", 40.89 +" .@%&*. ", 40.90 +" .#&=-. ", 40.91 +" $*-; ", 40.92 +" ...... ", 40.93 +" .>,'')!. ", 40.94 +" .~{]^/(_:.......... ", 40.95 +" ..<[}|/123'''''4567 ", 40.96 +" .[890!(aaaabcdeefg. ", 40.97 +" .}9hij(aaabcdeeekl. ", 40.98 +" ..|0imnopqrrrrrstuv ", 40.99 +" .wxjjyzAB.......... ", 40.100 +" .CDrrEF. ", 40.101 +" ...... ", 40.102 +" GHIJ ", 40.103 +" .KLMN. ", 40.104 +" .#&=-. ", 40.105 +" $*-; ", 40.106 +" .. ", 40.107 +" "};
41.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 41.2 +++ b/as_gfx/qticon.xpm Fri Nov 28 11:21:08 2008 +0100 41.3 @@ -0,0 +1,221 @@ 41.4 +/* XPM */ 41.5 +static const char *s_kpcQticon_xpm[] = { 41.6 +"22 22 196 2", 41.7 +" c None", 41.8 +". c #A2C510", 41.9 +"+ c #A2C512", 41.10 +"@ c #A2C511", 41.11 +"# c #A2C513", 41.12 +"$ c #92AD1B", 41.13 +"% c #57661C", 41.14 +"& c #29320F", 41.15 +"* c #141B07", 41.16 +"= c #161C07", 41.17 +"- c #293310", 41.18 +"; c #566814", 41.19 +"> c #90AE1F", 41.20 +", c #A1C513", 41.21 +"' c #A2C514", 41.22 +") c #59691B", 41.23 +"! c #090B09", 41.24 +"~ c #020203", 41.25 +"{ c #020204", 41.26 +"] c #010204", 41.27 +"^ c #000103", 41.28 +"/ c #02020A", 41.29 +"( c #080D0A", 41.30 +"_ c #56691A", 41.31 +": c #3F4C12", 41.32 +"< c #030203", 41.33 +"[ c #030209", 41.34 +"} c #131608", 41.35 +"| c #2C3512", 41.36 +"1 c #2C3613", 41.37 +"2 c #13190A", 41.38 +"3 c #020408", 41.39 +"4 c #020306", 41.40 +"5 c #010307", 41.41 +"6 c #596919", 41.42 +"7 c #030304", 41.43 +"8 c #050203", 41.44 +"9 c #14170B", 41.45 +"0 c #6E8018", 41.46 +"a c #A2BC1E", 41.47 +"b c #A4C316", 41.48 +"c c #A2C515", 41.49 +"d c #9EBF1E", 41.50 +"e c #6C8220", 41.51 +"f c #14180B", 41.52 +"g c #020206", 41.53 +"h c #030403", 41.54 +"i c #58681A", 41.55 +"j c #090B06", 41.56 +"k c #131709", 41.57 +"l c #8DA824", 41.58 +"m c #A2C411", 41.59 +"n c #A2C50F", 41.60 +"o c #A2C610", 41.61 +"p c #A2C51B", 41.62 +"q c #6E8815", 41.63 +"r c #9BBC22", 41.64 +"s c #8CA823", 41.65 +"t c #12180A", 41.66 +"u c #090A06", 41.67 +"v c #93AB21", 41.68 +"w c #030303", 41.69 +"x c #020208", 41.70 +"y c #6F8119", 41.71 +"z c #A2C50D", 41.72 +"A c #A1C413", 41.73 +"B c #A2C70C", 41.74 +"C c #5B6D1F", 41.75 +"D c #04060A", 41.76 +"E c #323F11", 41.77 +"F c #9ABA1B", 41.78 +"G c #6D831E", 41.79 +"H c #58651D", 41.80 +"I c #29330F", 41.81 +"J c #020106", 41.82 +"K c #12150B", 41.83 +"L c #A2C60C", 41.84 +"M c #A2C60E", 41.85 +"N c #A0C310", 41.86 +"O c #5C6E1B", 41.87 +"P c #030507", 41.88 +"Q c #020305", 41.89 +"R c #040605", 41.90 +"S c #6E871B", 41.91 +"T c #9FBD20", 41.92 +"U c #111705", 41.93 +"V c #010102", 41.94 +"W c #2B330F", 41.95 +"X c #141B06", 41.96 +"Y c #010105", 41.97 +"Z c #2D3514", 41.98 +"` c #A3C316", 41.99 +" . c #A3C415", 41.100 +".. c #5C6E1D", 41.101 +"+. c #040703", 41.102 +"@. c #020107", 41.103 +"#. c #030307", 41.104 +"$. c #5D6B1C", 41.105 +"%. c #9FC219", 41.106 +"&. c #2D3711", 41.107 +"*. c #010203", 41.108 +"=. c #161B09", 41.109 +"-. c #2C3612", 41.110 +";. c #A2C41B", 41.111 +">. c #5B6C1F", 41.112 +",. c #040607", 41.113 +"'. c #010202", 41.114 +"). c #030306", 41.115 +"!. c #5D6B20", 41.116 +"~. c #9FC412", 41.117 +"{. c #A0C317", 41.118 +"]. c #161B08", 41.119 +"^. c #283210", 41.120 +"/. c #020209", 41.121 +"(. c #12190A", 41.122 +"_. c #6E8916", 41.123 +":. c #04070B", 41.124 +"<. c #030406", 41.125 +"[. c #040407", 41.126 +"}. c #040405", 41.127 +"|. c #5A6E1A", 41.128 +"1. c #9FBC21", 41.129 +"2. c #13170A", 41.130 +"3. c #020105", 41.131 +"4. c #2B3411", 41.132 +"5. c #566716", 41.133 +"6. c #020507", 41.134 +"7. c #9CBC21", 41.135 +"8. c #323F12", 41.136 +"9. c #050705", 41.137 +"0. c #5E6B1E", 41.138 +"a. c #5E6C21", 41.139 +"b. c #040404", 41.140 +"c. c #020202", 41.141 +"d. c #030606", 41.142 +"e. c #373E1B", 41.143 +"f. c #040302", 41.144 +"g. c #030205", 41.145 +"h. c #586817", 41.146 +"i. c #93AD20", 41.147 +"j. c #0A0C0A", 41.148 +"k. c #020207", 41.149 +"l. c #8BA823", 41.150 +"m. c #9ABB1A", 41.151 +"n. c #6E871C", 41.152 +"o. c #9FC318", 41.153 +"p. c #9FC315", 41.154 +"q. c #5A6D1D", 41.155 +"r. c #030603", 41.156 +"s. c #010101", 41.157 +"t. c #090C04", 41.158 +"u. c #90AE19", 41.159 +"v. c #596719", 41.160 +"w. c #030207", 41.161 +"x. c #020205", 41.162 +"y. c #121909", 41.163 +"z. c #6D821D", 41.164 +"A. c #A0BE1E", 41.165 +"B. c #A0BD21", 41.166 +"C. c #383F1C", 41.167 +"D. c #374114", 41.168 +"E. c #020307", 41.169 +"F. c #131905", 41.170 +"G. c #2D3611", 41.171 +"H. c #2C3610", 41.172 +"I. c #12160A", 41.173 +"J. c #030602", 41.174 +"K. c #5C711B", 41.175 +"L. c #59681B", 41.176 +"M. c #010104", 41.177 +"N. c #020304", 41.178 +"O. c #030103", 41.179 +"P. c #090C03", 41.180 +"Q. c #040800", 41.181 +"R. c #5A6F19", 41.182 +"S. c #93AB20", 41.183 +"T. c #161A09", 41.184 +"U. c #161A08", 41.185 +"V. c #2C3411", 41.186 +"W. c #596817", 41.187 +"X. c #A2C417", 41.188 +"Y. c #5C701B", 41.189 +"Z. c #5A6E19", 41.190 +"`. c #A3C41C", 41.191 +" + c #A3C612", 41.192 +".+ c #A4C511", 41.193 +"++ c #A3C312", 41.194 +"@+ c #A2C01D", 41.195 +"#+ c #A4C220", 41.196 +"$+ c #A4C31A", 41.197 +"%+ c #A3C412", 41.198 +"&+ c #A2C413", 41.199 +"*+ c #A1C511", 41.200 +"=+ c #A1C512", 41.201 +"-+ c #A1C416", 41.202 +";+ c #A2C60F", 41.203 +" . . . + + @ @ @ + . ", 41.204 +" . . . . + + + + + + + + + . . . ", 41.205 +" . + . + + + + + + + + + + + + @ @ @ ", 41.206 +" . @ # . + + $ % & * = - ; > + + , # @ . ", 41.207 +" . @ , ' + ) ! ~ { ] ^ / / ( _ + ' . . . ", 41.208 +" . + + + : < [ / } | 1 2 3 4 5 : + + + . ", 41.209 +". . + + 6 7 8 9 0 a b c d e f g h i + + @ @ ", 41.210 +". + + $ j { k l m n o p q r s t ] u v + + @ ", 41.211 +". + + % w x y z A B + C D E F G 4 { H + + @ ", 41.212 +"+ + + I J K a L M N O P Q R S T U V W + + @ ", 41.213 +"+ + + X Y Z ` . ...+.@.#.$.%.c &.*.=.+ + + ", 41.214 +"+ + + = ^ -.c ;.>.,.g '.).!.~.{.&.] ].+ + + ", 41.215 +"+ + + ^./.(.d _.:.<.[.).J }.|.1.2.3.4.+ + + ", 41.216 +"+ + + 5./ 6.e 7.8.9.0.a.b.c.d.e.f.g.h.+ + + ", 41.217 +"@ + + i.j.k.f l.m.n.o.p.q.r.V V s.t.u.+ + + ", 41.218 +"@ @ + + v.w.x.y.z.A.# , B.C.V s.w D.+ + + @ ", 41.219 +" . + + + : }.] E.F.G.H.I.g.V w c.J.K.+ . ", 41.220 +" . . . ' + L.j ~ M.N.] ~ O.P.D.J.Q.R.@ . ", 41.221 +" . + # , + + S.H W T.U.V.W.u.X.Y.Z.`.@ . ", 41.222 +" . @ @ + +.+++++@+#+$+%++ &++ . + . ", 41.223 +" . . . + @ @ @ @ *+=+-+. ;+. . . ", 41.224 +" @ @ @ + + + + + @ @ "};
42.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 42.2 +++ b/as_gfx/refresh.xpm Fri Nov 28 11:21:08 2008 +0100 42.3 @@ -0,0 +1,124 @@ 42.4 +/* 42.5 +** OSSP asgui - Accounting system graphical user interface 42.6 +** Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 42.7 +** Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 42.8 +** Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 42.9 +** Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 42.10 +** 42.11 +** This file is part of OSSP asgui, an accounting system graphical user 42.12 +** interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 42.13 +** 42.14 +** Permission to use, copy, modify, and distribute this software for 42.15 +** any purpose with or without fee is hereby granted, provided that 42.16 +** the above copyright notice and this permission notice appear in all 42.17 +** copies. 42.18 +** 42.19 +** THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 42.20 +** WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 42.21 +** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 42.22 +** IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 42.23 +** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 42.24 +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 42.25 +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 42.26 +** USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 42.27 +** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 42.28 +** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 42.29 +** OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 42.30 +** SUCH DAMAGE. 42.31 +** 42.32 +** refresh.xpm: X pixmap image 42.33 +*/ 42.34 + 42.35 +/* XPM */ 42.36 +static const char *s_kpcRefresh_xpm[] = { 42.37 +"22 22 68 1", 42.38 +" c None", 42.39 +". c #000000", 42.40 +"+ c #624F1D", 42.41 +"@ c #A7852B", 42.42 +"# c #997514", 42.43 +"$ c #906C0D", 42.44 +"% c #4B3704", 42.45 +"& c #0F0C04", 42.46 +"* c #BE9A38", 42.47 +"= c #A87E0E", 42.48 +"- c #9B7100", 42.49 +"; c #956C00", 42.50 +"> c #8D6600", 42.51 +", c #7F5C00", 42.52 +"' c #090600", 42.53 +") c #A38128", 42.54 +"! c #B6870A", 42.55 +"~ c #AB7C00", 42.56 +"{ c #A37700", 42.57 +"] c #906900", 42.58 +"^ c #594100", 42.59 +"/ c #271C00", 42.60 +"( c #7E5C00", 42.61 +"_ c #201806", 42.62 +": c #1F1808", 42.63 +"< c #D5AA36", 42.64 +"[ c #C4920D", 42.65 +"} c #B98700", 42.66 +"| c #B28200", 42.67 +"1 c #A47700", 42.68 +"2 c #5C4300", 42.69 +"3 c #9B791E", 42.70 +"4 c #342500", 42.71 +"5 c #C99917", 42.72 +"6 c #C19828", 42.73 +"7 c #D39C07", 42.74 +"8 c #C99200", 42.75 +"9 c #C18C00", 42.76 +"0 c #AA7C00", 42.77 +"a c #674B00", 42.78 +"b c #100B00", 42.79 +"c c #433000", 42.80 +"d c #EEB315", 42.81 +"e c #E9AD0B", 42.82 +"f c #E1A70A", 42.83 +"g c #D89D00", 42.84 +"h c #D19800", 42.85 +"i c #BC8900", 42.86 +"j c #362700", 42.87 +"k c #F3B715", 42.88 +"l c #EDAD00", 42.89 +"m c #E6A800", 42.90 +"n c #DFA200", 42.91 +"o c #C38E00", 42.92 +"p c #745400", 42.93 +"q c #0D0900", 42.94 +"r c #F8BA15", 42.95 +"s c #F2B000", 42.96 +"t c #FDBE15", 42.97 +"u c #F8B500", 42.98 +"v c #EEAD00", 42.99 +"w c #D99E00", 42.100 +"x c #4F3900", 42.101 +"y c #513B00", 42.102 +"z c #523B00", 42.103 +"A c #543D00", 42.104 +"B c #563E00", 42.105 +"C c #705100", 42.106 +" ", 42.107 +" ... ", 42.108 +" .+@#$%. ", 42.109 +" &*=-;>,' ", 42.110 +" . .)!~{]^/(. ", 42.111 +" ._ :<[}|12. 34 ", 42.112 +" .5.67890ab c ", 42.113 +" .defghia. j ", 42.114 +" .klmnopq . ", 42.115 +" .rslm(. ", 42.116 +" .tusvw. .xyzABC. ", 42.117 +" .CBAzyx. .wvsut ", 42.118 +" .(mlsr ", 42.119 +" . qponmlk ", 42.120 +" j .aihgfed ", 42.121 +" c ba09876.5 ", 42.122 +" 43 .21|}[<: _ ", 42.123 +" .(/^]{~!). ", 42.124 +" ',>;-=*& ", 42.125 +" .%$#@+. ", 42.126 +" ... ", 42.127 +" "};
43.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 43.2 +++ b/as_gfx/refreshd.xpm Fri Nov 28 11:21:08 2008 +0100 43.3 @@ -0,0 +1,108 @@ 43.4 +/* 43.5 +** OSSP asgui - Accounting system graphical user interface 43.6 +** Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 43.7 +** Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 43.8 +** Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 43.9 +** Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 43.10 +** 43.11 +** This file is part of OSSP asgui, an accounting system graphical user 43.12 +** interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 43.13 +** 43.14 +** Permission to use, copy, modify, and distribute this software for 43.15 +** any purpose with or without fee is hereby granted, provided that 43.16 +** the above copyright notice and this permission notice appear in all 43.17 +** copies. 43.18 +** 43.19 +** THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 43.20 +** WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 43.21 +** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 43.22 +** IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 43.23 +** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43.24 +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 43.25 +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 43.26 +** USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 43.27 +** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 43.28 +** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 43.29 +** OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 43.30 +** SUCH DAMAGE. 43.31 +** 43.32 +** refreshd.xpm: X pixmap image 43.33 +*/ 43.34 + 43.35 +/* XPM */ 43.36 +static const char *s_kpcDrefresh_xpm[] = { 43.37 +"22 22 52 1", 43.38 +" g None", 43.39 +". g #7F7F7F", 43.40 +"+ g #A1A1A1", 43.41 +"@ g #BABABA", 43.42 +"# g #B3B3B3", 43.43 +"$ g #AFAFAF", 43.44 +"% g #979797", 43.45 +"& g #848484", 43.46 +"* g #C4C4C4", 43.47 +"= g #B7B7B7", 43.48 +"- g #B1B1B1", 43.49 +"; g #ACACAC", 43.50 +"> g #A7A7A7", 43.51 +", g #828282", 43.52 +"' g #B8B8B8", 43.53 +") g #BBBBBB", 43.54 +"! g #B6B6B6", 43.55 +"~ g #B4B4B4", 43.56 +"{ g #ADADAD", 43.57 +"] g #9B9B9B", 43.58 +"^ g #8B8B8B", 43.59 +"/ g #898989", 43.60 +"( g #CCCCCC", 43.61 +"_ g #C0C0C0", 43.62 +": g #B9B9B9", 43.63 +"< g #9C9C9C", 43.64 +"[ g #B5B5B5", 43.65 +"} g #8F8F8F", 43.66 +"| g #C3C3C3", 43.67 +"1 g #C5C5C5", 43.68 +"2 g #BEBEBE", 43.69 +"3 g #A0A0A0", 43.70 +"4 g #949494", 43.71 +"5 g #D1D1D1", 43.72 +"6 g #CECECE", 43.73 +"7 g #CBCBCB", 43.74 +"8 g #C6C6C6", 43.75 +"9 g #BCBCBC", 43.76 +"0 g #909090", 43.77 +"a g #D3D3D3", 43.78 +"b g #C8C8C8", 43.79 +"c g #BFBFBF", 43.80 +"d g #A4A4A4", 43.81 +"e g #838383", 43.82 +"f g #D4D4D4", 43.83 +"g g #CFCFCF", 43.84 +"h g #D7D7D7", 43.85 +"i g #D2D2D2", 43.86 +"j g #989898", 43.87 +"k g #999999", 43.88 +"l g #9A9A9A", 43.89 +"m g #A2A2A2", 43.90 +" ", 43.91 +" ... ", 43.92 +" .+@#$%. ", 43.93 +" &*=-$;>, ", 43.94 +" . .')!~{]^>. ", 43.95 +" ./ /(_):~<. [} ", 43.96 +" .*.|1_2!3& 4 ", 43.97 +" .5678|93. 0 ", 43.98 +" .a67bcde . ", 43.99 +" .fg67>. ", 43.100 +" .hig68. .jkkklm. ", 43.101 +" .mlkkkj. .86gih ", 43.102 +" .>76gf ", 43.103 +" . edcb76a ", 43.104 +" 0 .39|8765 ", 43.105 +" 4 &3!2_1|.* ", 43.106 +" }[ .<~:)_(/ / ", 43.107 +" .>^]{~!)'. ", 43.108 +" ,>;$-=*& ", 43.109 +" .%$#@+. ", 43.110 +" ... ", 43.111 +" "};
44.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 44.2 +++ b/as_gfx/report.xpm Fri Nov 28 11:21:08 2008 +0100 44.3 @@ -0,0 +1,128 @@ 44.4 +/* XPM */ 44.5 +static const char *s_kpcReport_xpm[] = { 44.6 +"22 22 103 2", 44.7 +" c None", 44.8 +". c #525252", 44.9 +"+ c #393939", 44.10 +"@ c #262626", 44.11 +"# c #4E4E4E", 44.12 +"$ c #383838", 44.13 +"% c #4F4F4F", 44.14 +"& c #AFAF8A", 44.15 +"* c #656558", 44.16 +"= c #3B3B37", 44.17 +"- c #4C4C4C", 44.18 +"; c #ABABAB", 44.19 +"> c #4B4B4B", 44.20 +", c #191919", 44.21 +"' c #454545", 44.22 +") c #AFAF86", 44.23 +"! c #5F5F57", 44.24 +"~ c #898989", 44.25 +"{ c #494949", 44.26 +"] c #F4F4F4", 44.27 +"^ c #E1E1E1", 44.28 +"/ c #8C8C8C", 44.29 +"( c #0A0A0A", 44.30 +"_ c #3A3A3A", 44.31 +": c #3E3E3E", 44.32 +"< c #404040", 44.33 +"[ c #414141", 44.34 +"} c #424242", 44.35 +"| c #202020", 44.36 +"1 c #444444", 44.37 +"2 c #ACAC84", 44.38 +"3 c #B9B9B9", 44.39 +"4 c #DFDFDF", 44.40 +"5 c #B5B5B5", 44.41 +"6 c #000000", 44.42 +"7 c #363636", 44.43 +"8 c #3B3B3B", 44.44 +"9 c #444439", 44.45 +"0 c #737358", 44.46 +"a c #7B7B58", 44.47 +"b c #ABAB83", 44.48 +"c c #B6B6B6", 44.49 +"d c #BEBEBE", 44.50 +"e c #E2E2E2", 44.51 +"f c #F6F6F6", 44.52 +"g c #FFFFFF", 44.53 +"h c #C7C7C7", 44.54 +"i c #2B2B20", 44.55 +"j c #868660", 44.56 +"k c #AAAA82", 44.57 +"l c #B8B8B8", 44.58 +"m c #E0E0E0", 44.59 +"n c #F5F5F5", 44.60 +"o c #E8E8E8", 44.61 +"p c #7A7A58", 44.62 +"q c #E6E6E6", 44.63 +"r c #737353", 44.64 +"s c #727252", 44.65 +"t c #717151", 44.66 +"u c #3F3F3F", 44.67 +"v c #F3F3F3", 44.68 +"w c #464646", 44.69 +"x c #D9D9D9", 44.70 +"y c #B7B7B7", 44.71 +"z c #434343", 44.72 +"A c #41413A", 44.73 +"B c #A2A2A2", 44.74 +"C c #6B6B6B", 44.75 +"D c #ACACAC", 44.76 +"E c #B0B0B0", 44.77 +"F c #020202", 44.78 +"G c #A7A780", 44.79 +"H c #595942", 44.80 +"I c #919191", 44.81 +"J c #707070", 44.82 +"K c #2C2C2C", 44.83 +"L c #181818", 44.84 +"M c #BDBDBD", 44.85 +"N c #FCFCFC", 44.86 +"O c #232323", 44.87 +"P c #7A7A5A", 44.88 +"Q c #99996F", 44.89 +"R c #5F5F45", 44.90 +"S c #191913", 44.91 +"T c #2D2D2D", 44.92 +"U c #0D0D0D", 44.93 +"V c #676767", 44.94 +"W c #606060", 44.95 +"X c #D1D1D1", 44.96 +"Y c #23231A", 44.97 +"Z c #464631", 44.98 +"` c #777755", 44.99 +" . c #7A7A57", 44.100 +".. c #0F0F0C", 44.101 +"+. c #56563E", 44.102 +"@. c #232319", 44.103 +"#. c #4D4D37", 44.104 +"$. c #606044", 44.105 +"%. c #656549", 44.106 +"&. c #6B6B4E", 44.107 +"*. c #6E6E4F", 44.108 +"=. c #707051", 44.109 +"-. c #5E5E43", 44.110 +" ", 44.111 +" . + @ # $ ", 44.112 +" % & * = - ; > , ", 44.113 +" ' ) ! ~ { ] ^ / ( _ : < [ } } _ | ", 44.114 +" 1 2 { 3 1 ] 4 5 6 7 : } 1 8 9 0 a 6 ", 44.115 +" 1 b 1 c 1 ] 4 c 6 d e f g g h i j 6 ", 44.116 +" 1 k 1 5 1 ] 4 c 6 l m n g g o 6 p 6 ", 44.117 +" 1 k 1 5 1 ] 4 c 6 l 4 ] g g q 6 r 6 ", 44.118 +" 1 k 1 5 1 ] 4 c 6 c 4 ] g g q 6 s 6 ", 44.119 +" 1 k 1 5 1 ] 4 c 6 c 4 ] g g q 6 t 6 ", 44.120 +" 1 k 1 5 1 ] 4 c 6 c 4 ] g g q 6 t 6 ", 44.121 +" 1 k 1 5 1 ] 4 c 6 c 4 ] g g q 6 t 6 ", 44.122 +" 1 k 1 c u v 4 c 6 c 4 ] g g q 6 t 6 ", 44.123 +" 1 k u c w x 4 c 6 y 4 ] g g q 6 t 6 ", 44.124 +" z b A B C C D E F y 4 n g g q 6 t 6 ", 44.125 +" _ G H # I J 6 K L M e f g N m 6 s 6 ", 44.126 +" O P Q R S T U V W c X 4 q m B Y r 6 ", 44.127 +" 6 Z ` .6 ..6 6 6 6 6 6 6 Y +.` 6 ", 44.128 +" 6 6 @.F #.$.%.&.*.=.t s r ` -.6 ", 44.129 +" 6 6 6 6 6 6 6 6 6 6 6 6 6 ", 44.130 +" ", 44.131 +" "};
45.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 45.2 +++ b/as_gfx/reportd.xpm Fri Nov 28 11:21:08 2008 +0100 45.3 @@ -0,0 +1,106 @@ 45.4 +/* XPM */ 45.5 +static const char *s_kpcDreport_xpm[] = { 45.6 +"22 22 81 1", 45.7 +" c None", 45.8 +". c #9D9D9D", 45.9 +"+ c #9A9A9A", 45.10 +"@ c #838383", 45.11 +"# c #979797", 45.12 +"$ c #8C8C8C", 45.13 +"% c #A5A5A5", 45.14 +"& c #CECECE", 45.15 +"* c #AFAFAF", 45.16 +"= c #9C9C9C", 45.17 +"- c #D5D5D5", 45.18 +"; c #848484", 45.19 +"> c #A2A2A2", 45.20 +", c #CDCDCD", 45.21 +"' c #ADADAD", 45.22 +") c #C4C4C4", 45.23 +"! c #A4A4A4", 45.24 +"~ c #FAFAFA", 45.25 +"{ c #F0F0F0", 45.26 +"] c #C6C6C6", 45.27 +"^ c #858585", 45.28 +"/ c #9F9F9F", 45.29 +"( c #A0A0A0", 45.30 +"_ c #A1A1A1", 45.31 +": c #626262", 45.32 +"< c #CCCCCC", 45.33 +"[ c #DCDCDC", 45.34 +"} c #EFEFEF", 45.35 +"| c #DADADA", 45.36 +"1 c #808080", 45.37 +"2 c #9B9B9B", 45.38 +"3 c #B2B2B2", 45.39 +"4 c #B4B4B4", 45.40 +"5 c #757575", 45.41 +"6 c #CBCBCB", 45.42 +"7 c #DBDBDB", 45.43 +"8 c #DFDFDF", 45.44 +"9 c #F1F1F1", 45.45 +"0 c #FBFBFB", 45.46 +"a c #FFFFFF", 45.47 +"b c #E3E3E3", 45.48 +"c c #929292", 45.49 +"d c #B9B9B9", 45.50 +"e c #F4F4F4", 45.51 +"f c #F3F3F3", 45.52 +"g c #B1B1B1", 45.53 +"h c #B0B0B0", 45.54 +"i c #F9F9F9", 45.55 +"j c #A3A3A3", 45.56 +"k c #ECECEC", 45.57 +"l c #9E9E9E", 45.58 +"m c #D1D1D1", 45.59 +"n c #B5B5B5", 45.60 +"o c #D6D6D6", 45.61 +"p c #D8D8D8", 45.62 +"q c #818181", 45.63 +"r c #C9C9C9", 45.64 +"s c #A6A6A6", 45.65 +"t c #A7A7A7", 45.66 +"u c #C8C8C8", 45.67 +"v c #B8B8B8", 45.68 +"w c #969696", 45.69 +"x c #DEDEDE", 45.70 +"y c #FEFEFE", 45.71 +"z c #C2C2C2", 45.72 +"A c #A9A9A9", 45.73 +"B c #8B8B8B", 45.74 +"C c #868686", 45.75 +"D c #B3B3B3", 45.76 +"E c #E8E8E8", 45.77 +"F c #8F8F8F", 45.78 +"G c #7D7D7D", 45.79 +"H c #696969", 45.80 +"I c #797979", 45.81 +"J c #ABABAB", 45.82 +"K c #AEAEAE", 45.83 +"L c #A8A8A8", 45.84 +"M c #777777", 45.85 +"N c #646464", 45.86 +"O c #727272", 45.87 +"P c #787878", 45.88 +" ", 45.89 +" .+@ #$ ", 45.90 +" %&*=%-%; ", 45.91 +" >,')!~{]^./((__.^: ", 45.92 +" ><![>~}|12/_>./345 ", 45.93 +" >6>7>~}71890aabcd1 ", 45.94 +" >6>|>~}71[{~aae141 ", 45.95 +" >6>|>~}71[}~aaf1g1 ", 45.96 +" >6>|>~}717}~aaf1g1 ", 45.97 +" >6>|>~}717}~aaf1h1 ", 45.98 +" >6>|>~}717}~aaf1h1 ", 45.99 +" >6>|>~}717}~aaf1h1 ", 45.100 +" >6>7/i}717}~aaf1h1 ", 45.101 +" >6/7jk}717}~aaf1h1 ", 45.102 +" _6lmnnopq7}~aaf1h1 ", 45.103 +" 2rstuv1w$x90ay{1g1 ", 45.104 +" ^nzABwCDh7E}f{mFg1 ", 45.105 +" G.D41C1111111F%D1 ", 45.106 +" HIF1_AJK*hhggDLM ", 45.107 +" NOP111111111MH ", 45.108 +" ", 45.109 +" "};
46.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 46.2 +++ b/as_gfx/revcolour.xpm Fri Nov 28 11:21:08 2008 +0100 46.3 @@ -0,0 +1,38 @@ 46.4 +/* 46.5 +** OSSP asgui - Accounting system graphical user interface 46.6 +** Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 46.7 +** Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 46.8 +** Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 46.9 +** Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 46.10 +** 46.11 +** This file is part of OSSP asgui, an accounting system graphical user 46.12 +** interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 46.13 +** 46.14 +** Permission to use, copy, modify, and distribute this software for 46.15 +** any purpose with or without fee is hereby granted, provided that 46.16 +** the above copyright notice and this permission notice appear in all 46.17 +** copies. 46.18 +** 46.19 +** THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 46.20 +** WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 46.21 +** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 46.22 +** IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 46.23 +** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 46.24 +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 46.25 +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 46.26 +** USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 46.27 +** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 46.28 +** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 46.29 +** OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 46.30 +** SUCH DAMAGE. 46.31 +** 46.32 +** revcolour.xpm: X pixmap image 46.33 +*/ 46.34 + 46.35 +/* XPM */ 46.36 +static const char *s_kpcRevcolour_xpm[] = { 46.37 +"2 1 3 1", 46.38 +" c None", 46.39 +". c #F8F8F0", 46.40 +"+ c #E0E0D8", 46.41 +".+"};
47.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 47.2 +++ b/as_gfx/rowadd.xpm Fri Nov 28 11:21:08 2008 +0100 47.3 @@ -0,0 +1,139 @@ 47.4 +/* 47.5 +** OSSP asgui - Accounting system graphical user interface 47.6 +** Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 47.7 +** Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 47.8 +** Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 47.9 +** Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 47.10 +** 47.11 +** This file is part of OSSP asgui, an accounting system graphical user 47.12 +** interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 47.13 +** 47.14 +** Permission to use, copy, modify, and distribute this software for 47.15 +** any purpose with or without fee is hereby granted, provided that 47.16 +** the above copyright notice and this permission notice appear in all 47.17 +** copies. 47.18 +** 47.19 +** THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 47.20 +** WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 47.21 +** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 47.22 +** IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 47.23 +** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 47.24 +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 47.25 +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 47.26 +** USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 47.27 +** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 47.28 +** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 47.29 +** OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 47.30 +** SUCH DAMAGE. 47.31 +** 47.32 +** rowadd.xpm: X pixmap image 47.33 +*/ 47.34 + 47.35 +/* XPM */ 47.36 +static const char *s_kpcRowadd_xpm[] = { 47.37 +"22 22 83 1", 47.38 +" c None", 47.39 +". c #878787", 47.40 +"+ c #737373", 47.41 +"@ c #676767", 47.42 +"# c #585858", 47.43 +"$ c #2A2A2A", 47.44 +"% c #DCDCDC", 47.45 +"& c #FDFDFD", 47.46 +"* c #3F3F3F", 47.47 +"= c #4E4E4E", 47.48 +"- c #A7A7A7", 47.49 +"; c #C1C1C1", 47.50 +"> c #000000", 47.51 +", c #FCFCFC", 47.52 +"' c #FAFAFA", 47.53 +") c #797979", 47.54 +"! c #A4A4A4", 47.55 +"~ c #CACACA", 47.56 +"{ c #A3A3A3", 47.57 +"] c #A2A2A2", 47.58 +"^ c #555555", 47.59 +"/ c #8E8E8E", 47.60 +"( c #6B6B6B", 47.61 +"_ c #818181", 47.62 +": c #F6F6F6", 47.63 +"< c #F3F3F3", 47.64 +"[ c #A1A1A1", 47.65 +"} c #F0F0F0", 47.66 +"| c #9E9E9E", 47.67 +"1 c #BFBFBF", 47.68 +"2 c #6C6C6C", 47.69 +"3 c #959595", 47.70 +"4 c #4C4C4C", 47.71 +"5 c #8D8D8D", 47.72 +"6 c #9B9B9B", 47.73 +"7 c #D4D4D4", 47.74 +"8 c #DFDFDF", 47.75 +"9 c #E3E3E3", 47.76 +"0 c #969696", 47.77 +"a c #B4B4B4", 47.78 +"b c #656565", 47.79 +"c c #D2D2D2", 47.80 +"d c #DEDEDE", 47.81 +"e c #DDDDDD", 47.82 +"f c #939393", 47.83 +"g c #B1B1B1", 47.84 +"h c #9ECDFB", 47.85 +"i c #0098E0", 47.86 +"j c #CCCCCC", 47.87 +"k c #8F8F8F", 47.88 +"l c #5F5F5F", 47.89 +"m c #727272", 47.90 +"n c #787878", 47.91 +"o c #2EB8FF", 47.92 +"p c #0064E0", 47.93 +"q c #C3C3C3", 47.94 +"r c #CFCFCF", 47.95 +"s c #D5D5D5", 47.96 +"t c #8C8C8C", 47.97 +"u c #AAAAAA", 47.98 +"v c #12B4FF", 47.99 +"w c #007BE0", 47.100 +"x c #D0D0D0", 47.101 +"y c #898989", 47.102 +"z c #A6A6A6", 47.103 +"A c #A2CEFF", 47.104 +"B c #00A9E0", 47.105 +"C c #11B4FF", 47.106 +"D c #22B6FF", 47.107 +"E c #868686", 47.108 +"F c #00AFE0", 47.109 +"G c #009BE0", 47.110 +"H c #0084E0", 47.111 +"I c #006500", 47.112 +"J c #0058E0", 47.113 +"K c #005100", 47.114 +"L c #004500", 47.115 +"M c #C0C0C0", 47.116 +"N c #C2C2C2", 47.117 +"O c #BEBEBE", 47.118 +"P c #C4C4C4", 47.119 +"Q c #636363", 47.120 +"R c #9F9F9F", 47.121 +" .+@@@@@@@@@@@@@#$ ", 47.122 +" .%&&&*=&&&&&&&-&&;> ", 47.123 +" @,'''=)'''''''!''~> ", 47.124 +" @{]]]^/]]]]]]](]]_> ", 47.125 +" @:<<<^/<<<<<<<[<<;> ", 47.126 +" @<}}}^/}}}}}}}|}}1> ", 47.127 +" @*=^^2332^^^^^^^^^> ", 47.128 +" @4)//3[[35////////> ", 47.129 +"6@7777778999999099a> ", 47.130 +"6@7@>>>bcd8e888f88g> ", 47.131 +"6@7>hhi>jkkkkkklkkm> ", 47.132 +"6ne>hop>qr777sstssu> ", 47.133 +">>>>hvw>>>bcxxxyxxz> ", 47.134 +">hhhAvBCDi>jEEE#EE(> ", 47.135 +">hovvFGGHI>qxxxtxxu> ", 47.136 +">ipwBGJKLL>Mxxxyxxz> ", 47.137 +">>>>CGK>>>^NEEE#EE(> ", 47.138 +"66O>DHL>PPPPPPPtPPu> ", 47.139 +" @6>iIL>PPPPPPPtPPu> ", 47.140 +" @ >>>>>0000000Q05R> ", 47.141 +" @>>>>>>>>>>>>>>>>>> ", 47.142 +" "};
48.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 48.2 +++ b/as_gfx/rowaddd.xpm Fri Nov 28 11:21:08 2008 +0100 48.3 @@ -0,0 +1,120 @@ 48.4 +/* 48.5 +** OSSP asgui - Accounting system graphical user interface 48.6 +** Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 48.7 +** Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 48.8 +** Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 48.9 +** Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 48.10 +** 48.11 +** This file is part of OSSP asgui, an accounting system graphical user 48.12 +** interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 48.13 +** 48.14 +** Permission to use, copy, modify, and distribute this software for 48.15 +** any purpose with or without fee is hereby granted, provided that 48.16 +** the above copyright notice and this permission notice appear in all 48.17 +** copies. 48.18 +** 48.19 +** THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 48.20 +** WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 48.21 +** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 48.22 +** IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 48.23 +** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 48.24 +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 48.25 +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 48.26 +** USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 48.27 +** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 48.28 +** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 48.29 +** OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 48.30 +** SUCH DAMAGE. 48.31 +** 48.32 +** rowaddd.xpm: X pixmap image 48.33 +*/ 48.34 + 48.35 +/* XPM */ 48.36 +static const char *s_kpcDrowadd_xpm[] = { 48.37 +"22 22 64 1", 48.38 +" g None", 48.39 +". g #BBBBBB", 48.40 +"+ g #B2B2B2", 48.41 +"@ g #ACACAC", 48.42 +"# g #A5A5A5", 48.43 +"$ g #919191", 48.44 +"% g #E7E7E7", 48.45 +"& g #FDFDFD", 48.46 +"* g #9A9A9A", 48.47 +"= g #A1A1A1", 48.48 +"- g #CBCBCB", 48.49 +"; g #D8D8D8", 48.50 +"> g #7F7F7F", 48.51 +", g #FCFCFC", 48.52 +"' g #FAFAFA", 48.53 +") g #B5B5B5", 48.54 +"! g #C9C9C9", 48.55 +"~ g #DDDDDD", 48.56 +"{ g #C8C8C8", 48.57 +"] g #A4A4A4", 48.58 +"^ g #BFBFBF", 48.59 +"/ g #AEAEAE", 48.60 +"( g #B8B8B8", 48.61 +"_ g #F7F7F7", 48.62 +": g #F5F5F5", 48.63 +"< g #F3F3F3", 48.64 +"[ g #C6C6C6", 48.65 +"} g #D7D7D7", 48.66 +"| g #AFAFAF", 48.67 +"1 g #C2C2C2", 48.68 +"2 g #A0A0A0", 48.69 +"3 g #BEBEBE", 48.70 +"4 g #C5C5C5", 48.71 +"5 g #E2E2E2", 48.72 +"6 g #E9E9E9", 48.73 +"7 g #EBEBEB", 48.74 +"8 g #D1D1D1", 48.75 +"9 g #ABABAB", 48.76 +"0 g #E1E1E1", 48.77 +"a g #E8E8E8", 48.78 +"b g #C1C1C1", 48.79 +"c g #D0D0D0", 48.80 +"d g #D9D9D9", 48.81 +"e g #B1B1B1", 48.82 +"f g #DEDEDE", 48.83 +"g g #A9A9A9", 48.84 +"h g #B4B4B4", 48.85 +"i g #A3A3A3", 48.86 +"j g #E0E0E0", 48.87 +"k g #E3E3E3", 48.88 +"l g #CCCCCC", 48.89 +"m g #BDBDBD", 48.90 +"n g #AAAAAA", 48.91 +"o g #BCBCBC", 48.92 +"p g #CACACA", 48.93 +"q g #DBDBDB", 48.94 +"r g #B6B6B6", 48.95 +"s g #C0C0C0", 48.96 +"t g #B7B7B7", 48.97 +"u g #999999", 48.98 +"v g #939393", 48.99 +"w g #909090", 48.100 +"x g #DADADA", 48.101 +"y g #C7C7C7", 48.102 +" .+@@@@@@@@@@@@@#$ ", 48.103 +" .%&&&*=&&&&&&&-&&;> ", 48.104 +" @,'''=)'''''''!''~> ", 48.105 +" @!{{{]^{{{{{{{/{{(> ", 48.106 +" @_:::]^:::::::{::;> ", 48.107 +" @:<<<]^<<<<<<<[<<}> ", 48.108 +" @*=]]|11|]]]]]]]]]> ", 48.109 +" @2)^^1{{13^^^^^^^^> ", 48.110 +"4@55555567777771778> ", 48.111 +"4@5@>>>90a6a666b66c> ", 48.112 +"4@5>dde>f^^^^^^g^^e> ", 48.113 +"4ha>d1i>dj555kk3kkl> ", 48.114 +">>>>dmn>>>90jjjojjp> ", 48.115 +">dddqmrmse>f...#../> ", 48.116 +">d1mmt++@u>djjj3jjl> ", 48.117 +">einr+2vww>;jjjojjp> ", 48.118 +">>>>m+v>>>]d...#../> ", 48.119 +"44}>s@w>xxxxxxx3xxl> ", 48.120 +" @4>euw>xxxxxxx3xxl> ", 48.121 +" @ >>>>>1111111n13y> ", 48.122 +" @>>>>>>>>>>>>>>>>>> ", 48.123 +" "};
49.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 49.2 +++ b/as_gfx/rowdel.xpm Fri Nov 28 11:21:08 2008 +0100 49.3 @@ -0,0 +1,128 @@ 49.4 +/* 49.5 +** OSSP asgui - Accounting system graphical user interface 49.6 +** Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 49.7 +** Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 49.8 +** Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 49.9 +** Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 49.10 +** 49.11 +** This file is part of OSSP asgui, an accounting system graphical user 49.12 +** interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 49.13 +** 49.14 +** Permission to use, copy, modify, and distribute this software for 49.15 +** any purpose with or without fee is hereby granted, provided that 49.16 +** the above copyright notice and this permission notice appear in all 49.17 +** copies. 49.18 +** 49.19 +** THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 49.20 +** WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 49.21 +** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 49.22 +** IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 49.23 +** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 49.24 +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 49.25 +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 49.26 +** USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 49.27 +** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 49.28 +** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 49.29 +** OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 49.30 +** SUCH DAMAGE. 49.31 +** 49.32 +** rowdel.xpm: X pixmap image 49.33 +*/ 49.34 + 49.35 +/* XPM */ 49.36 +static const char *s_kpcRowdel_xpm[] = { 49.37 +"22 22 72 1", 49.38 +" c None", 49.39 +". c #878787", 49.40 +"+ c #737373", 49.41 +"@ c #676767", 49.42 +"# c #585858", 49.43 +"$ c #2A2A2A", 49.44 +"% c #DCDCDC", 49.45 +"& c #FDFDFD", 49.46 +"* c #3F3F3F", 49.47 +"= c #4E4E4E", 49.48 +"- c #A7A7A7", 49.49 +"; c #C1C1C1", 49.50 +"> c #000000", 49.51 +", c #FCFCFC", 49.52 +"' c #FAFAFA", 49.53 +") c #797979", 49.54 +"! c #A4A4A4", 49.55 +"~ c #CACACA", 49.56 +"{ c #A3A3A3", 49.57 +"] c #A2A2A2", 49.58 +"^ c #555555", 49.59 +"/ c #8E8E8E", 49.60 +"( c #6B6B6B", 49.61 +"_ c #818181", 49.62 +": c #F6F6F6", 49.63 +"< c #F3F3F3", 49.64 +"[ c #A1A1A1", 49.65 +"} c #F0F0F0", 49.66 +"| c #9E9E9E", 49.67 +"1 c #BFBFBF", 49.68 +"2 c #6C6C6C", 49.69 +"3 c #959595", 49.70 +"4 c #4C4C4C", 49.71 +"5 c #8D8D8D", 49.72 +"6 c #9B9B9B", 49.73 +"7 c #E3E3E3", 49.74 +"8 c #969696", 49.75 +"9 c #B4B4B4", 49.76 +"0 c #DFDFDF", 49.77 +"a c #DDDDDD", 49.78 +"b c #939393", 49.79 +"c c #B1B1B1", 49.80 +"d c #8F8F8F", 49.81 +"e c #5F5F5F", 49.82 +"f c #727272", 49.83 +"g c #787878", 49.84 +"h c #D4D4D4", 49.85 +"i c #D5D5D5", 49.86 +"j c #8C8C8C", 49.87 +"k c #AAAAAA", 49.88 +"l c #656565", 49.89 +"m c #D2D2D2", 49.90 +"n c #D0D0D0", 49.91 +"o c #898989", 49.92 +"p c #A6A6A6", 49.93 +"q c #9ECDFB", 49.94 +"r c #A2CEFF", 49.95 +"s c #0098E0", 49.96 +"t c #CCCCCC", 49.97 +"u c #868686", 49.98 +"v c #2EB8FF", 49.99 +"w c #12B4FF", 49.100 +"x c #006500", 49.101 +"y c #C3C3C3", 49.102 +"z c #0058E0", 49.103 +"A c #004500", 49.104 +"B c #C0C0C0", 49.105 +"C c #C2C2C2", 49.106 +"D c #BEBEBE", 49.107 +"E c #C4C4C4", 49.108 +"F c #636363", 49.109 +"G c #9F9F9F", 49.110 +" .+@@@@@@@@@@@@@#$ ", 49.111 +" .%&&&*=&&&&&&&-&&;> ", 49.112 +" @,'''=)'''''''!''~> ", 49.113 +" @{]]]^/]]]]]]](]]_> ", 49.114 +" @:<<<^/<<<<<<<[<<;> ", 49.115 +" @<}}}^/}}}}}}}|}}1> ", 49.116 +" @*=^^2332^^^^^^^^^> ", 49.117 +" @4)//3[[35////////> ", 49.118 +"6@77777777777778779> ", 49.119 +"6@0a0000000a000b00c> ", 49.120 +"6@dddddddddddddeddf> ", 49.121 +"6gahhhhhiihhhiijiik> ", 49.122 +">>>>>>>>>>lmnnnonnp> ", 49.123 +">qqqrqqqqs>tuuu#uu(> ", 49.124 +">qvwwwwwwx>ynnnjnnk> ", 49.125 +">szzzzzzzA>Bnnnonnp> ", 49.126 +">>>>>>>>>>^Cuuu#uu(> ", 49.127 +"66DEEEEEEEEEEEEjEEk> ", 49.128 +" @6EEEEEEEEEEEEjEEk> ", 49.129 +" @ 888888888888F85G> ", 49.130 +" @>>>>>>>>>>>>>>>>>> ", 49.131 +" "};
50.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 50.2 +++ b/as_gfx/rowdeld.xpm Fri Nov 28 11:21:08 2008 +0100 50.3 @@ -0,0 +1,115 @@ 50.4 +/* 50.5 +** OSSP asgui - Accounting system graphical user interface 50.6 +** Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 50.7 +** Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 50.8 +** Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 50.9 +** Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 50.10 +** 50.11 +** This file is part of OSSP asgui, an accounting system graphical user 50.12 +** interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 50.13 +** 50.14 +** Permission to use, copy, modify, and distribute this software for 50.15 +** any purpose with or without fee is hereby granted, provided that 50.16 +** the above copyright notice and this permission notice appear in all 50.17 +** copies. 50.18 +** 50.19 +** THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 50.20 +** WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 50.21 +** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 50.22 +** IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 50.23 +** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 50.24 +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 50.25 +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 50.26 +** USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 50.27 +** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 50.28 +** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 50.29 +** OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 50.30 +** SUCH DAMAGE. 50.31 +** 50.32 +** rowdeld.xpm: X pixmap image 50.33 +*/ 50.34 + 50.35 +/* XPM */ 50.36 +static const char *s_kpcDrowdel_xpm[] = { 50.37 +"22 22 59 1", 50.38 +" g None", 50.39 +". g #BBBBBB", 50.40 +"+ g #B2B2B2", 50.41 +"@ g #ACACAC", 50.42 +"# g #A5A5A5", 50.43 +"$ g #919191", 50.44 +"% g #E7E7E7", 50.45 +"& g #FDFDFD", 50.46 +"* g #9A9A9A", 50.47 +"= g #A1A1A1", 50.48 +"- g #CBCBCB", 50.49 +"; g #D8D8D8", 50.50 +"> g #7F7F7F", 50.51 +", g #FCFCFC", 50.52 +"' g #FAFAFA", 50.53 +") g #B5B5B5", 50.54 +"! g #C9C9C9", 50.55 +"~ g #DDDDDD", 50.56 +"{ g #C8C8C8", 50.57 +"] g #A4A4A4", 50.58 +"^ g #BFBFBF", 50.59 +"/ g #AEAEAE", 50.60 +"( g #B8B8B8", 50.61 +"_ g #F7F7F7", 50.62 +": g #F5F5F5", 50.63 +"< g #F3F3F3", 50.64 +"[ g #C6C6C6", 50.65 +"} g #D7D7D7", 50.66 +"| g #AFAFAF", 50.67 +"1 g #C2C2C2", 50.68 +"2 g #A0A0A0", 50.69 +"3 g #BEBEBE", 50.70 +"4 g #C5C5C5", 50.71 +"5 g #EBEBEB", 50.72 +"6 g #D1D1D1", 50.73 +"7 g #E9E9E9", 50.74 +"8 g #E8E8E8", 50.75 +"9 g #C1C1C1", 50.76 +"0 g #D0D0D0", 50.77 +"a g #A9A9A9", 50.78 +"b g #B1B1B1", 50.79 +"c g #B4B4B4", 50.80 +"d g #E2E2E2", 50.81 +"e g #E3E3E3", 50.82 +"f g #CCCCCC", 50.83 +"g g #ABABAB", 50.84 +"h g #E1E1E1", 50.85 +"i g #E0E0E0", 50.86 +"j g #BCBCBC", 50.87 +"k g #CACACA", 50.88 +"l g #D9D9D9", 50.89 +"m g #DBDBDB", 50.90 +"n g #DEDEDE", 50.91 +"o g #BDBDBD", 50.92 +"p g #999999", 50.93 +"q g #909090", 50.94 +"r g #DADADA", 50.95 +"s g #AAAAAA", 50.96 +"t g #C7C7C7", 50.97 +" .+@@@@@@@@@@@@@#$ ", 50.98 +" .%&&&*=&&&&&&&-&&;> ", 50.99 +" @,'''=)'''''''!''~> ", 50.100 +" @!{{{]^{{{{{{{/{{(> ", 50.101 +" @_:::]^:::::::{::;> ", 50.102 +" @:<<<]^<<<<<<<[<<}> ", 50.103 +" @*=]]|11|]]]]]]]]]> ", 50.104 +" @2)^^1{{13^^^^^^^^> ", 50.105 +"4@55555555555551556> ", 50.106 +"4@78777777787779770> ", 50.107 +"4@^^^^^^^^^^^^^a^^b> ", 50.108 +"4c8dddddeedddee3eef> ", 50.109 +">>>>>>>>>>ghiiijiik> ", 50.110 +">lllmllllb>n...#../> ", 50.111 +">l1oooooop>liii3iif> ", 50.112 +">b2222222q>;iiijiik> ", 50.113 +">>>>>>>>>>]l...#../> ", 50.114 +"44}rrrrrrrrrrrr3rrf> ", 50.115 +" @4rrrrrrrrrrrr3rrf> ", 50.116 +" @ 111111111111s13t> ", 50.117 +" @>>>>>>>>>>>>>>>>>> ", 50.118 +" "};
51.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 51.2 +++ b/as_gfx/staterr.xpm Fri Nov 28 11:21:08 2008 +0100 51.3 @@ -0,0 +1,152 @@ 51.4 +/* XPM */ 51.5 +static const char *s_kpcStaterror_xpm[] = { 51.6 +"22 22 127 2", 51.7 +" c None", 51.8 +". c #000000", 51.9 +"+ c #FF6B6B", 51.10 +"@ c #FF7171", 51.11 +"# c #FE9393", 51.12 +"$ c #FD5858", 51.13 +"% c #FB0000", 51.14 +"& c #FE9999", 51.15 +"* c #FD6262", 51.16 +"= c #FD0606", 51.17 +"- c #FD9393", 51.18 +"; c #FC6363", 51.19 +"> c #FB2A2A", 51.20 +", c #F80000", 51.21 +"' c #E70000", 51.22 +") c #FD9A9A", 51.23 +"! c #FC6A6A", 51.24 +"~ c #FB2D2D", 51.25 +"{ c #F40000", 51.26 +"] c #D40000", 51.27 +"^ c #F96A6A", 51.28 +"/ c #F95858", 51.29 +"( c #F82B2B", 51.30 +"_ c #F70000", 51.31 +": c #F60000", 51.32 +"< c #F10000", 51.33 +"[ c #E40000", 51.34 +"} c #FB9A9A", 51.35 +"| c #DB0000", 51.36 +"1 c #9D0000", 51.37 +"2 c #7F0000", 51.38 +"3 c #F30000", 51.39 +"4 c #F20000", 51.40 +"5 c #EE0000", 51.41 +"6 c #FA9A9A", 51.42 +"7 c #F86A6A", 51.43 +"8 c #F52B2B", 51.44 +"9 c #A00000", 51.45 +"0 c #530000", 51.46 +"a c #DD0000", 51.47 +"b c #EA0000", 51.48 +"c c #EF0000", 51.49 +"d c #F23434", 51.50 +"e c #F57272", 51.51 +"f c #F46868", 51.52 +"g c #F12B2B", 51.53 +"h c #D70000", 51.54 +"i c #520000", 51.55 +"j c #D80000", 51.56 +"k c #E50000", 51.57 +"l c #E90000", 51.58 +"m c #EB1313", 51.59 +"n c #ED2D2D", 51.60 +"o c #EC2222", 51.61 +"p c #D30000", 51.62 +"q c #990000", 51.63 +"r c #500000", 51.64 +"s c #E60000", 51.65 +"t c #D50000", 51.66 +"u c #4F0000", 51.67 +"v c #E53434", 51.68 +"w c #E31313", 51.69 +"x c #E10000", 51.70 +"y c #C80000", 51.71 +"z c #850000", 51.72 +"A c #E97272", 51.73 +"B c #E02D2D", 51.74 +"C c #DC0000", 51.75 +"D c #AE0000", 51.76 +"E c #ED9A9A", 51.77 +"F c #E46868", 51.78 +"G c #DA2222", 51.79 +"H c #D60000", 51.80 +"I c #CE0000", 51.81 +"J c #C20000", 51.82 +"K c #EA9A9A", 51.83 +"L c #E16A6A", 51.84 +"M c #D72B2B", 51.85 +"N c #D20000", 51.86 +"O c #BA0000", 51.87 +"P c #C90000", 51.88 +"Q c #D10000", 51.89 +"R c #CD0000", 51.90 +"S c #C10000", 51.91 +"T c #E99A9A", 51.92 +"U c #DF6A6A", 51.93 +"V c #D42B2B", 51.94 +"W c #B90000", 51.95 +"X c #890000", 51.96 +"Y c #790000", 51.97 +"Z c #A30000", 51.98 +"` c #C60000", 51.99 +" . c #BE0000", 51.100 +".. c #E69999", 51.101 +"+. c #DB6A6A", 51.102 +"@. c #CE2B2B", 51.103 +"#. c #B40000", 51.104 +"$. c #830000", 51.105 +"%. c #440000", 51.106 +"&. c #B50000", 51.107 +"*. c #C40000", 51.108 +"=. c #C70000", 51.109 +"-. c #C00000", 51.110 +";. c #A90000", 51.111 +">. c #DA7171", 51.112 +",. c #D76262", 51.113 +"'. c #CC2D2D", 51.114 +"). c #B10000", 51.115 +"!. c #800000", 51.116 +"~. c #430000", 51.117 +"{. c #C30000", 51.118 +"]. c #B00000", 51.119 +"^. c #6A0000", 51.120 +"/. c #C10808", 51.121 +"(. c #BD0000", 51.122 +"_. c #AB0000", 51.123 +":. c #7E0000", 51.124 +"<. c #420000", 51.125 +"[. c #B20000", 51.126 +"}. c #AC0000", 51.127 +"|. c #860000", 51.128 +"1. c #4D0000", 51.129 +"2. c #A10000", 51.130 +"3. c #410000", 51.131 +"4. c #4C0000", 51.132 +"5. c #600000", 51.133 +"6. c #650000", 51.134 +" . . ", 51.135 +" . + . . @ . ", 51.136 +" . # $ % . . & * = . ", 51.137 +" . - ; > , ' . . ) ! ~ { ] . ", 51.138 +" . ^ / ( _ : < [ . . } ^ ( _ | 1 2 . ", 51.139 +" . 3 4 3 3 3 5 [ . . 6 7 8 3 | 9 0 . ", 51.140 +" . a b 5 c 5 5 d e f g c h 1 i . ", 51.141 +" . j k l b b m n o b p q r . ", 51.142 +" . j [ s s s s s t q u . ", 51.143 +" . v w x x x x y z . ", 51.144 +" . A B C C C C p D . ", 51.145 +" . E F G h h h h H I J . ", 51.146 +" . K L M N J O P Q N Q R S . ", 51.147 +" . T U V I W X Y Z ` R I R P .. ", 51.148 +" . ..+.@.y #.$.%.. . &.*.=.y =.-.;.. ", 51.149 +" . >.,.'.*.).!.~.. . &.-.{.*.].$.^.. ", 51.150 +" . /.(._.:.<.. . [.W }.|.1.. ", 51.151 +" . 2.Y 3.. . 9 2 4.. ", 51.152 +" . 5.. . 6.. ", 51.153 +" . . ", 51.154 +" ", 51.155 +" "};
52.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 52.2 +++ b/as_gfx/statok.xpm Fri Nov 28 11:21:08 2008 +0100 52.3 @@ -0,0 +1,50 @@ 52.4 +/* XPM */ 52.5 +static const char *s_kpcStatokay_xpm[] = { 52.6 +"22 22 25 1", 52.7 +" c None", 52.8 +". c #125F00", 52.9 +"+ c #1FBE36", 52.10 +"@ c #323232", 52.11 +"# c #21CA42", 52.12 +"$ c #66CD45", 52.13 +"% c #5C8800", 52.14 +"& c #68D44C", 52.15 +"* c #5D8800", 52.16 +"= c #358800", 52.17 +"- c #1C5F00", 52.18 +"; c #328800", 52.19 +"> c #1FA21A", 52.20 +", c #5F970F", 52.21 +"' c #48A21A", 52.22 +") c #21C941", 52.23 +"! c #66CC44", 52.24 +"~ c #5E950D", 52.25 +"{ c #5F9A12", 52.26 +"] c #588800", 52.27 +"^ c #5E8E06", 52.28 +"/ c #448800", 52.29 +"( c #2A8800", 52.30 +"_ c #558800", 52.31 +": c #2F8800", 52.32 +" ", 52.33 +" ", 52.34 +" . ", 52.35 +" .+@ ", 52.36 +" .#$%@ ", 52.37 +" .#&*=-@", 52.38 +" .#&*;.@ ", 52.39 +" .#&*;.@ ", 52.40 +" .#&*;.@ ", 52.41 +" .. .#&*;.@ ", 52.42 +" .>#. .#&*;.@ ", 52.43 +".>,&#. .#&*;.@ ", 52.44 +".',,&#. .#&*;.@ ", 52.45 +" .',,&#.)&*;.@ ", 52.46 +" .',,&&!*;.@ ", 52.47 +" .'~,{];.@ ", 52.48 +" .'^/(.@ ", 52.49 +" ._:.@ ", 52.50 +" ..@ ", 52.51 +" ", 52.52 +" ", 52.53 +" "};
53.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 53.2 +++ b/as_gfx/statvoid.xpm Fri Nov 28 11:21:08 2008 +0100 53.3 @@ -0,0 +1,26 @@ 53.4 +/* XPM */ 53.5 +static const char *s_kpcStatvoid_xpm[] = { 53.6 +"22 22 1 1", 53.7 +" c None", 53.8 +" ", 53.9 +" ", 53.10 +" ", 53.11 +" ", 53.12 +" ", 53.13 +" ", 53.14 +" ", 53.15 +" ", 53.16 +" ", 53.17 +" ", 53.18 +" ", 53.19 +" ", 53.20 +" ", 53.21 +" ", 53.22 +" ", 53.23 +" ", 53.24 +" ", 53.25 +" ", 53.26 +" ", 53.27 +" ", 53.28 +" ", 53.29 +" "};
54.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 54.2 +++ b/as_gfx/statwrn.xpm Fri Nov 28 11:21:08 2008 +0100 54.3 @@ -0,0 +1,252 @@ 54.4 +/* XPM */ 54.5 +static const char *s_kpcStatwarn_xpm[] = { 54.6 +"22 22 227 2", 54.7 +" c None", 54.8 +". c #F7ED81", 54.9 +"+ c #FDF5A1", 54.10 +"@ c #FEF6A1", 54.11 +"# c #F7E86A", 54.12 +"$ c #E8D332", 54.13 +"% c #D6BC00", 54.14 +"& c #FFFAAB", 54.15 +"* c #FFFFD2", 54.16 +"= c #FFFCBA", 54.17 +"- c #BEB692", 54.18 +"; c #B0A55D", 54.19 +"> c #B4A44A", 54.20 +", c #ECD636", 54.21 +"' c #E7CC1C", 54.22 +") c #E1C000", 54.23 +"! c #D8B400", 54.24 +"~ c #FFFFDE", 54.25 +"{ c #C5C0A7", 54.26 +"] c #A69F55", 54.27 +"^ c #928B2E", 54.28 +"/ c #9F9847", 54.29 +"( c #9D921E", 54.30 +"_ c #AA9700", 54.31 +": c #BFA400", 54.32 +"< c #E1BF00", 54.33 +"[ c #E2BC00", 54.34 +"} c #E1B900", 54.35 +"| c #FFFFE1", 54.36 +"1 c #FFFFD3", 54.37 +"2 c #FFFBB1", 54.38 +"3 c #B8B589", 54.39 +"4 c #EBEBF1", 54.40 +"5 c #C5C1A7", 54.41 +"6 c #9F8D00", 54.42 +"7 c #C3A300", 54.43 +"8 c #E1BC00", 54.44 +"9 c #E7C000", 54.45 +"0 c #EAC100", 54.46 +"a c #FFFAAF", 54.47 +"b c #FFFFD5", 54.48 +"c c #FFFDBC", 54.49 +"d c #ACA463", 54.50 +"e c #B0AC7A", 54.51 +"f c #E1E1E1", 54.52 +"g c #ACA462", 54.53 +"h c #CBCABA", 54.54 +"i c #B6AF7C", 54.55 +"j c #AB8F00", 54.56 +"k c #DEB900", 54.57 +"l c #E7C100", 54.58 +"m c #EBC300", 54.59 +"n c #EBC911", 54.60 +"o c #FFFFD7", 54.61 +"p c #FFFEC0", 54.62 +"q c #FFF6A0", 54.63 +"r c #DCD244", 54.64 +"s c #B3AF82", 54.65 +"t c #9F9430", 54.66 +"u c #A68E00", 54.67 +"v c #A49624", 54.68 +"w c #C3BDA3", 54.69 +"x c #A08500", 54.70 +"y c #DCB800", 54.71 +"z c #E5C000", 54.72 +"A c #EBC500", 54.73 +"B c #F4D01A", 54.74 +"C c #F8EE82", 54.75 +"D c #FFFEC3", 54.76 +"E c #FFF8A4", 54.77 +"F c #FAED7F", 54.78 +"G c #EEDD49", 54.79 +"H c #CAB812", 54.80 +"I c #9A8800", 54.81 +"J c #A98F00", 54.82 +"K c #9A8000", 54.83 +"L c #C2BDA3", 54.84 +"M c #B6AE7A", 54.85 +"N c #A88A00", 54.86 +"O c #DAB600", 54.87 +"P c #E5C100", 54.88 +"Q c #EBC702", 54.89 +"R c #F1CC11", 54.90 +"S c #E3CB26", 54.91 +"T c #FFF7A3", 54.92 +"U c #FFF8A5", 54.93 +"V c #FCEE80", 54.94 +"W c #F7E55A", 54.95 +"X c #EED733", 54.96 +"Y c #E3C711", 54.97 +"Z c #CAAA00", 54.98 +"` c #A78A00", 54.99 +" . c #ADA252", 54.100 +".. c #DFDFDF", 54.101 +"+. c #AB9600", 54.102 +"@. c #B99600", 54.103 +"#. c #DAB500", 54.104 +"$. c #ECC904", 54.105 +"%. c #EFCC0D", 54.106 +"&. c #F7DB41", 54.107 +"*. c #FFF7A1", 54.108 +"=. c #FBED83", 54.109 +"-. c #F6E45D", 54.110 +";. c #F1DA39", 54.111 +">. c #E9CB16", 54.112 +",. c #E2C000", 54.113 +"'. c #BB9900", 54.114 +"). c #AD9B09", 54.115 +"!. c #A99B2D", 54.116 +"~. c #A58400", 54.117 +"{. c #D0AA00", 54.118 +"]. c #DCB700", 54.119 +"^. c #E7C400", 54.120 +"/. c #ECCB0A", 54.121 +"(. c #F0CF0F", 54.122 +"_. c #FDE05F", 54.123 +":. c #F8E86C", 54.124 +"<. c #F7E55D", 54.125 +"[. c #F2DB3A", 54.126 +"}. c #ECCF1D", 54.127 +"|. c #E8C500", 54.128 +"1. c #E2BB00", 54.129 +"2. c #A68700", 54.130 +"3. c #BCB58E", 54.131 +"4. c #B6AE78", 54.132 +"5. c #A17F00", 54.133 +"6. c #BD9600", 54.134 +"7. c #D6AF00", 54.135 +"8. c #E0BC00", 54.136 +"9. c #E7C500", 54.137 +"0. c #EECE0F", 54.138 +"a. c #F2D11B", 54.139 +"b. c #FBE359", 54.140 +"c. c #EAD430", 54.141 +"d. c #EDD01D", 54.142 +"e. c #E9C808", 54.143 +"f. c #E5BF00", 54.144 +"g. c #E2B900", 54.145 +"h. c #A18100", 54.146 +"i. c #AC9B1A", 54.147 +"j. c #B48F00", 54.148 +"k. c #D2AA00", 54.149 +"l. c #DAB400", 54.150 +"m. c #E2BF00", 54.151 +"n. c #EBCA08", 54.152 +"o. c #F0D012", 54.153 +"p. c #F8D629", 54.154 +"q. c #EDD842", 54.155 +"r. c #D7BB00", 54.156 +"s. c #EBCE1C", 54.157 +"t. c #E8C300", 54.158 +"u. c #E7BF00", 54.159 +"v. c #E3B900", 54.160 +"w. c #BB9600", 54.161 +"x. c #AA9D40", 54.162 +"y. c #ADA153", 54.163 +"z. c #BC9600", 54.164 +"A. c #D7B000", 54.165 +"B. c #DFBB00", 54.166 +"C. c #E8C700", 54.167 +"D. c #EECF11", 54.168 +"E. c #F1D31A", 54.169 +"F. c #FCDC43", 54.170 +"G. c #D0C129", 54.171 +"H. c #E6C300", 54.172 +"I. c #E8C100", 54.173 +"J. c #E8C000", 54.174 +"K. c #E5BC00", 54.175 +"L. c #D3A900", 54.176 +"M. c #B39100", 54.177 +"N. c #B49300", 54.178 +"O. c #C8A400", 54.179 +"P. c #DBB800", 54.180 +"Q. c #E2C100", 54.181 +"R. c #ECCD0C", 54.182 +"S. c #F0D217", 54.183 +"T. c #F6D629", 54.184 +"U. c #FBE260", 54.185 +"V. c #DBB600", 54.186 +"W. c #E9C100", 54.187 +"X. c #EAC200", 54.188 +"Y. c #C09F00", 54.189 +"Z. c #AA9E46", 54.190 +"`. c #ACA259", 54.191 +" + c #AA9F46", 54.192 +".+ c #BA9D00", 54.193 +"++ c #E0C100", 54.194 +"@+ c #E7C90A", 54.195 +"#+ c #EDD016", 54.196 +"$+ c #F3D520", 54.197 +"%+ c #FDDE50", 54.198 +"&+ c #DACC38", 54.199 +"*+ c #E4BB00", 54.200 +"=+ c #EBC200", 54.201 +"-+ c #ECC400", 54.202 +";+ c #EAC400", 54.203 +">+ c #AD9200", 54.204 +",+ c #C5C0A6", 54.205 +"'+ c #A99400", 54.206 +")+ c #E3C707", 54.207 +"!+ c #EACE13", 54.208 +"~+ c #F0D21C", 54.209 +"{+ c #FBDC48", 54.210 +"]+ c #EEDD4F", 54.211 +"^+ c #EAC500", 54.212 +"/+ c #AE9500", 54.213 +"(+ c #C5C1A8", 54.214 +"_+ c #AB9700", 54.215 +":+ c #E6CB0E", 54.216 +"<+ c #F0D21E", 54.217 +"[+ c #FBDD4A", 54.218 +"}+ c #EEDD4E", 54.219 +"|+ c #F2CE14", 54.220 +"1+ c #DABC00", 54.221 +"2+ c #BCA400", 54.222 +"3+ c #988500", 54.223 +"4+ c #B09A00", 54.224 +"5+ c #DBC10A", 54.225 +"6+ c #F5D834", 54.226 +"7+ c #F7DF51", 54.227 +"8+ c #D8CA33", 54.228 +"9+ c #DFC81F", 54.229 +"0+ c #EFD537", 54.230 +"a+ c #F8DE49", 54.231 +"b+ c #F1DB46", 54.232 +"c+ c #E2CF36", 54.233 +"d+ c #C9BB21", 54.234 +" ", 54.235 +" ", 54.236 +" . + @ # $ % ", 54.237 +" & * = - ; > , ' ) ! ", 54.238 +" ~ * { ] ^ / ( _ : < [ } ", 54.239 +" | 1 2 ] 3 4 4 4 5 6 7 8 9 0 ", 54.240 +" a b c d e 4 f g h 4 i j k l m n ", 54.241 +" o p q r s f t u v 4 w x y z A B ", 54.242 +" C D E F G H I J K L 4 M N O P Q R S ", 54.243 +" T U V W X Y Z ` .4 ..+.@.#.P $.%.&. ", 54.244 +" *.=.-.;.>.,.'.)...4 !.~.{.].^./.(._. ", 54.245 +" :.<.[.}.|.1.2.3.4 4.5.6.7.8.9.0.a.b. ", 54.246 +" c.[.d.e.f.g.h.L 4 i.j.k.l.m.n.o.p.q. ", 54.247 +" r.s.e.t.u.v.w.x.y.+.z.A.B.C.D.E.F.G. ", 54.248 +" H.t.I.J.K.L.@.M.N.O.P.Q.R.S.T.U. ", 54.249 +" V.J.W.X.I.Y.Z.`. +.+++@+#+$+%+&+ ", 54.250 +" *+=+-+;+>+,+4 ,+'+)+!+~+{+]+ ", 54.251 +" =+-+^+/+5 4 (+_+:+<+[+}+ ", 54.252 +" n |+1+2+3+4+5+6+7+8+ ", 54.253 +" 9+0+a+b+c+d+ ", 54.254 +" ", 54.255 +" "};
55.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 55.2 +++ b/as_gfx/sync.xpm Fri Nov 28 11:21:08 2008 +0100 55.3 @@ -0,0 +1,77 @@ 55.4 +/* 55.5 +** OSSP asgui - Accounting system graphical user interface 55.6 +** Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 55.7 +** Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 55.8 +** Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 55.9 +** Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 55.10 +** 55.11 +** This file is part of OSSP asgui, an accounting system graphical user 55.12 +** interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 55.13 +** 55.14 +** Permission to use, copy, modify, and distribute this software for 55.15 +** any purpose with or without fee is hereby granted, provided that 55.16 +** the above copyright notice and this permission notice appear in all 55.17 +** copies. 55.18 +** 55.19 +** THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 55.20 +** WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 55.21 +** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 55.22 +** IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 55.23 +** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 55.24 +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 55.25 +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 55.26 +** USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 55.27 +** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 55.28 +** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 55.29 +** OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 55.30 +** SUCH DAMAGE. 55.31 +** 55.32 +** sync.xpm: X pixmap image 55.33 +*/ 55.34 + 55.35 +/* XPM */ 55.36 +static const char *s_kpcSync_xpm[] = { 55.37 +"22 22 21 1", 55.38 +" c None", 55.39 +". c #000000", 55.40 +"+ c #55551D", 55.41 +"@ c #4C4C16", 55.42 +"# c #343408", 55.43 +"$ c #555555", 55.44 +"% c #4C4C4C", 55.45 +"& c #343434", 55.46 +"* c #B6DB45", 55.47 +"= c #A7D31C", 55.48 +"- c #0082F1", 55.49 +"; c #0075D8", 55.50 +"> c #4A4A14", 55.51 +", c #B2D93A", 55.52 +"' c #85A900", 55.53 +") c #4A4A4A", 55.54 +"! c #007EEC", 55.55 +"~ c #004ACC", 55.56 +"{ c #363636", 55.57 +"] c #799A00", 55.58 +"^ c #003AC9", 55.59 +" ", 55.60 +" . .... ", 55.61 +" .. . ", 55.62 +" . ... ", 55.63 +" . . ", 55.64 +" . .. ..... ", 55.65 +" ", 55.66 +" +@#. .. $%&. ", 55.67 +" @*=. %-;. ", 55.68 +" >,'. .. )!~. ", 55.69 +" >,'. )!~. ", 55.70 +" >,'. .. . )!~. ", 55.71 +" >,'. .. )!~. ", 55.72 +" >,'...........{!~. ", 55.73 +" >,'. .. )!~. ", 55.74 +" >,'. .. . )!~. ", 55.75 +" >,'. )!~. ", 55.76 +" >,'. .. )!~. ", 55.77 +" #=]. &;^. ", 55.78 +" .... .. .... ", 55.79 +" ", 55.80 +" "};
56.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 56.2 +++ b/as_gfx/syncd.xpm Fri Nov 28 11:21:08 2008 +0100 56.3 @@ -0,0 +1,44 @@ 56.4 +/* XPM */ 56.5 +static const char *s_kpcDsync_xpm[] = { 56.6 +"22 22 19 1", 56.7 +" g None", 56.8 +". g #7F7F7F", 56.9 +"+ g #A6A6A6", 56.10 +"@ g #A2A2A2", 56.11 +"# g #979797", 56.12 +"$ g #AAAAAA", 56.13 +"% g #A5A5A5", 56.14 +"& g #999999", 56.15 +"* g #DFDFDF", 56.16 +"= g #D8D8D8", 56.17 +"- g #B9B9B9", 56.18 +"; g #B3B3B3", 56.19 +"> g #A1A1A1", 56.20 +", g #DDDDDD", 56.21 +"' g #C5C5C5", 56.22 +") g #A4A4A4", 56.23 +"! g #B7B7B7", 56.24 +"~ g #9A9A9A", 56.25 +"{ g #BFBFBF", 56.26 +" ", 56.27 +" . .... ", 56.28 +" .. . ", 56.29 +" . ... ", 56.30 +" . . ", 56.31 +" . .. ..... ", 56.32 +" ", 56.33 +" +@#. .. $%&. ", 56.34 +" @*=. %-;. ", 56.35 +" >,'. .. )!+. ", 56.36 +" >,'. )!+. ", 56.37 +" >,'. .. . )!+. ", 56.38 +" >,'. .. )!+. ", 56.39 +" >,'...........~!+. ", 56.40 +" >,'. .. )!+. ", 56.41 +" >,'. .. . )!+. ", 56.42 +" >,'. )!+. ", 56.43 +" >,'. .. )!+. ", 56.44 +" #={. &;>. ", 56.45 +" .... .. .... ", 56.46 +" ", 56.47 +" "};
57.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 57.2 +++ b/as_gfx/whatsthis.xpm Fri Nov 28 11:21:08 2008 +0100 57.3 @@ -0,0 +1,26 @@ 57.4 +/* XPM */ 57.5 +static const char *s_kpcWhatsthis_xpm[] = { 57.6 +/* width height ncolors chars_per_pixel */ 57.7 +"16 16 3 1", 57.8 +/* colors */ 57.9 +"# c None", 57.10 +". c #000000", 57.11 +"a c #000083", 57.12 +/* pixels */ 57.13 +".########aaaaa##", 57.14 +"..######aaa#aaa#", 57.15 +"...####aaa###aaa", 57.16 +"....###aa#####aa", 57.17 +".....##aa#####aa", 57.18 +"......##a####aaa", 57.19 +".......#####aaa#", 57.20 +"........###aaa##", 57.21 +".........#aaa###", 57.22 +".....#####aaa###", 57.23 +"..#...##########", 57.24 +".##...####aaa###", 57.25 +"####...###aaa###", 57.26 +"####...#########", 57.27 +"#####...########", 57.28 +"#####...########" 57.29 +};
58.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 58.2 +++ b/as_gui.cpp Fri Nov 28 11:21:08 2008 +0100 58.3 @@ -0,0 +1,100 @@ 58.4 +// 58.5 +// OSSP asgui - Accounting system graphical user interface 58.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 58.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 58.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 58.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 58.10 +// 58.11 +// This file is part of OSSP asgui, an accounting system graphical user 58.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 58.13 +// 58.14 +// Permission to use, copy, modify, and distribute this software for 58.15 +// any purpose with or without fee is hereby granted, provided that 58.16 +// the above copyright notice and this permission notice appear in all 58.17 +// copies. 58.18 +// 58.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 58.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 58.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 58.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 58.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 58.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 58.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 58.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 58.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 58.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 58.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 58.30 +// SUCH DAMAGE. 58.31 +// 58.32 +// as_gui.cpp: ISO C++ implementation 58.33 +// 58.34 + 58.35 +// User interface 58.36 +#include "as_gui.h" // Main classes 58.37 +#include "as_except.h" // Exception classes 58.38 +#include "as_table.h" // Class TiTable 58.39 +#include "as_const.h" // Application constants 58.40 +#include "as_pref.h" // Class Preferences 58.41 + 58.42 + 58.43 +// 58.44 +// Construct a Titraqform which is a child of 'pParent', with the 58.45 +// name 'kszName' and widget flags set to 'Flags' 58.46 +// 58.47 +Titraqform::Titraqform(QWidget *pParent, const char *kszName, WFlags Flags) : 58.48 + QMainWindow(pParent, kszName, Flags) 58.49 +{ 58.50 + // Early initializations 58.51 + m_pFiletools = NULL; 58.52 + m_pEdittools = NULL; 58.53 + m_pViewtools = NULL; 58.54 + m_pWhatstools = NULL; 58.55 + m_szFilename = NULL; 58.56 + 58.57 + // Atenzione! Order is very important in the following sequence. 58.58 + // FIXME: Reorganize this procedural mess into self contained objects 58.59 + try { 58.60 + setupPrefs(); // Load general preferences 58.61 + setupActions(); // Create and initialize actions 58.62 + setupMenubar(); // Create and initialize menu bar 58.63 + setupToolbars(); // Create and initialize tool bars 58.64 + setupCentralwidget(); // Format the layout of related widgets 58.65 + setupStatusbar(); // Create and initialize status bar 58.66 + setupTable(); // Create and initialize table and cells 58.67 + setupEditlay(); // Create and initialize edit controls 58.68 + setupColumns(); // Prepare columns for viewing, sorting 58.69 + enableIface(false); // Start things off in a empty state 58.70 + } 58.71 + catch (Genexcept& Genex) { 58.72 + Genex.reportErr(); 58.73 + exit(1); 58.74 + } 58.75 + 58.76 + // Postsetup manipulations 58.77 + m_pMaintable->setDirty(false); 58.78 + if (!kszName) 58.79 + this->setName(trUtf8("ASGuiapp")); 58.80 + this->resize(m_pPrefs->getNumber(TITRAQ_PREFFRAMEWIDTH, TITRAQ_DEFFRAMEWIDTH), 58.81 + m_pPrefs->getNumber(TITRAQ_PREFFRAMEHEIGHT, TITRAQ_DEFFRAMEHEIGHT)); 58.82 + connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(savePrefs())); 58.83 + this->setCaption(QString(TITRAQ_APPTITLE) + ' ' + asgui_version.v_short); 58.84 + 58.85 + // Rehydrate main window layout and doc positions 58.86 + QString Laystring = m_pPrefs->getString(TITRAQ_PREFFRAMELAY, NULL); // FIXME: Handle first case better 58.87 + QTextStream Laystream(&Laystring, IO_ReadOnly); 58.88 + Laystream >> *this; 58.89 + 58.90 +// // Lock down window size 58.91 +// setSizePolicy(QSizePolicy((QSizePolicy::SizeType)0, 58.92 +// (QSizePolicy::SizeType)0, 0, 0, sizePolicy().hasHeightForWidth())); 58.93 +} 58.94 + 58.95 +// 58.96 +// Destroy the object and free any allocated resources 58.97 +// 58.98 +Titraqform::~Titraqform(void) 58.99 +{ 58.100 + // Qt deletes child widgets for us 58.101 + m_pPrefs->flush(); 58.102 + delete m_pPrefs; 58.103 +}
59.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 59.2 +++ b/as_gui.h Fri Nov 28 11:21:08 2008 +0100 59.3 @@ -0,0 +1,325 @@ 59.4 +// 59.5 +// OSSP asgui - Accounting system graphical user interface 59.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 59.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 59.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 59.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 59.10 +// 59.11 +// This file is part of OSSP asgui, an accounting system graphical user 59.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 59.13 +// 59.14 +// Permission to use, copy, modify, and distribute this software for 59.15 +// any purpose with or without fee is hereby granted, provided that 59.16 +// the above copyright notice and this permission notice appear in all 59.17 +// copies. 59.18 +// 59.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 59.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 59.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 59.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 59.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 59.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 59.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 59.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 59.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 59.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 59.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 59.30 +// SUCH DAMAGE. 59.31 +// 59.32 +// as_gui.h: ISO C++ interface 59.33 +// 59.34 + 59.35 +#ifndef AS_GUI_MWIN_H 59.36 +#define AS_GUI_MWIN_H 59.37 + 59.38 +#include <qmainwindow.h> 59.39 + 59.40 +#ifdef HAVE_CONFIG_H 59.41 +#include "ac_config.h" 59.42 +#endif 59.43 + 59.44 +#include "as_except.h" // Exception classes 59.45 + 59.46 +// Version information 59.47 +#define _AS_VERSION_CPP_AS_HEADER_ 59.48 +#include "as_version.cpp" 59.49 +#undef _AS_VERSION_CPP_AS_HEADER_ 59.50 + 59.51 +// Trolltech class prototypes 59.52 +class QAction; 59.53 +class QHeader; 59.54 +class QTimeEdit; 59.55 +class QComboBox; 59.56 +class QLineEdit; 59.57 +class QLabel; 59.58 +class QDate; 59.59 +class QFile; 59.60 + 59.61 +// Local class prototypes 59.62 +class ASTimeEdit; 59.63 +class Daydatedit; // Might be replaced with ASTimeEdit throughout 59.64 +class TiTable; 59.65 +class Preferences; 59.66 +class Prefpanel; 59.67 + 59.68 +// Intentional no operation 59.69 +#define TITRAQ_NOP ((void)0) 59.70 + 59.71 +#ifdef HAVE_CONFIG_H 59.72 +#if (SIZEOF_CHAR == 1) 59.73 +typedef unsigned char U8; 59.74 +#else 59.75 +?==Error: Undefined 8 bit type 59.76 +#endif // U8 59.77 + 59.78 +#if (SIZEOF_SHORT == 2) 59.79 +typedef unsigned short U16; 59.80 +#elif (SIZEOF_INT == 2) 59.81 +typedef unsigned int U16; 59.82 +#elif (SIZEOF_LONG == 2) 59.83 +typedef unsigned long U16; 59.84 +#else 59.85 +?==Error: Undefined 16 bit type 59.86 +#endif // U16 59.87 + 59.88 +#if (SIZEOF_SHORT == 4) 59.89 +typedef unsigned short U32; 59.90 +#elif (SIZEOF_INT == 4) 59.91 +typedef unsigned int U32; 59.92 +#elif (SIZEOF_LONG == 4) 59.93 +typedef unsigned long U32; 59.94 +#else 59.95 +?==Error: Undefined 32 bit type 59.96 +#endif // U32 59.97 + 59.98 +#else // HAVE_CONFIG_H (not defined) 59.99 +typedef unsigned char U8; 59.100 + 59.101 +#if (2 == 2) 59.102 +typedef unsigned short U16; 59.103 +#elif (4 == 2) 59.104 +typedef unsigned int U16; 59.105 +#else 59.106 +?==Error: Undefined 16 bit type 59.107 +#endif 59.108 + 59.109 +#if (2 == 4) 59.110 +typedef unsigned short U32; 59.111 +#elif (4 == 4) 59.112 +typedef unsigned int U32; 59.113 +#elif (4 == 4) 59.114 +typedef unsigned long U32; 59.115 +#else 59.116 +?== Error: Undefined 32 bit type 59.117 +#endif 59.118 +#endif // HAVE_CONFIG_H 59.119 + 59.120 + 59.121 +// Main table size 59.122 +const int g_knBlocks = 32; 59.123 + 59.124 +// Styles enumeration 59.125 +typedef enum 59.126 +{ 59.127 + TITRAQ_STYLECDE, 59.128 + TITRAQ_STYLESGI, 59.129 + TITRAQ_STYLEMOTIF, 59.130 + TITRAQ_STYLEMPLUS, 59.131 + TITRAQ_STYLEPLAT, 59.132 + TITRAQ_STYLEMSOFT 59.133 +} styles_t; 59.134 + 59.135 +// Main application form window 59.136 +class Titraqform : public QMainWindow 59.137 +{ 59.138 + Q_OBJECT // Generate MOC object model stubs 59.139 + 59.140 +public: 59.141 + Titraqform(QWidget *pParent = 0, const char *kszName = 0, WFlags Flags = 0); 59.142 + ~Titraqform(void); 59.143 + 59.144 + // Accessor methods 59.145 + const QString getRowdata(void) const; // Get a whole row of data 59.146 + void setRowdata(QString &) const; // Set a whole row of data 59.147 + const int getFirstcol(void) const; // Learn which col is first 59.148 + const bool isOpen(void) {return (m_szFilename == NULL) ? false : true;}; // Doc state 59.149 + void setOpen(bool bDocopen = true) // Set state of document 59.150 + { 59.151 + if (bDocopen) { 59.152 + if (m_szFilename == NULL) 59.153 + m_szFilename = new QString(); 59.154 + } 59.155 + else 59.156 + if (m_szFilename != NULL) { 59.157 + delete m_szFilename; 59.158 + m_szFilename = NULL; 59.159 + } 59.160 + }; 59.161 + const QString *getFilename(void) // Get the current file name 59.162 + { 59.163 + if (this->isOpen()) 59.164 + return m_szFilename; 59.165 + else 59.166 + throw Genexcept("File name does not exist."); 59.167 + }; 59.168 + void setFilename(const QString &Fname) // Set file name 59.169 + { 59.170 + if (this->isOpen()) // If a file name exists 59.171 + setOpen(false); // then get rid of it first 59.172 + m_szFilename = new QString(Fname); 59.173 + }; 59.174 + 59.175 + // Utility members 59.176 + void loadInit(void); // Parse cmds and open initial file 59.177 + 59.178 + // Top level members 59.179 + Preferences *m_pPrefs; 59.180 + 59.181 + // Main application actions 59.182 + QAction *m_pFilenewact, *m_pFileopenact; 59.183 + QAction *m_pFilesaveact, *m_pFilesaveasact; 59.184 + QAction *m_pFilecloseact, *m_pFilequitact; 59.185 + QAction *m_pAddrowact, *m_pDelrowact; 59.186 + QAction *m_pRefreshact, *m_pCutact; 59.187 + QAction *m_pCopyact, *m_pPasteact; 59.188 + QAction *m_pSyncact, *m_pPrefsact; 59.189 + QAction *m_pReportact; 59.190 + 59.191 + // Table, cells, and entries in package layout 59.192 + TiTable *m_pMaintable; 59.193 + QHeader *m_pTablehead; 59.194 + QStringList *m_pTaskentries; 59.195 + 59.196 + // Edition widgets 59.197 + QLabel *m_pStatusedit; // Control to show entry status 59.198 + QLineEdit *m_pLineedit; // Control to line number 59.199 + QLineEdit *m_pUseredit; // Control to edit user name 59.200 + QLineEdit *m_pGuidedit; // Control to edit GUID 59.201 + QLineEdit *m_pCrcedit; // Control to edit CRC 59.202 + QLineEdit *m_pRevedit; // Control to edit revision 59.203 + Daydatedit *m_pDateedit; // Control to edit date 59.204 + QTimeEdit *m_pStarttime; // Control to edit start time 59.205 + QTimeEdit *m_pEndtime; // Control to edit finish time 59.206 +// QTimeEdit *m_pAmount; // Control to edit total time 59.207 + ASTimeEdit *m_pAmount; // Control to edit total time 59.208 + QComboBox *m_pTasks; // Control to choose a task 59.209 + QLineEdit *m_pRemark; // Control to edit remark 59.210 + 59.211 +protected slots: 59.212 + void cutEntry(void); // Cut task entries from the list 59.213 + void copyEntry(void); // Copy task entries from the list 59.214 + void pasteEntry(void); // Paste task entries to the list 59.215 + void addEntry(int nRows= -1); // Add task entries to the list 59.216 + void delEntry(int nRows= -1); // Delete task entries from the list 59.217 + void refreshDisplay(void); // Refresh the display of all data items 59.218 + void syncIiop(void); // Syncronize data with server using IIOP 59.219 + void syncSoap(void); // Syncronize data with server using SOAP 59.220 + void newDoc(void); // Make and display a new document window 59.221 + void openDoc(void); // Open and display an existing document 59.222 + void quitApp(void); // Close the current document and quit 59.223 + void saveFile(void); // Serialize to the current file 59.224 + void saveAs(void); // Serialize to a selected file 59.225 + void saveName(void); // Implicitly serialize to a selected file 59.226 + void helpContents(void); // Use the help contents 59.227 + void aboutTitraq(void); // Learn more about this program itself 59.228 + void aboutOSSP(void); // Learn more about the OSSP 59.229 + void aboutQt(void); // Learn more about Qt 59.230 + void selAll(void); // Edit menu select all 59.231 + void onClick(int, int, int, const QPoint &); // Table was clicked 59.232 + void inplaceEdit(int, int, int, const QPoint &); // Enter in place edit mode 59.233 + void updEdit(int, int nCol = 0); // Update edit controls 59.234 + void validateRow(void); // Validate current row of matrix 59.235 + void validateRow(int, int); // Validate specified row of matrix 59.236 + void updSizes(int, int, int); // Update edit sizes 59.237 + void calcCrc(void); // Calculate CRC of current row 59.238 + void calcCrc(int, int); // Calculate CRC of specified row 59.239 + void dataChanged(int, int); // Timesheet data changed 59.240 + void updateLine(const QString &); // Update line number column 59.241 + void updateUser(const QString &); // Update user column 59.242 + void updateGuid(const QString &); // Update GUID column 59.243 + void updateCrc(const QString &); // Update CRC column 59.244 + void updateRev(const QString &); // Update rev column 59.245 + void updateDate(const QDate &); // Update date column 59.246 + void updateStart(const QTime &); // Update start column 59.247 + void updateFinish(const QTime &); // Update finish column 59.248 + void updateAmount(const QTime &); // Update amount column 59.249 + void updateTask(const QString &); // Update task column 59.250 + void updateRemark(const QString &); // Update remark column 59.251 + void confirmEdit(void); // Confirm whole row edition 59.252 + void configPrefs(void); // Edit menu configure preferences 59.253 + void normalView(void); // View menu normal 59.254 + void editingView(void); // View menu editing 59.255 + void timingView(void); // View menu timing 59.256 + void showFilebar(void); // View menu show file toolbar 59.257 + void showEditbar(void); // View menu show edit toolbar 59.258 + void showViewbar(void); // View menu show view toolbar 59.259 + void showPrefsbar(void); // View menu show prefs toolbar 59.260 + void showWhatsbar(void); // View menu show whats this toolbar 59.261 + void showStatcol(void); // View menu show status column 59.262 + void showLinecol(void); // View menu show line numbers column 59.263 + void showUsercol(void); // View menu show Users column 59.264 + void showGuidcol(void); // View menu show GUIDs column 59.265 + void showCrccol(void); // View menu show CRC column 59.266 + void showRevcol(void); // View menu show Rev column 59.267 + void showDatecol(void); // View menu show Dates column 59.268 + void showStartcol(void); // View menu show Start time column 59.269 + void showFinishcol(void); // View menu show Finish time column 59.270 + void showAmountcol(void); // View menu show Amounts column 59.271 + void showTaskcol(void); // View menu show Tasks column 59.272 + void showRemarkcol(void); // View menu show Remarks column 59.273 + void genReport(void); // Generate a local formatted report 59.274 + void savePrefs(void); // Save user preferences 59.275 + void applyPrefs(void); // Apply preferences from applied() 59.276 + void applyPrefs(Prefpanel *); // Apply preferences from accept() 59.277 + 59.278 +protected: 59.279 + // Application main events 59.280 + void closeEvent(QCloseEvent *); // Close current document in main window 59.281 + 59.282 + // Application main window widgets 59.283 + QFrame *m_pCenframe; // Central frame 59.284 + QVBoxLayout *m_pMainlayout; // Package and control layouts 59.285 + QVBoxLayout *m_pPackagelayout; // Main table control 59.286 + QHBoxLayout *m_pEditlayout; // Lower edition widgets 59.287 + 59.288 +private: 59.289 + // Owned by QMainWindow 59.290 + QMenuBar *m_pMenubar; 59.291 + QPopupMenu *m_pViewpopup; // Saved for manipulating views 59.292 + QPopupMenu *m_pTbarspopup; // Saved for manipulating toolbars 59.293 + QPopupMenu *m_pColspopup; // Saved for manipulating columns 59.294 + QStatusBar *m_pStatbar; 59.295 + 59.296 + // Belong to us 59.297 + QToolBar *m_pFiletools; 59.298 + QToolBar *m_pEdittools; 59.299 + QToolBar *m_pViewtools; 59.300 + QToolBar *m_pPrefstools; 59.301 + QToolBar *m_pWhatstools; 59.302 + QString *m_szFilename; 59.303 + 59.304 + // Constructor helpers 59.305 + void setupPrefs(void); // Preferences 59.306 + void setupActions(void); // Actions 59.307 + void setupMenubar(void); // Menu bar 59.308 + void setupToolbars(void); // Tool bars 59.309 + void setupStatusbar(void); // Status bar 59.310 + void setupCentralwidget(void); // Assemble main Frame widget 59.311 + void setupTable(void); // Table widget 59.312 + void setupEditlay(void); // Editing lay 59.313 + void setupPieces(void); // Assemble widget pieces 59.314 + void setupColumns(void); // Arrange and configure columns 59.315 + void enableIface(bool); // [En/dis]able most ui pieces 59.316 + 59.317 + // Data processing 59.318 + void loadAccounts(QFile &); // Load accounts from file 59.319 + void loadAccounts(QTextStream &); // Load accounts from stream 59.320 + void loadData(QFile &); // Load personal data from file 59.321 + void loadData(QTextStream &); // Load personal data from stream 59.322 + void saveData(QFile &); // Save accounting data to file 59.323 + void saveData(QTextStream &); // Save accounting data to stream 59.324 + const bool validateData(QFile &) const; // Validate personal data in file 59.325 + const bool validateData(QString &) const; // Validate personal data from string 59.326 +}; 59.327 + 59.328 +#endif // AS_GUI_MWIN_H
60.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 60.2 +++ b/as_gui_test.sh Fri Nov 28 11:21:08 2008 +0100 60.3 @@ -0,0 +1,33 @@ 60.4 +## 60.5 +## OSSP asgui - Accounting system graphical user interface 60.6 +## Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 60.7 +## Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 60.8 +## Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 60.9 +## Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 60.10 +## 60.11 +## This file is part of OSSP asgui, an accounting system graphical user 60.12 +## interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 60.13 +## 60.14 +## Permission to use, copy, modify, and distribute this software for 60.15 +## any purpose with or without fee is hereby granted, provided that 60.16 +## the above copyright notice and this permission notice appear in all 60.17 +## copies. 60.18 +## 60.19 +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 60.20 +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 60.21 +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 60.22 +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 60.23 +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 60.24 +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 60.25 +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 60.26 +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 60.27 +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 60.28 +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 60.29 +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 60.30 +## SUCH DAMAGE. 60.31 +## 60.32 +## titraq_test.sh: Bourne shell script 60.33 +## 60.34 + 60.35 +#! /bin/sh 60.36 +./as-gui
61.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 61.2 +++ b/as_helpanel.cpp Fri Nov 28 11:21:08 2008 +0100 61.3 @@ -0,0 +1,109 @@ 61.4 +// 61.5 +// OSSP asgui - Accounting system graphical user interface 61.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 61.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 61.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 61.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 61.10 +// 61.11 +// This file is part of OSSP asgui, an accounting system graphical user 61.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 61.13 +// 61.14 +// Permission to use, copy, modify, and distribute this software for 61.15 +// any purpose with or without fee is hereby granted, provided that 61.16 +// the above copyright notice and this permission notice appear in all 61.17 +// copies. 61.18 +// 61.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 61.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 61.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 61.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 61.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 61.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 61.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 61.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 61.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 61.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 61.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 61.30 +// SUCH DAMAGE. 61.31 +// 61.32 +// as_helpanel.cpp: ISO C++ implementation 61.33 +// 61.34 + 61.35 +#include <qvariant.h> 61.36 +#include <qpushbutton.h> 61.37 +#include <qtextbrowser.h> 61.38 +#include <qlayout.h> 61.39 +#include <qtooltip.h> 61.40 +#include <qwhatsthis.h> 61.41 + 61.42 +#include "as_helpanel.h" 61.43 + 61.44 + 61.45 +namespace AS { 61.46 + 61.47 +// 61.48 +// Constructs a Helpanel as a child of 'pParent', with the 61.49 +// name 'kszName' and widget flags set to 'Flags'. 61.50 +// 61.51 +// The dialog will by default be modal, unless you set 'bModal' to 61.52 +// false to construct a modeless dialog. 61.53 +// 61.54 +Helpanel::Helpanel(const QString &kSource, QWidget *pParent, const char *kszName, bool bModal, WFlags Flags) 61.55 + : QDialog(pParent, kszName, bModal, Flags) 61.56 +{ 61.57 + // Boilerplate code to initialize the panel 61.58 + if (!kszName) 61.59 + this->setName("Helpanel"); 61.60 + 61.61 + // Make panel resizeable 61.62 + this->setSizeGripEnabled(true); 61.63 + this->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)5, 61.64 + (QSizePolicy::SizeType)5, 0, 0, this->sizePolicy().hasHeightForWidth())); 61.65 + 61.66 + // Build panel using already constructed widgets and layouts 61.67 + m_pFormlay = new QVBoxLayout(this, 11, 6, "Formlayout"); 61.68 + 61.69 + // Groupbox and its text display 61.70 + m_pBrowser = new QTextBrowser(this, "Helpbrowser"); 61.71 + m_pBrowser->setSource(QString(TITRAQ_DOCDIR) + QChar('/') + kSource); 61.72 + m_pBrowser->setReadOnly(true); 61.73 + m_pBrowser->setFocus(); 61.74 + 61.75 + // Add a spacer to sideline the otherwise massive dismiss button 61.76 + m_pButtlay = new QHBoxLayout(0, 0, 6, "Buttonlayout"); 61.77 + QSpacerItem *pSpacey = new QSpacerItem(40, 20, QSizePolicy::Minimum, QSizePolicy::Minimum); 61.78 + m_pButtlay->addItem(pSpacey); 61.79 + 61.80 + // Add dismiss push button 61.81 + m_pDismissbutt = new QPushButton(this, "Dismissbutton"); 61.82 + m_pDismissbutt->setPaletteBackgroundColor(QColor(198, 196, 186)); 61.83 + m_pDismissbutt->setCursor(QCursor(13)); 61.84 + m_pButtlay->addWidget(m_pDismissbutt); 61.85 + 61.86 + // Add the stuff to our form layout 61.87 + m_pFormlay->addWidget(m_pBrowser); 61.88 + m_pFormlay->addSpacing(6); 61.89 + m_pFormlay->addLayout(m_pButtlay); 61.90 + 61.91 + // Connect signals to slots, accept() and reject() are Qt implicit 61.92 + connect(m_pDismissbutt, SIGNAL(clicked(void)), SLOT(accept(void))); 61.93 + this->resize(QSize(464, 332).expandedTo(minimumSizeHint())); 61.94 + this->textChange(); 61.95 +} 61.96 + 61.97 +// 61.98 +// Sets the strings of the subwidgets using the current language 61.99 +// 61.100 +void Helpanel::textChange(void) 61.101 +{ 61.102 + this->setCaption(trUtf8("AS Accounting System help contents", "Help contents for the AS GUI application.")); 61.103 + 61.104 + // Top level push buttons associated with accept and save slots 61.105 + m_pDismissbutt->setText(trUtf8("Dismiss", "Comment for Dismissbutton")); 61.106 + QToolTip::add(m_pDismissbutt, trUtf8("Closes the help panel", "Comment for tooltip Dismissbutton")); 61.107 + QWhatsThis::add(m_pDismissbutt, trUtf8("The dismiss button dismisses the help panel", "Comment for whatsThis Dismissbutton")); 61.108 + 61.109 + // The main text browser window which presents the HTML help contents 61.110 + QWhatsThis::add(m_pBrowser, trUtf8("The text browser window displays the help contents", "Comment for whatsThis Browser")); 61.111 +} 61.112 +} // namespace AS
62.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 62.2 +++ b/as_helpanel.h Fri Nov 28 11:21:08 2008 +0100 62.3 @@ -0,0 +1,68 @@ 62.4 +// 62.5 +// OSSP asgui - Accounting system graphical user interface 62.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 62.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 62.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 62.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 62.10 +// 62.11 +// This file is part of OSSP asgui, an accounting system graphical user 62.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 62.13 +// 62.14 +// Permission to use, copy, modify, and distribute this software for 62.15 +// any purpose with or without fee is hereby granted, provided that 62.16 +// the above copyright notice and this permission notice appear in all 62.17 +// copies. 62.18 +// 62.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 62.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 62.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 62.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 62.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 62.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 62.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 62.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 62.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 62.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 62.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 62.30 +// SUCH DAMAGE. 62.31 +// 62.32 +// as_helpanel.h: ISO C++ interface 62.33 +// 62.34 + 62.35 +#ifndef HELPANEL_H 62.36 +#define HELPANEL_H 62.37 + 62.38 +#include <qvariant.h> 62.39 +#include <qdialog.h> 62.40 + 62.41 + 62.42 +class QVBoxLayout; 62.43 +class QHBoxLayout; 62.44 +class QPushButton; 62.45 +class QTextBrowser; 62.46 + 62.47 +namespace AS { 62.48 + 62.49 +class Helpanel : public QDialog 62.50 +{ 62.51 + Q_OBJECT 62.52 + 62.53 +public: 62.54 + Helpanel(const QString &, QWidget *pParent = 0, const char *kszName = 0, 62.55 + bool bModal = true, WFlags Flags = 0); 62.56 +// ~Helpanel(void); // No need to destroy widgets, because qt does it for us 62.57 + 62.58 +public: 62.59 + QTextBrowser *m_pBrowser; 62.60 + QPushButton *m_pDismissbutt; 62.61 + 62.62 +protected: 62.63 + QVBoxLayout *m_pFormlay; 62.64 + QHBoxLayout *m_pButtlay; 62.65 + 62.66 +protected slots: 62.67 + virtual void textChange(void); 62.68 +}; 62.69 +} // namespace AS 62.70 + 62.71 +#endif // HELPANEL_H
63.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 63.2 +++ b/as_main.cpp Fri Nov 28 11:21:08 2008 +0100 63.3 @@ -0,0 +1,46 @@ 63.4 +// 63.5 +// OSSP asgui - Accounting system graphical user interface 63.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 63.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 63.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 63.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 63.10 +// 63.11 +// This file is part of OSSP asgui, an accounting system graphical user 63.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 63.13 +// 63.14 +// Permission to use, copy, modify, and distribute this software for 63.15 +// any purpose with or without fee is hereby granted, provided that 63.16 +// the above copyright notice and this permission notice appear in all 63.17 +// copies. 63.18 +// 63.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 63.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 63.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 63.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 63.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 63.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 63.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 63.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 63.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 63.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 63.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 63.30 +// SUCH DAMAGE. 63.31 +// 63.32 +// as_main.cpp: ISO C++ implementation 63.33 +// 63.34 + 63.35 +#include <qapplication.h> 63.36 + 63.37 +#include "as_gui.h" 63.38 + 63.39 + 63.40 +int main(int argc, char **argv) 63.41 +{ 63.42 + QApplication App(argc, argv, QApplication::GuiClient); 63.43 + 63.44 + Titraqform Mainform; // Main app window 63.45 + App.setMainWidget(&Mainform); 63.46 + Mainform.show(); // Finally start the show 63.47 + Mainform.loadInit(); // Start with initial data 63.48 + return App.exec(); 63.49 +}
64.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 64.2 +++ b/as_numdial.cpp Fri Nov 28 11:21:08 2008 +0100 64.3 @@ -0,0 +1,134 @@ 64.4 +// 64.5 +// OSSP asgui - Accounting system graphical user interface 64.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 64.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 64.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 64.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 64.10 +// 64.11 +// This file is part of OSSP asgui, an accounting system graphical user 64.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 64.13 +// 64.14 +// Permission to use, copy, modify, and distribute this software for 64.15 +// any purpose with or without fee is hereby granted, provided that 64.16 +// the above copyright notice and this permission notice appear in all 64.17 +// copies. 64.18 +// 64.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 64.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 64.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 64.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 64.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 64.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 64.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 64.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 64.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 64.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 64.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 64.30 +// SUCH DAMAGE. 64.31 +// 64.32 +// as_numdial.cpp: ISO C++ implementation 64.33 +// 64.34 + 64.35 +#include "as_numdial.h" 64.36 + 64.37 +#include <qvariant.h> 64.38 +#include <qframe.h> 64.39 +#include <qlabel.h> 64.40 +#include <qpushbutton.h> 64.41 +#include <qspinbox.h> 64.42 +#include <qlayout.h> 64.43 +#include <qtooltip.h> 64.44 +#include <qwhatsthis.h> 64.45 + 64.46 +#include "as_const.h" 64.47 + 64.48 + 64.49 +namespace AS { 64.50 + 64.51 +// 64.52 +// Constructs a Numdial as a child of 'pParent', with the 64.53 +// name 'kszName' and widget flags set to 'Flags'. 64.54 +// 64.55 +// The dialog will by default be modal, unless you set 'bModal' to 64.56 +// false to construct a modeless dialog. 64.57 +// 64.58 +Numdial::Numdial(QWidget *pParent, const char *kszName, bool bModal, WFlags Flags) 64.59 + : QDialog(pParent, kszName, bModal, Flags) 64.60 +{ 64.61 + // Boilerplate code to initialize the panel 64.62 + if (!kszName) 64.63 + this->setName("Numberdialog"); 64.64 + 64.65 + // Fix dialog size 64.66 + this->setSizeGripEnabled(false); 64.67 + this->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)0, 64.68 + (QSizePolicy::SizeType)0, 0, 0, this->sizePolicy().hasHeightForWidth())); 64.69 + 64.70 + m_pFrame = new QFrame(this, "Mainframe"); 64.71 + m_pFrame->setFrameShape(QFrame::StyledPanel); 64.72 + m_pFrame->setFrameShadow(QFrame::Raised); 64.73 + m_pFramelay = new QVBoxLayout(m_pFrame, 11, 6, "Framelay"); 64.74 + m_pInputlay = new QHBoxLayout(0, 0, 6, "Horizontallayout"); 64.75 + m_pFormlayout = new QVBoxLayout(this, 11, 6, "Formlayout"); 64.76 + 64.77 + m_pReportlabel = new QLabel(m_pFrame, "Reportlabel"); 64.78 + m_pReportlabel->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)4, (QSizePolicy::SizeType)5, 0, 0, m_pReportlabel->sizePolicy().hasHeightForWidth())); 64.79 + m_pInputlay->addWidget(m_pReportlabel); 64.80 + 64.81 + m_pSpinbox = new QSpinBox(m_pFrame, "Spinbox"); 64.82 + m_pSpinbox->setMinValue(1); // Must choose at least one week 64.83 + m_pSpinbox->setMaxValue(TITRAQ_BIGMAGIC); // Must choose less than magic 64.84 +// m_pSpinbox->setButtonSymbols(QSpinBox::PlusMinus); 64.85 +// m_pSpinbox->editor()->setAlignment(Qt::AlignRight); 64.86 + m_pInputlay->addWidget(m_pSpinbox); 64.87 + 64.88 + m_pWeeklabel = new QLabel(m_pFrame, "Weeklabel"); 64.89 + m_pWeeklabel->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)4, (QSizePolicy::SizeType)5, 0, 0, m_pWeeklabel->sizePolicy().hasHeightForWidth())); 64.90 + m_pInputlay->addWidget(m_pWeeklabel); 64.91 + m_pFramelay->addLayout(m_pInputlay); 64.92 + 64.93 + // Push button suite 64.94 + m_pButtlay = new QHBoxLayout(0, 0, 6, "Buttlay"); 64.95 + m_pOkaybutt = new QPushButton(m_pFrame, "Okaybutton"); 64.96 + m_pOkaybutt->setPaletteBackgroundColor(QColor(198, 196, 186)); 64.97 + m_pOkaybutt->setCursor(QCursor(13)); 64.98 + m_pOkaybutt->setDefault(true); 64.99 + m_pButtlay->addWidget(m_pOkaybutt); 64.100 + m_pCancelbutt = new QPushButton(m_pFrame, "Cancelbutton"); 64.101 + m_pCancelbutt->setPaletteBackgroundColor(QColor(198, 196, 186)); 64.102 + m_pCancelbutt->setCursor(QCursor(13)); 64.103 + m_pButtlay->addWidget(m_pCancelbutt); 64.104 + m_pFramelay->addLayout(m_pButtlay); 64.105 + 64.106 + // Add all the junk to our main frame 64.107 + m_pFormlayout->addWidget(m_pFrame); 64.108 + 64.109 + // Connect signals to slots, accept() and reject() are Qt implicit 64.110 + connect(m_pOkaybutt, SIGNAL(clicked(void)), SLOT(accept(void))); 64.111 + connect(m_pCancelbutt, SIGNAL(clicked(void)), SLOT(reject(void))); 64.112 + this->resize(QSize(272, 111).expandedTo(minimumSizeHint())); 64.113 + this->textChange(); 64.114 +} 64.115 + 64.116 +// 64.117 +// Sets the strings of the subwidgets using the current language 64.118 +// 64.119 +void Numdial::textChange() 64.120 +{ 64.121 + this->setCaption(trUtf8("Numberdialog", "For general input of numbers followed by an accept or cancel operation")); 64.122 + m_pReportlabel->setText(trUtf8("Report")); 64.123 + m_pWeeklabel->setText(trUtf8("weeks of data")); 64.124 + 64.125 + // Top level push buttons associated with accept slot 64.126 + m_pCancelbutt->setText(trUtf8("Cancel", "Comment for Cancelbutton")); 64.127 + QToolTip::add(m_pCancelbutt, trUtf8("Closes the report panel", "Comment for tooltip Cancelbutton")); 64.128 + QWhatsThis::add(m_pCancelbutt, trUtf8("The cancel button closes the report panel without further action", "Comment for whatsThis Cancelbutton")); 64.129 + m_pOkaybutt->setText(trUtf8("Okay", "Comment for Okaybutton")); 64.130 + QToolTip::add(m_pOkaybutt, trUtf8("Aknowleges your input", "Comment for tooltip Okaybutton")); 64.131 + QWhatsThis::add(m_pOkaybutt, trUtf8("The okay button aknowleges your input and prepares for action", "Comment for whatsThis Okaybutton")); 64.132 + 64.133 + // Text help for spinbox number input 64.134 + QToolTip::add(m_pSpinbox, trUtf8("Input a number", "Comment for tooltip Spinbox")); 64.135 + QWhatsThis::add(m_pSpinbox, trUtf8("Click on the arrows or type to input a number", "Comment for whatsThis Spinbox")); 64.136 +} 64.137 +} // namespace AS
65.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 65.2 +++ b/as_numdial.h Fri Nov 28 11:21:08 2008 +0100 65.3 @@ -0,0 +1,80 @@ 65.4 +// 65.5 +// OSSP asgui - Accounting system graphical user interface 65.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 65.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 65.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 65.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 65.10 +// 65.11 +// This file is part of OSSP asgui, an accounting system graphical user 65.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 65.13 +// 65.14 +// Permission to use, copy, modify, and distribute this software for 65.15 +// any purpose with or without fee is hereby granted, provided that 65.16 +// the above copyright notice and this permission notice appear in all 65.17 +// copies. 65.18 +// 65.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 65.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 65.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 65.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 65.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 65.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 65.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 65.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 65.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 65.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 65.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 65.30 +// SUCH DAMAGE. 65.31 +// 65.32 +// as_numdial.h: ISO C++ interface 65.33 +// 65.34 + 65.35 +#ifndef NUMDIALOG_H 65.36 +#define NUMDIALOG_H 65.37 + 65.38 +#include <qvariant.h> 65.39 +#include <qdialog.h> 65.40 +#include <qspinbox.h> 65.41 + 65.42 + 65.43 +class QVBoxLayout; 65.44 +class QHBoxLayout; 65.45 +class QGridLayout; 65.46 +class QFrame; 65.47 +class QLabel; 65.48 +class QPushButton; 65.49 + 65.50 +namespace AS { 65.51 + 65.52 +class Numdial : public QDialog 65.53 +{ 65.54 + Q_OBJECT 65.55 + 65.56 +public: 65.57 + Numdial(QWidget *pParent = 0, const char *pkcName = 0, bool bModal = true, WFlags Flags = 0); 65.58 +// ~Numdial(void); // No need to destroy widgets, because qt does it for us 65.59 + 65.60 + QFrame *m_pFrame; 65.61 + QLabel *m_pReportlabel; 65.62 + QSpinBox *m_pSpinbox; 65.63 + QLabel *m_pWeeklabel; 65.64 + QPushButton *m_pOkaybutt; 65.65 + QPushButton *m_pCancelbutt; 65.66 + 65.67 +protected: 65.68 + QVBoxLayout *m_pFormlayout; 65.69 + QVBoxLayout *m_pFramelay; 65.70 + QHBoxLayout *m_pInputlay; 65.71 + QHBoxLayout *m_pButtlay; 65.72 + 65.73 +protected slots: 65.74 + virtual void textChange(); 65.75 + 65.76 +public: 65.77 + // Accessors members 65.78 + int getNum(void) const {return m_pSpinbox->value();}; 65.79 + void setNum(int nInit) {m_pSpinbox->setValue(nInit);}; 65.80 +}; 65.81 +} // namespace AS 65.82 + 65.83 +#endif // NUMDIALOG_H
66.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 66.2 +++ b/as_panel.cpp Fri Nov 28 11:21:08 2008 +0100 66.3 @@ -0,0 +1,422 @@ 66.4 +// 66.5 +// OSSP asgui - Accounting system graphical user interface 66.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 66.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 66.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 66.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 66.10 +// 66.11 +// This file is part of OSSP asgui, an accounting system graphical user 66.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 66.13 +// 66.14 +// Permission to use, copy, modify, and distribute this software for 66.15 +// any purpose with or without fee is hereby granted, provided that 66.16 +// the above copyright notice and this permission notice appear in all 66.17 +// copies. 66.18 +// 66.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 66.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 66.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 66.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 66.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 66.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 66.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 66.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 66.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 66.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 66.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 66.30 +// SUCH DAMAGE. 66.31 +// 66.32 +// as_panel.cpp: ISO C++ implementation 66.33 +// 66.34 + 66.35 +#include <vector> 66.36 + 66.37 +#include <qimage.h> 66.38 + 66.39 +#include "as_panel.h" 66.40 +#include "as_generic.h" 66.41 +#include "as_const.h" 66.42 + 66.43 +#include "as_gfx/revcolour.xpm" 66.44 + 66.45 +// 66.46 +// Constructs a Prefpanel as a child of 'pParent', with the 66.47 +// name 'kszName' and widget flags set to 'Flags'. 66.48 +// 66.49 +// The dialog will by default be modal, unless you set 'bModal' to 66.50 +// false to construct a modeless dialog. 66.51 +// 66.52 +Prefpanel::Prefpanel(QWidget *pParent, const char *kszName, bool bModal, WFlags Flags) 66.53 + : QDialog(pParent, kszName, bModal, Flags) 66.54 +{ 66.55 + if (!kszName) 66.56 + this->setName("Prefpanel"); 66.57 + 66.58 + this->setSizeGripEnabled(false); 66.59 + this->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)5, 66.60 + (QSizePolicy::SizeType)5, 0, 0, this->sizePolicy().hasHeightForWidth())); 66.61 + 66.62 + // Initialize our button colours 66.63 + m_pLight = new QColor(); 66.64 + m_pDark = new QColor(); 66.65 + 66.66 + m_pVlayout = new QVBoxLayout(this, 11, 6, "Formlayout"); 66.67 + m_pTabselect = new QTabWidget(this, "Tabselector"); 66.68 + 66.69 + // Start of style chooser UI pieces 66.70 + m_pBoolpage = new QWidget(m_pTabselect, "Tabpage"); 66.71 + m_pBoolayout = new QHBoxLayout(m_pBoolpage, 11, 6, "Genlayout"); 66.72 + m_pBinlayout = new QVBoxLayout(0, 0, 6, "Binarylayout"); 66.73 + m_pStylegroup = new QButtonGroup(m_pBoolpage, "Stylebuttongroup"); 66.74 + m_pStylegroup->setColumnLayout(0, Qt::Vertical); 66.75 + m_pStylegroup->layout()->setSpacing(6); 66.76 + m_pStylegroup->layout()->setMargin(11); 66.77 + m_pStylegroup->setExclusive(true); 66.78 + 66.79 + m_pStylelay = new QVBoxLayout(m_pStylegroup->layout()); 66.80 + m_pStylelay->setAlignment(Qt::AlignTop); 66.81 + 66.82 + // Block to handle a vector of radio buttons 66.83 + int nIter = 0; 66.84 + QStringList Styles = QStyleFactory::keys(); 66.85 + std::vector<QRadioButton *> Stylevector(Styles.size()); 66.86 + 66.87 + // Discover which interface styles are available, and 66.88 + // dynamically construct new radio buttons to represent them 66.89 + for (QStringList::Iterator Stylename = Styles.begin(); 66.90 + Stylename != Styles.end(); Stylename++) { 66.91 + Stylevector[nIter] = new QRadioButton(m_pStylegroup, *Stylename + "_button"); 66.92 + Stylevector[nIter]->setText(trUtf8(*Stylename, "Comment for " + *Stylename)); 66.93 + Stylevector[nIter]->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Expanding, 66.94 + Stylevector[nIter]->sizePolicy().hasHeightForWidth()); 66.95 + QToolTip::add(Stylevector[nIter], trUtf8("The " + *Stylename + " style", 66.96 + "Comment for toolTip " + *Stylename)); 66.97 + QWhatsThis::add(Stylevector[nIter], trUtf8("Click this button to enjoy the style of the " 66.98 + + *Stylename + " user interface", "Comment whatsThis for " + *Stylename)); 66.99 + m_pStylelay->addWidget(Stylevector[nIter]); 66.100 + nIter++; 66.101 + } 66.102 + 66.103 + // Start of binary option UI pieces (like make backups, yes or no) 66.104 + m_pSwitchgroup = new QButtonGroup(m_pBoolpage, "Switchbuttongroup"); 66.105 + m_pSwitchgroup->setColumnLayout(0, Qt::Vertical); 66.106 + m_pSwitchgroup->layout()->setSpacing(6); 66.107 + m_pSwitchgroup->layout()->setMargin(11); 66.108 + m_pSwitchgroup->setExclusive(false); 66.109 + m_pSwitchlay = new QVBoxLayout(m_pSwitchgroup->layout()); 66.110 + m_pSwitchlay->setAlignment(Qt::AlignTop); 66.111 + 66.112 + // Optional file backups with hard coded extension .bak 66.113 + m_pBackupcheck = new QCheckBox(m_pSwitchgroup, "Backupbutton"); 66.114 + m_pBackupcheck->setText(trUtf8("Make .bak file on save", "Comment for Backupcheck")); 66.115 + QToolTip::add(m_pBackupcheck, trUtf8("Make a .bak file when saving", "Comment for toolTip Backupcheck")); 66.116 + QWhatsThis::add(m_pBackupcheck, trUtf8("Check this box to enable automatic file backups when overwriting an existing file", "Comment whatsThis for Backupcheck")); 66.117 + m_pSwitchlay->addWidget(m_pBackupcheck); 66.118 + 66.119 + // Optional easy filename appending with hard coded extension .as 66.120 + m_pExtendcheck = new QCheckBox(m_pSwitchgroup, "Extensionbutton"); 66.121 + m_pExtendcheck->setText(trUtf8("Append .as extension", "Comment for Extensioncheck")); 66.122 + QToolTip::add(m_pExtendcheck, trUtf8("Use the .as file extension", "Comment for toolTip Extensioncheck")); 66.123 + QWhatsThis::add(m_pExtendcheck, trUtf8("Check this box to automatically append '.as' to new filenames when saving", "Comment whatsThis for Extensioncheck")); 66.124 + m_pSwitchlay->addWidget(m_pExtendcheck); 66.125 + 66.126 + // Start of report option UI pieces (like detailed report listings) 66.127 + m_pReportgroup = new QButtonGroup(m_pBoolpage, "Reportbuttongroup"); 66.128 + m_pReportgroup->setColumnLayout(0, Qt::Vertical); 66.129 + m_pReportgroup->layout()->setSpacing(6); 66.130 + m_pReportgroup->layout()->setMargin(11); 66.131 + m_pReportgroup->setExclusive(false); 66.132 + m_pReportlay = new QVBoxLayout(m_pReportgroup->layout()); 66.133 + m_pReportlay->setAlignment(Qt::AlignTop); 66.134 + 66.135 + // Optional detailed report listings write all events in range 66.136 + m_pDetailcheck = new QCheckBox(m_pReportgroup, "Detailistbutton"); 66.137 + m_pDetailcheck->setText(trUtf8("Detailed listing", "Comment for Detailcheck")); 66.138 + QToolTip::add(m_pDetailcheck, trUtf8("Write detailed event listings", "Comment for toolTip Detailcheck")); 66.139 + QWhatsThis::add(m_pDetailcheck, trUtf8("Check this box to enable writing of detailed event listings to the local report", "Comment whatsThis for Detailcheck")); 66.140 + m_pReportlay->addWidget(m_pDetailcheck); 66.141 + 66.142 + // Optional signature line in report footer 66.143 + m_pSigncheck = new QCheckBox(m_pReportgroup, "Signaturebutton"); 66.144 + m_pSigncheck->setText(trUtf8("Signature line", "Comment for Signaturecheck")); 66.145 + QToolTip::add(m_pSigncheck, trUtf8("Append a signature line", "Comment for toolTip Signaturecheck")); 66.146 + QWhatsThis::add(m_pSigncheck, trUtf8("Check this box to write a signature line to the report footer", "Comment whatsThis for Signaturecheck")); 66.147 + m_pReportlay->addWidget(m_pSigncheck); 66.148 + m_pBoolayout->addWidget(m_pStylegroup); 66.149 + m_pBinlayout->addWidget(m_pReportgroup); 66.150 + m_pBinlayout->addWidget(m_pSwitchgroup); 66.151 + m_pBoolayout->addLayout(m_pBinlayout); 66.152 + m_pTabselect->insertTab(m_pBoolpage, ""); 66.153 + 66.154 + // Start of paths page UI pieces 66.155 + m_pGeneralpage = new QWidget(m_pTabselect, "Generalpage"); 66.156 + m_pGenlayout = new QHBoxLayout(m_pGeneralpage, 11, 6, "Genlayout"); 66.157 + m_pGenbox = new QGroupBox(m_pGeneralpage, "Groupboxlayout"); 66.158 + m_pGenbox->setColumnLayout(0, Qt::Vertical); 66.159 + m_pGenbox->layout()->setSpacing(6); 66.160 + m_pGenbox->layout()->setMargin(11); 66.161 + m_pGenboxlay = new QHBoxLayout(m_pGenbox->layout()); 66.162 + m_pGenboxlay->setAlignment(Qt::AlignTop); 66.163 + 66.164 + // Start of path text entry preferences UI pieces 66.165 + m_pGeninner = new QGridLayout(0, 4, 2, 0, 16, "Innergrid"); 66.166 + m_pAcctlabel = new QLabel(m_pGenbox, "Accfilelabel"); 66.167 + m_pGeninner->addWidget(m_pAcctlabel, 0, 0); 66.168 + m_pAcctline = new QLineEdit(m_pGenbox, "Accountline"); 66.169 + m_pGeninner->addWidget(m_pAcctline, 0, 1); 66.170 + m_pEventlabel = new QLabel(m_pGenbox, "Evntdirlabel"); 66.171 + m_pGeninner->addWidget(m_pEventlabel, 1, 0); 66.172 + m_pEventline = new QLineEdit(m_pGenbox, "Eventline"); 66.173 + m_pGeninner->addWidget(m_pEventline, 1, 1); 66.174 + m_pHomelabel = new QLabel(m_pGenbox, "Homelabel"); 66.175 + m_pGeninner->addWidget(m_pHomelabel, 2, 0); 66.176 + m_pHomeline = new QLineEdit(m_pGenbox, "Homeline"); 66.177 + m_pGeninner->addWidget(m_pHomeline, 2, 1); 66.178 + m_pUserlabel = new QLabel(m_pGenbox, "Userlabel"); 66.179 + m_pGeninner->addWidget(m_pUserlabel, 3, 0); 66.180 + m_pUserline = new QLineEdit(m_pGenbox, "Userline"); 66.181 + m_pGeninner->addWidget(m_pUserline, 3, 1); 66.182 + m_pGenboxlay->addLayout(m_pGeninner); 66.183 + 66.184 + m_pGenlayout->addWidget(m_pGenbox); 66.185 + m_pTabselect->insertTab(m_pGeneralpage, ""); 66.186 + 66.187 + // Start of remote page UI pieces 66.188 + m_pRemotepage = new QWidget(m_pTabselect, "Remotepage"); 66.189 + m_pRemlayout = new QHBoxLayout(m_pRemotepage, 11, 6, "Remlayout"); 66.190 + m_pRembox = new QGroupBox(m_pRemotepage, "Remoteboxlayout"); 66.191 + 66.192 + m_pRembox->setColumnLayout(0, Qt::Vertical); 66.193 + m_pRembox->layout()->setSpacing(6); 66.194 + m_pRembox->layout()->setMargin(11); 66.195 + m_pRemboxlay = new QHBoxLayout(m_pRembox->layout()); 66.196 + m_pRemboxlay->setAlignment(Qt::AlignTop); 66.197 + 66.198 + // Start of RPC preferences UI pieces 66.199 + m_pReminner = new QGridLayout(0, 5, 2, 0, 12, "Innergrid"); 66.200 + m_pCorbalabel = new QLabel(m_pRembox, "Corbalabel"); 66.201 + m_pReminner->addWidget(m_pCorbalabel, 0, 0); 66.202 + m_pCorbaline = new QLineEdit(m_pRembox, "Corbaline"); 66.203 + m_pReminner->addWidget(m_pCorbaline, 0, 1); 66.204 + m_pCorbacheck = new QCheckBox(m_pRembox, "Corbacheckbox"); 66.205 + m_pReminner->addWidget(m_pCorbacheck, 1, 1); 66.206 + QSpacerItem *Spacey = new QSpacerItem(6, 12, QSizePolicy::Minimum, QSizePolicy::Minimum); 66.207 + m_pReminner->addItem(Spacey, 2, 0); 66.208 + m_pSoaplabel = new QLabel(m_pRembox, "Soaplabel"); 66.209 + m_pReminner->addWidget(m_pSoaplabel, 3, 0); 66.210 + m_pSoapline = new QLineEdit(m_pRembox, "Soapline"); 66.211 + m_pReminner->addWidget(m_pSoapline, 3, 1); 66.212 + m_pSoapcheck = new QCheckBox(m_pRembox, "Corbacheckbox"); 66.213 + m_pReminner->addWidget(m_pSoapcheck, 4, 1); 66.214 + m_pRemboxlay->addLayout(m_pReminner); 66.215 + 66.216 + m_pRemlayout->addWidget(m_pRembox); 66.217 + m_pTabselect->insertTab(m_pRemotepage, ""); 66.218 + 66.219 + // Start of color page UI pieces 66.220 + m_pColourpage = new QWidget(m_pTabselect, "Colourpage"); 66.221 + m_pColourlayout = new QHBoxLayout(m_pColourpage, 11, 6, "Colourlayout"); 66.222 + m_pShadebox = new QGroupBox(m_pColourpage, "Shadegroupbox"); 66.223 + m_pShadebox->setColumnLayout(0, Qt::Horizontal); 66.224 + m_pShadebox->layout()->setSpacing(6); 66.225 + m_pShadebox->layout()->setMargin(11); 66.226 + m_pShadeboxlay = new QVBoxLayout(m_pShadebox->layout()); 66.227 + m_pShadeboxlay->setAlignment(Qt::AlignTop); 66.228 + 66.229 + m_pShadelayout = new QGridLayout(0, 2, 2, 6, 16, "Shadelayout"); 66.230 + m_pLightlab = new QLabel(m_pShadebox, "Lightlabel"); 66.231 + m_pLightlab->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred, this->sizePolicy().hasHeightForWidth()); 66.232 + m_pShadelayout->addWidget(m_pLightlab, 0, 0); 66.233 + m_pLightbutt = new QToolButton(m_pShadebox, "Lightbutton"); 66.234 + m_pLightbutt->setFocusPolicy(QToolButton::TabFocus); 66.235 + m_pLightbutt->setCursor(QCursor(13)); 66.236 + m_pShadelayout->addWidget(m_pLightbutt, 0, 1); 66.237 + 66.238 + m_pDarklab = new QLabel(m_pShadebox, "Darklabel"); 66.239 + m_pDarklab->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred, this->sizePolicy().hasHeightForWidth()); 66.240 + m_pShadelayout->addWidget(m_pDarklab, 1, 0); 66.241 + m_pDarkbutt = new QToolButton(m_pShadebox, "Darkbutton"); 66.242 + m_pDarkbutt->setFocusPolicy(QToolButton::TabFocus); 66.243 + m_pDarkbutt->setCursor(QCursor(13)); 66.244 + m_pShadelayout->addWidget(m_pDarkbutt, 1, 1); 66.245 + 66.246 + m_pRevertlab = new QLabel(m_pShadebox, "Revertlabel"); 66.247 + m_pShadelayout->addWidget(m_pRevertlab, 2, 0); 66.248 + m_pRevertbutt = new QToolButton(m_pShadebox, "Revertbutton"); 66.249 + m_pRevertbutt->setFocusPolicy(QToolButton::TabFocus); 66.250 +// m_pRevertbutt->setIconSet(QIconSet(QPixmap(s_kpcRevcolour_xpm))); 66.251 + m_pRevertbutt->setCursor(QCursor(13)); 66.252 + m_pShadelayout->addWidget(m_pRevertbutt, 2, 1); 66.253 + 66.254 + m_pThemebox = new QGroupBox(m_pColourpage, "Themegroupbox"); 66.255 + m_pThemebox->setColumnLayout(0, Qt::Vertical); 66.256 + m_pThemebox->layout()->setSpacing(6); 66.257 + m_pThemebox->layout()->setMargin(11); 66.258 + m_pThemeboxlay = new QVBoxLayout(m_pThemebox->layout()); 66.259 + 66.260 + QLabel *pPlaceholder = new QLabel(m_pThemebox, "Placeholderlabel"); 66.261 + pPlaceholder->setText(trUtf8("Reserved for future use", "Comment for Placeholderlabel")); 66.262 + m_pThemeboxlay->addWidget(pPlaceholder, 1, Qt::AlignCenter); 66.263 + 66.264 + m_pShadeboxlay->addLayout(m_pShadelayout); 66.265 + m_pColourlayout->addWidget(m_pShadebox); 66.266 + m_pColourlayout->addWidget(m_pThemebox); 66.267 + m_pTabselect->insertTab(m_pColourpage, ""); 66.268 + 66.269 + connect(m_pLightbutt, SIGNAL(clicked(void)), SLOT(shadeLight(void))); 66.270 + connect(m_pDarkbutt, SIGNAL(clicked(void)), SLOT(shadeDark(void))); 66.271 + connect(m_pRevertbutt, SIGNAL(clicked(void)), SLOT(shadeRevert(void))); 66.272 + 66.273 + // Finally add the damn pages to the tab selector widget! 66.274 + m_pVlayout->addWidget(m_pTabselect); 66.275 + 66.276 + // Start of bottom buttons for aknowlegement and commital of changes 66.277 + m_pButtlay = new QHBoxLayout(0, 0, 12, "Buttonlayout"); 66.278 + m_pOkaybutton = new QPushButton(this, "Okaybutton"); 66.279 + m_pOkaybutton->setMinimumWidth(120); 66.280 + m_pOkaybutton->setPaletteBackgroundColor(QColor(202, 194, 182)); 66.281 + m_pOkaybutton->setCursor(QCursor(13)); 66.282 + m_pButtlay->addWidget(m_pOkaybutton); 66.283 + m_pApplybutton = new QPushButton(this, "Applybutton"); 66.284 + m_pApplybutton->setMinimumWidth(120); 66.285 + m_pApplybutton->setPaletteBackgroundColor(QColor(198, 196, 186)); 66.286 + m_pApplybutton->setCursor(QCursor(13)); 66.287 + m_pButtlay->addWidget(m_pApplybutton); 66.288 +// QSpacerItem *Spacey = new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); 66.289 +// m_pButtlay->addItem(Spacey); 66.290 + m_pCancelbutton = new QPushButton(this, "Cancelbutton"); 66.291 + m_pCancelbutton->setMinimumWidth(120); 66.292 + m_pCancelbutton->setPaletteBackgroundColor(QColor(198, 196, 186)); 66.293 + m_pCancelbutton->setCursor(QCursor(13)); 66.294 + m_pButtlay->addWidget(m_pCancelbutton); 66.295 + m_pCancelbutton->setDefault(true); 66.296 + m_pVlayout->addLayout(m_pButtlay); 66.297 + 66.298 + // Connect our signals to slots, accept() and reject() are Qt implicit 66.299 + connect(m_pOkaybutton, SIGNAL(clicked(void)), SLOT(accept(void))); 66.300 + connect(m_pApplybutton, SIGNAL(clicked(void)), SIGNAL(applied(void))); 66.301 + connect(m_pCancelbutton, SIGNAL(clicked(void)), SLOT(reject(void))); 66.302 + connect(m_pCorbacheck, SIGNAL(toggled(bool)), SLOT(enableCorba(bool))); 66.303 + connect(m_pSoapcheck, SIGNAL(toggled(bool)), SLOT(enableSoap(bool))); 66.304 + this->textChange(); 66.305 + this->resize(QSize(400, 264).expandedTo(minimumSizeHint())); 66.306 +} 66.307 + 66.308 +// 66.309 +// Sets the light shading colour for rows 66.310 +// 66.311 +void Prefpanel::shadeLight(void) 66.312 +{ 66.313 + QColorDialog::setCustomColor(0, this->getRevlight()->rgb()); 66.314 + QColorDialog::setCustomColor(1, this->getRevdark()->rgb()); 66.315 + QColorDialog::setCustomColor(2, this->getAltlight()->rgb()); 66.316 + QColorDialog::setCustomColor(3, this->getAltdark()->rgb()); 66.317 + QColor Colortemp = QColorDialog::getColor(*m_pLight); 66.318 + if (Colortemp.isValid()) { 66.319 + delete m_pLight; 66.320 + m_pLight = new QColor(Colortemp); 66.321 + m_pLightbutt->setPaletteBackgroundColor(*m_pLight); 66.322 + } 66.323 +} 66.324 + 66.325 +// 66.326 +// Sets the dark shading colour for rows 66.327 +// 66.328 +void Prefpanel::shadeDark(void) 66.329 +{ 66.330 + QColorDialog::setCustomColor(0, m_pLight->rgb()); 66.331 + QColorDialog::setCustomColor(1, m_pDark->rgb()); 66.332 + QColor Colortemp = QColorDialog::getColor(*m_pDark); 66.333 + if (Colortemp.isValid()) { 66.334 + delete m_pDark; 66.335 + m_pDark = new QColor(Colortemp); 66.336 + m_pDarkbutt->setPaletteBackgroundColor(*m_pDark); 66.337 + } 66.338 +} 66.339 + 66.340 +// 66.341 +// Reverts the shading colours to default values 66.342 +// 66.343 +void Prefpanel::shadeRevert(void) 66.344 +{ 66.345 + delete m_pLight; 66.346 + m_pLight = new QColor(*this->getRevlight()); 66.347 + m_pLightbutt->setPaletteBackgroundColor(*m_pLight); 66.348 + delete m_pDark; 66.349 + m_pDark = new QColor(*this->getRevdark()); 66.350 + m_pDarkbutt->setPaletteBackgroundColor(*m_pDark); 66.351 +} 66.352 + 66.353 +// 66.354 +// Polish off ending changes after creating and before widget shows 66.355 +// 66.356 +void Prefpanel::polish(void) 66.357 +{ 66.358 + // Set our buttons now that user has probably set their colours 66.359 + m_pLightbutt->setPaletteBackgroundColor(*m_pLight); 66.360 + m_pDarkbutt->setPaletteBackgroundColor(*m_pDark); 66.361 +} 66.362 + 66.363 +// 66.364 +// Sets the strings of the subwidgets using the current language 66.365 +// 66.366 +void Prefpanel::textChange(void) 66.367 +{ 66.368 + this->setCaption(trUtf8("AS Applicate Preferences", "Personal preferences are persistent across sessions")); 66.369 + 66.370 + m_pTabselect->changeTab(m_pBoolpage, trUtf8("General")); 66.371 + m_pTabselect->changeTab(m_pGeneralpage, trUtf8("Paths")); 66.372 + m_pTabselect->changeTab(m_pRemotepage, trUtf8("Hosts")); 66.373 + m_pTabselect->changeTab(m_pColourpage, trUtf8("Colour")); 66.374 + 66.375 + m_pOkaybutton->setText(trUtf8("Okay", "Comment for Okaybutton")); 66.376 + QToolTip::add(m_pOkaybutton, trUtf8("Applies and saves changes", "Comment for tooltip Okaybutton")); 66.377 + QWhatsThis::add(m_pOkaybutton, trUtf8("The okay button applies and saves changes", "Comment for whatsThis Okaybutton")); 66.378 + 66.379 + m_pApplybutton->setText(trUtf8("Apply", "Comment for Applybutton")); 66.380 + QToolTip::add(m_pApplybutton, trUtf8("Apply changes immediately", "Comment for toolTip Applybutton")); 66.381 + QWhatsThis::add(m_pApplybutton, trUtf8("The apply button applies changes immediately", "Comment for whatsThis Applybutton")); 66.382 + 66.383 + m_pCancelbutton->setText(trUtf8("Cancel", "Comment for Cancelbutton")); 66.384 + QToolTip::add(m_pCancelbutton, trUtf8("Cancel any changes", "Comment for toolTip Cancelbutton")); 66.385 + QWhatsThis::add(m_pCancelbutton, trUtf8("The cancel button cancels any changes", "Comment for whatsThis Cancelbutton")); 66.386 + 66.387 + m_pGenbox->setTitle(trUtf8("File and directory paths", "Comment for Genbox")); 66.388 + m_pAcctlabel->setText(trUtf8("Accounts path", "Comment for Acctlabel")); 66.389 + m_pEventlabel->setText(trUtf8("Events directory", "Comment for Eventlabel")); 66.390 + m_pUserlabel->setText(trUtf8("User name", "Comment for Userlabel")); 66.391 + m_pHomelabel->setText(trUtf8("Home directory", "Comment for Homelabel")); 66.392 + QToolTip::add(m_pAcctline, trUtf8("The accounts file pathname", "Comment for toolTip Acctline")); 66.393 + QToolTip::add(m_pEventline, trUtf8("The default events directory", "Comment for toolTip Eventline")); 66.394 + QToolTip::add(m_pUserline, trUtf8("The user name", "Comment for toolTip Userline")); 66.395 + QToolTip::add(m_pHomeline, trUtf8("The home directory", "Comment for toolTip Homeline")); 66.396 + 66.397 + m_pRembox->setTitle(trUtf8("Remote host names", "Comment for Rembox")); 66.398 + m_pCorbalabel->setText(trUtf8("CORBA host", "Comment for Corbalabel")); 66.399 + m_pSoaplabel->setText(trUtf8("SOAP host", "Comment for Soaplabel")); 66.400 + QToolTip::add(m_pCorbaline, trUtf8("The CORBA host name", "Comment for toolTip Corbaline")); 66.401 + QToolTip::add(m_pSoapline, trUtf8("The SOAP host name", "Comment for toolTip Soapline")); 66.402 + 66.403 + m_pCorbacheck->setText(trUtf8("Enable IIOP transmission", "Comment for Corbacheck")); 66.404 + QToolTip::add(m_pCorbacheck, trUtf8("Will enable transmission over IIOP", "Comment for toolTip Corbacheck")); 66.405 + QWhatsThis::add(m_pCorbacheck, trUtf8("Check this box to enable transmission to a CORBA host", "Comment whatsThis for Corbacheck")); 66.406 + 66.407 + m_pSoapcheck->setText(trUtf8("Enable SOAP transmission", "Comment for Soapcheck")); 66.408 + QToolTip::add(m_pSoapcheck, trUtf8("Will enable transmission over SOAP", "Comment for toolTip Soapcheck")); 66.409 + QWhatsThis::add(m_pSoapcheck, trUtf8("Check this box to enable transmission to a SOAP host", "Comment whatsThis for Soapcheck")); 66.410 + 66.411 + m_pShadebox->setTitle(trUtf8("Row shading", "Comment for Shadebox")); 66.412 + m_pThemebox->setTitle(trUtf8("Skin themes", "Comment for Themebox")); 66.413 + 66.414 + m_pLightlab->setText(trUtf8("Light", "Comment for Lightlabel")); 66.415 + m_pDarklab->setText(trUtf8("Dark", "Comment for Darklabel")); 66.416 + m_pRevertlab->setText(trUtf8("Revert", "Comment for Revertlabel")); 66.417 + QToolTip::add(m_pLightbutt, trUtf8("Light row shading colour", "Comment for tooltip Lightbutt")); 66.418 + QWhatsThis::add(m_pLightbutt, trUtf8("The Light button sets the light row shading colour.", "Comment for whatsThis Lightbutt")); 66.419 + QToolTip::add(m_pDarkbutt, trUtf8("Dark row shading colour", "Comment for tooltip Darkbutt")); 66.420 + QWhatsThis::add(m_pDarkbutt, trUtf8("The Dark button sets the light row shading colour.", "Comment for whatsThis Darkbutt")); 66.421 + 66.422 + m_pStylegroup->setTitle(trUtf8("Available styles", "Comment for Stylebuttons")); 66.423 + m_pReportgroup->setTitle(trUtf8("Report options", "Comment for Reportbox")); 66.424 + m_pSwitchgroup->setTitle(trUtf8("Other options", "Comment for Switchbox")); 66.425 +}
67.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 67.2 +++ b/as_panel.h Fri Nov 28 11:21:08 2008 +0100 67.3 @@ -0,0 +1,167 @@ 67.4 +// 67.5 +// OSSP asgui - Accounting system graphical user interface 67.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 67.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 67.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 67.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 67.10 +// 67.11 +// This file is part of OSSP asgui, an accounting system graphical user 67.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 67.13 +// 67.14 +// Permission to use, copy, modify, and distribute this software for 67.15 +// any purpose with or without fee is hereby granted, provided that 67.16 +// the above copyright notice and this permission notice appear in all 67.17 +// copies. 67.18 +// 67.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 67.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 67.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 67.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 67.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 67.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 67.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 67.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 67.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 67.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 67.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 67.30 +// SUCH DAMAGE. 67.31 +// 67.32 +// as_panel.h: ISO C++ interface 67.33 +// 67.34 + 67.35 +#ifndef PREFPANEL_H 67.36 +#define PREFPANEL_H 67.37 + 67.38 +#include <qvariant.h> 67.39 +#include <qdialog.h> 67.40 +#include <qbuttongroup.h> 67.41 +#include <qlabel.h> 67.42 +#include <qlineedit.h> 67.43 +#include <qpushbutton.h> 67.44 +#include <qtoolbutton.h> 67.45 +#include <qcolordialog.h> 67.46 +#include <qradiobutton.h> 67.47 +#include <qcheckbox.h> 67.48 +#include <qtabwidget.h> 67.49 +#include <qwidget.h> 67.50 +#include <qlayout.h> 67.51 +#include <qtooltip.h> 67.52 +#include <qwhatsthis.h> 67.53 +#include <qstylefactory.h> 67.54 +#include <qlayout.h> 67.55 + 67.56 +#include "as_gui.h" // For usage of style_t 67.57 + 67.58 + 67.59 +class Prefpanel : public QDialog 67.60 +{ 67.61 + Q_OBJECT 67.62 + 67.63 +public: 67.64 + Prefpanel(QWidget *pParent = 0, const char *kszName = 0, bool bModal = true, WFlags Flags = 0); 67.65 +// ~Prefpanel(void); // No need to destroy widgets, because qt does it for us 67.66 + 67.67 +private: 67.68 + Preferences *m_pPanprefs; 67.69 + QColor *m_pLight, *m_pDark; 67.70 + QColorGroup *m_pOrigcolours, *m_pAltcolours; 67.71 + 67.72 +public: 67.73 + QGroupBox *m_pGenbox, *m_pRembox, *m_pShadebox, *m_pThemebox; 67.74 + QVBoxLayout *m_pStylelay, *m_pReportlay, *m_pSwitchlay; 67.75 + QVBoxLayout *m_pVlayout, *m_pBinlayout; 67.76 + QHBoxLayout *m_pBoolayout, *m_pGenlayout, *m_pRemlayout; 67.77 + QVBoxLayout *m_pShadeboxlay, *m_pThemeboxlay; 67.78 + QHBoxLayout *m_pGenboxlay, *m_pRemboxlay, *m_pColourlayout; 67.79 + QGridLayout *m_pGeninner, *m_pReminner, *m_pShadelayout; 67.80 + 67.81 + QWidget *m_pBoolpage, *m_pGeneralpage, *m_pRemotepage, *m_pColourpage; 67.82 + 67.83 + QHBoxLayout *m_pButtlay; 67.84 + QPushButton *m_pOkaybutton; 67.85 + QPushButton *m_pApplybutton; 67.86 + QPushButton *m_pCancelbutton; 67.87 + QTabWidget *m_pTabselect; 67.88 + 67.89 + QLabel *m_pAcctlabel, *m_pEventlabel; 67.90 + QLabel *m_pUserlabel, *m_pHomelabel; 67.91 + QLabel *m_pCorbalabel, *m_pSoaplabel; 67.92 + QLineEdit *m_pAcctline, *m_pEventline; 67.93 + QLineEdit *m_pUserline, *m_pHomeline; 67.94 + QLineEdit *m_pCorbaline, *m_pSoapline; 67.95 + QCheckBox *m_pCorbacheck, *m_pSoapcheck; 67.96 + 67.97 + QLabel *m_pLightlab, *m_pDarklab, *m_pRevertlab; 67.98 + QToolButton *m_pLightbutt, *m_pDarkbutt, *m_pRevertbutt; 67.99 + 67.100 + QButtonGroup *m_pStylegroup, *m_pReportgroup, *m_pSwitchgroup; 67.101 + QCheckBox *m_pBackupcheck, *m_pExtendcheck; 67.102 + QCheckBox *m_pDetailcheck, *m_pSigncheck; 67.103 + 67.104 +public: 67.105 + // Accessor get methods 67.106 + QString getStyle(void) {return (m_pStylegroup->selected()->text());}; 67.107 + QString getAccounts(void) {return (m_pAcctline->text());}; 67.108 + QString getEvents(void) {return (m_pEventline->text());}; 67.109 + QString getUser(void) {return (m_pUserline->text());}; 67.110 + QString getHome(void) {return (m_pHomeline->text());}; 67.111 + QString getCorbahost(void) {return (m_pCorbaline->text());}; 67.112 + QString getSoaphost(void) {return (m_pSoapline->text());}; 67.113 + bool getCorbaon(void) {return (m_pCorbacheck->isChecked());}; 67.114 + bool getSoapon(void) {return (m_pSoapcheck->isChecked());}; 67.115 + bool getBackon(void) {return (m_pBackupcheck->isChecked());}; 67.116 + bool getExtendon(void) {return (m_pExtendcheck->isChecked());}; 67.117 + bool getDetailon(void) {return (m_pDetailcheck->isChecked());}; 67.118 + bool getSignaton(void) {return (m_pSigncheck->isChecked());}; 67.119 + QColor *getLight(void) {return m_pLight;}; 67.120 + QColor *getDark(void) {return m_pDark;}; 67.121 + QColor *getRevlight(void) {return (QColor *)&m_pOrigcolours->foreground();}; 67.122 + QColor *getRevdark(void) {return (QColor *)&m_pOrigcolours->background();}; 67.123 + QColor *getAltlight(void) {return (QColor *)&m_pAltcolours->foreground();}; 67.124 + QColor *getAltdark(void) {return (QColor *)&m_pAltcolours->background();}; 67.125 + 67.126 + // Accessor set methods 67.127 + void setAccounts(const QString &kInstr) {m_pAcctline->setText(kInstr);}; 67.128 + void setEvents(const QString &kInstr) {m_pEventline->setText(kInstr);}; 67.129 + void setUser(const QString &kInstr) {m_pUserline->setText(kInstr);}; 67.130 + void setHome(const QString &kInstr) {m_pHomeline->setText(kInstr);}; 67.131 + void setCorbahost(const QString &kInstr) {m_pCorbaline->setText(kInstr);}; 67.132 + void setSoaphost(const QString &kInstr) {m_pSoapline->setText(kInstr);}; 67.133 + void setBackon(const bool &kbEnable = true) {m_pBackupcheck->setChecked(kbEnable);}; 67.134 + void setExtendon(const bool &kbEnable = true) {m_pExtendcheck->setChecked(kbEnable);}; 67.135 + void setDetailon(const bool &kbEnable = true) {m_pDetailcheck->setChecked(kbEnable);}; 67.136 + void setSignaton(const bool &kbEnable = true) {m_pSigncheck->setChecked(kbEnable);}; 67.137 + void lockCorba(const bool &kbLock = true) {m_pCorbacheck->setEnabled(!kbLock);}; 67.138 + void lockSoap(const bool &kbLock = true) {m_pSoapcheck->setEnabled(!kbLock);}; 67.139 + void setLight(const QColor *pLight) {m_pLight = (QColor *)pLight;}; 67.140 + void setDark(const QColor *pDark) {m_pDark = (QColor *)pDark;}; 67.141 + void setOrigcolour(QColorGroup *pGroup) {m_pOrigcolours = pGroup;}; 67.142 + void setAltcolour(QColorGroup *pGroup) {m_pAltcolours = pGroup;}; 67.143 + void setCorbaon(const bool &kbEnable = true) { 67.144 + m_pCorbaline->setEnabled(kbEnable); 67.145 + m_pCorbacheck->setChecked(kbEnable); 67.146 + }; 67.147 + void setSoapon(const bool &kbEnable = true) { 67.148 + m_pSoapline->setEnabled(kbEnable); 67.149 + m_pSoapcheck->setChecked(kbEnable); 67.150 + }; 67.151 + void setStyle(const char *pkszStyle) { 67.152 + for (int nIter = 0; nIter < m_pStylegroup->count(); nIter++) 67.153 + if (m_pStylegroup->find(nIter)->text() == pkszStyle) 67.154 + m_pStylegroup->setButton(nIter); 67.155 + }; 67.156 + 67.157 +protected slots: 67.158 + virtual void polish(void); 67.159 + virtual void textChange(void); 67.160 + virtual void shadeLight(void); 67.161 + virtual void shadeDark(void); 67.162 + virtual void shadeRevert(void); 67.163 + void enableCorba(bool bOn) {m_pCorbaline->setEnabled(bOn);}; 67.164 + void enableSoap(bool bOn) {m_pSoapline->setEnabled(bOn);}; 67.165 + 67.166 +signals: 67.167 + void applied(void); 67.168 +}; 67.169 + 67.170 +#endif // PREFPANEL_H
68.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 68.2 +++ b/as_pref.cpp Fri Nov 28 11:21:08 2008 +0100 68.3 @@ -0,0 +1,354 @@ 68.4 +/*************************************************************************** 68.5 + preferences.cc 68.6 + ------------------- 68.7 + A class to access persistant preferences for an application. Utilizes XML/DOM. 68.8 + Basic format is: 68.9 + <!DOCTYPE preferences> 68.10 + <preferences version="0.1" application="MyApp" > 68.11 + <group name="Default" > 68.12 + <option key="alpha" value="true" /> 68.13 + <option key="beta" value="99" /> 68.14 + <option key="gamma" value="test" /> 68.15 + </group> 68.16 + </preferences> 68.17 + ------------------- 68.18 + begin Tue Sep 12 2000 68.19 + author David Johnson, david@usermode.org 68.20 + ------------------- 68.21 + Copyright 2000, David Johnson 68.22 + Please see the header file for copyright and license information 68.23 +***************************************************************************/ 68.24 + 68.25 +// version 2 68.26 + 68.27 +// TODO: fix up to account for worst case scenarios: 68.28 +// keys without values in file, and 68.29 +// checking for a key that doesn't exist puts it into the map 68.30 +// then it gets written out if dirty, possibly corrupting the file 68.31 + 68.32 +// TODO: Fix up error reporting 68.33 + 68.34 +#include <qdom.h> 68.35 +#include <qfile.h> 68.36 +#include <qtextstream.h> 68.37 + 68.38 +#include "as_pref.h" 68.39 + 68.40 +////////////////////////////////////////////////////////////////////////////// 68.41 +// Construction // 68.42 +////////////////////////////////////////////////////////////////////////////// 68.43 + 68.44 +////////////////////////////////////////////////////////////////////////////// 68.45 +// Preferences() 68.46 +// ------------- 68.47 +// Constructor. Takes the preferences file name as an argument. 68.48 + 68.49 +Preferences::Preferences(const QString& filename, 68.50 + const QString& format, 68.51 + const QString& version) 68.52 + : dirty_(false), 68.53 + currentgroup_(), 68.54 + file_(filename), 68.55 + format_(format), 68.56 + version_(version), 68.57 + filestate_(false), 68.58 + formatstate_(false), 68.59 + groups_() 68.60 +{ 68.61 + readData(); 68.62 + dirty_ = false; 68.63 + currentgroup_ = "Default"; 68.64 +} 68.65 + 68.66 +////////////////////////////////////////////////////////////////////////////// 68.67 +// ~Preferences() 68.68 +// --------------- 68.69 +// Destructor 68.70 + 68.71 +Preferences::~Preferences() 68.72 +{ 68.73 + if (dirty_) writeData(); 68.74 +} 68.75 + 68.76 +////////////////////////////////////////////////////////////////////////////// 68.77 +// Settings 68.78 +////////////////////////////////////////////////////////////////////////////// 68.79 + 68.80 +////////////////////////////////////////////////////////////////////////////// 68.81 +// getBoolean() 68.82 +// ------------ 68.83 +// Get a boolean value 68.84 + 68.85 +bool Preferences::getBool(const QString& key, bool def) 68.86 +{ 68.87 + buffer_ = getString(key, def ? "true" : "false"); 68.88 + if (buffer_.isEmpty()) return def; 68.89 + if (buffer_.contains("true")) 68.90 + return true; 68.91 + else 68.92 + return false; 68.93 +} 68.94 + 68.95 +////////////////////////////////////////////////////////////////////////////// 68.96 +// setBoolean() 68.97 +// ------------ 68.98 +// Set a boolean value 68.99 + 68.100 +void Preferences::setBool(const QString& key, bool value) 68.101 +{ 68.102 + groups_[currentgroup_][key] = value ? "true" : "false"; 68.103 + dirty_ = true; 68.104 +} 68.105 + 68.106 +////////////////////////////////////////////////////////////////////////////// 68.107 +// getNumber() 68.108 +// ----------- 68.109 +// Get a number value 68.110 + 68.111 +// TODO: this might be a place for templates 68.112 + 68.113 +long Preferences::getNumber(const QString& key, long def) 68.114 +{ 68.115 + buffer_ = getString(key, QString::number(def)); 68.116 + if (buffer_.isEmpty()) return def; 68.117 + 68.118 + bool ok; 68.119 + long num = buffer_.toLong(&ok); 68.120 + if (ok) return num; 68.121 + else return def; 68.122 +} 68.123 + 68.124 +////////////////////////////////////////////////////////////////////////////// 68.125 +// setNumber() 68.126 +// ----------- 68.127 +// Set a number value 68.128 + 68.129 +void Preferences::setNumber(const QString& key, long value) 68.130 +{ 68.131 + buffer_.setNum(value); 68.132 + 68.133 + groups_[currentgroup_][key] = buffer_; 68.134 + dirty_ = true; 68.135 +} 68.136 + 68.137 +////////////////////////////////////////////////////////////////////////////// 68.138 +// getDouble() 68.139 +// ----------- 68.140 +// Get a double value 68.141 + 68.142 +double Preferences::getDouble(const QString& key, double def) 68.143 +{ 68.144 + buffer_ = getString(key, QString::number(def)); 68.145 + if (buffer_.isEmpty()) return def; 68.146 + 68.147 + bool ok; 68.148 + double num = buffer_.toDouble(&ok); 68.149 + if (ok) return num; 68.150 + else return def; 68.151 +} 68.152 + 68.153 +////////////////////////////////////////////////////////////////////////////// 68.154 +// setDouble() 68.155 +// ----------- 68.156 +// Set a double value 68.157 + 68.158 +void Preferences::setDouble(const QString& key, double value) 68.159 +{ 68.160 + buffer_.setNum(value); 68.161 + 68.162 + groups_[currentgroup_][key] = buffer_; 68.163 + dirty_ = true; 68.164 +} 68.165 + 68.166 + 68.167 +////////////////////////////////////////////////////////////////////////////// 68.168 +// getString() 68.169 +// ----------- 68.170 +// Get a string value 68.171 + 68.172 +QString Preferences::getString(const QString& key, const QString& def) 68.173 +{ 68.174 + buffer_ = ""; 68.175 + if (groups_.contains(currentgroup_)) { 68.176 + if (groups_[currentgroup_].contains(key)) { 68.177 + buffer_ = groups_[currentgroup_][key]; 68.178 + } 68.179 + } 68.180 + if (buffer_.isEmpty()) return def; 68.181 + return buffer_; 68.182 +} 68.183 + 68.184 +////////////////////////////////////////////////////////////////////////////// 68.185 +// setString() 68.186 +// ----------- 68.187 +// Set a string value 68.188 + 68.189 +void Preferences::setString(const QString& key, const QString& value) 68.190 +{ 68.191 + groups_[currentgroup_][key] = value; 68.192 + dirty_ = true; 68.193 +} 68.194 + 68.195 +////////////////////////////////////////////////////////////////////////////// 68.196 +// removeValue() 68.197 +// ------------- 68.198 +// Remove a value from the preferences 68.199 + 68.200 +void Preferences::removeKey(const QString& key) 68.201 +{ 68.202 + groups_[currentgroup_].remove(key); 68.203 +} 68.204 + 68.205 +////////////////////////////////////////////////////////////////////////////// 68.206 +// removeGroup() 68.207 +// ------------- 68.208 +// Remove a group from the preferences, and all its options 68.209 + 68.210 +void Preferences::removeGroup() 68.211 +{ 68.212 + groups_.remove(currentgroup_); 68.213 +} 68.214 + 68.215 +////////////////////////////////////////////////////////////////////////////// 68.216 +// flush() 68.217 +// ------- 68.218 +// Flush the preferences to file 68.219 + 68.220 +void Preferences::flush() 68.221 +{ 68.222 + if (dirty_) { 68.223 + writeData(); 68.224 + dirty_ = false; 68.225 + } 68.226 +} 68.227 + 68.228 +////////////////////////////////////////////////////////////////////////////// 68.229 +// Serialization // 68.230 +////////////////////////////////////////////////////////////////////////////// 68.231 + 68.232 +////////////////////////////////////////////////////////////////////////////// 68.233 +// readData() 68.234 +// ---------- 68.235 +// Read data from the file 68.236 + 68.237 +void Preferences::readData() 68.238 +{ 68.239 + // open file 68.240 + QFile* datafile = new QFile(file_); 68.241 + if (!datafile->open(IO_ReadOnly)) { 68.242 + // error opening file 68.243 + qWarning("Error: cannot open preferences file " + file_); 68.244 + datafile->close(); 68.245 + delete (datafile); 68.246 + filestate_ = false; 68.247 + return; 68.248 + } 68.249 + filestate_ = true; 68.250 + 68.251 + // open dom document 68.252 + QDomDocument doc("preferences"); 68.253 + if (!doc.setContent(datafile)) { 68.254 + qWarning("Error: " + file_ + " is not a proper preferences file"); 68.255 + datafile->close(); 68.256 + delete (datafile); 68.257 + formatstate_ = false; 68.258 + return; 68.259 + } 68.260 + datafile->close(); 68.261 + delete (datafile); 68.262 + 68.263 + // check the doc type and stuff 68.264 + if (doc.doctype().name() != "preferences") { 68.265 + // wrong file type 68.266 + qWarning("Error: " +file_ + " is not a valid preferences file"); 68.267 + formatstate_ = false; 68.268 + return; 68.269 + } 68.270 + QDomElement root = doc.documentElement(); 68.271 + if (root.attribute("application") != format_) { 68.272 + // right file type, wrong application 68.273 + qWarning("Error: " + file_ + " is not a preferences file for " + format_); 68.274 + formatstate_ = false; 68.275 + return; 68.276 + } 68.277 + // We don't care about application version... 68.278 + 68.279 + // get list of groups 68.280 + QDomNodeList nodes = root.elementsByTagName("group"); 68.281 + 68.282 + // iterate through the groups 68.283 + QDomNodeList options; 68.284 + for (unsigned n=0; n<nodes.count(); ++n) { 68.285 + if (nodes.item(n).isElement()) { 68.286 + processGroup(nodes.item(n).toElement()); 68.287 + } 68.288 + } 68.289 + formatstate_ = true; 68.290 +} 68.291 + 68.292 +void Preferences::processGroup(QDomElement group) 68.293 +{ 68.294 + QDomElement elem; 68.295 + QDomNodeList options; 68.296 + currentgroup_ = group.attribute("name", "Default"); 68.297 + options = group.elementsByTagName("option"); 68.298 + for (unsigned n=0; n<options.count(); ++n) { 68.299 + if (options.item(n).isElement()) { 68.300 + elem = options.item(n).toElement(); 68.301 + setString(elem.attribute("key"), elem.attribute("value")); 68.302 + } 68.303 + } 68.304 +} 68.305 + 68.306 +////////////////////////////////////////////////////////////////////////////// 68.307 +// writeData() 68.308 +// ----------- 68.309 +// Write data out to the file 68.310 + 68.311 +void Preferences::writeData() 68.312 +{ 68.313 + QDomDocument doc("preferences"); 68.314 + 68.315 + // create the root element 68.316 + QDomElement root = doc.createElement(doc.doctype().name()); 68.317 + root.setAttribute("version", version_); 68.318 + root.setAttribute("application", format_); 68.319 + 68.320 + // now do our options group by group 68.321 + QMap<QString, PrefMap>::Iterator git; 68.322 + PrefMap::Iterator pit; 68.323 + QDomElement group, option; 68.324 + for (git = groups_.begin(); git != groups_.end(); ++git) { 68.325 + // create a group element 68.326 + group = doc.createElement("group"); 68.327 + group.setAttribute("name", git.key()); 68.328 + // add in options 68.329 + for (pit = (*git).begin(); pit != (*git).end(); ++pit) { 68.330 + option = doc.createElement("option"); 68.331 + option.setAttribute("key", pit.key()); 68.332 + option.setAttribute("value", pit.data()); 68.333 + group.appendChild(option); 68.334 + } 68.335 + root.appendChild(group); 68.336 + } 68.337 + doc.appendChild(root); 68.338 + 68.339 + // open file 68.340 + QFile* datafile = new QFile(file_); 68.341 + if (!datafile->open(IO_WriteOnly)) { 68.342 + // error opening file 68.343 + qWarning("Error: Cannot open preferences file " + file_); 68.344 + datafile->close(); 68.345 + delete (datafile); 68.346 + filestate_ = false; 68.347 + return; 68.348 + } 68.349 + filestate_ = true; 68.350 + 68.351 + // write it out 68.352 + QTextStream textstream(datafile); 68.353 + doc.save(textstream, 0); 68.354 + datafile->close(); 68.355 + delete (datafile); 68.356 + formatstate_ = true; 68.357 +}
69.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 69.2 +++ b/as_pref.h Fri Nov 28 11:21:08 2008 +0100 69.3 @@ -0,0 +1,134 @@ 69.4 +/*************************************************************************** 69.5 + preferences.h 69.6 + ------------------- 69.7 + A class to access persistant preferences for an application. Utilizes XML/DOM. 69.8 + Basic format is: 69.9 + <!DOCTYPE preferences> 69.10 + <preferences version="0.1" application="MyApp" > 69.11 + <group name="Default" > 69.12 + <option key="alpha" value="true" /> 69.13 + <option key="beta" value="99" /> 69.14 + <option key="gamma" value="test" /> 69.15 + </group> 69.16 + </preferences> 69.17 + ------------------- 69.18 + begin Tue Sep 12 2000 69.19 + author David Johnson, david@usermode.org 69.20 + ------------------- 69.21 + Copyright 2000, David Johnson 69.22 + All rights reserved. 69.23 + 69.24 + Redistribution and use in source and binary forms, with or without 69.25 + modification, are permitted provided that the following conditions are met: 69.26 + 69.27 + 1. Redistributions of source code must retain the above copyright notice, this 69.28 + list of conditions and the following disclaimer. 69.29 + 69.30 + 2. Redistributions in binary form must reproduce the above copyright notice, 69.31 + this list of conditions and the following disclaimer in the documentation 69.32 + and/or other materials provided with the distribution. 69.33 + 69.34 + 3. Neither name of the copyright holders nor the names of its contributors may 69.35 + be used to endorse or promote products derived from this software without 69.36 + specific prior written permission. 69.37 + 69.38 + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' 69.39 + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 69.40 + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 69.41 + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE 69.42 + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 69.43 + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 69.44 + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 69.45 + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 69.46 + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 69.47 + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 69.48 + ***************************************************************************/ 69.49 + 69.50 +// version 2 69.51 + 69.52 +#ifndef PREFERENCES_H 69.53 +#define PREFERENCES_H 69.54 + 69.55 +#include <qapplication.h> 69.56 +#include <qstring.h> 69.57 +#include <qmap.h> 69.58 + 69.59 +class QDomElement; 69.60 + 69.61 +class Preferences { 69.62 +public: 69.63 + // constructor 69.64 + Preferences(const QString& filename, const QString& format, const QString& version); 69.65 + // destructor 69.66 + virtual ~Preferences(void); 69.67 + 69.68 + // preference file information 69.69 + const QString& file(); 69.70 + const QString& format(); 69.71 + const QString& version(); 69.72 + // did file open successfully? 69.73 + bool fileState(); 69.74 + // is this a proper preferences file for format? 69.75 + bool formatState(); 69.76 + 69.77 + // group settings 69.78 + const QString& getGroup(); 69.79 + void setGroup(const QString& group); 69.80 + 69.81 + // boolean data storage 69.82 + bool getBool(const QString& key, bool def = false); 69.83 + void setBool(const QString& key, bool value); 69.84 + // integer data storage 69.85 + long getNumber(const QString& key, long def = 0); 69.86 + void setNumber(const QString& key, long value); 69.87 + // double data storage 69.88 + double getDouble(const QString& key, double def = 0.0); 69.89 + void setDouble(const QString& key, double value); 69.90 + // string data storage 69.91 + QString getString(const QString& key, const QString& def = "NULL"); 69.92 + void setString(const QString& key, const QString& value); 69.93 + 69.94 + // remove a key/value from the preferences 69.95 + void removeKey(const QString& key); 69.96 + // remove the current group from the preferences 69.97 + void removeGroup(); 69.98 + 69.99 + // flush the preferences out to file 69.100 + void flush(); 69.101 + 69.102 +protected: 69.103 + // serialization 69.104 + void readData(); 69.105 + void writeData(); 69.106 + void processGroup(QDomElement group); 69.107 + 69.108 +private: 69.109 + bool dirty_; 69.110 + QString currentgroup_; 69.111 + QString file_; 69.112 + QString format_; 69.113 + QString version_; 69.114 + QString buffer_; 69.115 + bool filestate_; 69.116 + bool formatstate_; 69.117 + 69.118 + typedef QMap<QString, QString> PrefMap; 69.119 + QMap<QString, PrefMap> groups_; 69.120 +}; 69.121 + 69.122 +////////////////////////////////////////////////////////////////////////////// 69.123 +// Inline methods 69.124 + 69.125 +inline const QString& Preferences::file() { return file_; }; 69.126 + 69.127 +inline const QString& Preferences::format() { return format_; } 69.128 + 69.129 +inline bool Preferences::fileState() { return filestate_; } 69.130 + 69.131 +inline bool Preferences::formatState() { return formatstate_; } 69.132 + 69.133 +inline void Preferences::setGroup(const QString& group) { currentgroup_ = group; } 69.134 + 69.135 +inline const QString& Preferences::getGroup() { return currentgroup_; } 69.136 + 69.137 +#endif // PREFERENCES
70.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 70.2 +++ b/as_rand.cpp Fri Nov 28 11:21:08 2008 +0100 70.3 @@ -0,0 +1,137 @@ 70.4 +// 70.5 +// OSSP asgui - Accounting system graphical user interface 70.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 70.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 70.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 70.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 70.10 +// 70.11 +// This file is part of OSSP asgui, an accounting system graphical user 70.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 70.13 +// 70.14 +// Permission to use, copy, modify, and distribute this software for 70.15 +// any purpose with or without fee is hereby granted, provided that 70.16 +// the above copyright notice and this permission notice appear in all 70.17 +// copies. 70.18 +// 70.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 70.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 70.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 70.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 70.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 70.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 70.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 70.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 70.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 70.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 70.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 70.30 +// SUCH DAMAGE. 70.31 +// 70.32 +// as_rand.cpp: ISO C++ implementation 70.33 +// 70.34 + 70.35 +#include <fcntl.h> 70.36 +#include <cerrno> 70.37 + 70.38 +#include "as_rand.h" 70.39 + 70.40 +#if HAVE_UNISTD_H 70.41 +#include <unistd.h> 70.42 +#endif // HAVE_UNISTD_H 70.43 +#if HAVE_STDLIB_H 70.44 +#include <stdlib.h> 70.45 +#endif // HAVE_STDLIB_H 70.46 + 70.47 +#if TIME_WITH_SYS_TIME 70.48 +#include <sys/time.h> 70.49 +#include <time.h> 70.50 +#else 70.51 +#if HAVE_SYS_TIME_H 70.52 +#include <sys/time.h> 70.53 +#else 70.54 +#include <time.h> 70.55 +#endif // HAVE_SYS_TIME_H 70.56 +#endif // TIME_WITH_SYS_TIME 70.57 + 70.58 + 70.59 +namespace AS { 70.60 + 70.61 +// Constructor 70.62 +Rand::Rand(void) 70.63 +{ 70.64 + this->nFd = -4; // Object fresh status 70.65 + this->openDevice(); // Open the random device 70.66 +// if (this->nFd < 0) 70.67 +// throw Genexcept("Could not open /dev/urandom or /dev/random."); 70.68 +} 70.69 + 70.70 +// Destructor 70.71 +Rand::~Rand(void) 70.72 +{ 70.73 + this->closeDevice(); // Close the random device 70.74 + this->nFd = -4; // Return this object to its fresh status 70.75 +} 70.76 + 70.77 +// 70.78 +// Rand::openDevice(void) 70.79 +// Open the random device associated with this object 70.80 +// 70.81 +void Rand::openDevice(void) 70.82 +{ 70.83 + struct timeval Time; 70.84 + 70.85 + if (this->nFd == -4) { // -4 indicates a fresh object 70.86 + gettimeofday(&Time, 0); 70.87 + this->nFd = open("/dev/urandom", O_RDONLY); 70.88 + if (this->nFd == -1) 70.89 + this->nFd = open("/dev/random", O_RDONLY | O_NONBLOCK); 70.90 + srand((getpid() << 16) ^ getuid() ^ Time.tv_sec ^ Time.tv_usec); // Seed 70.91 + } 70.92 + 70.93 + // Improve randomness by stirring in entropy 70.94 + gettimeofday(&Time, 0); 70.95 + for (int nIter = (Time.tv_sec ^ Time.tv_usec) & 0x1F; nIter > 0; nIter--) 70.96 + rand(); 70.97 +} 70.98 + 70.99 +// 70.100 +// Rand::closeDevice(void) 70.101 +// Close the random device associated with this object 70.102 +// 70.103 +void Rand::closeDevice(void) 70.104 +{ 70.105 + if (this->nFd >= 0) 70.106 + close(this->nFd); 70.107 +} 70.108 + 70.109 +// 70.110 +// Rand::genData(void *pvBuf, int nBytes) 70.111 +// Generate a series of random data from the system 70.112 +// standard random devices /dev/[u|s]random 70.113 +// 70.114 +void Rand::genData(void *pBuf, int nBytes) 70.115 +{ 70.116 + int nRead = 0; 70.117 + int nLost = 0; 70.118 + char *szOut = (char *)pBuf; 70.119 + 70.120 + if (this->nFd >= 0) { 70.121 + while (nBytes > 0) { 70.122 + nRead = read(this->nFd, szOut, nBytes); 70.123 + if ((nRead < 0) && ((errno == EINTR) || (errno == EAGAIN))) 70.124 + continue; 70.125 + if (nRead <= 0) { 70.126 + if (nLost++ == 8) 70.127 + break; 70.128 + continue; 70.129 + } 70.130 + nBytes -= nRead; 70.131 + szOut += nRead; 70.132 + nLost = 0; 70.133 + } 70.134 + } 70.135 + 70.136 + // For systems with no /dev/random, we do the next best thing 70.137 + for (int nIter = 0; nIter< nBytes; nIter++) 70.138 + *szOut++ = rand() & 0xFF; 70.139 +} 70.140 +} // namespace AS
71.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 71.2 +++ b/as_rand.h Fri Nov 28 11:21:08 2008 +0100 71.3 @@ -0,0 +1,63 @@ 71.4 +// 71.5 +// OSSP asgui - Accounting system graphical user interface 71.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 71.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 71.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 71.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 71.10 +// 71.11 +// This file is part of OSSP asgui, an accounting system graphical user 71.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 71.13 +// 71.14 +// Permission to use, copy, modify, and distribute this software for 71.15 +// any purpose with or without fee is hereby granted, provided that 71.16 +// the above copyright notice and this permission notice appear in all 71.17 +// copies. 71.18 +// 71.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 71.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 71.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 71.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 71.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 71.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 71.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 71.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 71.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 71.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 71.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 71.30 +// SUCH DAMAGE. 71.31 +// 71.32 +// as_rand.h: ISO C++ interface 71.33 +// 71.34 + 71.35 +#ifndef RAND_H 71.36 +#define RAND_H 71.37 + 71.38 +#ifdef HAVE_CONFIG_H 71.39 +#include "ac_config.h" 71.40 +#endif 71.41 + 71.42 + 71.43 +namespace AS { 71.44 + 71.45 +// 71.46 +// Generates (multiple) random numbers, using the 71.47 +// system standard random devices or a choppy 71.48 +// home made algorythm if no devices exist 71.49 +// 71.50 +class Rand 71.51 +{ 71.52 +private: 71.53 + int nFd; // File descriptor of random device 71.54 + 71.55 +public: 71.56 + Rand(void); // Constructor 71.57 + ~Rand(void); // Destructor 71.58 + void genData(void *, int); // Generates a number 71.59 + 71.60 +private: 71.61 + void openDevice(void); // Opens the random device 71.62 + void closeDevice(void); // Closes the random device 71.63 +}; 71.64 +} 71.65 + 71.66 +#endif // RAND_H
72.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 72.2 +++ b/as_reportpanel.cpp Fri Nov 28 11:21:08 2008 +0100 72.3 @@ -0,0 +1,762 @@ 72.4 +// 72.5 +// OSSP asgui - Accounting system graphical user interface 72.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 72.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 72.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 72.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 72.10 +// 72.11 +// This file is part of OSSP asgui, an accounting system graphical user 72.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 72.13 +// 72.14 +// Permission to use, copy, modify, and distribute this software for 72.15 +// any purpose with or without fee is hereby granted, provided that 72.16 +// the above copyright notice and this permission notice appear in all 72.17 +// copies. 72.18 +// 72.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 72.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 72.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 72.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 72.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 72.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 72.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 72.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 72.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 72.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 72.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 72.30 +// SUCH DAMAGE. 72.31 +// 72.32 +// as_reportpanel.cpp: ISO C++ implementation 72.33 +// 72.34 + 72.35 +#include <qvariant.h> 72.36 +#include <qpushbutton.h> 72.37 +#include <qtextedit.h> 72.38 +#include <qtoolbutton.h> 72.39 +#include <qbuttongroup.h> 72.40 +#include <qpopupmenu.h> 72.41 +#include <qlayout.h> 72.42 +#include <qtooltip.h> 72.43 +#include <qwhatsthis.h> 72.44 +#include <qtextstream.h> 72.45 +#include <qfiledialog.h> 72.46 +#include <qprinter.h> 72.47 +#include <qpaintdevicemetrics.h> 72.48 +#include <qpainter.h> 72.49 +#include <qfile.h> 72.50 +#include <qdir.h> 72.51 + 72.52 +#include "as_reportpanel.h" 72.53 +#include "as_numdial.h" 72.54 +#include "as_table.h" 72.55 +#include "as_pref.h" 72.56 +#include "as_generic.h" 72.57 +#include "as_const.h" 72.58 +#include "as_except.h" 72.59 + 72.60 +// Version information 72.61 +#define _AS_VERSION_CPP_AS_HEADER_ 72.62 +#include "as_version.cpp" 72.63 +#undef _AS_VERSION_CPP_AS_HEADER_ 72.64 + 72.65 + 72.66 +namespace AS { 72.67 + 72.68 +// 72.69 +// Constructs a Reportpanel as a child of 'pParent', with the 72.70 +// name 'kszName' and widget flags set to 'Flags'. 72.71 +// 72.72 +// The dialog will by default be modal, unless you set 'bModal' to 72.73 +// false to construct a modeless dialog. 72.74 +// 72.75 +Reportpanel::Reportpanel(TiTable *pTable, Preferences *pPreferences, 72.76 + QWidget *pParent, const char *kszName, 72.77 + bool bModal, WFlags Flags) 72.78 + : QDialog(pParent, kszName, bModal, Flags) 72.79 +{ 72.80 + // Boilerplate code to initialize the panel 72.81 + if (!kszName) 72.82 + this->setName("Reportpanel"); 72.83 + 72.84 + // Make panel resizeable 72.85 + this->setSizeGripEnabled(true); 72.86 + this->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)5, 72.87 + (QSizePolicy::SizeType)5, 0, 0, this->sizePolicy().hasHeightForWidth())); 72.88 + 72.89 + // Store matrix and prefs members 72.90 + m_pReptable = pTable; 72.91 + m_pReprefs = pPreferences; 72.92 + m_pPrinter = new QPrinter; 72.93 + 72.94 + // Preset number of weeks and months to report 72.95 + m_nWeeks = m_pReprefs->getNumber(TITRAQ_PREFREPORTWEEKS, TITRAQ_DEFREPORTWEEKS); 72.96 + m_nMonths = m_pReprefs->getNumber(TITRAQ_PREFREPORTMONTHS, TITRAQ_DEFREPORTMONTHS); 72.97 + 72.98 + // Build panel using already constructed widgets and layouts 72.99 + m_pFormlay = new QVBoxLayout(this, 11, 6, "Formlayout"); 72.100 + m_pToolay = new QHBoxLayout(0, 0, 6, "Toolbuttonlay"); 72.101 + m_pPushlay = new QHBoxLayout(0, 0, 6, "Pushbuttonlay"); 72.102 + 72.103 + // Groupbox and its text display 72.104 + m_pBrowser = new QTextEdit(this, "Reportbrowser"); 72.105 + m_pBrowser->setTextFormat(PlainText); 72.106 + m_pBrowser->setReadOnly(true); 72.107 + m_pBrowser->setFont(QFont("Courier", 10)); 72.108 + m_pFormlay->addWidget(m_pBrowser); 72.109 + m_pFormlay->addSpacing(6); 72.110 + m_pFormlay->addLayout(m_pToolay); 72.111 + m_pFormlay->addSpacing(6); 72.112 + m_pFormlay->addLayout(m_pPushlay); 72.113 + 72.114 + // Tool button suite 72.115 + m_pWeekmonthgroup = new QButtonGroup(this, "Weekmonthgroup"); 72.116 + m_pWeekmonthgroup->setColumnLayout(0, Qt::Horizontal); 72.117 + m_pWeekmonthgroup->layout()->setSpacing(11); 72.118 + m_pWeekmonthgroup->layout()->setMargin(0); 72.119 + m_pWeekmonthlay = new QHBoxLayout(m_pWeekmonthgroup->layout()); 72.120 + m_pWeekmonthgroup->setFrameShape(QFrame::NoFrame); 72.121 + m_pWeekmonthgroup->setExclusive(true); 72.122 + m_pWeeklybutt = new QToolButton(m_pWeekmonthgroup, "Weeklybutton"); 72.123 +// m_pWeeklybutt->setPaletteBackgroundColor(QColor(198, 196, 186)); 72.124 + m_pWeeklybutt->setFocusPolicy(QWidget::TabFocus); 72.125 + m_pWeeklybutt->setCursor(QCursor(13)); 72.126 + m_pWeeklybutt->setToggleButton(true); 72.127 + m_pMonthlybutt = new QToolButton(m_pWeekmonthgroup, "Monthlybutton"); 72.128 +// m_pMonthlybutt->setPaletteBackgroundColor(QColor(198, 196, 186)); 72.129 + m_pMonthlybutt->setFocusPolicy(QWidget::TabFocus); 72.130 + m_pMonthlybutt->setCursor(QCursor(13)); 72.131 + m_pMonthlybutt->setToggleButton(true); 72.132 + 72.133 + // Popup for number of weeks 72.134 + m_pWeekpop = new QPopupMenu(this); 72.135 + if (m_pWeekpop == NULL) // Sanity check 72.136 + throw Genexcept("Weekly toolbutton popup creation failed."); 72.137 + m_pWeekpop->insertItem(trUtf8("One week"), this, SLOT(reportWeeks(int))); 72.138 + m_pWeekpop->insertItem(trUtf8("Two weeks"), this, SLOT(reportWeeks(int))); 72.139 + m_pWeekpop->insertItem(trUtf8("Three weeks"), this, SLOT(reportWeeks(int))); 72.140 + m_pWeekpop->insertItem(trUtf8("Four weeks"), this, SLOT(reportWeeks(int))); 72.141 + m_pWeekpop->insertItem(trUtf8("N... weeks"), this, SLOT(reportWeeks(int))); 72.142 + m_pWeekpop->setCheckable(true); 72.143 + m_pWeeklybutt->setPopup(m_pWeekpop); 72.144 + m_pWeeklybutt->setPopupDelay(TITRAQ_POPUPMSECS); 72.145 + 72.146 + { // Initialize check button correctly 72.147 + int nPosition = (m_nWeeks < m_pWeekpop->count()) ? m_nWeeks : m_pWeekpop->count(); 72.148 + m_pWeekpop->setItemChecked(m_pWeekpop->idAt(--nPosition), true); 72.149 + } 72.150 + 72.151 + // Popup for number of months 72.152 + m_pMonthpop = new QPopupMenu(this); 72.153 + if (m_pMonthpop == NULL) // Sanity check 72.154 + throw Genexcept("Monthly toolbutton popup creation failed."); 72.155 + m_pMonthpop->insertItem(trUtf8("One month"), this, SLOT(reportMonths(int))); 72.156 + m_pMonthpop->insertItem(trUtf8("Two months"), this, SLOT(reportMonths(int))); 72.157 + m_pMonthpop->insertItem(trUtf8("Three months"), this, SLOT(reportMonths(int))); 72.158 + m_pMonthpop->insertItem(trUtf8("Four months"), this, SLOT(reportMonths(int))); 72.159 + m_pMonthpop->insertItem(trUtf8("N... months"), this, SLOT(reportMonths(int))); 72.160 + m_pMonthpop->setCheckable(true); 72.161 + m_pMonthlybutt->setPopup(m_pMonthpop); 72.162 + m_pMonthlybutt->setPopupDelay(TITRAQ_POPUPMSECS); 72.163 + 72.164 + { // Initialize check button correctly 72.165 + int nPosition = (m_nMonths < m_pMonthpop->count()) ? m_nMonths : m_pMonthpop->count(); 72.166 + m_pMonthpop->setItemChecked(m_pMonthpop->idAt(--nPosition), true); 72.167 + } 72.168 + 72.169 + // Add our tool buttons 72.170 + m_pWeekmonthlay->addWidget(m_pWeeklybutt); 72.171 + m_pWeekmonthlay->addWidget(m_pMonthlybutt); 72.172 + m_pToolay->addWidget(m_pWeekmonthgroup); 72.173 + 72.174 + // Push button suite 72.175 + m_pSavebutt = new QPushButton(this, "Savebutton"); 72.176 + m_pSavebutt->setPaletteBackgroundColor(QColor(202, 194, 182)); 72.177 + m_pSavebutt->setCursor(QCursor(13)); 72.178 + m_pPrintbutt = new QPushButton(this, "Printbutton"); 72.179 + m_pPrintbutt->setPaletteBackgroundColor(QColor(198, 196, 186)); 72.180 + m_pPrintbutt->setCursor(QCursor(13)); 72.181 +#ifdef QT_NO_PRINTER 72.182 + m_pPrintbutt->setEnabled(false); 72.183 +#endif 72.184 + m_pDismissbutt = new QPushButton(this, "Dismissbutton"); 72.185 + m_pDismissbutt->setPaletteBackgroundColor(QColor(198, 196, 186)); 72.186 + m_pDismissbutt->setCursor(QCursor(13)); 72.187 + m_pDismissbutt->setDefault(true); 72.188 + m_pPushlay->addWidget(m_pSavebutt); 72.189 + m_pPushlay->addWidget(m_pPrintbutt); 72.190 + m_pPushlay->addWidget(m_pDismissbutt); 72.191 + 72.192 + // Connect signals to slots, accept() and reject() are Qt implicit 72.193 + connect(m_pWeeklybutt, SIGNAL(clicked(void)), SLOT(reportWeeks(void))); 72.194 + connect(m_pMonthlybutt, SIGNAL(clicked(void)), SLOT(reportMonths(void))); 72.195 + connect(m_pSavebutt, SIGNAL(clicked(void)), SLOT(saveReport(void))); 72.196 + connect(m_pPrintbutt, SIGNAL(clicked(void)), SLOT(printReport(void))); 72.197 + connect(m_pDismissbutt, SIGNAL(clicked(void)), SLOT(accept(void))); 72.198 + this->resize(QSize(464, 332).expandedTo(minimumSizeHint())); 72.199 + this->textChange(); 72.200 +} 72.201 + 72.202 +// 72.203 +// Overload QDialog::exec(), and generate a report before executing modally 72.204 +// 72.205 +int Reportpanel::exec(void) 72.206 +{ 72.207 + int nRet = 0; 72.208 + int nPeriod = m_pReprefs->getNumber(TITRAQ_PREFREPORTYPE, TITRAQ_DEFREPORTYPE); 72.209 + 72.210 + switch (nPeriod) { 72.211 + case TITRAQ_REPORTWEEK: 72.212 + this->reportWeeks(1); 72.213 + m_pWeekmonthgroup->setButton(TITRAQ_REPORTWEEK); 72.214 + break; 72.215 + case TITRAQ_REPORTMONTH: 72.216 + this->reportMonths(1); 72.217 + m_pWeekmonthgroup->setButton(TITRAQ_REPORTMONTH); 72.218 + break; 72.219 + default: 72.220 + throw Genexcept("Reportpanel: Modal event loop entered with no report period."); 72.221 + break; 72.222 + } 72.223 + 72.224 + nRet = QDialog::exec(); // Blast off 72.225 + 72.226 + // Before losing scope, the preferred report period 72.227 + m_pReprefs->setNumber(TITRAQ_PREFREPORTYPE, 72.228 + m_pWeekmonthgroup->id(m_pWeekmonthgroup->selected())); 72.229 + m_pReprefs->setNumber(TITRAQ_PREFREPORTWEEKS, m_nWeeks); 72.230 + m_pReprefs->setNumber(TITRAQ_PREFREPORTMONTHS, m_nMonths); 72.231 + return nRet; 72.232 +} 72.233 + 72.234 +// 72.235 +// Makes a new weekly report of so many weeks 72.236 +// 72.237 +void Reportpanel::reportWeeks(int nMenuid) 72.238 +{ 72.239 + // Range of weeks to report 72.240 + int nFirstweek, nLastweek; 72.241 + 72.242 + // Menu index, first item is always 0 72.243 + int nIndex = m_pWeekpop->indexOf(nMenuid); // Corresponds to weeks 72.244 + int nLastid = 0; // Last menu id selected 72.245 + 72.246 + if (m_nWeeks < m_pWeekpop->count()) 72.247 + nLastid = m_pWeekpop->idAt(m_nWeeks - 1); // Probably not last item 72.248 + else 72.249 + nLastid = m_pWeekpop->idAt(m_pWeekpop->count() - 1); // Last item selected 72.250 + 72.251 + // Set the button in case from a menu selection 72.252 + m_pWeekmonthgroup->setButton(TITRAQ_REPORTWEEK); 72.253 + 72.254 + // Update m_nWeeks only if user prefers a different number 72.255 + if (nIndex >= 0) { 72.256 + // User selected N... to indicate an arbitrary number 72.257 + if (nIndex == m_pWeekpop->count() - 1) { 72.258 + Numdial Weeksinput; 72.259 + Weeksinput.setNum(m_nWeeks); 72.260 + if (Weeksinput.exec() == QDialog::Accepted) { 72.261 + m_nWeeks = Weeksinput.getNum(); 72.262 + m_pWeekpop->setItemChecked(nLastid, false); 72.263 + m_pWeekpop->setItemChecked(nMenuid, true); 72.264 + } 72.265 + else 72.266 + return; 72.267 + } 72.268 + else { // User selected a preset menu item such as '2 weeks' 72.269 + m_nWeeks = nIndex + 1; 72.270 + m_pWeekpop->setItemChecked(nLastid, false); 72.271 + m_pWeekpop->setItemChecked(nMenuid, true); 72.272 + } 72.273 + } 72.274 + 72.275 + // Clear data window 72.276 + m_pBrowser->setUpdatesEnabled(false); 72.277 + m_pBrowser->clear(); 72.278 + 72.279 + // Determine first and last week numbers, then write header 72.280 + nLastweek = QDate::currentDate().weekNumber(); 72.281 + if (m_nWeeks > 1) { 72.282 + nFirstweek = QDate::currentDate().addDays(m_nWeeks * -7).weekNumber() + 1; 72.283 + this->writeHeader(nFirstweek, nLastweek); 72.284 + } 72.285 + else 72.286 + this->writeHeader(nLastweek); 72.287 + 72.288 + // Write new contents to data window 72.289 + m_pBrowser->append(this->getWeektotals(QDate::currentDate(), m_nWeeks)); 72.290 + if (m_pReprefs->getBool(TITRAQ_PREFDETAILON, TITRAQ_DEFDETAILON)) 72.291 + m_pBrowser->append(this->getWeekdetails(QDate::currentDate(), m_nWeeks)); 72.292 + this->writeFooter(); 72.293 + m_pBrowser->setCursorPosition(0, 0); 72.294 + m_pBrowser->ensureCursorVisible(); 72.295 + m_pBrowser->setUpdatesEnabled(true); 72.296 + m_pBrowser->repaint(false); 72.297 +} 72.298 + 72.299 +// 72.300 +// Makes a new monthly report of so many months 72.301 +// 72.302 +void Reportpanel::reportMonths(int nMenuid) 72.303 +{ 72.304 + // Range of months to report 72.305 + QString Firstmonth, Lastmonth; 72.306 + 72.307 + // Menu index, first item is always 0 72.308 + int nIndex = m_pMonthpop->indexOf(nMenuid); // Corresponds to months 72.309 + int nLastid = 0; // Last menu id selected 72.310 + 72.311 + if (m_nMonths < m_pMonthpop->count()) 72.312 + nLastid = m_pMonthpop->idAt(m_nMonths - 1); // Probably not last item 72.313 + else 72.314 + nLastid = m_pMonthpop->idAt(m_pMonthpop->count() - 1); // Last item selected 72.315 + 72.316 + // Set the button in case from a menu selection 72.317 + m_pWeekmonthgroup->setButton(TITRAQ_REPORTMONTH); 72.318 + 72.319 + // Update m_nMonths only if user prefers a different number 72.320 + if (nIndex >= 0) { 72.321 + // User selected N... to indicate an arbitrary number 72.322 + if (nIndex == m_pMonthpop->count() - 1) { 72.323 + Numdial Monthsinput; 72.324 + Monthsinput.setNum(m_nMonths); 72.325 + if (Monthsinput.exec() == QDialog::Accepted) { 72.326 + m_nMonths = Monthsinput.getNum(); 72.327 + m_pMonthpop->setItemChecked(nLastid, false); 72.328 + m_pMonthpop->setItemChecked(nMenuid, true); 72.329 + } 72.330 + else 72.331 + return; 72.332 + } 72.333 + else { // User selected a preset menu item such as '2 months' 72.334 + m_nMonths = nIndex + 1; 72.335 + m_pMonthpop->setItemChecked(nLastid, false); 72.336 + m_pMonthpop->setItemChecked(nMenuid, true); 72.337 + } 72.338 + } 72.339 + 72.340 + // Clear data window 72.341 + m_pBrowser->setUpdatesEnabled(false); 72.342 + m_pBrowser->clear(); 72.343 + 72.344 + // Determine first and last month names, then write header 72.345 + Lastmonth = QDate::longMonthName(QDate::currentDate().month()); 72.346 + if (m_nMonths > 1) { 72.347 + int nMonth = (QDate::currentDate().addMonths(m_nMonths * -1).month() + 12) % 12 + 1; 72.348 + Firstmonth = QDate::longMonthName(nMonth); 72.349 + this->writeHeader(Firstmonth, Lastmonth); 72.350 + } 72.351 + else 72.352 + this->writeHeader(Lastmonth); 72.353 + 72.354 + // Write new contents to data window 72.355 + m_pBrowser->append(this->getMonthtotals(QDate::currentDate(), m_nMonths)); 72.356 + if (m_pReprefs->getBool(TITRAQ_PREFDETAILON, TITRAQ_DEFDETAILON)) { 72.357 + m_pBrowser->append(this->getMonthdetails(QDate::currentDate(), m_nMonths)); 72.358 + } 72.359 + this->writeFooter(); 72.360 + m_pBrowser->setCursorPosition(0, 0); 72.361 + m_pBrowser->ensureCursorVisible(); 72.362 + m_pBrowser->setUpdatesEnabled(true); 72.363 + m_pBrowser->repaint(false); 72.364 +} 72.365 + 72.366 +// 72.367 +// Writes a report header to the display window 72.368 +// 72.369 +void Reportpanel::writeHeader(int nWeeknum) 72.370 +{ 72.371 + QString Header; 72.372 + Header = QString("Accounting System "); 72.373 + Header += QString(asgui_version.v_short); 72.374 + Header += trUtf8("\nLocal report, username '"); 72.375 + Header += m_pReprefs->getString(TITRAQ_PREFUSER, TITRAQ_DEFUSER); 72.376 + Header += QString("'\n"); 72.377 + Header += trUtf8("Date "); 72.378 + Header += QDate::currentDate().toString(Qt::ISODate); 72.379 + Header += trUtf8(", Time "); 72.380 + Header += QTime::currentTime().toString(Qt::ISODate); 72.381 + Header += trUtf8("\nReporting for week %1...").arg(nWeeknum); 72.382 + Header += QString("\n\n"); 72.383 + m_pBrowser->setText(Header); 72.384 +} 72.385 + 72.386 +// 72.387 +// Writes a report header to the display window 72.388 +// 72.389 +void Reportpanel::writeHeader(QString Month) 72.390 +{ 72.391 + QString Header; 72.392 + Header = QString("Accounting System "); 72.393 + Header += QString(asgui_version.v_short); 72.394 + Header += trUtf8("\nLocal report, username '"); 72.395 + Header += m_pReprefs->getString(TITRAQ_PREFUSER, TITRAQ_DEFUSER); 72.396 + Header += QString("'\n"); 72.397 + Header += trUtf8("Date "); 72.398 + Header += QDate::currentDate().toString(Qt::ISODate); 72.399 + Header += trUtf8(", Time "); 72.400 + Header += QTime::currentTime().toString(Qt::ISODate); 72.401 + Header += trUtf8("\nReporting for month %1...").arg(Month); 72.402 + Header += QString("\n\n"); 72.403 + m_pBrowser->setText(Header); 72.404 +} 72.405 + 72.406 +// 72.407 +// Writes a report header to the display window 72.408 +// 72.409 +void Reportpanel::writeHeader(int nFirst, int nLast) 72.410 +{ 72.411 + QString Header; 72.412 + Header = QString("Accounting System "); 72.413 + Header += QString(asgui_version.v_short); 72.414 + Header += trUtf8("\nLocal report, username '"); 72.415 + Header += m_pReprefs->getString(TITRAQ_PREFUSER, TITRAQ_DEFUSER); 72.416 + Header += QString("'\n"); 72.417 + Header += trUtf8("Date "); 72.418 + Header += QDate::currentDate().toString(Qt::ISODate); 72.419 + Header += trUtf8(", Time "); 72.420 + Header += QTime::currentTime().toString(Qt::ISODate); 72.421 + Header += trUtf8("\nReporting for weeks %1 through %2...").arg(nFirst).arg(nLast); 72.422 + Header += QString("\n\n"); 72.423 + m_pBrowser->setText(Header); 72.424 +} 72.425 + 72.426 +// 72.427 +// Writes a report header to the display window 72.428 +// 72.429 +void Reportpanel::writeHeader(QString First, QString Last) 72.430 +{ 72.431 + QString Header; 72.432 + Header = QString("Accounting System "); 72.433 + Header += QString(asgui_version.v_short); 72.434 + Header += trUtf8("\nLocal report, username '"); 72.435 + Header += m_pReprefs->getString(TITRAQ_PREFUSER, TITRAQ_DEFUSER); 72.436 + Header += QString("'\n"); 72.437 + Header += trUtf8("Date "); 72.438 + Header += QDate::currentDate().toString(Qt::ISODate); 72.439 + Header += trUtf8(", Time "); 72.440 + Header += QTime::currentTime().toString(Qt::ISODate); 72.441 + Header += trUtf8("\nReporting months %1 through %2...").arg(First).arg(Last); 72.442 + Header += QString("\n\n"); 72.443 + m_pBrowser->setText(Header); 72.444 +} 72.445 + 72.446 +// 72.447 +// Writes a report footer to the display window 72.448 +// 72.449 +void Reportpanel::writeFooter(void) 72.450 +{ 72.451 + if (m_pReprefs->getBool(TITRAQ_PREFSIGNATON, TITRAQ_DEFSIGNATON)) { 72.452 + m_pBrowser->append(trUtf8("\n\nPrint name ________________________________________\n")); 72.453 + m_pBrowser->append(trUtf8("\n\nSignature ________________________________________")); 72.454 + } 72.455 +} 72.456 + 72.457 +// 72.458 +// Returns one week of details data 72.459 +// 72.460 +QString Reportpanel::getWeekdetails(QDate Dayref, int nWeeks) 72.461 +{ 72.462 + QString Data; // Output string 72.463 + QString Tempstring; // Temp churning 72.464 + int nRows = m_pReptable->numRows(); 72.465 + 72.466 + // Find range boundaries 72.467 + Q_ASSERT(nWeeks > 0); 72.468 + QDate Tempdate; 72.469 + QDate Firstday; 72.470 + QDate Lastday; 72.471 + Firstday = Dayref.addDays(Dayref.dayOfWeek() * -1 + 1); 72.472 + Firstday = Firstday.addDays((nWeeks - 1) * -7); 72.473 + Lastday = Firstday.addDays(7 * nWeeks); 72.474 + 72.475 + // Write some quick header text to the outgoing string 72.476 + Data = trUtf8("\nDate Hours Account details\n"); 72.477 + Data += QString("---------- ----- ----------------------------------------\n"); 72.478 + 72.479 + // Build the long week data string 72.480 + for (int nIter = nRows - 1; nIter >= 0; nIter--) { 72.481 + // Work on this tuple only if it within the reporting range 72.482 + Tempstring = m_pReptable->text(nIter, TITRAQ_IDXTASK); 72.483 + Tempdate = QDate::fromString(m_pReptable->text(nIter, TITRAQ_IDXDATE), Qt::ISODate); 72.484 + if (!Tempstring.isEmpty() && Firstday <= Tempdate && Tempdate < Lastday) { 72.485 + Tempstring = m_pReptable->text(nIter, TITRAQ_IDXDATE); 72.486 + if (!Tempstring.isEmpty()) 72.487 + Data += Tempstring; 72.488 + Tempstring = m_pReptable->text(nIter, TITRAQ_IDXAMOUNT); 72.489 + if (!Tempstring.isEmpty()) 72.490 + Data += QString(TITRAQ_SEPARATORTOK) + Tempstring; 72.491 + Tempstring = m_pReptable->text(nIter, TITRAQ_IDXTASK); 72.492 + if (!Tempstring.isEmpty()) 72.493 + Data += QString(TITRAQ_SEPARATORTOK) + Tempstring; 72.494 + Data += QString("\n"); // Finish off line 72.495 + } 72.496 + } 72.497 + 72.498 + return Data; 72.499 +} 72.500 + 72.501 +// 72.502 +// Returns one week of totals data 72.503 +// 72.504 +QString Reportpanel::getWeektotals(QDate Dayref, int nWeeks) 72.505 +{ 72.506 + using namespace std; // Needed for maps and hash 72.507 + map<string, string> Hashtasks; // Hashtable to store tasks 72.508 + multimap<string, string> Hashhours; // Hashtable to store hours 72.509 + map<string, string>::iterator Taskiter; // Hashtable task iterator 72.510 + multimap<string, string>::iterator Houriter; // Hashtable hour iterator 72.511 + 72.512 + QString Totals; // Data totals to return for writing 72.513 + QString Tempstring; // Temporary processing string 72.514 + QDate Tempdate; // Temporary processing date 72.515 + int nRows = m_pReptable->numRows(); 72.516 + 72.517 + // Find range boundaries 72.518 + Q_ASSERT(nWeeks > 0); 72.519 + QDate Firstday; 72.520 + QDate Lastday; 72.521 + Firstday = Dayref.addDays(Dayref.dayOfWeek() * -1 + 1); 72.522 + Firstday = Firstday.addDays((nWeeks - 1) * -7); 72.523 + Lastday = Firstday.addDays(7 * nWeeks); 72.524 + 72.525 + // Parse the table for interesting values 72.526 + for (int nIter = 0; nIter < nRows; nIter++) { 72.527 + // Work on this tuple only if it within the reporting range 72.528 + Tempstring = m_pReptable->text(nIter, TITRAQ_IDXTASK); 72.529 + Tempdate = QDate::fromString(m_pReptable->text(nIter, TITRAQ_IDXDATE), Qt::ISODate); 72.530 + if (!Tempstring.isEmpty() && Firstday <= Tempdate && Tempdate < Lastday) { 72.531 + string Convstring = Tempstring; // Convert to string (can't cast?) 72.532 + QTime Intable = QTime::fromString(m_pReptable->text(nIter, TITRAQ_IDXAMOUNT), Qt::ISODate); 72.533 + int nTothours = QString(Hashtasks[Convstring]).section(':', 0, 0).toInt() + Intable.hour(); 72.534 + int nTotminut = QString(Hashtasks[Convstring]).section(':', 1, 1).toInt() + Intable.minute(); 72.535 + nTothours += nTotminut / 60; 72.536 + nTotminut %= 60; 72.537 + QString Hours = QString::number(nTothours).rightJustify(3, ' '); 72.538 + QString Mins = QString::number(nTotminut).rightJustify(2, '0'); 72.539 + string Timestring = Hours + ':' + Mins; // Convert to string (can't cast?) 72.540 + Hashtasks[Convstring] = Timestring; // Finally store in hashtable 72.541 + } 72.542 + } 72.543 + 72.544 + // Reverse copy the tasks hashtable to both sort and index by amount key 72.545 + for (Taskiter = Hashtasks.begin(); Taskiter != Hashtasks.end(); Taskiter++) 72.546 + Hashhours.insert(pair<string, string>(Taskiter->second, Taskiter->first)); 72.547 + 72.548 + // Write the actual data totals to the outgoing string in reverse order 72.549 + for (Houriter = Hashhours.begin(); Houriter != Hashhours.end(); Houriter++) 72.550 + Totals = Houriter->first + ' ' + Houriter->second + '\n' + Totals; 72.551 + 72.552 + // Write some quick header text to the outgoing string in reverse order 72.553 + Totals = QString("------ ----------------------------------------\n") + Totals; 72.554 + Totals = trUtf8("Total Account summary\n") + Totals; 72.555 + 72.556 + return Totals; // The outgoing string... its finally gone, let's go to bed 72.557 +} 72.558 + 72.559 +// 72.560 +// Returns one month of details data 72.561 +// 72.562 +QString Reportpanel::getMonthdetails(QDate Dayref, int nMonths) 72.563 +{ 72.564 + QString Data; // Output string 72.565 + QString Tempstring; // Temp churning 72.566 + QDate Tempdate; // For comparing 72.567 + QDate Firstday; // Minimum boundary 72.568 + QDate Lastday; // Maximum boundary 72.569 + int nRows = m_pReptable->numRows(); 72.570 + 72.571 + // Find range boundaries 72.572 + Q_ASSERT(nMonths > 0); 72.573 + int nYear = Dayref.year(); 72.574 + int nMonth = (Dayref.addMonths(nMonths * -1).month() + 12) % 12 + 1; 72.575 + if (nMonth > Dayref.month()) 72.576 + nYear--; 72.577 + Firstday = QDate(nYear, nMonth, 1); 72.578 + Lastday = QDate(Dayref.year(), Dayref.month(), Dayref.daysInMonth()); 72.579 + 72.580 + // Write some quick header text to the outgoing string 72.581 + Data = trUtf8("\nDate Hours Account details\n"); 72.582 + Data += QString("---------- ----- ----------------------------------------\n"); 72.583 + 72.584 + // Build the long week data string 72.585 + for (int nIter = nRows - 1; nIter >= 0; nIter--) { 72.586 + // Work on this tuple only if it within the reporting range 72.587 + Tempstring = m_pReptable->text(nIter, TITRAQ_IDXTASK); 72.588 + Tempdate = QDate::fromString(m_pReptable->text(nIter, TITRAQ_IDXDATE), Qt::ISODate); 72.589 + if (!Tempstring.isEmpty() && Firstday <= Tempdate && Tempdate < Lastday) { 72.590 + Tempstring = m_pReptable->text(nIter, TITRAQ_IDXDATE); 72.591 + if (!Tempstring.isEmpty()) 72.592 + Data += Tempstring; 72.593 + Tempstring = m_pReptable->text(nIter, TITRAQ_IDXAMOUNT); 72.594 + if (!Tempstring.isEmpty()) 72.595 + Data += QString(TITRAQ_SEPARATORTOK) + Tempstring; 72.596 + Tempstring = m_pReptable->text(nIter, TITRAQ_IDXTASK); 72.597 + if (!Tempstring.isEmpty()) 72.598 + Data += QString(TITRAQ_SEPARATORTOK) + Tempstring; 72.599 + Data += trUtf8("\n"); // Finish off line 72.600 + } 72.601 + } 72.602 + 72.603 + return Data; 72.604 +} 72.605 + 72.606 +// 72.607 +// Returns one month of totals data 72.608 +// 72.609 +QString Reportpanel::getMonthtotals(QDate Dayref, int nMonths) 72.610 +{ 72.611 + using namespace std; // Needed for maps and hash 72.612 + map<string, string> Hashtasks; // Hashtable to store tasks 72.613 + multimap<string, string> Hashhours; // Hashtable to store hours 72.614 + map<string, string>::iterator Taskiter; // Hashtable task iterator 72.615 + multimap<string, string>::iterator Houriter; // Hashtable hour iterator 72.616 + 72.617 + QString Totals; // Data totals to return for writing 72.618 + QString Tempstring; // Temporary processing string 72.619 + QDate Tempdate; // Temporary processing date 72.620 + int nRows = m_pReptable->numRows(); 72.621 + 72.622 + // Find range boundaries 72.623 + Q_ASSERT(nMonths > 0); 72.624 + int nYear = Dayref.year(); 72.625 + int nMonth = (Dayref.addMonths(nMonths * -1).month() + 12) % 12 + 1; 72.626 + if (nMonth > Dayref.month()) 72.627 + nYear--; 72.628 + QDate Firstday = QDate(nYear, nMonth, 1); 72.629 + QDate Lastday = QDate(Dayref.year(), Dayref.month(), Dayref.daysInMonth()); 72.630 + 72.631 + // Parse the table for interesting values 72.632 + for (int nIter = 0; nIter < nRows; nIter++) { 72.633 + // Work on this tuple only if it within the reporting range 72.634 + Tempstring = m_pReptable->text(nIter, TITRAQ_IDXTASK); 72.635 + Tempdate = QDate::fromString(m_pReptable->text(nIter, TITRAQ_IDXDATE), Qt::ISODate); 72.636 + if (!Tempstring.isEmpty() && Firstday <= Tempdate && Tempdate < Lastday) { 72.637 + string Convstring = Tempstring; // Convert to string (can't cast?) 72.638 + QTime Intable = QTime::fromString(m_pReptable->text(nIter, TITRAQ_IDXAMOUNT), Qt::ISODate); 72.639 + int nTothours = QString(Hashtasks[Convstring]).section(':', 0, 0).toInt() + Intable.hour(); 72.640 + int nTotminut = QString(Hashtasks[Convstring]).section(':', 1, 1).toInt() + Intable.minute(); 72.641 + nTothours += nTotminut / 60; 72.642 + nTotminut %= 60; 72.643 + QString Hours = QString::number(nTothours).rightJustify(3, ' '); 72.644 + QString Mins = QString::number(nTotminut).rightJustify(2, '0'); 72.645 + string Timestring = Hours + ':' + Mins; // Convert to string (can't cast?) 72.646 + Hashtasks[Convstring] = Timestring; // Finally store in hashtable 72.647 + } 72.648 + } 72.649 + 72.650 + // Reverse copy the tasks hashtable to both sort and index by amount key 72.651 + for (Taskiter = Hashtasks.begin(); Taskiter != Hashtasks.end(); Taskiter++) 72.652 + Hashhours.insert(pair<string, string>(Taskiter->second, Taskiter->first)); 72.653 + 72.654 + // Write the actual data totals to the outgoing string in reverse order 72.655 + for (Houriter = Hashhours.begin(); Houriter != Hashhours.end(); Houriter++) 72.656 + Totals = Houriter->first + ' ' + Houriter->second + '\n' + Totals; 72.657 + 72.658 + // Write some quick header text to the outgoing string in reverse order 72.659 + Totals = QString("------ ----------------------------------------\n") + Totals; 72.660 + Totals = trUtf8("Total Account summary\n") + Totals; 72.661 + 72.662 + return Totals; // The outgoing string... its finally gone, let's go to bed 72.663 +} 72.664 + 72.665 +// 72.666 +// Saves the currently displayed local report 72.667 +// 72.668 +void Reportpanel::saveReport(void) 72.669 +{ 72.670 + int nResult = 0; // For checking user's answer 72.671 + QFile Report; // The resulting report file 72.672 + QString Filestring; // The user chosen file name to save 72.673 + QString Openas = m_pReprefs->getString(TITRAQ_PREFHOME, TITRAQ_DEFHOME); 72.674 + 72.675 + // And then get the name of the selected file to save to 72.676 + Filestring = QFileDialog::getSaveFileName(Openas, trUtf8("Text files (*.txt);;All Files (*)"), this, trUtf8("ChooserDialog"), trUtf8("Choose a file to save"), NULL, false); 72.677 + if (!Filestring.isEmpty()) { 72.678 + if (QFile::exists(Filestring)) { 72.679 + nResult = QMessageBox::warning(this, QString(TITRAQ_APPTITLE) 72.680 + + ' ' + asgui_version.v_short, trUtf8(TITRAQ_OVERWRITE), 72.681 + trUtf8("&Yes"), trUtf8("&No"), NULL, 1, 1); 72.682 + if (nResult = QMessageBox::Ok) { // Overwrite a file 72.683 + Report.setName(Filestring); // User wished name 72.684 + Report.open(IO_WriteOnly | IO_Truncate); // Open report file 72.685 + QTextStream Outstream(&Report); // Convert to stream 72.686 + Outstream << m_pBrowser->text(); // Write the data 72.687 + Report.close(); // Finish by closing 72.688 + } 72.689 + } 72.690 + else { // User gave a file name, and there was no preexisting file there 72.691 + Report.setName(Filestring); // User wished name 72.692 + Report.open(IO_WriteOnly | IO_Truncate); // Open report file 72.693 + QTextStream Outstream(&Report); // Convert to stream 72.694 + Outstream << m_pBrowser->text(); // Write the data 72.695 + Report.close(); // Finish by closing 72.696 + } 72.697 + } 72.698 + // Otherwise, user did not select a valid file and push okay button 72.699 +} 72.700 + 72.701 +// 72.702 +// Prints the currently displayed local report 72.703 +// 72.704 +void Reportpanel::printReport(void) 72.705 +{ 72.706 +#ifndef QT_NO_PRINTER 72.707 + if (m_pPrinter->setup(this)) { // Opens printer dialog 72.708 + m_pPrinter->setFullPage(true); // Set our own margins 72.709 + QPainter Paint; // Our painter (for pages) 72.710 + Paint.begin(m_pPrinter); // Paint on printer 72.711 + Paint.setFont(m_pBrowser->font()); 72.712 + QFontMetrics Fontmetrics = Paint.fontMetrics(); 72.713 + QPaintDeviceMetrics Devmetrics(m_pPrinter); // Need width/height of printer surface 72.714 + const int knMargin = Devmetrics.logicalDpiX() / 2; // Half-inch margin 72.715 + int nYpos = knMargin; // Y position for each line 72.716 + int nPageno = 1; // The starting page number 72.717 + 72.718 + for (int nIter = 0; nIter < m_pBrowser->lines() && !m_pPrinter->aborted(); nIter++) { 72.719 + // See if there is some space on this page to paint on 72.720 + if (nYpos + Fontmetrics.lineSpacing() > Devmetrics.height() - knMargin) { 72.721 +// QString Printmsg(trUtf8("Printing page ")) 72.722 +// + QString::number(++nPageno) + QString("..."); 72.723 +// m_pStatus()->message(Printmsg); // Not in scope (crap) 72.724 + if (!m_pPrinter->newPage()) // Start new page 72.725 + break; // Some error 72.726 + nYpos = knMargin; // Back to top of page 72.727 + } 72.728 + Paint.drawText(knMargin, nYpos, Devmetrics.width() - 2 * knMargin, 72.729 + Fontmetrics.lineSpacing(), Qt::ExpandTabs, m_pBrowser->text(nIter)); 72.730 + nYpos += Fontmetrics.lineSpacing(); 72.731 + } 72.732 + Paint.end(); // Send job to printer 72.733 +// m_pStatus()->message(trUtf8("Printing completed"), 2000); // Not in scope 72.734 + } 72.735 +// m_pStatusBar()->message(trUtf8("Printing completed"), 2000); // Not in scope 72.736 +#endif 72.737 +} 72.738 + 72.739 +// 72.740 +// Sets the strings of the subwidgets using the current language 72.741 +// 72.742 +void Reportpanel::textChange(void) 72.743 +{ 72.744 + this->setCaption(trUtf8("AS local report", "Local report using weekly or monthly data.")); 72.745 + 72.746 + // Top level push buttons associated with accept and save slots 72.747 + m_pSavebutt->setText(trUtf8("Save As...", "Comment for Savebutton")); 72.748 + QToolTip::add(m_pSavebutt, trUtf8("Saves the report text", "Comment for tooltip Savebutton")); 72.749 + QWhatsThis::add(m_pSavebutt, trUtf8("The save button saves the report text to a file", "Comment for whatsThis Savebutton")); 72.750 + m_pPrintbutt->setText(trUtf8("Print...", "Comment for Printbutton")); 72.751 + QToolTip::add(m_pPrintbutt, trUtf8("Print the report text", "Comment for tooltip Printbutton")); 72.752 + QWhatsThis::add(m_pPrintbutt, trUtf8("The print button prints the report text to a file", "Comment for whatsThis Printbutton")); 72.753 + m_pDismissbutt->setText(trUtf8("Dismiss", "Comment for Dismissbutton")); 72.754 + QToolTip::add(m_pDismissbutt, trUtf8("Closes the report panel", "Comment for tooltip Dismissbutton")); 72.755 + QWhatsThis::add(m_pDismissbutt, trUtf8("The dismiss button dismisses the report panel", "Comment for whatsThis Dismissbutton")); 72.756 + 72.757 + // Inner tool buttons for new local report generation 72.758 + m_pWeeklybutt->setText(trUtf8("Weekly", "Comment for Weeklybutt")); 72.759 + QToolTip::add(m_pWeeklybutt, trUtf8("Hold down for options", "Comment for tooltip Weeklybutt")); 72.760 + QWhatsThis::add(m_pWeeklybutt, trUtf8("The Weekly button generates a new weekly report.\nHold this button down to specify many weeks.", "Comment for whatsThis Weeklybutt")); 72.761 + m_pMonthlybutt->setText(trUtf8("Monthly", "Comment for Monthlybutt")); 72.762 + QToolTip::add(m_pMonthlybutt, trUtf8("Hold down for options", "Comment for tooltip Monthlybutt")); 72.763 + QWhatsThis::add(m_pMonthlybutt, trUtf8("The Monthly button makes a new monthly report.\nHold this button down to specify how many months.", "Comment for whatsThis Monthlybutt")); 72.764 +} 72.765 +} // namespace AS
73.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 73.2 +++ b/as_reportpanel.h Fri Nov 28 11:21:08 2008 +0100 73.3 @@ -0,0 +1,113 @@ 73.4 +// 73.5 +// OSSP asgui - Accounting system graphical user interface 73.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 73.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 73.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 73.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 73.10 +// 73.11 +// This file is part of OSSP asgui, an accounting system graphical user 73.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 73.13 +// 73.14 +// Permission to use, copy, modify, and distribute this software for 73.15 +// any purpose with or without fee is hereby granted, provided that 73.16 +// the above copyright notice and this permission notice appear in all 73.17 +// copies. 73.18 +// 73.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 73.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 73.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 73.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 73.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 73.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 73.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 73.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 73.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 73.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 73.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 73.30 +// SUCH DAMAGE. 73.31 +// 73.32 +// as_reportpanel.h: ISO C++ interface 73.33 +// 73.34 + 73.35 +#ifndef REPORTPANEL_H 73.36 +#define REPORTPANEL_H 73.37 + 73.38 +#include <qvariant.h> 73.39 +#include <qdialog.h> 73.40 +#include <qdatetime.h> 73.41 + 73.42 + 73.43 +class TiTable; 73.44 +class Preferences; 73.45 +class QVBoxLayout; 73.46 +class QHBoxLayout; 73.47 +class QGridLayout; 73.48 +class QPushButton; 73.49 +class QTextEdit; 73.50 +class QToolButton; 73.51 +class QButtonGroup; 73.52 +class QPopupMenu; 73.53 +class QPrinter; 73.54 + 73.55 +namespace AS { 73.56 + 73.57 +class Reportpanel : public QDialog 73.58 +{ 73.59 + Q_OBJECT 73.60 + 73.61 +public: 73.62 + Reportpanel(TiTable *, Preferences *, QWidget *pParent = 0, 73.63 + const char *kszName = 0, bool bModal = true, WFlags Flags = 0); 73.64 +// ~Reportpanel(void); // No need to destroy widgets, because qt does it for us 73.65 + 73.66 +public: 73.67 + QButtonGroup *m_pWeekmonthgroup; 73.68 + QToolButton *m_pWeeklybutt; 73.69 + QToolButton *m_pMonthlybutt; 73.70 + QTextEdit *m_pBrowser; 73.71 + QPushButton *m_pSavebutt; 73.72 + QPushButton *m_pDismissbutt; 73.73 + QPushButton *m_pPrintbutt; 73.74 + 73.75 +protected: 73.76 + QVBoxLayout *m_pFormlay; 73.77 + QVBoxLayout *m_pGrouplay; 73.78 + QHBoxLayout *m_pToolay; 73.79 + QHBoxLayout *m_pPushlay; 73.80 + QHBoxLayout *m_pWeekmonthlay; 73.81 + QPopupMenu *m_pWeekpop; 73.82 + QPopupMenu *m_pMonthpop; 73.83 + 73.84 +private: 73.85 + int m_nWeeks; 73.86 + int m_nMonths; 73.87 + TiTable *m_pReptable; 73.88 + Preferences *m_pReprefs; 73.89 +#ifndef QT_NO_PRINTER 73.90 + QPrinter *m_pPrinter; 73.91 +#endif 73.92 + 73.93 +public slots: 73.94 + int exec(void); 73.95 + 73.96 +protected slots: 73.97 + virtual void saveReport(void); 73.98 + virtual void printReport(void); 73.99 + virtual void textChange(void); 73.100 + virtual void reportWeeks(int nMenuid = -1); 73.101 + virtual void reportMonths(int nMenuid = -1); 73.102 + 73.103 +private: 73.104 + void writeHeader(int); 73.105 + void writeHeader(int, int); 73.106 + void writeHeader(QString); 73.107 + void writeHeader(QString, QString); 73.108 + void writeFooter(void); 73.109 + QString getWeektotals(QDate Refer = QDate::currentDate(), int nWeeks = 1); 73.110 + QString getWeekdetails(QDate Refer = QDate::currentDate(), int nWeeks = 1); 73.111 + QString getMonthtotals(QDate Refer = QDate::currentDate(), int nMonths = 1); 73.112 + QString getMonthdetails(QDate Refer = QDate::currentDate(), int nMonths = 1); 73.113 +}; 73.114 +} // namespace AS 73.115 + 73.116 +#endif // REPORTPANEL_H
74.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 74.2 +++ b/as_sfile.cpp Fri Nov 28 11:21:08 2008 +0100 74.3 @@ -0,0 +1,64 @@ 74.4 +// 74.5 +// OSSP asgui - Accounting system graphical user interface 74.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 74.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 74.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 74.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 74.10 +// 74.11 +// This file is part of OSSP asgui, an accounting system graphical user 74.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 74.13 +// 74.14 +// Permission to use, copy, modify, and distribute this software for 74.15 +// any purpose with or without fee is hereby granted, provided that 74.16 +// the above copyright notice and this permission notice appear in all 74.17 +// copies. 74.18 +// 74.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 74.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 74.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 74.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 74.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 74.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 74.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 74.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 74.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 74.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 74.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 74.30 +// SUCH DAMAGE. 74.31 +// 74.32 +// as_sfile.cpp: ISO C++ implementation 74.33 +// 74.34 + 74.35 +#include "as_sfile.h" 74.36 +#include "as_except.h" 74.37 + 74.38 + 74.39 +// 74.40 +// Serialize a backup of an incoming file object 74.41 +// 74.42 +void Simplefile::makeBackup(void) 74.43 +{ 74.44 + QFile Filein; // Input readonly file 74.45 + QFile Filebak; // Backup writeonly file 74.46 + QString Fname; // Filename of input file 74.47 + QTextStream Streamin; // Stream to read from (Filein) 74.48 + QTextStream Streambak; // Stream to write to (Filebak) 74.49 + 74.50 + try { 74.51 + if(!this->exists()) // Conditionally short circuit if 74.52 + return; // file to backup does not exist 74.53 + Fname = this->name(); // Copy filename from original 74.54 + Filein.setName(Fname); // Set filename of original 74.55 + Filein.open(IO_ReadOnly); // Open original read-only 74.56 + Filebak.setName(Fname + ".bak"); // Set filename of backup 74.57 + Filebak.open(IO_WriteOnly); // Open backup write-only 74.58 + Streamin.setDevice(&Filein); // Set incoming stream 74.59 + Streambak.setDevice(&Filebak); // Set outgoing stream 74.60 + Streambak << Streamin.read(); // Do actual writing 74.61 + Filein.close(); // Close original 74.62 + Filebak.close(); // Close backup 74.63 + } 74.64 + catch (Genexcept& Genex) { 74.65 + Genex.reportErr(); 74.66 + } 74.67 +}
75.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 75.2 +++ b/as_sfile.h Fri Nov 28 11:21:08 2008 +0100 75.3 @@ -0,0 +1,47 @@ 75.4 +// 75.5 +// OSSP asgui - Accounting system graphical user interface 75.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 75.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 75.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 75.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 75.10 +// 75.11 +// This file is part of OSSP asgui, an accounting system graphical user 75.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 75.13 +// 75.14 +// Permission to use, copy, modify, and distribute this software for 75.15 +// any purpose with or without fee is hereby granted, provided that 75.16 +// the above copyright notice and this permission notice appear in all 75.17 +// copies. 75.18 +// 75.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 75.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 75.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 75.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 75.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 75.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 75.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 75.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 75.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 75.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 75.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 75.30 +// SUCH DAMAGE. 75.31 +// 75.32 +// as_sfile.h: ISO C++ interface 75.33 +// 75.34 + 75.35 +#ifndef SIMPLEFILE_H 75.36 +#define SIMPLEFILE_H 75.37 + 75.38 +#include <qfile.h> 75.39 +#include <qtextstream.h> 75.40 + 75.41 + 75.42 +class Simplefile : public QFile 75.43 +{ 75.44 +public: 75.45 + Simplefile(void) : QFile() {}; 75.46 + Simplefile(const QString &Name) : QFile(Name) {}; 75.47 + void makeBackup(void); 75.48 +}; 75.49 + 75.50 +#endif // SIMPLEFILE_H
76.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 76.2 +++ b/as_slot.cpp Fri Nov 28 11:21:08 2008 +0100 76.3 @@ -0,0 +1,2018 @@ 76.4 +// 76.5 +// OSSP asgui - Accounting system graphical user interface 76.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 76.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 76.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 76.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 76.10 +// 76.11 +// This file is part of OSSP asgui, an accounting system graphical user 76.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 76.13 +// 76.14 +// Permission to use, copy, modify, and distribute this software for 76.15 +// any purpose with or without fee is hereby granted, provided that 76.16 +// the above copyright notice and this permission notice appear in all 76.17 +// copies. 76.18 +// 76.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 76.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 76.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 76.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 76.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 76.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 76.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 76.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 76.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 76.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 76.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 76.30 +// SUCH DAMAGE. 76.31 +// 76.32 +// as_slot.cpp: ISO C++ implementation 76.33 +// 76.34 + 76.35 +// system headers 76.36 +#include <memory> 76.37 +#include <cstring> 76.38 + 76.39 +// Qt headers 76.40 +#include <qfiledialog.h> 76.41 +#include <qcombobox.h> 76.42 +#include <qclipboard.h> 76.43 +#include <qmenudata.h> 76.44 +#include <qdatastream.h> 76.45 +#include <qstatusbar.h> 76.46 +#include <qaction.h> 76.47 +#include <qpopupmenu.h> 76.48 + 76.49 +// Qt style headers 76.50 +#include <qcdestyle.h> 76.51 +#include <qsgistyle.h> 76.52 +#include <qmotifstyle.h> 76.53 +#include <qmotifplusstyle.h> 76.54 +#include <qplatinumstyle.h> 76.55 +#include <qwindowsstyle.h> 76.56 + 76.57 +// User interface 76.58 +#include "as_const.h" // Application constants 76.59 +#include "as_except.h" // Exception classes 76.60 +#include "as_tableitem.h" // For our custom table items 76.61 +#include "as_generic.h" // Generic classes 76.62 +#include "as_uuid.h" // UUID classes 76.63 +#include "as_datedit.h" // Derived from QDateEdit 76.64 +#include "as_amount.h" // Derived from QTimeEdit 76.65 +#include "as_crc.h" // Useful Qualistring class 76.66 +#include "as_pref.h" // For Preferences class 76.67 +#include "as_panel.h" // For Prefpanel class 76.68 +#include "as_reportpanel.h" // For Reportpanel class 76.69 +#include "as_helpanel.h" // For Helpanel class 76.70 +#include "as_sfile.h" // For Simplefile class 76.71 +#include "as_table.h" // For TiTable class 76.72 + 76.73 +// RPC headers 76.74 +#ifdef HAVE_ESOAP 76.75 +#include <easysoap/SOAP.h> 76.76 +#endif // HAVE_ESOAP 76.77 +#ifdef HAVE_MICO 76.78 +#include <coss/CosNaming.h> 76.79 +#include "as_stub.h" // CORBA stubs and skeletons 76.80 +#endif // HAVE_MICO 76.81 + 76.82 +// Icon pixel maps 76.83 +#include "as_gfx/cwlogo.xpm" // static const char *s_kpcCwlogo_xpm[] 76.84 +#include "as_gfx/ossplogo.xpm" // static const char *s_kpcOssplogo_xpm[] 76.85 +#include "as_gfx/statok.xpm" // static const char *s_kpcStatokay_xpm[] 76.86 +#include "as_gfx/staterr.xpm" // static const char *s_kpcStaterror_xpm[] 76.87 +#include "as_gfx/statwrn.xpm" // static const char *s_kpcStatwarn_xpm[] 76.88 +#include "as_gfx/statvoid.xpm" // static const char *s_kpcStatvoid_xpm[] 76.89 + 76.90 + 76.91 +// 76.92 +// Cut an entry 76.93 +// 76.94 +void Titraqform::cutEntry(void) 76.95 +{ 76.96 + this->copyEntry(); // Reuse slot 76.97 + this->delEntry(); // Reuse slot 76.98 +} 76.99 + 76.100 +// 76.101 +// Copy an entry 76.102 +// 76.103 +void Titraqform::copyEntry(void) 76.104 +{ 76.105 + QString Selection; // Will hold the selected text 76.106 + QClipboard *pClip; // Will reference the global clipboard 76.107 + 76.108 + // Initialize data and clipboard handle 76.109 + Selection = getRowdata(); // Use accessor 76.110 + pClip = QApplication::clipboard(); 76.111 + 76.112 + Q_ASSERT(!Selection.isNull()); 76.113 + pClip->setText(Selection, QClipboard::Selection); // Doesn't work on Windows 76.114 + pClip->setText(Selection, QClipboard::Clipboard); // Works on both equally 76.115 +} 76.116 + 76.117 +// 76.118 +// Paste an entry 76.119 +// 76.120 +void Titraqform::pasteEntry(void) 76.121 +{ 76.122 + int nRows = 0; // Paste so many rows as are stored 76.123 + QString Selection; // Will receive the clipboard text 76.124 + QClipboard *pClip = NULL; // Will reference the global clipboard 76.125 + 76.126 + pClip = QApplication::clipboard(); // Prime the clips 76.127 + Selection = pClip->text(QClipboard::Clipboard); // Windows and Unix 76.128 + nRows = Selection.contains(QChar('\n')); // How many rows 76.129 + if (Selection != NULL && nRows > 0) { // Ignore empty clipboards 76.130 + this->addEntry(nRows); // Reuse slot 76.131 + setRowdata(Selection); // Use accessor 76.132 + 76.133 + // Update line numbers for this new row and all subsequent rows 76.134 + for (int nIter = m_pMaintable->currentRow(); nIter < m_pMaintable->numRows(); nIter++) 76.135 + m_pMaintable->setText(nIter, TITRAQ_IDXLINE, QString::number(nIter).rightJustify(4, QChar('0'))); 76.136 + 76.137 + // Do basic data validation to warn against missing fields 76.138 + for (int nIter = 0; nIter < nRows; nIter++) 76.139 + this->validateRow(m_pMaintable->currentRow() + nIter, 0); 76.140 + 76.141 + m_pStatbar->message(QString::number(nRows) + trUtf8(" rows pasted"), 4000); 76.142 + updEdit(m_pMaintable->currentRow()); // Reflect in the update controls 76.143 + } 76.144 + else // Well, I guess the user tried to paste an empty clipboard 76.145 + m_pStatbar->message(trUtf8("The clipboard is empty"), 4000); 76.146 +} 76.147 + 76.148 +// 76.149 +// Append a blank row entry 76.150 +// 76.151 +void Titraqform::addEntry(int nRows) 76.152 +{ 76.153 + QTableSelection Select; // Highlighted text 76.154 + int nTotal = 0; // Total row select 76.155 + int nCurrent = 0; // Current row 76.156 + std::auto_ptr<AS::Uuid> pGuid(new AS::Uuid); // For GUID production 76.157 + 76.158 + // Decide how many rows to add 76.159 + Select = m_pMaintable->selection(0); 76.160 + if (nRows > 0) 76.161 + nTotal = nRows; 76.162 + else 76.163 + nTotal = Select.bottomRow() - Select.topRow() + 1; 76.164 + 76.165 + // Optimize viewing by repainting cells only once after processing 76.166 + m_pMaintable->setUpdatesEnabled(false); 76.167 + 76.168 + // Add a row after selection and focus to the new row 76.169 + if (Select.bottomRow() + 1 != m_pMaintable->numRows()) { // Add upwards 76.170 + m_pMaintable->insertRows(Select.topRow(), nTotal); 76.171 + m_pMaintable->setDirty(); // Set data to dirty state 76.172 + m_pMaintable->setCurrentCell(Select.topRow(), m_pMaintable->currentColumn()); 76.173 + 76.174 + // According to Trolltech, insertRows() "clears the selection(s)". 76.175 + // They are pretty wrong about that, so unfortunately we'll have to 76.176 + // take care of the dirty work ourselves with a clearSelection(). 76.177 + m_pMaintable->clearSelection(false); 76.178 + m_pMaintable->selectRow(m_pMaintable->currentRow()); 76.179 + 76.180 + // Update relevant data fields for all new rows 76.181 + for (int nIter = 0; nIter < nTotal; nIter++) { 76.182 + m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXSTATUS, QString(QChar('W'))); 76.183 + m_pMaintable->setPixmap(Select.topRow() + nIter, TITRAQ_IDXSTATUS, QPixmap(s_kpcStatwarn_xpm)); 76.184 + m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXUSER, m_pPrefs->getString(TITRAQ_PREFUSER, TITRAQ_DEFUSER)); 76.185 + pGuid->genId(); 76.186 + m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXGUID, pGuid->getString()); 76.187 + m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXCRC, "0"); // 0 = invalid entry 76.188 + m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXREV, "0"); // Entry not revised 76.189 + m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXDATE, QDate::currentDate().toString(Qt::ISODate)); 76.190 + m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXSTART, "00:00"); 76.191 + m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXFINISH, "00:00"); 76.192 + m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXAMOUNT, "00:00"); 76.193 +// m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXTASK, "/"); 76.194 +// m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXREMARK, "Remark"); 76.195 + m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXCRC, "1"); // 0 = invalid entry 76.196 + this->calcCrc(Select.topRow() + nIter, -1); 76.197 + } 76.198 + } 76.199 + else { // Special case on last row add downwards 76.200 + m_pMaintable->insertRows(Select.bottomRow() + 1, nTotal); 76.201 + m_pMaintable->setDirty(); // Set data to dirty state 76.202 + m_pMaintable->setCurrentCell(Select.bottomRow() + 1, m_pMaintable->currentColumn()); 76.203 + 76.204 + // According to Trolltech, insertRows() "clears the selection(s)". 76.205 + // They are pretty wrong about that, so unfortunately we'll have to 76.206 + // take care of the dirty work ourselves with a clearSelection(). 76.207 + m_pMaintable->clearSelection(false); 76.208 + m_pMaintable->selectRow(m_pMaintable->currentRow()); 76.209 + 76.210 + // Update relevant data fields for all new rows 76.211 + for (int nIter = 1; nIter <= nTotal; nIter++) { 76.212 + m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXSTATUS, QString(QChar('W'))); 76.213 + m_pMaintable->setPixmap(Select.bottomRow() + nIter, TITRAQ_IDXSTATUS, QPixmap(s_kpcStatwarn_xpm)); 76.214 + m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXUSER, m_pPrefs->getString(TITRAQ_PREFUSER, TITRAQ_DEFUSER)); 76.215 + pGuid->genId(); 76.216 + m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXGUID, pGuid->getString()); 76.217 + m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXCRC, "0"); 76.218 + m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXREV, "0"); 76.219 + m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXDATE, QDate::currentDate().toString(Qt::ISODate)); 76.220 + m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXSTART, "00:00"); 76.221 + m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXFINISH, "00:00"); 76.222 + m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXAMOUNT, "00:00"); 76.223 +// m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXTASK, "/"); 76.224 +// m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXREMARK, "Remark"); 76.225 + this->calcCrc(Select.bottomRow() + nIter, -1); 76.226 + } 76.227 + } 76.228 + 76.229 + // Update line numbers for this new row and all subsequent rows 76.230 + for (int nIter = m_pMaintable->currentRow(); nIter < m_pMaintable->numRows(); nIter++) 76.231 + m_pMaintable->setText(nIter, TITRAQ_IDXLINE, QString::number(nIter).rightJustify(4, QChar('0'))); 76.232 + 76.233 + updEdit(m_pMaintable->currentRow()); // Reflect in the update controls 76.234 + m_pStatusedit->setPixmap(QPixmap(s_kpcStatwarn_xpm)); // Show pixmap 76.235 + 76.236 + m_pMaintable->setUpdatesEnabled(true); // Turn updates back on 76.237 + m_pMaintable->repaintContents(true); // Do a general repaint of table 76.238 + m_pMaintable->ensureCellVisible(m_pMaintable->currentRow() + nTotal - 1, m_pMaintable->currentColumn()); 76.239 + m_pMaintable->ensureCellVisible(m_pMaintable->currentRow(), m_pMaintable->currentColumn()); 76.240 + 76.241 + // In case we added the first and only row entry, 76.242 + // do post state adjustments like icon undimming 76.243 + if (m_pMaintable->numRows() == 1) { 76.244 + m_pDelrowact->setEnabled(true); 76.245 + m_pRefreshact->setEnabled(true); 76.246 + m_pCutact->setEnabled(true); 76.247 + m_pCopyact->setEnabled(true); 76.248 + 76.249 + // Brighten all the edit controls also 76.250 + m_pLineedit->setEnabled(true); 76.251 + m_pUseredit->setEnabled(true); 76.252 + m_pGuidedit->setEnabled(true); 76.253 + m_pCrcedit->setEnabled(true); 76.254 + m_pRevedit->setEnabled(true); 76.255 + m_pDateedit->setEnabled(true); 76.256 + m_pStarttime->setEnabled(true); 76.257 + m_pEndtime->setEnabled(true); 76.258 + m_pAmount->setEnabled(true); 76.259 + m_pTasks->setEnabled(true); 76.260 + m_pRemark->setEnabled(true); 76.261 + 76.262 + // And optionally the RPC actions, too 76.263 +#if defined HAVE_MICO || defined HAVE_ESOAP 76.264 + m_pSyncact->setEnabled(m_pPrefs->getBool(TITRAQ_PREFCORBON, TITRAQ_DEFCORBON) 76.265 + | m_pPrefs->getBool(TITRAQ_PREFSOAPON, TITRAQ_DEFSOAPON)); 76.266 +#endif // HAVE_MICO || defined HAVE_ESOAP 76.267 + } 76.268 +} 76.269 + 76.270 +// 76.271 +// Delete a row entry 76.272 +// 76.273 +void Titraqform::delEntry(int nRows) 76.274 +{ 76.275 + QTableSelection Select = m_pMaintable->selection(0); // Highlighted text 76.276 + int nTotal = Select.bottomRow() - Select.topRow() + 1; // Total row select 76.277 + QMemArray<int> Rowselect(nTotal); // Row array 76.278 + 76.279 + // Calculate rows to delete from selection highlight 76.280 + for (int nIter = 0; nIter < nTotal; ++nIter) 76.281 + Rowselect[nIter] = Select.topRow() + nIter; 76.282 + 76.283 + // Remove the row at selection and focus to the next row 76.284 + if (m_pMaintable->currentRow() + 1 != m_pMaintable->numRows()) { 76.285 + m_pMaintable->setCurrentCell(Select.bottomRow() + 1, m_pMaintable->currentColumn()); 76.286 + m_pMaintable->removeRows(Rowselect); 76.287 + m_pMaintable->setDirty(); // Set data to dirty state 76.288 + } 76.289 + else { // Special case to handle removing of only row or last row 76.290 + m_pMaintable->removeRows(Rowselect); 76.291 + m_pMaintable->setDirty(); // Set data to dirty state 76.292 + } 76.293 + 76.294 + // Update line numbers for this new row and all subsequent rows 76.295 + for (int nIter = m_pMaintable->currentRow(); nIter < m_pMaintable->numRows(); nIter++) 76.296 + m_pMaintable->setText(nIter, TITRAQ_IDXLINE, QString::number(nIter)); 76.297 + 76.298 + // In case we removed the last remaining row, 76.299 + // do post state adjustments like icon dimming 76.300 + if (m_pMaintable->numRows() <= 0) { 76.301 + m_pDelrowact->setEnabled(false); 76.302 + m_pRefreshact->setEnabled(false); 76.303 + m_pCutact->setEnabled(false); 76.304 + m_pCopyact->setEnabled(false); 76.305 + 76.306 + // Dim all the edit controls also 76.307 + m_pStatusedit->setPixmap(s_kpcStatvoid_xpm); 76.308 + m_pLineedit->setEnabled(false); 76.309 + m_pUseredit->setEnabled(false); 76.310 + m_pGuidedit->setEnabled(false); 76.311 + m_pCrcedit->setEnabled(false); 76.312 + m_pRevedit->setEnabled(false); 76.313 + m_pDateedit->setEnabled(false); 76.314 + m_pStarttime->setEnabled(false); 76.315 + m_pEndtime->setEnabled(false); 76.316 + m_pAmount->setEnabled(false); 76.317 + m_pTasks->setEnabled(false); 76.318 + m_pRemark->setEnabled(false); 76.319 + 76.320 + // And optionally dim the RPC actions 76.321 +#if defined HAVE_MICO || defined HAVE_ESOAP 76.322 + m_pSyncact->setEnabled(false); 76.323 +#endif // HAVE_MICO || defined HAVE_ESOAP 76.324 + } 76.325 +} 76.326 + 76.327 +// 76.328 +// Refresh the display of all data items 76.329 +// 76.330 +void Titraqform::refreshDisplay(void) 76.331 +{ 76.332 + int nIter = 0; // Matrix iterator 76.333 + int nRows = m_pMaintable->numRows(); // Total number of rows 76.334 + 76.335 + // Sweep through matrix validating linewise 76.336 + // data and updating line numbers for all rows 76.337 + while (nIter < nRows) { 76.338 + this->validateRow(nIter, 0); 76.339 + m_pMaintable->setText(nIter, TITRAQ_IDXLINE, QString::number(nIter).rightJustify(4, QChar('0'))); 76.340 + nIter++; 76.341 + } 76.342 + 76.343 + m_pMaintable->repaintContents(false); // Do a general repaint of table 76.344 + m_pStatbar->message(trUtf8("Display was refreshed"), 4000); // Announce result 76.345 +} 76.346 + 76.347 +// 76.348 +// Make and display a new document window 76.349 +// 76.350 +void Titraqform::newDoc(void) 76.351 +{ 76.352 + int nResult = 0; // Holds return value from save first messagebox 76.353 + 76.354 + // Check modification state of current data 76.355 + if (m_pMaintable->isDirty()) { 76.356 + nResult = QMessageBox::information(this, QString(TITRAQ_APPTITLE) 76.357 + + ' ' + asgui_version.v_short, trUtf8(TITRAQ_SAVEFIRST), 76.358 + trUtf8("&Save"), trUtf8("&Discard"), trUtf8("Cancel"), 0, 2); 76.359 + 76.360 + switch (nResult) { 76.361 + case 0: // First button selected, so save first 76.362 + this->saveFile(); // Save changes first 76.363 + break; 76.364 + case 1: // Second button selected, so don't save 76.365 + break; 76.366 + case 2: // Third button selected, so return sofort 76.367 + default: 76.368 + m_pStatbar->message(trUtf8("New aborted"), 4000); 76.369 + return; 76.370 + break; 76.371 + } 76.372 + } 76.373 + 76.374 + if (!m_pMaintable->isDirty() || nResult == 1) { // Check modification state 76.375 + // Fall through to implicit new doc code 76.376 + this->setCaption(trUtf8("No file name")); 76.377 + m_pStatbar->message(trUtf8("New document"), 4000); 76.378 + this->enableIface(true); // Enable the interface 76.379 + m_pMaintable->setNumRows(0); // Remove all data in table 76.380 + this->setFilename(""); // Signal a closed doc state 76.381 + this->addEntry(1); // Default new op adds a row 76.382 + m_pMaintable->setDirty(false); // Start out clean 76.383 + } 76.384 +} 76.385 + 76.386 +// 76.387 +// Open and display an existing document 76.388 +// 76.389 +void Titraqform::openDoc(void) 76.390 +{ 76.391 + int nResult = 0; // Holds return value from save first messagebox 76.392 + 76.393 +// 76.394 +// This block will guide the user to saving the contents of the timesheet 76.395 +// before losing them in an open operation. The question and dialog box will 76.396 +// not be raised if no open timesheet exists or if it was just serialized. 76.397 +// 76.398 + if (m_pMaintable->isDirty()) { // Check modification state 76.399 + nResult = QMessageBox::information(this, QString(TITRAQ_APPTITLE) 76.400 + + ' ' + asgui_version.v_short, trUtf8(TITRAQ_SAVEFIRST), 76.401 + trUtf8("&Save"), trUtf8("&Discard"), trUtf8("Cancel"), 0, 2); 76.402 + 76.403 + switch (nResult) { 76.404 + case 0: // Save first 76.405 + this->saveFile(); // Save changes first 76.406 + break; 76.407 + case 1: // Don't save first but do load 76.408 + break; 76.409 + case 2: // Don't do a load timesheet 76.410 + default: 76.411 + m_pStatbar->message(trUtf8("Loading aborted"), 4000); 76.412 + return; 76.413 + break; 76.414 + } 76.415 + } 76.416 + 76.417 +// 76.418 +// This block ensures that conditions of first block logic were met if 76.419 +// applicable. If so, the user gives a file name to open or cancels the 76.420 +// operation. The corresponding file will be opened, and if this is 76.421 +// unsuccessful then the post state is exactly the same as the pre state. 76.422 +// 76.423 + if (!m_pMaintable->isDirty() || nResult == 1) { // Check modification state 76.424 + // Make sure we correctly get the name of the default file to open 76.425 + QString Openas = m_pPrefs->getString(TITRAQ_PREFASDIR, TITRAQ_DEFASDIR); 76.426 + if (Openas.startsWith(TITRAQ_HOMEDIRTOK)) 76.427 + Openas = QDir::homeDirPath() + Openas.remove(0, QString(TITRAQ_HOMEDIRTOK).length() - 1); 76.428 + 76.429 + // This dialog asks which file the user wants to open 76.430 + QString Filestring = QFileDialog::getOpenFileName(Openas, 76.431 + trUtf8("Accounting Data (*.as);;Text files (*.txt);;All Files (*)"), 76.432 + this, trUtf8("ChooserDialog"), trUtf8("Choose a file to open"), NULL, false); 76.433 + 76.434 + // We might have a filename to work on, so do something with it 76.435 + if (!Filestring.isEmpty()) { 76.436 + QFile Filetemp(Filestring); // File to load 76.437 + try { 76.438 + if (Filetemp.exists() && validateData(Filetemp)) { // Be extra sure 76.439 + setFilename(Filestring); // Set the new file name 76.440 + m_pMaintable->setNumRows(0); // Clear out old data 76.441 + m_pMaintable->setDirty(false); // Reset dirty flag 76.442 + loadData(Filetemp); // Pass to helper method 76.443 + this->setCaption(Filestring); // Caption in the titlebar 76.444 + m_pStatbar->message(trUtf8("Loaded document ") + Filestring, 4000); 76.445 + this->enableIface(true); // Turn on the lights 76.446 + this->setOpen(true); // Indicate doc is open 76.447 + } 76.448 + } 76.449 + catch (Genexcept& Genex) { // Crap, we failed 76.450 + m_pStatbar->message(trUtf8("Loading failed"), 4000); 76.451 + Genex.reportErr(); 76.452 + return; 76.453 + } 76.454 + } 76.455 + else // An empty filename returning from the file dialog means cancel 76.456 + m_pStatbar->message(trUtf8("Loading aborted"), 4000); 76.457 + } 76.458 +} 76.459 + 76.460 +// 76.461 +// Serialize current state to the current file 76.462 +// 76.463 +void Titraqform::saveFile(void) 76.464 +{ 76.465 + QString Fname; 76.466 + Simplefile Filevents; 76.467 + 76.468 + try { 76.469 + Fname = *this->getFilename(); 76.470 + 76.471 + // First time saves are really just saveName in disguise 76.472 + if (Fname.isEmpty()) { 76.473 + try { 76.474 + this->saveName(); // Try to 'save as' 76.475 + return; // and short circuit 76.476 + } 76.477 + catch (Genexcept& Genex) { 76.478 +// Genex.reportErr(); // Report the error 76.479 + return; // and short circuit 76.480 + } 76.481 + } 76.482 + 76.483 + Filevents.setName(Fname); // Construct a file to write 76.484 + if (m_pPrefs->getBool(TITRAQ_PREFBAKON, TITRAQ_DEFBAKON)) 76.485 + Filevents.makeBackup(); // Back up to filename.bak 76.486 + this->saveData(Filevents); // Pass to helper method 76.487 + } 76.488 + catch (Genexcept& Genex) { 76.489 + Genex.reportErr(); 76.490 + } 76.491 + // Reset and give output to main window 76.492 + this->setCaption(Fname); 76.493 + m_pStatbar->message(trUtf8("File %1 saved").arg(Fname), 4000); 76.494 + m_pMaintable->setDirty(false); // Set the clean state to allow close 76.495 +} 76.496 + 76.497 +// 76.498 +// Serialize current state to a selected file 76.499 +// 76.500 +void Titraqform::saveAs(void) 76.501 +{ 76.502 + int nResult = 0; // For checking user's answer 76.503 + 76.504 + // Make sure we correctly get the name of the default file to open 76.505 + QString Openas = m_pPrefs->getString(TITRAQ_PREFASDIR, TITRAQ_DEFASDIR); 76.506 + if (Openas.startsWith(TITRAQ_HOMEDIRTOK)) 76.507 + Openas = QDir::homeDirPath() + Openas.remove(0, QString(TITRAQ_HOMEDIRTOK).length() - 1); 76.508 + 76.509 + // And then get the name of the selected file to save to 76.510 + QString Filestring = QFileDialog::getSaveFileName(Openas, trUtf8("Accounting Data (*.as);;Text files (*.txt);;All Files (*)"), this, trUtf8("ChooserDialog"), trUtf8("Choose a file to save"), NULL, false); 76.511 + if (!Filestring.isEmpty()) { 76.512 + if (QFile::exists(Filestring)) { 76.513 + nResult = QMessageBox::warning(this, QString(TITRAQ_APPTITLE) 76.514 + + ' ' + asgui_version.v_short, trUtf8(TITRAQ_OVERWRITE), 76.515 + trUtf8("&Yes"), trUtf8("&No"), NULL, 1, 1); 76.516 + switch (nResult) { 76.517 + case 0: // Overwrite contents 76.518 + this->setFilename(Filestring); 76.519 + this->saveFile(); 76.520 + break; 76.521 + case 1: // Don't overwrite 76.522 + default: 76.523 + break; 76.524 + } 76.525 + } 76.526 + else { 76.527 + // Conditionally use a unique extension like '.as' if user prefers 76.528 + if (m_pPrefs->getBool(TITRAQ_PREFEXTENDON, TITRAQ_DEFEXTENDON)) { 76.529 + QString Extension = TITRAQ_FEXTENSION; // Logic to handle 76.530 + if (!Filestring.endsWith(Extension)) // AS file extension 76.531 + Filestring += Extension; // insertion 76.532 + } 76.533 + this->setFilename(Filestring); // Set filename of object first 76.534 + this->saveFile(); // Finish by calling the save action 76.535 + } 76.536 + } 76.537 + else 76.538 + // User did not select a valid file and push okay button 76.539 + m_pStatbar->message(trUtf8("Saving aborted"), 4000); 76.540 +} 76.541 + 76.542 +// 76.543 +// Implicitly serialize current state to a selected file 76.544 +// The main difference with saveAs is that this uses exceptions 76.545 +// 76.546 +void Titraqform::saveName(void) 76.547 +{ 76.548 + int nResult = 0; // For checking user's answer 76.549 + 76.550 + // Make sure we correctly get the name of the default file to open 76.551 + QString Openas = m_pPrefs->getString(TITRAQ_PREFASDIR, TITRAQ_DEFASDIR); 76.552 + if (Openas.startsWith(TITRAQ_HOMEDIRTOK)) 76.553 + Openas = QDir::homeDirPath() + Openas.remove(0, QString(TITRAQ_HOMEDIRTOK).length() - 1); 76.554 + 76.555 + nResult = 1; // We loop on this dialog only if an indecisive user 76.556 + while (nResult > 0) { // is hesitant to overwrite a file over and over again 76.557 + QString Filestring = QFileDialog::getSaveFileName(Openas, trUtf8("Accounting Data (*.as);;Text files (*.txt);;All Files (*)"), this, trUtf8("ChooserDialog"), trUtf8("Choose a file to save"), NULL, false); 76.558 + if (!Filestring.isEmpty()) { 76.559 + if (QFile::exists(Filestring)) { 76.560 + nResult = QMessageBox::warning(this, QString(TITRAQ_APPTITLE) 76.561 + + ' ' + asgui_version.v_short, trUtf8(TITRAQ_OVERWRITE), 76.562 + trUtf8("&Yes"), trUtf8("&No"), NULL, 1, 1); 76.563 + switch (nResult) { 76.564 + case 0: // Overwrite contents 76.565 + this->setFilename(Filestring); 76.566 + this->saveFile(); 76.567 + break; 76.568 + case 1: // Don't overwrite 76.569 + default: 76.570 + break; 76.571 + } 76.572 + } 76.573 + else { 76.574 + 76.575 + // Conditionally use a unique extension like '.as' if user prefers 76.576 + if (m_pPrefs->getBool(TITRAQ_PREFEXTENDON, TITRAQ_DEFEXTENDON)) { 76.577 + QString Extension = TITRAQ_FEXTENSION; // Logic to handle 76.578 + if (!Filestring.endsWith(Extension)) // AS file extension 76.579 + Filestring += Extension; // insertion 76.580 + } 76.581 + this->setFilename(Filestring); // Set filename of object first 76.582 + nResult = 0; // Reset our loop control 76.583 + this->saveFile(); // Finish by calling the save action 76.584 + } 76.585 + } 76.586 + else { 76.587 + // User did not select a valid file and push okay button 76.588 + m_pStatbar->message(trUtf8("Saving aborted"), 4000); 76.589 + throw Genexcept(TITRAQ_SAVECANCELLED); 76.590 + } 76.591 + } 76.592 +} 76.593 + 76.594 +// 76.595 +// Close current document, and then quit the application 76.596 +// 76.597 +void Titraqform::quitApp(void) 76.598 +{ 76.599 + int nResult = 0; 76.600 + 76.601 + if (m_pMaintable->isDirty()) { 76.602 + nResult = QMessageBox::information(this, QString(TITRAQ_APPTITLE) 76.603 + + ' ' + asgui_version.v_short, trUtf8(TITRAQ_SAVEFIRST), 76.604 + trUtf8("&Save"), trUtf8("&Discard"), trUtf8("Cancel"), 0, 2); 76.605 + 76.606 + switch (nResult) { // Maybe save before closing 76.607 + case 0: // Save first 76.608 + this->saveFile(); // Save changes first 76.609 + break; 76.610 + case 1: // Don't save first 76.611 + m_pMaintable->setDirty(false); 76.612 + break; 76.613 + case 2: // Do nothing 76.614 + default: 76.615 + return; // Go away without closing 76.616 + break; 76.617 + } 76.618 + } 76.619 + 76.620 + // We should be clean now, but double check just in case 76.621 + if (!m_pMaintable->isDirty()) 76.622 + qApp->quit(); 76.623 +} 76.624 + 76.625 +// 76.626 +// Close current document, displaying in main window 76.627 +// 76.628 +void Titraqform::closeEvent(QCloseEvent *pClosit) 76.629 +{ 76.630 + int nResult = 0; 76.631 + 76.632 + if (!this->isOpen()) // Short circuit if user 76.633 + qApp->quit(); // selects close twice 76.634 + 76.635 + // Check modification state of current data 76.636 + if (m_pMaintable->isDirty()) { 76.637 + nResult = QMessageBox::information(this, QString(TITRAQ_APPTITLE) 76.638 + + ' ' + asgui_version.v_short, trUtf8(TITRAQ_SAVEFIRST), 76.639 + trUtf8("&Save"), trUtf8("&Discard"), trUtf8("Cancel"), 0, 2); 76.640 + 76.641 + switch (nResult) { // Maybe save before closing 76.642 + case 0: // Save first 76.643 + this->saveFile(); // Save changes first 76.644 + break; 76.645 + case 1: // Don't save first 76.646 + m_pMaintable->setDirty(false); 76.647 + break; 76.648 + case 2: // Do nothing 76.649 + default: 76.650 + pClosit->ignore(); 76.651 + return; // Go away without closing 76.652 + break; 76.653 + } 76.654 + } 76.655 + 76.656 + if (!m_pMaintable->isDirty()) { // Check again 76.657 + // Fall through to implicit close code 76.658 + this->setCaption(QString(TITRAQ_APPTITLE) + ' ' + asgui_version.v_short); 76.659 + try { // There might be problems, so wrap these last ops with error handling 76.660 + QString Lightsout; // It's late, go to bed 76.661 + if (this->isOpen()) 76.662 + Lightsout = trUtf8("Closed document ") + *this->getFilename(); 76.663 + this->setOpen(false); // Set doc state to closed 76.664 + this->enableIface(false); // Turn off the lights 76.665 + m_pStatbar->message(Lightsout, 4000); 76.666 + } 76.667 + catch (Genexcept& Genex) { 76.668 + Genex.reportErr(); 76.669 + } 76.670 + } 76.671 + pClosit->ignore(); // Finish off by not closing 76.672 +} 76.673 + 76.674 +// 76.675 +// Edit menu select all entries 76.676 +// 76.677 +void Titraqform::selAll(void) 76.678 +{ 76.679 + Prototype Unimp; 76.680 + Unimp.doMbox(); 76.681 +} 76.682 + 76.683 +// 76.684 +// Edit a table entry in place, without the usual edit controls 76.685 +// 76.686 +void Titraqform::inplaceEdit(int nRow, int nCol, int nButton, const QPoint &Mousepos) 76.687 +{ 76.688 + // Table read only attribute must be reset here, so that editing can take 76.689 + // place. Otherwise calls to editCell are ignored (for obvious reasons). 76.690 + m_pMaintable->setReadOnly(false); 76.691 + 76.692 + // After editCell() is called, beginEdit() and endEdit() execute. The read 76.693 + // only attribute is reset in endEdit() to return everything to normal. 76.694 + m_pMaintable->editCell(nRow, nCol); 76.695 + 76.696 + m_pMaintable->setEdition(nCol); 76.697 +} 76.698 + 76.699 +// 76.700 +// Update the edit controls widget sizes 76.701 +// 76.702 +void Titraqform::updSizes(int nSection, int nOldsize, int nNewsize) 76.703 +{ 76.704 + switch (nSection) { 76.705 + case TITRAQ_IDXALLCTRLS: 76.706 + if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXSTATUS) > 0) 76.707 + m_pStatusedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXSTATUS) - TITRAQ_SPACING); 76.708 + if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXLINE) > 0) 76.709 + m_pLineedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXLINE) - TITRAQ_SPACING); 76.710 + if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXUSER) > 0) 76.711 + m_pUseredit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXUSER) - TITRAQ_SPACING); 76.712 + if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXGUID) > 0) 76.713 + m_pGuidedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXGUID) - TITRAQ_SPACING); 76.714 + if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXCRC) > 0) 76.715 + m_pCrcedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXCRC) - TITRAQ_SPACING); 76.716 + if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXREV) > 0) 76.717 + m_pRevedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXREV) - TITRAQ_SPACING); 76.718 + if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXDATE) > 0) 76.719 + m_pDateedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXDATE) - TITRAQ_SPACING); 76.720 + if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXSTART) > 0) 76.721 + m_pStarttime->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXSTART) - TITRAQ_SPACING); 76.722 + if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXFINISH) > 0) 76.723 + m_pEndtime->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXFINISH) - TITRAQ_SPACING); 76.724 + if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXAMOUNT) > 0) 76.725 + m_pAmount->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXAMOUNT) - TITRAQ_SPACING); 76.726 + if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXTASK) > 0) 76.727 + m_pTasks->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXTASK) - TITRAQ_SPACING); 76.728 +// if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXRCOL))) 76.729 +// m_pRemark->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXREMARK) - TITRAQ_SPACING); 76.730 + break; 76.731 + case TITRAQ_IDXSTATUS: 76.732 + m_pStatusedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXSTATUS) - TITRAQ_SPACING); 76.733 + break; 76.734 + case TITRAQ_IDXLINE: 76.735 + m_pLineedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXLINE) - TITRAQ_SPACING); 76.736 + break; 76.737 + case TITRAQ_IDXUSER: 76.738 + m_pUseredit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXUSER) - TITRAQ_SPACING); 76.739 + break; 76.740 + case TITRAQ_IDXGUID: 76.741 + m_pGuidedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXGUID) - TITRAQ_SPACING); 76.742 + break; 76.743 + case TITRAQ_IDXCRC: 76.744 + m_pCrcedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXCRC) - TITRAQ_SPACING); 76.745 + break; 76.746 + case TITRAQ_IDXREV: 76.747 + m_pRevedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXREV) - TITRAQ_SPACING); 76.748 + break; 76.749 + case TITRAQ_IDXDATE: 76.750 + m_pDateedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXDATE) - TITRAQ_SPACING); 76.751 + break; 76.752 + case TITRAQ_IDXSTART: 76.753 + m_pStarttime->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXSTART) - TITRAQ_SPACING); 76.754 + break; 76.755 + case TITRAQ_IDXFINISH: 76.756 + m_pEndtime->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXFINISH) - TITRAQ_SPACING); 76.757 + break; 76.758 + case TITRAQ_IDXAMOUNT: 76.759 + m_pAmount->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXAMOUNT) - TITRAQ_SPACING); 76.760 + break; 76.761 + case TITRAQ_IDXTASK: 76.762 + m_pTasks->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXTASK) - TITRAQ_SPACING); 76.763 + break; 76.764 + case TITRAQ_IDXREMARK: 76.765 +// m_pRemark->setFixedWidth(nNewsize); 76.766 + break; 76.767 + default: 76.768 + throw Genexcept("Unrecognized main window column header."); 76.769 + break; 76.770 + } 76.771 + 76.772 + // As a last and redundant step, adjust size of first visible control 76.773 + switch(this->getFirstcol()) { 76.774 + case TITRAQ_IDXSTATUS: 76.775 + m_pStatusedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXSTATUS) - TITRAQ_SPACING + TITRAQ_SPACING / 2); 76.776 + break; 76.777 + case TITRAQ_IDXLINE: 76.778 + m_pLineedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXLINE) - TITRAQ_SPACING + TITRAQ_SPACING / 2); 76.779 + break; 76.780 + case TITRAQ_IDXUSER: 76.781 + m_pUseredit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXUSER) - TITRAQ_SPACING + TITRAQ_SPACING / 2); 76.782 + break; 76.783 + case TITRAQ_IDXGUID: 76.784 + m_pGuidedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXGUID) - TITRAQ_SPACING + TITRAQ_SPACING / 2); 76.785 + break; 76.786 + case TITRAQ_IDXCRC: 76.787 + m_pCrcedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXCRC) - TITRAQ_SPACING + TITRAQ_SPACING / 2); 76.788 + break; 76.789 + case TITRAQ_IDXREV: 76.790 + m_pRevedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXREV) - TITRAQ_SPACING + TITRAQ_SPACING / 2); 76.791 + break; 76.792 + case TITRAQ_IDXDATE: 76.793 + m_pDateedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXDATE) - TITRAQ_SPACING + TITRAQ_SPACING / 2); 76.794 + break; 76.795 + case TITRAQ_IDXSTART: 76.796 + m_pStarttime->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXSTART) - TITRAQ_SPACING + TITRAQ_SPACING / 2); 76.797 + break; 76.798 + case TITRAQ_IDXFINISH: 76.799 + m_pEndtime->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXFINISH) - TITRAQ_SPACING + TITRAQ_SPACING / 2); 76.800 + break; 76.801 + case TITRAQ_IDXAMOUNT: 76.802 + m_pAmount->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXAMOUNT) - TITRAQ_SPACING + TITRAQ_SPACING / 2); 76.803 + break; 76.804 + case TITRAQ_IDXTASK: 76.805 + m_pTasks->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXTASK) - TITRAQ_SPACING + TITRAQ_SPACING / 2); 76.806 + break; 76.807 + default: // Probably no columns are visible? 76.808 + break; 76.809 + } 76.810 +} 76.811 + 76.812 +// 76.813 +// What to do if a data cell is modified 76.814 +// 76.815 +void Titraqform::dataChanged(int nRow, int nCol) 76.816 +{ 76.817 + if (nCol != TITRAQ_IDXSTATUS && nCol != TITRAQ_IDXLINE) 76.818 + m_pMaintable->setDirty(); // Mark this timesheet dirty, changes pending save 76.819 +} 76.820 + 76.821 +// 76.822 +// Convenience member calculates CRC for current row 76.823 +// 76.824 +void Titraqform::calcCrc(void) 76.825 +{ 76.826 + this->calcCrc(-1, -1); 76.827 +} 76.828 + 76.829 +// 76.830 +// Calculates CRC for the specified row, fires when data is changed 76.831 +// 76.832 +void Titraqform::calcCrc(int nRow, int nCol) 76.833 +{ 76.834 + if (nCol != TITRAQ_IDXSTATUS && nCol != TITRAQ_IDXLINE \ 76.835 + && m_pMaintable->numRows() > 0) { 76.836 + U32 Testcrc, Valcrc; 76.837 + QString Crcstr; 76.838 + std::auto_ptr<Qualistring>pWholerow(new Qualistring); 76.839 + int nRealrow = -1; 76.840 + 76.841 + // Build the data that will be used in testing CRC calculation 76.842 + nRealrow = (nRow >= 0) ? nRow : m_pMaintable->currentRow(); 76.843 + *pWholerow = m_pMaintable->text(nRealrow, TITRAQ_IDXUSER); 76.844 + for (int nIter = TITRAQ_IDXUSER + 1; nIter < TITRAQ_IDXTAIL; nIter++) 76.845 + if (nIter != TITRAQ_IDXCRC) // Don't checksum the checksum! 76.846 + *pWholerow += m_pMaintable->text(nRealrow, nIter); 76.847 + 76.848 + // Update the checksum and revision only if necessary 76.849 + Testcrc = pWholerow->getCrc(); 76.850 + 76.851 + // FIXME: This thing is not very unportable, because toUInt != U32 76.852 + if (Testcrc != m_pMaintable->text(nRealrow, TITRAQ_IDXCRC).toUInt()) { 76.853 + 76.854 +// // Bump the revision number of our entry to control conflicts 76.855 +// nNewrev = m_pMaintable->text(nRealrow, TITRAQ_IDXREV).toInt() + 1; 76.856 +// m_pMaintable->setText(nRealrow, TITRAQ_IDXREV, QString::number(nNewrev)); 76.857 + 76.858 + // Build the data that will be used in setting CRC calculation 76.859 + *pWholerow = m_pMaintable->text(nRealrow, TITRAQ_IDXUSER); 76.860 + for (int nIter = TITRAQ_IDXUSER + 1; nIter < TITRAQ_IDXTAIL; nIter++) 76.861 + if (nIter != TITRAQ_IDXCRC) // Don't checksum the checksum! 76.862 + *pWholerow += m_pMaintable->text(nRealrow, nIter); 76.863 + 76.864 + Valcrc = pWholerow->getCrc(); // Finally set the checksum to its new value 76.865 + Crcstr = QString::number(Valcrc, 16).rightJustify(8, '0'); 76.866 + m_pMaintable->setText(nRealrow, TITRAQ_IDXCRC, "0x" + Crcstr); 76.867 + m_pCrcedit->setText("0x" + Crcstr); 76.868 + } 76.869 + } 76.870 +} 76.871 + 76.872 +// 76.873 +// Gets a hit on every table click 76.874 +// 76.875 +void Titraqform::onClick(int nRow, int nCol, int nButton, const QPoint &Mousepos) 76.876 +{ 76.877 + // Give the clueless user some hints when clicking an empty timesheet 76.878 + if (m_pMaintable->numRows() <= 0) 76.879 + m_pStatbar->message(trUtf8("Empty timesheet, add entries first please"), 2000); 76.880 +} 76.881 + 76.882 +// 76.883 +// Update the edit controls contents 76.884 +// 76.885 +void Titraqform::updEdit(int nRow, int nCol) 76.886 +{ 76.887 + // Why is the app sending negative row signal? I don't know yet, 76.888 + // so add in this nasty hack to fend off the debug spew on stderr 76.889 + if (m_pMaintable->numRows() > 0 && nRow >= 0) { 76.890 + // Field strings to check for validity and process 76.891 + QString Textline(m_pMaintable->text(nRow, TITRAQ_IDXLINE)); 76.892 + QString Textuser(m_pMaintable->text(nRow, TITRAQ_IDXUSER)); 76.893 + QString Textguid(m_pMaintable->text(nRow, TITRAQ_IDXGUID)); 76.894 + QString Textcrc(m_pMaintable->text(nRow, TITRAQ_IDXCRC)); 76.895 + QString Textrev(m_pMaintable->text(nRow, TITRAQ_IDXREV)); 76.896 + QString Textdate(m_pMaintable->text(nRow, TITRAQ_IDXDATE)); 76.897 + QString Textstart(m_pMaintable->text(nRow, TITRAQ_IDXSTART)); 76.898 + QString Textfinish(m_pMaintable->text(nRow, TITRAQ_IDXFINISH)); 76.899 + QString Textamount(m_pMaintable->text(nRow, TITRAQ_IDXAMOUNT)); 76.900 + QString Texttask(m_pMaintable->text(nRow, TITRAQ_IDXTASK)); 76.901 + QString Textremark(m_pMaintable->text(nRow, TITRAQ_IDXREMARK)); 76.902 + 76.903 + // Reset the edition state member 76.904 + m_pMaintable->setEdition(); 76.905 + 76.906 + // Set text of member edit controls 76.907 + if (m_pMaintable->text(nRow, TITRAQ_IDXSTATUS).isEmpty()) // If row is empty 76.908 + m_pStatusedit->setPixmap(s_kpcStatvoid_xpm); // add a placeholder 76.909 + else 76.910 + m_pStatusedit->setPixmap(m_pMaintable->pixmap(nRow, TITRAQ_IDXSTATUS)); 76.911 + m_pLineedit->setText(Textline); 76.912 + m_pUseredit->setText(Textuser); 76.913 + m_pGuidedit->setText(Textguid); 76.914 + m_pCrcedit->setText(Textcrc); 76.915 + m_pRevedit->setText(Textrev); 76.916 + 76.917 +// QRegExp Shorten("/(\\w+)$"); // For stripping prefix off the current task 76.918 +// Texttask.remove(0, Shorten.search(Texttask) + 1); // Strip leading slash 76.919 + 76.920 + m_pRemark->setText(Textremark); 76.921 + m_pTasks->setCurrentText(Texttask); 76.922 + 76.923 + // Date field not suitable for empty string text 76.924 + if (Textdate == ".") 76.925 + m_pDateedit->setDate(QDate::currentDate()); 76.926 + else if (Textdate.isEmpty()) 76.927 + m_pDateedit->setDate(QDate::fromString("0000-00-00", Qt::ISODate)); 76.928 + else 76.929 + m_pDateedit->setDate(QDate::fromString(Textdate, Qt::ISODate)); 76.930 + 76.931 + // Start time not suitable for empty string text 76.932 + if (Textstart == ".") 76.933 + m_pStarttime->setTime(QTime::currentTime()); 76.934 + else if (Textstart.isEmpty()) 76.935 + m_pStarttime->setTime(QTime::QTime(0, 0)); 76.936 + else 76.937 + m_pStarttime->setTime(QTime::fromString(Textstart, Qt::ISODate)); 76.938 + 76.939 + // Finish time not suitable for empty string text 76.940 + if (Textfinish == ".") 76.941 + m_pEndtime->setTime(QTime::currentTime()); 76.942 + else if (Textfinish.isEmpty()) 76.943 + m_pEndtime->setTime(QTime::QTime(0, 0)); 76.944 + else 76.945 + m_pEndtime->setTime(QTime::fromString(Textfinish, Qt::ISODate)); 76.946 + 76.947 + // Amount time not suitable for empty string text 76.948 + if (Textamount == ".") { 76.949 + int nDifference = m_pStarttime->time().secsTo(m_pEndtime->time()); 76.950 + m_pAmount->setTime(QTime(0, 0).addSecs(nDifference)); 76.951 + } 76.952 + else if (Textamount.isEmpty()) 76.953 + m_pAmount->setTime(QTime::QTime(0, 0)); 76.954 + else 76.955 + m_pAmount->setTime(QTime::fromString(Textamount, Qt::ISODate)); 76.956 + } 76.957 +} 76.958 + 76.959 +// 76.960 +// Validate current row of the matrix 76.961 +// 76.962 +void Titraqform::validateRow(void) 76.963 +{ 76.964 + this->validateRow(-1, -1); 76.965 +} 76.966 + 76.967 +// 76.968 +// Validate specified row of the matrix 76.969 +// 76.970 +void Titraqform::validateRow(int nRow, int nCol) 76.971 +{ 76.972 + int nRealrow = -1; 76.973 + 76.974 + if (!this->isOpen()) { // If no data is loaded then short circuit 76.975 + m_pStatbar->message(trUtf8("Timesheet contains no data"), 4000); 76.976 + return; 76.977 + } 76.978 + 76.979 + nRealrow = (nRow >= 0) ? nRow : m_pMaintable->currentRow(); 76.980 + QString Statis = m_pMaintable->text(nRealrow, TITRAQ_IDXSTATUS); // Get text 76.981 + 76.982 + // Review whole data validity, and set pixmap accordingly 76.983 + if (m_pMaintable->text(nRealrow, TITRAQ_IDXUSER).isEmpty() || 76.984 + m_pMaintable->text(nRealrow, TITRAQ_IDXGUID).isEmpty() || 76.985 + m_pMaintable->text(nRealrow, TITRAQ_IDXCRC).isEmpty() || 76.986 + m_pMaintable->text(nRealrow, TITRAQ_IDXREV).isEmpty() || 76.987 + m_pMaintable->text(nRealrow, TITRAQ_IDXDATE).isEmpty() || 76.988 + m_pMaintable->text(nRealrow, TITRAQ_IDXSTART).isEmpty() || 76.989 + m_pMaintable->text(nRealrow, TITRAQ_IDXFINISH).isEmpty() || 76.990 + m_pMaintable->text(nRealrow, TITRAQ_IDXAMOUNT).isEmpty() || 76.991 + m_pMaintable->text(nRealrow, TITRAQ_IDXTASK).isEmpty()) 76.992 + { // No K&R style to show where actual code begins 76.993 + if (Statis.startsWith(QString("W"))) { // Conditionally set pixmap to avoid overhead 76.994 +// FIXME: Next line commented out, and I see that this algorythm needs help 76.995 +// m_pStatusedit->setPixmap(m_pMaintable->pixmap(nRealrow, TITRAQ_IDXSTATUS)); 76.996 + } 76.997 + else if (!Statis.startsWith(QString("E"))) { // Conditionally set pixmap to avoid overhead 76.998 + m_pMaintable->setText(nRealrow, TITRAQ_IDXSTATUS, Statis.replace(TITRAQ_IDXSTATERROR, sizeof(char), 'E')); 76.999 + m_pMaintable->setPixmap(nRealrow, TITRAQ_IDXSTATUS, QPixmap(s_kpcStaterror_xpm)); 76.1000 + m_pStatusedit->setPixmap(m_pMaintable->pixmap(nRealrow, TITRAQ_IDXSTATUS)); 76.1001 + } 76.1002 + } 76.1003 + else { 76.1004 + if (!Statis.startsWith(QString("O"))) { // Conditionally set pixmap to avoid overhead 76.1005 + m_pMaintable->setText(nRealrow, TITRAQ_IDXSTATUS, Statis.replace(TITRAQ_IDXSTATERROR, sizeof(char), 'O')); 76.1006 + m_pMaintable->setPixmap(nRealrow, TITRAQ_IDXSTATUS, QPixmap(s_kpcStatokay_xpm)); 76.1007 + m_pStatusedit->setPixmap(m_pMaintable->pixmap(nRealrow, TITRAQ_IDXSTATUS)); 76.1008 + } 76.1009 + } 76.1010 + 76.1011 + // Test for blank user field, and set to default if so 76.1012 + if (m_pMaintable->text(nRealrow, TITRAQ_IDXUSER).isEmpty()) 76.1013 + m_pMaintable->setText(nRealrow, TITRAQ_IDXUSER, m_pPrefs->getString(TITRAQ_PREFUSER, TITRAQ_DEFUSER)); 76.1014 + 76.1015 + // Test for blank date field, and set to default if so 76.1016 + if (m_pMaintable->text(nRealrow, TITRAQ_IDXDATE) == ".") 76.1017 + m_pMaintable->setText(nRealrow, TITRAQ_IDXDATE, QDate::currentDate().toString(Qt::ISODate)); 76.1018 + 76.1019 + // Test for blank start field, and set to default if so 76.1020 + if (m_pMaintable->text(nRealrow, TITRAQ_IDXSTART) == ".") 76.1021 + m_pMaintable->setText(nRealrow, TITRAQ_IDXSTART, QTime::currentTime().toString("hh:mm")); 76.1022 + 76.1023 + // Test for blank finish field, and set to default if so 76.1024 + if (m_pMaintable->text(nRealrow, TITRAQ_IDXFINISH) == ".") 76.1025 + m_pMaintable->setText(nRealrow, TITRAQ_IDXFINISH, QTime::currentTime().toString("hh:mm")); 76.1026 + 76.1027 + // Test for blank amount field, and set to default if so 76.1028 + if (m_pMaintable->text(nRealrow, TITRAQ_IDXAMOUNT) == ".") { 76.1029 + QTime Begin = QTime::fromString(m_pMaintable->text(nRealrow, TITRAQ_IDXSTART), Qt::ISODate); 76.1030 + QTime End = QTime::fromString(m_pMaintable->text(nRealrow, TITRAQ_IDXFINISH), Qt::ISODate); 76.1031 + QString Diff = QTime(0, 0).addSecs(Begin.secsTo(End)).toString("hh:mm"); 76.1032 + m_pMaintable->setText(nRealrow, TITRAQ_IDXAMOUNT, Diff); 76.1033 + } 76.1034 +} 76.1035 + 76.1036 +// 76.1037 +// Update the current line number column item 76.1038 +// 76.1039 +void Titraqform::updateLine(const QString &Instring) 76.1040 +{ 76.1041 + m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXLINE, Instring); 76.1042 +} 76.1043 + 76.1044 +// 76.1045 +// Update the current user column item 76.1046 +// 76.1047 +void Titraqform::updateUser(const QString &Instring) 76.1048 +{ 76.1049 + m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXUSER, Instring); 76.1050 +} 76.1051 + 76.1052 +// 76.1053 +// Update the current GUID column item 76.1054 +// 76.1055 +void Titraqform::updateGuid(const QString &Instring) 76.1056 +{ 76.1057 + m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXGUID, Instring); 76.1058 +} 76.1059 + 76.1060 +// 76.1061 +// Update the current CRC column item 76.1062 +// 76.1063 +void Titraqform::updateCrc(const QString &Instring) 76.1064 +{ 76.1065 + m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXCRC, Instring); 76.1066 +} 76.1067 + 76.1068 +// 76.1069 +// Update the current rev column item 76.1070 +// 76.1071 +void Titraqform::updateRev(const QString &Instring) 76.1072 +{ 76.1073 + m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXREV, Instring); 76.1074 +} 76.1075 + 76.1076 +// 76.1077 +// Update the current date column item 76.1078 +// 76.1079 +void Titraqform::updateDate(const QDate &Dateup) 76.1080 +{ 76.1081 + m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXDATE, Dateup.toString(Qt::ISODate)); 76.1082 +} 76.1083 + 76.1084 +// 76.1085 +// Update the current start column item 76.1086 +// 76.1087 +void Titraqform::updateStart(const QTime &Startup) 76.1088 +{ 76.1089 + m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXSTART, Startup.toString("hh:mm")); 76.1090 +} 76.1091 + 76.1092 +// 76.1093 +// Update the current finish column item 76.1094 +// 76.1095 +void Titraqform::updateFinish(const QTime &Finishup) 76.1096 +{ 76.1097 + m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXFINISH, Finishup.toString("hh:mm")); 76.1098 +} 76.1099 + 76.1100 +// 76.1101 +// Update the current amount column item 76.1102 +// 76.1103 +void Titraqform::updateAmount(const QTime &Amountup) 76.1104 +{ 76.1105 + m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXAMOUNT, Amountup.toString("hh:mm")); 76.1106 +} 76.1107 + 76.1108 +// 76.1109 +// Update the current task column item 76.1110 +// 76.1111 +void Titraqform::updateTask(const QString &Taskup) 76.1112 +{ 76.1113 +// // FIXME: Broken 76.1114 +// RtTableItem *pTask = NULL; 76.1115 +// pTask = static_cast<RtTableItem *>(m_pMaintable->item(m_pMaintable->currentRow(), TITRAQ_IDXTASK)); 76.1116 +// pTask->setText(Taskup); 76.1117 + 76.1118 + // Don't try to use the Taskup string, because it ignores autocompletion 76.1119 + m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXTASK, m_pTasks->currentText()); 76.1120 +} 76.1121 + 76.1122 +// 76.1123 +// Update the current remark column item 76.1124 +// 76.1125 +void Titraqform::updateRemark(const QString &Remarkup) 76.1126 +{ 76.1127 + m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXREMARK, Remarkup); 76.1128 +} 76.1129 + 76.1130 +// 76.1131 +// Confirm any recent editions on a whole row 76.1132 +// 76.1133 +void Titraqform::confirmEdit(void) 76.1134 +{ 76.1135 + RtTableItem *pTask = NULL; // Task item is a derived class 76.1136 + 76.1137 + // Conversions from edit control data formats to native tabular format 76.1138 + m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXDATE, m_pDateedit->date().toString(Qt::ISODate)); 76.1139 + m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXSTART, m_pStarttime->time().toString(Qt::ISODate)); 76.1140 + m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXFINISH, m_pEndtime->time().toString(Qt::ISODate)); 76.1141 + m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXAMOUNT, m_pAmount->time().toString(Qt::ISODate)); 76.1142 + 76.1143 + // Specially handle task fields 76.1144 + pTask = static_cast<RtTableItem *>(m_pMaintable->item(m_pMaintable->currentRow(), TITRAQ_IDXTASK)); 76.1145 + pTask->setText(m_pTasks->currentText()); 76.1146 + 76.1147 + m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXREMARK, m_pRemark->text()); 76.1148 +} 76.1149 + 76.1150 +// 76.1151 +// Edit menu configure preferences 76.1152 +// 76.1153 +void Titraqform::configPrefs(void) 76.1154 +{ 76.1155 + QString Templine; // Used for preferences resetting 76.1156 + Prefpanel *pUserpanel = NULL; // The user preferences panel itself 76.1157 + 76.1158 + // Create a new preferences panel window 76.1159 + pUserpanel = new Prefpanel(this, "Userprefpanel"); 76.1160 + connect(pUserpanel, SIGNAL(applied(void)), SLOT(applyPrefs(void))); 76.1161 + 76.1162 + // Set default values to appear in initialized panel widgets 76.1163 + pUserpanel->setAccounts(m_pPrefs->getString(TITRAQ_PREFACCOUNTS, TITRAQ_DEFACCOUNTS)); 76.1164 + pUserpanel->setEvents(m_pPrefs->getString(TITRAQ_PREFASDIR, TITRAQ_DEFASDIR)); 76.1165 + pUserpanel->setUser(m_pPrefs->getString(TITRAQ_PREFUSER, TITRAQ_DEFUSER)); 76.1166 + pUserpanel->setHome(m_pPrefs->getString(TITRAQ_PREFHOME, TITRAQ_DEFHOME)); 76.1167 + pUserpanel->setCorbahost(m_pPrefs->getString(TITRAQ_PREFCORBHOST, TITRAQ_DEFCORBHOST)); 76.1168 + pUserpanel->setSoaphost(m_pPrefs->getString(TITRAQ_PREFSOAPHOST, TITRAQ_DEFSOAPHOST)); 76.1169 +#ifdef HAVE_MICO 76.1170 + pUserpanel->setCorbaon(m_pPrefs->getBool(TITRAQ_PREFCORBON, TITRAQ_DEFCORBON)); 76.1171 +#else 76.1172 + pUserpanel->setCorbaon(false); 76.1173 + pUserpanel->lockCorba(); 76.1174 +#endif 76.1175 +#ifdef HAVE_ESOAP 76.1176 + pUserpanel->setSoapon(m_pPrefs->getBool(TITRAQ_PREFSOAPON, TITRAQ_DEFSOAPON)); 76.1177 +#else 76.1178 + pUserpanel->setSoapon(false); 76.1179 + pUserpanel->lockSoap(); 76.1180 +#endif 76.1181 + pUserpanel->setBackon(m_pPrefs->getBool(TITRAQ_PREFBAKON, TITRAQ_DEFBAKON)); 76.1182 + pUserpanel->setExtendon(m_pPrefs->getBool(TITRAQ_PREFEXTENDON, TITRAQ_DEFEXTENDON)); 76.1183 + pUserpanel->setDetailon(m_pPrefs->getBool(TITRAQ_PREFDETAILON, TITRAQ_DEFDETAILON)); 76.1184 + pUserpanel->setSignaton(m_pPrefs->getBool(TITRAQ_PREFSIGNATON, TITRAQ_DEFSIGNATON)); 76.1185 + 76.1186 + // Set default style which can be more complicated due to mapping... 76.1187 + switch (m_pPrefs->getNumber(TITRAQ_PREFSTYLE, TITRAQ_STYLECDE)) { 76.1188 + case TITRAQ_STYLECDE: 76.1189 + pUserpanel->setStyle(TITRAQ_STRCDE); 76.1190 + break; 76.1191 + case TITRAQ_STYLESGI: 76.1192 + pUserpanel->setStyle(TITRAQ_STRSGI); 76.1193 + break; 76.1194 + case TITRAQ_STYLEMOTIF: 76.1195 + pUserpanel->setStyle(TITRAQ_STRMOTIF); 76.1196 + break; 76.1197 + case TITRAQ_STYLEMPLUS: 76.1198 + pUserpanel->setStyle(TITRAQ_STRMPLUS); 76.1199 + break; 76.1200 + case TITRAQ_STYLEPLAT: 76.1201 + pUserpanel->setStyle(TITRAQ_STRPLAT); 76.1202 + break; 76.1203 + case TITRAQ_STYLEMSOFT: 76.1204 + pUserpanel->setStyle(TITRAQ_STRMSOFT); 76.1205 + break; 76.1206 + default: 76.1207 + pUserpanel->setStyle(TITRAQ_STRCDE); // My personal favourite ;-) 76.1208 + break; 76.1209 + } 76.1210 + 76.1211 + // Colour preferences 76.1212 + int nRed, nGreen, nBlue; 76.1213 + QColorGroup Origcolour, Altcolour; 76.1214 + const QColor Origlight = QColor(TITRAQ_DEFLIGHTRED, TITRAQ_DEFLIGHTGREEN, TITRAQ_DEFLIGHTBLUE); 76.1215 + const QColor Origdark = QColor(TITRAQ_DEFDARKRED, TITRAQ_DEFDARKGREEN, TITRAQ_DEFDARKBLUE); 76.1216 + const QColor Altlight = QColor(TITRAQ_DEFLTALTRED, TITRAQ_DEFLTALTGREEN, TITRAQ_DEFLTALTBLUE); 76.1217 + const QColor Altdark = QColor(TITRAQ_DEFDKALTRED, TITRAQ_DEFDKALTGREEN, TITRAQ_DEFDKALTBLUE); 76.1218 + 76.1219 + // Set colours to revert to if user screws up and wants out 76.1220 + Origcolour.setColor(QColorGroup::Foreground, Origlight); 76.1221 + Origcolour.setColor(QColorGroup::Background, Origdark); 76.1222 + pUserpanel->setOrigcolour(&Origcolour); 76.1223 + Altcolour.setColor(QColorGroup::Foreground, Altlight); 76.1224 + Altcolour.setColor(QColorGroup::Background, Altdark); 76.1225 + pUserpanel->setAltcolour(&Altcolour); 76.1226 + 76.1227 + // Set colour preferences saved from last session 76.1228 + nRed = m_pPrefs->getNumber(TITRAQ_PREFLIGHTRED, TITRAQ_DEFLIGHTRED); 76.1229 + nGreen = m_pPrefs->getNumber(TITRAQ_PREFLIGHTGREEN, TITRAQ_DEFLIGHTGREEN); 76.1230 + nBlue = m_pPrefs->getNumber(TITRAQ_PREFLIGHTBLUE, TITRAQ_DEFLIGHTBLUE); 76.1231 + const QColor Lightshade = QColor(nRed, nGreen, nBlue); 76.1232 + pUserpanel->setLight(&Lightshade); 76.1233 + nRed = m_pPrefs->getNumber(TITRAQ_PREFDARKRED, TITRAQ_DEFDARKRED); 76.1234 + nGreen = m_pPrefs->getNumber(TITRAQ_PREFDARKGREEN, TITRAQ_DEFDARKGREEN); 76.1235 + nBlue = m_pPrefs->getNumber(TITRAQ_PREFDARKBLUE, TITRAQ_DEFDARKBLUE); 76.1236 + const QColor Darkshade = QColor(nRed, nGreen, nBlue); 76.1237 + pUserpanel->setDark(&Darkshade); 76.1238 + 76.1239 + // Modal panel handler 76.1240 + if (pUserpanel->exec() == QDialog::Accepted) 76.1241 + this->applyPrefs(pUserpanel); 76.1242 + 76.1243 + // Dispose Panel object 76.1244 + delete pUserpanel; 76.1245 +} 76.1246 + 76.1247 +// 76.1248 +// View menu normal 76.1249 +// 76.1250 +void Titraqform::normalView(void) 76.1251 +{ 76.1252 + // All view types except normal are disabled until implemention, so 76.1253 + // this body can remain empty, causing nothing to happen on selection. 76.1254 +} 76.1255 + 76.1256 +// 76.1257 +// View menu editing 76.1258 +// 76.1259 +void Titraqform::editingView(void) 76.1260 +{ 76.1261 + // All view types except normal are disabled until implemention, so 76.1262 + // this body can remain empty, causing nothing to happen on selection. 76.1263 +} 76.1264 + 76.1265 +// 76.1266 +// View menu timing 76.1267 +// 76.1268 +void Titraqform::timingView(void) 76.1269 +{ 76.1270 + // All view types except normal are disabled until implemention, so 76.1271 + // this body can remain empty, causing nothing to happen on selection. 76.1272 +} 76.1273 + 76.1274 +// 76.1275 +// View menu show file toolbar 76.1276 +// 76.1277 +void Titraqform::showFilebar(void) 76.1278 +{ 76.1279 + if (m_pFiletools->isVisible()) { 76.1280 + m_pFiletools->hide(); 76.1281 + m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXFILEBAR), false); 76.1282 + } 76.1283 + else { 76.1284 + m_pFiletools->show(); 76.1285 + m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXFILEBAR), true); 76.1286 + } 76.1287 +} 76.1288 + 76.1289 +// 76.1290 +// View menu show edit toolbar 76.1291 +// 76.1292 +void Titraqform::showEditbar(void) 76.1293 +{ 76.1294 + if (m_pEdittools->isVisible()) { 76.1295 + m_pEdittools->hide(); 76.1296 + m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXEDITBAR), false); 76.1297 + } 76.1298 + else { 76.1299 + m_pEdittools->show(); 76.1300 + m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXEDITBAR), true); 76.1301 + } 76.1302 +} 76.1303 + 76.1304 +// 76.1305 +// View menu show view toolbar 76.1306 +// 76.1307 +void Titraqform::showViewbar(void) 76.1308 +{ 76.1309 + if (m_pViewtools->isVisible()) { 76.1310 + m_pViewtools->hide(); 76.1311 + m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXVIEWBAR), false); 76.1312 + } 76.1313 + else { 76.1314 + m_pViewtools->show(); 76.1315 + m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXVIEWBAR), true); 76.1316 + } 76.1317 +} 76.1318 + 76.1319 +// 76.1320 +// View menu show prefs toolbar 76.1321 +// 76.1322 +void Titraqform::showPrefsbar(void) 76.1323 +{ 76.1324 + if (m_pPrefstools->isVisible()) { 76.1325 + m_pPrefstools->hide(); 76.1326 + m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXPREFBAR), false); 76.1327 + } 76.1328 + else { 76.1329 + m_pPrefstools->show(); 76.1330 + m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXPREFBAR), true); 76.1331 + } 76.1332 +} 76.1333 + 76.1334 +// 76.1335 +// View menu show whats this toolbar 76.1336 +// 76.1337 +void Titraqform::showWhatsbar(void) 76.1338 +{ 76.1339 + if (m_pWhatstools->isVisible()) { 76.1340 + m_pWhatstools->hide(); 76.1341 + m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXWHATBAR), false); 76.1342 + } 76.1343 + else { 76.1344 + m_pWhatstools->show(); 76.1345 + m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXWHATBAR), true); 76.1346 + } 76.1347 +} 76.1348 + 76.1349 +// 76.1350 +// View menu show status column 76.1351 +// 76.1352 +void Titraqform::showStatcol(void) 76.1353 +{ 76.1354 + // Test if column is currently shown, conditionally show or hide it 76.1355 + if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXSTATCOL))) { 76.1356 + m_pMaintable->hideColumn(TITRAQ_IDXSTATUS); 76.1357 + m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXSTATCOL), false); 76.1358 + m_pStatusedit->hide(); 76.1359 + } 76.1360 + else { 76.1361 + m_pMaintable->showColumn(TITRAQ_IDXSTATUS); 76.1362 + m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXSTATCOL), true); 76.1363 + m_pStatusedit->show(); 76.1364 + } 76.1365 + 76.1366 + // Make sure switch take place right away and sizes are handled 76.1367 + m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXSTATCOL)); 76.1368 + this->updSizes(TITRAQ_IDXALLCTRLS, 0, 0); // Update size of this and next 76.1369 +} 76.1370 + 76.1371 +// 76.1372 +// View menu show line numbers column 76.1373 +// 76.1374 +void Titraqform::showLinecol(void) 76.1375 +{ 76.1376 + // Test if column is currently shown, conditionally show or hide it 76.1377 + if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXLCOL))) { 76.1378 + m_pMaintable->hideColumn(TITRAQ_IDXLINE); 76.1379 + m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXLCOL), false); 76.1380 + m_pLineedit->hide(); 76.1381 + } 76.1382 + else { 76.1383 + m_pMaintable->showColumn(TITRAQ_IDXLINE); 76.1384 + m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXLCOL), true); 76.1385 + m_pLineedit->show(); 76.1386 + } 76.1387 + 76.1388 + // Make sure switch take place right away and sizes are handled 76.1389 + m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXLCOL)); 76.1390 + this->updSizes(TITRAQ_IDXALLCTRLS, 0, 0); // Update size of this and next 76.1391 +} 76.1392 + 76.1393 +// 76.1394 +// View menu show users column 76.1395 +// 76.1396 +void Titraqform::showUsercol(void) 76.1397 +{ 76.1398 + // Test if column is currently shown, conditionally show or hide it 76.1399 + if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXUCOL))) { 76.1400 + m_pMaintable->hideColumn(TITRAQ_IDXUSER); 76.1401 + m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXUCOL), false); 76.1402 + m_pUseredit->hide(); 76.1403 + } 76.1404 + else { 76.1405 + m_pMaintable->showColumn(TITRAQ_IDXUSER); 76.1406 + m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXUCOL), true); 76.1407 + m_pUseredit->show(); 76.1408 + } 76.1409 + 76.1410 + // Make sure switch take place right away and sizes are handled 76.1411 + this->updSizes(TITRAQ_IDXALLCTRLS, 0, 0); // Update size of this and next 76.1412 + m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXUCOL)); 76.1413 +} 76.1414 + 76.1415 +// 76.1416 +// View menu show GUIDs column 76.1417 +// 76.1418 +void Titraqform::showGuidcol(void) 76.1419 +{ 76.1420 + // Test if column is currently shown, conditionally show or hide it 76.1421 + if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXGCOL))) { 76.1422 + m_pMaintable->hideColumn(TITRAQ_IDXGUID); 76.1423 + m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXGCOL), false); 76.1424 + m_pGuidedit->hide(); 76.1425 + } 76.1426 + else { 76.1427 + m_pMaintable->showColumn(TITRAQ_IDXGUID); 76.1428 + m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXGCOL), true); 76.1429 + m_pGuidedit->show(); 76.1430 + } 76.1431 + 76.1432 + // Make sure switch take place right away and sizes are handled 76.1433 + m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXGCOL)); 76.1434 + this->updSizes(TITRAQ_IDXALLCTRLS, 0, 0); // Update size of this and next 76.1435 +} 76.1436 + 76.1437 +// 76.1438 +// View menu show CRC column 76.1439 +// 76.1440 +void Titraqform::showCrccol(void) 76.1441 +{ 76.1442 + // Test if column is currently shown, conditionally show or hide it 76.1443 + if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXCCOL))) { 76.1444 + m_pMaintable->hideColumn(TITRAQ_IDXCRC); 76.1445 + m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXCCOL), false); 76.1446 + m_pCrcedit->hide(); 76.1447 + } 76.1448 + else { 76.1449 + m_pMaintable->showColumn(TITRAQ_IDXCRC); 76.1450 + m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXCCOL), true); 76.1451 + m_pCrcedit->show(); 76.1452 + } 76.1453 + 76.1454 + // Make sure switch take place right away and sizes are handled 76.1455 + m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXCCOL)); 76.1456 + this->updSizes(TITRAQ_IDXALLCTRLS, 0, 0); // Update size of this and next 76.1457 +} 76.1458 + 76.1459 +// 76.1460 +// View menu show Rev column 76.1461 +// 76.1462 +void Titraqform::showRevcol(void) 76.1463 +{ 76.1464 + // Test if column is currently shown, conditionally show or hide it 76.1465 + if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXREVCOL))) { 76.1466 + m_pMaintable->hideColumn(TITRAQ_IDXREV); 76.1467 + m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXREVCOL), false); 76.1468 + m_pRevedit->hide(); 76.1469 + } 76.1470 + else { 76.1471 + m_pMaintable->showColumn(TITRAQ_IDXREV); 76.1472 + m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXREVCOL), true); 76.1473 + m_pRevedit->show(); 76.1474 + } 76.1475 + 76.1476 + // Make sure switch take place right away and sizes are handled 76.1477 + m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXREVCOL)); 76.1478 + this->updSizes(TITRAQ_IDXALLCTRLS, 0, 0); // Update size of this and next 76.1479 +} 76.1480 + 76.1481 +// 76.1482 +// View menu show dates column 76.1483 +// 76.1484 +void Titraqform::showDatecol(void) 76.1485 +{ 76.1486 + // Test if column is currently shown, conditionally show or hide it 76.1487 + if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXDCOL))) { 76.1488 + m_pMaintable->hideColumn(TITRAQ_IDXDATE); 76.1489 + m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXDCOL), false); 76.1490 + m_pDateedit->hide(); 76.1491 + } 76.1492 + else { 76.1493 + m_pMaintable->showColumn(TITRAQ_IDXDATE); 76.1494 + m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXDCOL), true); 76.1495 + m_pDateedit->show(); 76.1496 + } 76.1497 + 76.1498 + // Make sure switch take place right away and sizes are handled 76.1499 + m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXDCOL)); 76.1500 + this->updSizes(TITRAQ_IDXALLCTRLS, 0, 0); // Update size of this and next 76.1501 +} 76.1502 + 76.1503 +// 76.1504 +// View menu show start time column 76.1505 +// 76.1506 +void Titraqform::showStartcol(void) 76.1507 +{ 76.1508 + // Test if column is currently shown, conditionally show or hide it 76.1509 + if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXSTARTCOL))) { 76.1510 + m_pMaintable->hideColumn(TITRAQ_IDXSTART); 76.1511 + m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXSTARTCOL), false); 76.1512 + m_pStarttime->hide(); 76.1513 + } 76.1514 + else { 76.1515 + m_pMaintable->showColumn(TITRAQ_IDXSTART); 76.1516 + m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXSTARTCOL), true); 76.1517 + m_pStarttime->show(); 76.1518 + } 76.1519 + 76.1520 + // Make sure switch take place right away and sizes are handled 76.1521 + m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXSTARTCOL)); 76.1522 + this->updSizes(TITRAQ_IDXALLCTRLS, 0, 0); // Update size of this and next 76.1523 +} 76.1524 + 76.1525 +// 76.1526 +// View menu show finish time column 76.1527 +// 76.1528 +void Titraqform::showFinishcol(void) 76.1529 +{ 76.1530 + // Test if column is currently shown, conditionally show or hide it 76.1531 + if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXFCOL))) { 76.1532 + m_pMaintable->hideColumn(TITRAQ_IDXFINISH); 76.1533 + m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXFCOL), false); 76.1534 + m_pEndtime->hide(); 76.1535 + } 76.1536 + else { 76.1537 + m_pMaintable->showColumn(TITRAQ_IDXFINISH); 76.1538 + m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXFCOL), true); 76.1539 + m_pEndtime->show(); 76.1540 + } 76.1541 + 76.1542 + // Make sure switch take place right away and sizes are handled 76.1543 + m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXFCOL)); 76.1544 + this->updSizes(TITRAQ_IDXALLCTRLS, 0, 0); // Update size of this and next 76.1545 +} 76.1546 + 76.1547 +// 76.1548 +// View menu show Amounts column 76.1549 +// 76.1550 +void Titraqform::showAmountcol(void) 76.1551 +{ 76.1552 + // Test if column is currently shown, conditionally show or hide it 76.1553 + if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXACOL))) { 76.1554 + m_pMaintable->hideColumn(TITRAQ_IDXAMOUNT); 76.1555 + m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXACOL), false); 76.1556 + m_pAmount->hide(); 76.1557 + } 76.1558 + else { 76.1559 + m_pMaintable->showColumn(TITRAQ_IDXAMOUNT); 76.1560 + m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXACOL), true); 76.1561 + m_pAmount->show(); 76.1562 + } 76.1563 + 76.1564 + // Make sure switch take place right away and sizes are handled 76.1565 + m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXACOL)); 76.1566 + this->updSizes(TITRAQ_IDXALLCTRLS, 0, 0); // Update size of this and next 76.1567 +} 76.1568 + 76.1569 +// 76.1570 +// View menu show tasks column 76.1571 +// 76.1572 +void Titraqform::showTaskcol(void) 76.1573 +{ 76.1574 + // Test if column is currently shown, conditionally show or hide it 76.1575 + if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXTCOL))) { 76.1576 + m_pMaintable->hideColumn(TITRAQ_IDXTASK); 76.1577 + m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXTCOL), false); 76.1578 + m_pTasks->hide(); 76.1579 + } 76.1580 + else { 76.1581 + m_pMaintable->showColumn(TITRAQ_IDXTASK); 76.1582 + m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXTCOL), true); 76.1583 + m_pTasks->show(); 76.1584 + } 76.1585 + 76.1586 + // Make sure switch take place right away and sizes are handled 76.1587 + m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXTCOL)); 76.1588 + this->updSizes(TITRAQ_IDXALLCTRLS, 0, 0); // Update size of this and next 76.1589 +} 76.1590 + 76.1591 +// 76.1592 +// View menu show Remarks column 76.1593 +// 76.1594 +void Titraqform::showRemarkcol(void) 76.1595 +{ 76.1596 + // Test if column is currently shown, conditionally show or hide it 76.1597 + if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXREMCOL))) { 76.1598 + m_pMaintable->hideColumn(TITRAQ_IDXREMARK); 76.1599 + m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXREMCOL), false); 76.1600 + m_pRemark->hide(); 76.1601 + } 76.1602 + else { 76.1603 + m_pMaintable->showColumn(TITRAQ_IDXREMARK); 76.1604 + m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXREMCOL), true); 76.1605 + m_pRemark->show(); 76.1606 + } 76.1607 + 76.1608 + // Make sure switch take place right away and sizes are handled 76.1609 + m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXREMCOL)); 76.1610 + this->updSizes(TITRAQ_IDXALLCTRLS, 0, 0); // Update size of this and next 76.1611 +} 76.1612 + 76.1613 +// 76.1614 +// Generate a local formatted report 76.1615 +// 76.1616 +void Titraqform::genReport(void) 76.1617 +{ 76.1618 + try { // Create and execute a new local report window 76.1619 + std::auto_ptr<AS::Reportpanel> pReport(new AS::Reportpanel 76.1620 + (m_pMaintable, m_pPrefs, this, "Locreportpanel")); 76.1621 + pReport->exec(); 76.1622 + delete pReport.release(); // Technically unnecessary, smart pointer 76.1623 + } 76.1624 + catch (Genexcept& Genex) { 76.1625 + Genex.reportErr(); 76.1626 + return; 76.1627 + } 76.1628 +} 76.1629 + 76.1630 +// 76.1631 +// Syncronize data with server using IIOP 76.1632 +// 76.1633 +void Titraqform::syncIiop(void) 76.1634 +{ 76.1635 +#ifdef HAVE_MICO 76.1636 + // Short circuit if user has disabled CORBA transmission in prefs 76.1637 + if (!m_pPrefs->getBool(TITRAQ_PREFCORBON, TITRAQ_DEFCORBON)) 76.1638 + return; 76.1639 + 76.1640 + char **ppcInargv = NULL; // Parameters to the ORB 76.1641 + CORBA::ORB_var Orb; // The ORB iself 76.1642 + 76.1643 + CORBA::Object_var Nameobj; // Name service reference 76.1644 + CosNaming::NamingContext_var Namectx; // COSS ns context 76.1645 + CosNaming::Name Cosname; // Our requested obj name 76.1646 + 76.1647 + CORBA::Object_var Objcaster; // Generic CORBA object 76.1648 + Asdatabase_var Asdbase; // Casted object to ASDB 76.1649 + Astuple Singlerow; // A single row of AS data 76.1650 + 76.1651 + QString *pOrbargv = new QString(TITRAQ_ORBINIT); 76.1652 + int nCount = pOrbargv->contains(' '); 76.1653 + int nNamesize = 0; 76.1654 + 76.1655 + // Build a false incoming argv with which we initialize the ORB 76.1656 + ppcInargv = new char *[nCount + 3]; // 3 = arg0 + last section + COSS host 76.1657 + *ppcInargv = new char[strlen(*qApp->argv() + 2)]; // For cmd name 76.1658 + strcpy(ppcInargv[0], *qApp->argv()); // Copy cmd name 76.1659 + for (int nIter = 0; nIter <= nCount; nIter++) { 76.1660 + QString Section = pOrbargv->section(' ', nIter, nIter); 76.1661 + ppcInargv[nIter + 1] = new char[strlen(Section.ascii() + 2)]; 76.1662 + strcpy(ppcInargv[nIter + 1], Section.ascii()); 76.1663 + } 76.1664 + 76.1665 + // Build the single string COSS naming host name with associated port number 76.1666 + *pOrbargv = TITRAQ_COSSPART1 76.1667 + + m_pPrefs->getString(TITRAQ_PREFCORBHOST, TITRAQ_DEFCORBHOST) 76.1668 + + TITRAQ_COSSPART2; 76.1669 + nNamesize = strlen(pOrbargv->ascii()); 76.1670 + ppcInargv[nCount + 2] = new char[nNamesize]; 76.1671 + strcpy(ppcInargv[nCount + 2], pOrbargv->ascii()); 76.1672 + 76.1673 + try { 76.1674 + // Initialization of the ORB and COSS naming service 76.1675 + nCount = nCount + 3; // Raise the count to include app, last sec, COSS 76.1676 + Orb = CORBA::ORB_init(nCount, ppcInargv, "mico-local-orb"); 76.1677 + Nameobj = Orb->resolve_initial_references("NameService"); 76.1678 + Namectx = CosNaming::NamingContext::_narrow(Nameobj); 76.1679 + if (CORBA::is_nil(Namectx)) { // Verify sanity 76.1680 + m_pStatbar->message(trUtf8("Could not find the COSS naming service")); 76.1681 + qWarning("Could not find the COSS naming service\n"); 76.1682 + } 76.1683 + 76.1684 + // Clean up our dynamically allocated array 76.1685 + for (int nIter = 0; nIter < nCount; nIter++) 76.1686 + delete ppcInargv[nIter]; 76.1687 + delete ppcInargv; // Free the array itself 76.1688 + delete pOrbargv; // Free the intermediate string 76.1689 + 76.1690 + // Prepare the COSS name request 76.1691 + Cosname.length(1); 76.1692 + Cosname[0].id = CORBA::string_dup("Asdatabase"); 76.1693 + Cosname[0].kind = CORBA::string_dup(""); 76.1694 + 76.1695 + try { // Resolve to a CORBA object 76.1696 + Objcaster = Namectx->resolve(Cosname); 76.1697 + } 76.1698 + catch (CosNaming::NamingContext::NotFound &Cossex) { 76.1699 + m_pStatbar->message(trUtf8("NotFound exception thrown")); 76.1700 + qWarning("NotFound exception thrown\n"); 76.1701 + return; 76.1702 + } 76.1703 + catch (CosNaming::NamingContext::CannotProceed &Cossex) { 76.1704 + m_pStatbar->message(trUtf8("CannotProceed exception thrown")); 76.1705 + qWarning("CannotProceed exception thrown\n"); 76.1706 + return; 76.1707 + } 76.1708 + catch (CosNaming::NamingContext::InvalidName &Cossex) { 76.1709 + m_pStatbar->message(trUtf8("InvalidName exception thrown")); 76.1710 + qWarning("InvalidName exception thrown\n"); 76.1711 + return; 76.1712 + } 76.1713 + 76.1714 + // Cast the generic CORBA object to a AS database type 76.1715 + Asdbase = Asdatabase::_narrow(Objcaster); 76.1716 + if (CORBA::is_nil(Asdbase)) { // Verify sanity 76.1717 + m_pStatbar->message(trUtf8("Could not find the AS database")); 76.1718 + qWarning("Could not find the AS database\n"); 76.1719 + return; 76.1720 + } 76.1721 + 76.1722 + // Open an account object on the remote server 76.1723 + Account_var Account = Asdbase->Open("/tmp/events.as"); 76.1724 + if (CORBA::is_nil(Account)) { // Verify sanity 76.1725 + m_pStatbar->message(trUtf8("Could not create an account object on the server")); 76.1726 + qWarning("Could not create an account object on the server\n"); 76.1727 + return; 76.1728 + } 76.1729 + 76.1730 + // Fill account log object(s) to marshall and transmit 76.1731 + int nRow = m_pMaintable->currentRow(); 76.1732 + QTableSelection Select = m_pMaintable->selection(0); // Capture selected rows 76.1733 + int nTotal = Select.bottomRow() - Select.topRow() + 1; // Total rows selected 76.1734 + 76.1735 + // Remember, CORBA::stri_dup creates smart pointers 76.1736 + for (int nIter = 0; nIter < nTotal; nIter++) { 76.1737 + Singlerow.szUser = CORBA::string_dup(m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXUSER)); 76.1738 + Singlerow.szGuid = CORBA::string_dup(m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXGUID)); 76.1739 + Singlerow.szCrc = CORBA::string_dup(m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXCRC).remove("0x")); 76.1740 + Singlerow.szRev = CORBA::string_dup(m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXREV)); 76.1741 + Singlerow.szDate = CORBA::string_dup(m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXDATE)); 76.1742 + Singlerow.szStart = CORBA::string_dup(m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXSTART)); 76.1743 + Singlerow.szFinish = CORBA::string_dup(m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXFINISH)); 76.1744 + Singlerow.szAmount = CORBA::string_dup(m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXAMOUNT)); 76.1745 +// Singlerow.nRev = m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXREV).toUInt(); 76.1746 +// Singlerow.nDate = m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXDATE).toUInt(); 76.1747 +// Singlerow.nStart = m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXSTART).toUInt(); 76.1748 +// Singlerow.nFinish = m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXFINISH).toUInt(); 76.1749 +// Singlerow.nAmount = m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXAMOUNT).toUInt(); 76.1750 + Singlerow.szTask = CORBA::string_dup(m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXTASK)); 76.1751 + Singlerow.szRemark = CORBA::string_dup(m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXREMARK)); 76.1752 + Account->Log(Singlerow); // Finally transmit to server 76.1753 + } 76.1754 + 76.1755 + m_pStatbar->message(trUtf8("Successful transmission of accounting data")); 76.1756 + } 76.1757 + catch (const CORBA::Exception &Corbex) { 76.1758 + m_pStatbar->message(trUtf8("Caught CORBA exception: %1").arg(Corbex._repoid())); 76.1759 + qWarning("Caught CORBA exception: %s", Corbex._repoid()); 76.1760 + } 76.1761 + catch (...) { 76.1762 + qWarning("Caught unknown exception\n"); 76.1763 + } 76.1764 +#endif // HAVE_MICO 76.1765 +} 76.1766 + 76.1767 +// 76.1768 +// Syncronize data with server using SOAP 76.1769 +// 76.1770 +void Titraqform::syncSoap(void) 76.1771 +{ 76.1772 +#ifdef HAVE_ESOAP 76.1773 + // Short circuit if user has disabled SOAP transmission in prefs 76.1774 + if (!m_pPrefs->getBool(TITRAQ_PREFSOAPON, TITRAQ_DEFSOAPON)) 76.1775 + return; 76.1776 + 76.1777 + USING_EASYSOAP_NAMESPACE 76.1778 + 76.1779 + try { 76.1780 + SOAPMethod Logmeth("Log", TITRAQ_SOAPSPACE); // SOAP namespace 76.1781 + SOAPString Clistr; // Outgoing parameter to marshall 76.1782 + int nCrc; // SOAP unmarshalled return value 76.1783 + 76.1784 + // Build the single string SOAP end point which look like this: 76.1785 + // "http://www.europalab.com/cgi-bin/asdbserv" 76.1786 + QString Endpoint; 76.1787 + Endpoint = TITRAQ_PREFIXHTTP + m_pPrefs->getString(TITRAQ_PREFSOAPHOST, TITRAQ_DEFSOAPHOST); 76.1788 + SOAPProxy Proxy(Endpoint.ascii()); 76.1789 + 76.1790 + // Fill account log object(s) to marshall and transmit 76.1791 + QTableSelection Select = m_pMaintable->selection(0); // Capture selected rows 76.1792 + int nTotal = Select.bottomRow() - Select.topRow() + 1; // Total rows selected 76.1793 + 76.1794 + // Iterate through the selection of row entries to transmit 76.1795 + for (int nRowiter = 0; nRowiter < nTotal; nRowiter++) { 76.1796 + QString Syncthis = m_pMaintable->text(Select.topRow() + nRowiter, TITRAQ_IDXUSER); 76.1797 + Syncthis += ' ' + m_pMaintable->text(Select.topRow() + nRowiter, TITRAQ_IDXGUID); 76.1798 + Syncthis += ' ' + m_pMaintable->text(Select.topRow() + nRowiter, TITRAQ_IDXCRC).remove("0x"); 76.1799 + Syncthis += ' ' + m_pMaintable->text(Select.topRow() + nRowiter, TITRAQ_IDXREV); 76.1800 + Syncthis += ' ' + m_pMaintable->text(Select.topRow() + nRowiter, TITRAQ_IDXDATE); 76.1801 + Syncthis += ' ' + m_pMaintable->text(Select.topRow() + nRowiter, TITRAQ_IDXSTART); 76.1802 + Syncthis += ' ' + m_pMaintable->text(Select.topRow() + nRowiter, TITRAQ_IDXFINISH); 76.1803 + Syncthis += ' ' + m_pMaintable->text(Select.topRow() + nRowiter, TITRAQ_IDXAMOUNT); 76.1804 + Syncthis += ' ' + m_pMaintable->text(Select.topRow() + nRowiter, TITRAQ_IDXTASK); 76.1805 + Syncthis += ' ' + ('"' + m_pMaintable->text(Select.topRow() + nRowiter, TITRAQ_IDXREMARK)) + '"'; 76.1806 + Clistr = Syncthis; // Build RPC parameter 76.1807 + Logmeth.AddParameter("Tuple") << Clistr; // Prepare for marshalling 76.1808 + const SOAPResponse &Logresp = Proxy.Execute(Logmeth); 76.1809 + Logresp.GetReturnValue() >> nCrc; 76.1810 + } 76.1811 + m_pStatbar->message(trUtf8("Successful transmission, CRC returned %1").arg(nCrc)); 76.1812 + } 76.1813 + catch (SOAPException& Soapex) { // Announce the exception we received 76.1814 + m_pStatbar->message(trUtf8("Caught SOAP exception: %1").arg(Soapex.What().Str())); 76.1815 + qDebug("Caught SOAP exception: %s", Soapex.What().Str()); 76.1816 + } 76.1817 + catch (...) { 76.1818 + qDebug("Caught unknown exception\n"); 76.1819 + } 76.1820 +#endif // HAVE_ESOAP 76.1821 +} 76.1822 + 76.1823 +// 76.1824 +// Save user preferences 76.1825 +// 76.1826 +void Titraqform::savePrefs(void) 76.1827 +{ 76.1828 + // Get check status from column menu and pass it to prefs handler 76.1829 + m_pPrefs->setBool(TITRAQ_PREFSTATCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXSTATCOL))); 76.1830 + m_pPrefs->setBool(TITRAQ_PREFLCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXLCOL))); 76.1831 + m_pPrefs->setBool(TITRAQ_PREFUCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXUCOL))); 76.1832 + m_pPrefs->setBool(TITRAQ_PREFGCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXGCOL))); 76.1833 + m_pPrefs->setBool(TITRAQ_PREFCCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXCCOL))); 76.1834 + m_pPrefs->setBool(TITRAQ_PREFREVCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXREVCOL))); 76.1835 + m_pPrefs->setBool(TITRAQ_PREFDCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXDCOL))); 76.1836 + m_pPrefs->setBool(TITRAQ_PREFSTARTCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXSTARTCOL))); 76.1837 + m_pPrefs->setBool(TITRAQ_PREFFCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXFCOL))); 76.1838 + m_pPrefs->setBool(TITRAQ_PREFACOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXACOL))); 76.1839 + m_pPrefs->setBool(TITRAQ_PREFFCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXFCOL))); 76.1840 + m_pPrefs->setBool(TITRAQ_PREFREMCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXREMCOL))); 76.1841 + 76.1842 + // Get check status from toolbar menu and pass it to prefs handler 76.1843 + m_pPrefs->setBool(TITRAQ_PREFFILEBAR, m_pTbarspopup->isItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXFILEBAR))); 76.1844 + m_pPrefs->setBool(TITRAQ_PREFEDITBAR, m_pTbarspopup->isItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXEDITBAR))); 76.1845 + m_pPrefs->setBool(TITRAQ_PREFVIEWBAR, m_pTbarspopup->isItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXVIEWBAR))); 76.1846 + m_pPrefs->setBool(TITRAQ_PREFPREFBAR, m_pTbarspopup->isItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXPREFBAR))); 76.1847 + m_pPrefs->setBool(TITRAQ_PREFWHATBAR, m_pTbarspopup->isItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXWHATBAR))); 76.1848 + 76.1849 + // Get column widths from main table and pass it to prefs handler 76.1850 + if (m_pMaintable->columnWidth(TITRAQ_IDXSTATUS) > 0) 76.1851 + m_pPrefs->setNumber(TITRAQ_PREFSTATCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXSTATUS)); 76.1852 + if (m_pMaintable->columnWidth(TITRAQ_IDXLINE) > 0) 76.1853 + m_pPrefs->setNumber(TITRAQ_PREFLCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXLINE)); 76.1854 + if (m_pMaintable->columnWidth(TITRAQ_IDXUSER) > 0) 76.1855 + m_pPrefs->setNumber(TITRAQ_PREFUCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXUSER)); 76.1856 + if (m_pMaintable->columnWidth(TITRAQ_IDXGUID) > 0) 76.1857 + m_pPrefs->setNumber(TITRAQ_PREFGCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXGUID)); 76.1858 + if (m_pMaintable->columnWidth(TITRAQ_IDXCRC) > 0) 76.1859 + m_pPrefs->setNumber(TITRAQ_PREFCCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXCRC)); 76.1860 + if (m_pMaintable->columnWidth(TITRAQ_IDXREV) > 0) 76.1861 + m_pPrefs->setNumber(TITRAQ_PREFREVCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXREV)); 76.1862 + if (m_pMaintable->columnWidth(TITRAQ_IDXDATE) > 0) 76.1863 + m_pPrefs->setNumber(TITRAQ_PREFDCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXDATE)); 76.1864 + if (m_pMaintable->columnWidth(TITRAQ_IDXSTART) > 0) 76.1865 + m_pPrefs->setNumber(TITRAQ_PREFSTARTCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXSTART)); 76.1866 + if (m_pMaintable->columnWidth(TITRAQ_IDXFINISH) > 0) 76.1867 + m_pPrefs->setNumber(TITRAQ_PREFFCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXFINISH)); 76.1868 + if (m_pMaintable->columnWidth(TITRAQ_IDXAMOUNT) > 0) 76.1869 + m_pPrefs->setNumber(TITRAQ_PREFACOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXAMOUNT)); 76.1870 + if (m_pMaintable->columnWidth(TITRAQ_IDXTASK) > 0) 76.1871 + m_pPrefs->setNumber(TITRAQ_PREFTCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXTASK)); 76.1872 + if (m_pMaintable->columnWidth(TITRAQ_IDXREMARK) > 0) 76.1873 + m_pPrefs->setNumber(TITRAQ_PREFREMCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXREMARK)); 76.1874 + 76.1875 + // Get sorting order and direction from table and pass it to prefs handler 76.1876 + m_pPrefs->setNumber(TITRAQ_PREFSORTCOL, (long)m_pMaintable->getSortcol()); 76.1877 + m_pPrefs->setBool(TITRAQ_PREFSORTDIR, (long)m_pMaintable->getSortdir()); 76.1878 + 76.1879 + // Set frame geometry preferences 76.1880 + m_pPrefs->setNumber(TITRAQ_PREFFRAMEWIDTH, (long)this->width()); 76.1881 + m_pPrefs->setNumber(TITRAQ_PREFFRAMEHEIGHT, (long)this->height()); 76.1882 + 76.1883 + // Remember main window layout and doc positions 76.1884 + QString Laystring; 76.1885 + QTextStream Laystream(&Laystring, IO_WriteOnly); 76.1886 + Laystream << *this; // Persist the main window 76.1887 + m_pPrefs->setString(TITRAQ_PREFFRAMELAY, Laystring); 76.1888 +} 76.1889 + 76.1890 +// 76.1891 +// Get help on Titraq functionality 76.1892 +// 76.1893 +void Titraqform::helpContents(void) 76.1894 +{ 76.1895 + try { // Create and execute a new help contents window 76.1896 + std::auto_ptr<AS::Helpanel> pHelpcont(new AS::Helpanel(TITRAQ_REFHELP, this, "Helpanel")); 76.1897 + pHelpcont->exec(); 76.1898 + delete pHelpcont.release(); // Technically unnecessary, smart pointer 76.1899 + } 76.1900 + catch (Genexcept& Genex) { 76.1901 + Genex.reportErr(); 76.1902 + return; 76.1903 + } 76.1904 +} 76.1905 + 76.1906 +// 76.1907 +// Learn more about this program itself 76.1908 +// 76.1909 +void Titraqform::aboutTitraq(void) 76.1910 +{ 76.1911 + QString Namever = QString(TITRAQ_APPTITLE) + ' ' + asgui_version.v_short; 76.1912 + QMessageBox *pCwmsg = new QMessageBox(Namever, 76.1913 + QObject::trUtf8("The as-gui is a time and task-based accounting\n" 76.1914 + "system that acts as both a work-like punch card and\n" 76.1915 + "time tracker. Development of as-gui is sponsored by\n" 76.1916 + "Cable & Wireless Telecommunications Services GmbH."), 76.1917 + QMessageBox::NoIcon, QMessageBox::Ok | QMessageBox::Default, 76.1918 + QMessageBox::NoButton, QMessageBox::NoButton, 76.1919 + NULL, "Titraqmessage", true, Qt::WStyle_NormalBorder); 76.1920 + 76.1921 + pCwmsg->setIconPixmap(QPixmap(s_kpcCwlogo_xpm)); 76.1922 + pCwmsg->exec(); 76.1923 +} 76.1924 + 76.1925 +// 76.1926 +// Learn more about the OSSP 76.1927 +// 76.1928 +void Titraqform::aboutOSSP(void) 76.1929 +{ 76.1930 + QString Namever = QString(TITRAQ_APPTITLE) + ' ' + asgui_version.v_short; 76.1931 + QMessageBox *pOsspmsg = new QMessageBox(Namever, 76.1932 + QObject::trUtf8("The open source software project (OSSP) is\n" 76.1933 + "a collective effort aimed at implementing\n" 76.1934 + "high-quality Unix software components,\n" 76.1935 + "ranging from networking, multi-threading\n" 76.1936 + "and algorithmic libraries to networking\n" 76.1937 + "servers and development tools."), 76.1938 + QMessageBox::NoIcon, QMessageBox::Ok | QMessageBox::Default, 76.1939 + QMessageBox::NoButton, QMessageBox::NoButton, 76.1940 + NULL, "Osspmessage", true, Qt::WStyle_NormalBorder); 76.1941 + 76.1942 + pOsspmsg->setIconPixmap(QPixmap(s_kpcOssplogo_xpm)); 76.1943 + pOsspmsg->exec(); 76.1944 +} 76.1945 + 76.1946 +// 76.1947 +// Learn more about this program and Qt 76.1948 +// 76.1949 +void Titraqform::aboutQt(void) 76.1950 +{ 76.1951 + QMessageBox::aboutQt(this, QString(TITRAQ_APPTITLE) + ' ' + asgui_version.v_short); 76.1952 +} 76.1953 + 76.1954 +// 76.1955 +// Apply preference values from a signal emitting object 76.1956 +// 76.1957 +void Titraqform::applyPrefs(void) 76.1958 +{ 76.1959 + Prefpanel *pPan = (Prefpanel *)QObject::sender(); 76.1960 + this->applyPrefs(pPan); 76.1961 +} 76.1962 + 76.1963 +// 76.1964 +// Accept preference values from a inbound Panel object 76.1965 +// 76.1966 +void Titraqform::applyPrefs(Prefpanel *pPrefpanel) 76.1967 +{ 76.1968 + m_pPrefs->setString(TITRAQ_PREFACCOUNTS, pPrefpanel->getAccounts()); 76.1969 + m_pPrefs->setString(TITRAQ_PREFASDIR, pPrefpanel->getEvents()); 76.1970 + m_pPrefs->setString(TITRAQ_PREFUSER, pPrefpanel->getUser()); 76.1971 + m_pPrefs->setString(TITRAQ_PREFHOME, pPrefpanel->getHome()); 76.1972 + m_pPrefs->setString(TITRAQ_PREFCORBHOST, pPrefpanel->getCorbahost()); 76.1973 + m_pPrefs->setString(TITRAQ_PREFSOAPHOST, pPrefpanel->getSoaphost()); 76.1974 + m_pPrefs->setBool(TITRAQ_PREFCORBON, pPrefpanel->getCorbaon()); 76.1975 + m_pPrefs->setBool(TITRAQ_PREFSOAPON, pPrefpanel->getSoapon()); 76.1976 + m_pPrefs->setBool(TITRAQ_PREFBAKON, pPrefpanel->getBackon()); 76.1977 + m_pPrefs->setBool(TITRAQ_PREFEXTENDON, pPrefpanel->getExtendon()); 76.1978 + m_pPrefs->setBool(TITRAQ_PREFDETAILON, pPrefpanel->getDetailon()); 76.1979 + m_pPrefs->setBool(TITRAQ_PREFSIGNATON, pPrefpanel->getSignaton()); 76.1980 + m_pPrefs->setNumber(TITRAQ_PREFLIGHTRED, pPrefpanel->getLight()->red()); 76.1981 + m_pPrefs->setNumber(TITRAQ_PREFLIGHTGREEN, pPrefpanel->getLight()->green()); 76.1982 + m_pPrefs->setNumber(TITRAQ_PREFLIGHTBLUE, pPrefpanel->getLight()->blue()); 76.1983 + m_pPrefs->setNumber(TITRAQ_PREFDARKRED, pPrefpanel->getDark()->red()); 76.1984 + m_pPrefs->setNumber(TITRAQ_PREFDARKGREEN, pPrefpanel->getDark()->green()); 76.1985 + m_pPrefs->setNumber(TITRAQ_PREFDARKBLUE, pPrefpanel->getDark()->blue()); 76.1986 + 76.1987 + // Dim the lights if no RPC transports are available 76.1988 + if (this->isOpen()) 76.1989 + m_pSyncact->setEnabled(m_pPrefs->getBool(TITRAQ_PREFCORBON, TITRAQ_DEFCORBON) 76.1990 + | m_pPrefs->getBool(TITRAQ_PREFSOAPON, TITRAQ_DEFSOAPON)); 76.1991 + else 76.1992 + m_pSyncact->setEnabled(false); 76.1993 + 76.1994 + // Get the selected style which can be more complicated due to mapping... 76.1995 + if (pPrefpanel->getStyle() == TITRAQ_STRCDE) { 76.1996 + m_pPrefs->setNumber(TITRAQ_PREFSTYLE, TITRAQ_STYLECDE); 76.1997 + qApp->setStyle(new QCDEStyle); 76.1998 + } 76.1999 + else if (pPrefpanel->getStyle() == TITRAQ_STRSGI) { 76.2000 + m_pPrefs->setNumber(TITRAQ_PREFSTYLE, TITRAQ_STYLESGI); 76.2001 + qApp->setStyle(new QSGIStyle); 76.2002 + } 76.2003 + else if (pPrefpanel->getStyle() == TITRAQ_STRMOTIF) { 76.2004 + m_pPrefs->setNumber(TITRAQ_PREFSTYLE, TITRAQ_STYLEMOTIF); 76.2005 + qApp->setStyle(new QMotifStyle); 76.2006 + } 76.2007 + else if (pPrefpanel->getStyle() == TITRAQ_STRMPLUS) { 76.2008 + m_pPrefs->setNumber(TITRAQ_PREFSTYLE, TITRAQ_STYLEMPLUS); 76.2009 + qApp->setStyle(new QMotifPlusStyle); 76.2010 + } 76.2011 + else if (pPrefpanel->getStyle() == TITRAQ_STRPLAT) { 76.2012 + m_pPrefs->setNumber(TITRAQ_PREFSTYLE, TITRAQ_STYLEPLAT); 76.2013 + qApp->setStyle(new QPlatinumStyle); 76.2014 + } 76.2015 + else if (pPrefpanel->getStyle() == TITRAQ_STRMSOFT) { 76.2016 + m_pPrefs->setNumber(TITRAQ_PREFSTYLE, TITRAQ_STYLEMSOFT); 76.2017 + qApp->setStyle(new QWindowsStyle); 76.2018 + } 76.2019 + else // My personal favourite ;-) 76.2020 + m_pPrefs->setNumber(TITRAQ_PREFSTYLE, TITRAQ_STYLECDE); 76.2021 +}
77.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 77.2 +++ b/as_stub.idl Fri Nov 28 11:21:08 2008 +0100 77.3 @@ -0,0 +1,57 @@ 77.4 +// 77.5 +// OSSP asgui - Accounting system graphical user interface 77.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 77.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 77.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 77.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 77.10 +// 77.11 +// This file is part of OSSP asgui, an accounting system graphical user 77.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 77.13 +// 77.14 +// Permission to use, copy, modify, and distribute this software for 77.15 +// any purpose with or without fee is hereby granted, provided that 77.16 +// the above copyright notice and this permission notice appear in all 77.17 +// copies. 77.18 +// 77.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 77.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 77.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 77.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 77.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 77.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 77.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 77.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 77.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 77.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 77.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 77.30 +// SUCH DAMAGE. 77.31 +// 77.32 +// as_stub.idl: OMG IDL 77.33 +// 77.34 + 77.35 +struct Astuple { 77.36 + string szUser; 77.37 + string szGuid; 77.38 + string szCrc; 77.39 + string szRev; 77.40 + string szDate; 77.41 + string szStart; 77.42 + string szFinish; 77.43 + string szAmount; 77.44 +// unsigned long nRev; 77.45 +// unsigned long nDate; 77.46 +// unsigned long nStart; 77.47 +// unsigned long nFinish; 77.48 +// unsigned long nAmount; 77.49 + string szTask; 77.50 + string szRemark; 77.51 +}; 77.52 + 77.53 +interface Account { 77.54 + void Log(in Astuple Msgline); 77.55 + string Dump(); 77.56 +}; 77.57 + 77.58 +interface Asdatabase { 77.59 + Account Open(in string Filename); 77.60 +};
78.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 78.2 +++ b/as_table.cpp Fri Nov 28 11:21:08 2008 +0100 78.3 @@ -0,0 +1,251 @@ 78.4 +// 78.5 +// OSSP asgui - Accounting system graphical user interface 78.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 78.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 78.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 78.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 78.10 +// 78.11 +// This file is part of OSSP asgui, an accounting system graphical user 78.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 78.13 +// 78.14 +// Permission to use, copy, modify, and distribute this software for 78.15 +// any purpose with or without fee is hereby granted, provided that 78.16 +// the above copyright notice and this permission notice appear in all 78.17 +// copies. 78.18 +// 78.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 78.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 78.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 78.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 78.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 78.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 78.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 78.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 78.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 78.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 78.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 78.30 +// SUCH DAMAGE. 78.31 +// 78.32 +// as_table.cpp: ISO C++ implementation 78.33 +// 78.34 + 78.35 +#include <qheader.h> 78.36 + 78.37 +#include "as_const.h" 78.38 +#include "as_table.h" 78.39 + 78.40 + 78.41 +// Implements an event filter for catching header double click events 78.42 +bool TiTable::eventFilter(QObject *pObject, QEvent *pEvent) 78.43 +{ 78.44 + if (pObject == horizontalHeader() && pEvent->type() == QEvent::MouseButtonDblClick) 78.45 + return true; 78.46 + if (pEvent->type() == QEvent::MouseButtonPress && // Ignore mid, right clicks 78.47 + ((QMouseEvent *)pEvent)->button() == QMouseEvent::RightButton || 78.48 + ((QMouseEvent *)pEvent)->button() == QMouseEvent::MidButton) 78.49 + return true; 78.50 + else if (pEvent->type() == QEvent::KeyPress) { 78.51 + if (((QKeyEvent *)pEvent)->key() == Qt::Key_Tab) { // Handle tab key 78.52 + if (this->getEdition() >= 0) { 78.53 + int nIter = 1; // Logic to skip invisible or read only columns 78.54 + while (columnWidth((currentColumn() + nIter) % TITRAQ_IDXTAIL) <= 0 78.55 + || isColumnReadOnly((currentColumn() + nIter) % TITRAQ_IDXTAIL)) 78.56 + nIter++; 78.57 + 78.58 + // Advance the column or both row and column possibly 78.59 + int nColadvance = ((currentColumn() + nIter) % TITRAQ_IDXTAIL); 78.60 + if ((currentColumn() + nIter) >= TITRAQ_IDXTAIL) { 78.61 + this->clearSelection(true); 78.62 + this->setCurrentCell(currentRow() + 1, nColadvance); 78.63 +// this->repaint(false); // Really necessary? 78.64 + } 78.65 + else 78.66 + this->setCurrentCell(currentRow(), nColadvance); 78.67 + this->setReadOnly(false); 78.68 + this->editCell(currentRow(), currentColumn()); 78.69 + this->setEdition(currentColumn()); 78.70 + } 78.71 + return true; // Handle the tab key event and cancel its progress 78.72 + } 78.73 + else if (((QKeyEvent *)pEvent)->key() == Qt::Key_Backtab) { // Handle shift tab key 78.74 + if (this->getEdition() >= 0) { 78.75 + int nIter = 1; // Logic to skip invisible or read only columns 78.76 + while (columnWidth((currentColumn() - nIter + TITRAQ_IDXTAIL) % TITRAQ_IDXTAIL) <= 0 78.77 + || isColumnReadOnly((currentColumn() - nIter + TITRAQ_IDXTAIL) % TITRAQ_IDXTAIL)) 78.78 + nIter++; 78.79 + 78.80 + // Advance the column or both row and column possibly 78.81 + int nColadvance = (currentColumn() - nIter + TITRAQ_IDXTAIL) % TITRAQ_IDXTAIL; 78.82 + if ((currentColumn() - nIter) < 0) { 78.83 + this->clearSelection(true); 78.84 + this->setCurrentCell(currentRow() - 1, nColadvance); 78.85 +// this->repaint(false); // Really necessary? 78.86 + } 78.87 + else 78.88 + this->setCurrentCell(currentRow(), nColadvance); 78.89 + this->setReadOnly(false); 78.90 + this->editCell(currentRow(), currentColumn()); 78.91 + this->setEdition(currentColumn()); 78.92 + } 78.93 + return true; // Handle the shift tab key event and cancel its progress 78.94 + } 78.95 + else if (((QKeyEvent *)pEvent)->key() == Qt::Key_Return && this->getEdition() >= 0) { // Return key 78.96 + this->endEdit(currEditRow(), currEditCol(), true, false); 78.97 + this->setEdition(); // Reset edition 78.98 + return true; // Cancel progress 78.99 + } 78.100 + else if (((QKeyEvent *)pEvent)->key() == Qt::Key_Enter && this->getEdition() >= 0) { // Enter key 78.101 + this->endEdit(currEditRow(), currEditCol(), true, false); 78.102 + this->setEdition(); // Reset edition 78.103 + return true; // Cancel progress 78.104 + } 78.105 + else if (((QKeyEvent *)pEvent)->key() == Qt::Key_Return) { // Return key without edition 78.106 + this->setReadOnly(false); // Allow edition 78.107 + this->editCell(currentRow(), currentColumn()); // Begin edition 78.108 + this->setEdition(currentColumn()); // Store edition state 78.109 + return true; // Cancel further progress 78.110 + } 78.111 + else if (((QKeyEvent *)pEvent)->key() == Qt::Key_Enter) { // Enter key without edition 78.112 + this->setReadOnly(false); // Allow edition 78.113 + this->editCell(currentRow(), currentColumn()); // Begin edition 78.114 + this->setEdition(currentColumn()); // Store edition state 78.115 + return true; // Cancel further progress 78.116 + } 78.117 + else if (((QKeyEvent *)pEvent)->key() == Qt::Key_Escape) // Handle escape key 78.118 + this->setEdition(); 78.119 + else if (((QKeyEvent *)pEvent)->key() == Qt::Key_Up && this->getEdition() >= 0) // Handle up key 78.120 + return true; // Capture 78.121 + else if (((QKeyEvent *)pEvent)->key() == Qt::Key_Down && this->getEdition() >= 0) // Handle down key 78.122 + return true; // Capture 78.123 + 78.124 + // Forward incompletely handled key events 78.125 + return QTable::eventFilter(pObject, pEvent); 78.126 + } 78.127 + else // Default behaviour is to pass the event onwards 78.128 + return QTable::eventFilter(pObject, pEvent); 78.129 +} 78.130 + 78.131 +// Overridden member hack to allow externally connected control 78.132 +// widgets to influence dirty or clean state of table data 78.133 +void TiTable::setText(int nRow, int nCol, const QString &nText) 78.134 +{ 78.135 + if (this->numRows() > 0) { 78.136 + // If a cell was edited, emit a signal indicating so 78.137 + // We can't rely on valueChanged for unknown reasons 78.138 + if (nText != this->text(nRow, nCol) && nCol != TITRAQ_IDXLINE) 78.139 + emit textEdited(nRow, nCol); 78.140 + 78.141 + QTable::setText(nRow, nCol, nText); 78.142 + } 78.143 +} 78.144 + 78.145 +// Overridden member hack to allow externally connected control 78.146 +// widgets to influence dirty or clean state of table data 78.147 +void TiTable::sortColumn(int nCol, bool bAscend, bool bWhole) 78.148 +{ 78.149 + // Guard against a repeat sort behaviour 78.150 + if (nCol == this->getSortcol() && bAscend == this->getSortdir()) 78.151 + this->setSortdir(!bAscend); 78.152 + else 78.153 + this->setSortdir(bAscend); 78.154 + 78.155 + this->setSortcol(nCol); 78.156 + QTable::sortColumn(nCol, this->getSortdir(), true); 78.157 + 78.158 +// // Announce sorting policy with multiple selections 78.159 +// QTableSelection Testsel = this->selection(this->currentSelection()); 78.160 +// if (Testsel.topRow() != Testsel.bottomRow()) 78.161 +// m_pStatbar->message(trUtf8("Multiple selections dropped when sorting"), 4000); 78.162 + 78.163 + // Move and display the selection highlight 78.164 + this->removeSelection(this->currentSelection()); 78.165 + this->selectRow(this->currentRow()); 78.166 + this->ensureCellVisible(this->currentRow(), 0); 78.167 + 78.168 + // Write nonsaving line numbers for all rows 78.169 + for (int nIter = this->numRows() - 1; nIter >= 0; nIter--) 78.170 + this->setText(nIter, TITRAQ_IDXLINE, QString::number(nIter).rightJustify(4, QChar('0'))); 78.171 +} 78.172 + 78.173 +// Overriden member to render edge rows differently according to a sort key 78.174 +void TiTable::paintCell(QPainter *pPainter, int nRow, int nCol, const QRect &Recto, bool bSelect, const QColorGroup &Colgroup) 78.175 +{ 78.176 + QColorGroup Cgroup(Colgroup); 78.177 + int nRed, nGreen, nBlue; 78.178 + 78.179 + nRed = m_pTiprefs->getNumber(TITRAQ_PREFLIGHTRED, TITRAQ_DEFLIGHTRED); 78.180 + nGreen = m_pTiprefs->getNumber(TITRAQ_PREFLIGHTGREEN, TITRAQ_DEFLIGHTGREEN); 78.181 + nBlue = m_pTiprefs->getNumber(TITRAQ_PREFLIGHTBLUE, TITRAQ_DEFLIGHTBLUE); 78.182 + QColor Bright = QColor(nRed, nGreen, nBlue); 78.183 + nRed = m_pTiprefs->getNumber(TITRAQ_PREFDARKRED, TITRAQ_DEFDARKRED); 78.184 + nGreen = m_pTiprefs->getNumber(TITRAQ_PREFDARKGREEN, TITRAQ_DEFDARKGREEN); 78.185 + nBlue = m_pTiprefs->getNumber(TITRAQ_PREFDARKBLUE, TITRAQ_DEFDARKBLUE); 78.186 + QColor Dark = QColor(nRed, nGreen, nBlue); 78.187 + 78.188 + // Alternate color for nonmatching sort keys 78.189 + QString Cur = this->text(nRow, this->getSortcol()); 78.190 + QString Las = this->text(nRow - 1, this->getSortcol()); 78.191 + 78.192 + // A nice cascade of conditions providing a linewise base color test and set 78.193 + // The algorythm: 78.194 + // 1 Determine if the current row's index key differs from the former one 78.195 + // 2a If they are the same, then current row should have the same color 78.196 + // 2b If they are different, then current row should have an alt color 78.197 + // 3 Store information about which color we chose for the current row 78.198 + if (!Cur.isNull() && !Las.isNull() && Cur == Las) { // Set the base color conditionally 78.199 + if (this->text(nRow - 1, TITRAQ_IDXSTATUS).at(TITRAQ_IDXSTATCOLOR) == QChar(TITRAQ_BRIGHT)) { 78.200 + Cgroup.setColor(QColorGroup::Base, Bright); // Bright 78.201 + if (this->text(nRow, TITRAQ_IDXSTATUS).at(TITRAQ_IDXSTATCOLOR) != QChar(TITRAQ_BRIGHT)) 78.202 + this->setText(nRow, TITRAQ_IDXSTATUS, this->text(nRow, TITRAQ_IDXSTATUS).replace(TITRAQ_IDXSTATCOLOR, sizeof(char), QChar(TITRAQ_BRIGHT))); 78.203 + } 78.204 + else { 78.205 + Cgroup.setColor(QColorGroup::Base, Dark); // Dark 78.206 + if (this->text(nRow, TITRAQ_IDXSTATUS).at(TITRAQ_IDXSTATCOLOR) != QChar(TITRAQ_DARK)) 78.207 + this->setText(nRow, TITRAQ_IDXSTATUS, this->text(nRow, TITRAQ_IDXSTATUS).replace(TITRAQ_IDXSTATCOLOR, sizeof(char), QChar(TITRAQ_DARK))); 78.208 + } 78.209 + } 78.210 + else { 78.211 + if (this->text(nRow - 1, TITRAQ_IDXSTATUS).at(TITRAQ_IDXSTATCOLOR) == QChar(TITRAQ_BRIGHT)) { 78.212 + Cgroup.setColor(QColorGroup::Base, Dark); // Dark 78.213 + if (this->text(nRow, TITRAQ_IDXSTATUS).at(TITRAQ_IDXSTATCOLOR) != QChar(TITRAQ_DARK)) 78.214 + this->setText(nRow, TITRAQ_IDXSTATUS, this->text(nRow, TITRAQ_IDXSTATUS).replace(TITRAQ_IDXSTATCOLOR, sizeof(char), QChar(TITRAQ_DARK))); 78.215 + } 78.216 + else { 78.217 + Cgroup.setColor(QColorGroup::Base, Bright); // Bright 78.218 + if (this->text(nRow, TITRAQ_IDXSTATUS).at(TITRAQ_IDXSTATCOLOR) != QChar(TITRAQ_BRIGHT)) 78.219 + this->setText(nRow, TITRAQ_IDXSTATUS, this->text(nRow, TITRAQ_IDXSTATUS).replace(TITRAQ_IDXSTATCOLOR, sizeof(char), QChar(TITRAQ_BRIGHT))); 78.220 + } 78.221 + } 78.222 + 78.223 + QTable::paintCell(pPainter, nRow, nCol, Recto, bSelect, Cgroup); 78.224 +}; 78.225 + 78.226 +// Blah 78.227 +void TiTable::activateNextCell(void) 78.228 +{ 78.229 + int nIter = 1; // Logic to skip invisible or read only columns 78.230 + while (columnWidth((currentColumn() + nIter) % TITRAQ_IDXTAIL) <= 0 78.231 + || isColumnReadOnly((currentColumn() + nIter) % TITRAQ_IDXTAIL)) 78.232 + nIter++; 78.233 + 78.234 + // Advance the column or both row and column possibly 78.235 + int nColadvance = ((currentColumn() + nIter) % TITRAQ_IDXTAIL); 78.236 + if ((currentColumn() + nIter) >= TITRAQ_IDXTAIL) 78.237 + this->setCurrentCell(currentRow() + 1, nColadvance); 78.238 + else 78.239 + this->setCurrentCell(currentRow(), nColadvance); 78.240 + this->setReadOnly(false); 78.241 + this->editCell(currentRow(), currentColumn()); 78.242 + this->setEdition(currentColumn()); 78.243 +} 78.244 + 78.245 +// Overriden member to properly handle read only attribute after edition 78.246 +void TiTable::endEdit(int nRow, int nCol, bool bAccept, bool bReplace) 78.247 +{ 78.248 + QTable::endEdit(nRow, nCol, bAccept, bReplace); 78.249 + 78.250 + // Table read only attribute must be set to return to the normal 78.251 + // row highlight and selection behaviour of AS. The reason it was 78.252 + // reset in inplaceEdit() was to allow editing in the first place. 78.253 + this->setReadOnly(true); 78.254 +}
79.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 79.2 +++ b/as_table.h Fri Nov 28 11:21:08 2008 +0100 79.3 @@ -0,0 +1,99 @@ 79.4 +// 79.5 +// OSSP asgui - Accounting system graphical user interface 79.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 79.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 79.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 79.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 79.10 +// 79.11 +// This file is part of OSSP asgui, an accounting system graphical user 79.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 79.13 +// 79.14 +// Permission to use, copy, modify, and distribute this software for 79.15 +// any purpose with or without fee is hereby granted, provided that 79.16 +// the above copyright notice and this permission notice appear in all 79.17 +// copies. 79.18 +// 79.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 79.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 79.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 79.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 79.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 79.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 79.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 79.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 79.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 79.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 79.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 79.30 +// SUCH DAMAGE. 79.31 +// 79.32 +// as_table.h: ISO C++ interface 79.33 +// 79.34 + 79.35 +#ifndef TITABLE_H 79.36 +#define TITABLE_H 79.37 + 79.38 +#include <qtable.h> 79.39 + 79.40 +#include "as_pref.h" 79.41 + 79.42 + 79.43 +class TiTable : public QTable 79.44 +{ 79.45 + Q_OBJECT 79.46 + 79.47 +private: 79.48 + int m_nSortcol; // To track current sort column 79.49 + int m_bSortdir; // To track current sort direction 79.50 + bool m_bDirt; // To track dirty and clean states 79.51 + Preferences *m_pTiprefs; // To read current color values 79.52 + 79.53 +public: 79.54 + // Try to match QTable's default constructor with an initializer list 79.55 + TiTable(Preferences *pPrefs, QWidget *pParent = 0, const char *szName = 0) : QTable(pParent, szName) 79.56 + { 79.57 + this->setSortcol(0); 79.58 + this->setSortdir(true); 79.59 + this->setDirty(false); 79.60 + this->setEdition(); // Reset edition state 79.61 + m_pTiprefs = pPrefs; 79.62 + horizontalHeader()->installEventFilter(this); 79.63 + }; 79.64 + 79.65 + bool eventFilter(QObject *, QEvent *); 79.66 + 79.67 + // Standard members 79.68 + int m_nEdit; // To track edition state 79.69 + 79.70 + // Accessor methods 79.71 + const bool isDirty(void) {return m_bDirt;}; // Check for changed state danger 79.72 + void setDirty(bool bDirty = true) {m_bDirt = bDirty;}; // Clean or dirty 79.73 + const int getEdition(void) {return m_nEdit;}; // Which edited column was confirmed 79.74 + void setEdition(const int nEdit = -1) {m_nEdit = nEdit;}; // Set edition status 79.75 + const int getSortcol(void) {return m_nSortcol;}; 79.76 + void setSortcol(const int nColin) {m_nSortcol = nColin;}; 79.77 + const bool getSortdir(void) {return m_bSortdir;}; 79.78 + void setSortdir(const bool bDirection) {m_bSortdir = bDirection;}; 79.79 + 79.80 + // Overridden accessors 79.81 + void setText(int, int, const QString &); 79.82 + void sortColumn(int nCol, bool bAscend = true, bool bWhole = true); 79.83 +// virtual QTableItem *item(int nRow, int nCol) const {return QTable::item(nRow, nCol);}; 79.84 + 79.85 + // Deny a cell special handling of the focus rectangle 79.86 + // by overriding class QTable's paintFocus method 79.87 + virtual void paintFocus(QPainter *, const QRect &) {}; 79.88 + 79.89 + // Override for special linewise shading according to sort key 79.90 + virtual void paintCell(QPainter *, int, int, const QRect &, bool, const QColorGroup &); 79.91 + 79.92 + // Override to properly handle read only attribute during edition 79.93 + virtual void endEdit(int, int, bool, bool); 79.94 + 79.95 + // For special focus handling on return key in edit mode 79.96 + virtual void activateNextCell(void); 79.97 + 79.98 +signals: 79.99 + void textEdited(int, int); // A cell was edited and data was modified 79.100 +}; 79.101 + 79.102 +#endif // TITABLE_H
80.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 80.2 +++ b/as_tableitem.h Fri Nov 28 11:21:08 2008 +0100 80.3 @@ -0,0 +1,49 @@ 80.4 +// 80.5 +// OSSP asgui - Accounting system graphical user interface 80.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 80.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 80.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 80.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 80.10 +// 80.11 +// This file is part of OSSP asgui, an accounting system graphical user 80.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 80.13 +// 80.14 +// Permission to use, copy, modify, and distribute this software for 80.15 +// any purpose with or without fee is hereby granted, provided that 80.16 +// the above copyright notice and this permission notice appear in all 80.17 +// copies. 80.18 +// 80.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 80.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 80.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 80.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 80.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 80.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 80.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 80.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 80.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 80.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 80.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 80.30 +// SUCH DAMAGE. 80.31 +// 80.32 +// as_tableitem.h: ISO C++ interface 80.33 +// 80.34 + 80.35 +#ifndef RTTABLEITEM_H 80.36 +#define RTTABLEITEM_H 80.37 + 80.38 +#include <qtable.h> 80.39 + 80.40 + 80.41 +class RtTableItem : public QTableItem 80.42 +{ 80.43 +public: 80.44 + RtTableItem(QTable *pTable, EditType eType, const QString &Text) : QTableItem(pTable, eType, Text) {m_nOwnalign = AlignRight | AlignVCenter;}; 80.45 + void setAlignment(int nAlign = AlignRight | AlignVCenter) {m_nOwnalign = nAlign;}; 80.46 + int alignment() const {return m_nOwnalign;}; 80.47 + 80.48 +private: 80.49 + int m_nOwnalign; 80.50 +}; 80.51 + 80.52 +#endif // RTTABLEITEM_H
81.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 81.2 +++ b/as_user.cpp Fri Nov 28 11:21:08 2008 +0100 81.3 @@ -0,0 +1,85 @@ 81.4 +// 81.5 +// OSSP asgui - Accounting system graphical user interface 81.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 81.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 81.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 81.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 81.10 +// 81.11 +// This file is part of OSSP asgui, an accounting system graphical user 81.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 81.13 +// 81.14 +// Permission to use, copy, modify, and distribute this software for 81.15 +// any purpose with or without fee is hereby granted, provided that 81.16 +// the above copyright notice and this permission notice appear in all 81.17 +// copies. 81.18 +// 81.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 81.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 81.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 81.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 81.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 81.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 81.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 81.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 81.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 81.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 81.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 81.30 +// SUCH DAMAGE. 81.31 +// 81.32 +// as_user.cpp: ISO C++ implementation 81.33 +// 81.34 + 81.35 +// For username research 81.36 +#if defined(Q_OS_WIN32) 81.37 +#include <lmcons.h> 81.38 +#else 81.39 +#include <pwd.h> 81.40 +#include <unistd.h> 81.41 +#endif // #if defined(Q_OS_WIN32) 81.42 + 81.43 +// Local class definitions 81.44 +#include "as_user.h" 81.45 +#include "as_const.h" 81.46 + 81.47 + 81.48 +// Constructor 81.49 +User::User(void) 81.50 +{ 81.51 +// Start the show by getting the username 81.52 +#if defined(Q_OS_WIN32) 81.53 + { 81.54 + DWORD dwWinusernamesize = sizeof(dwWinusernamesize); 81.55 +#if defined(UNICODE) 81.56 + TCHAR szWinusername[UNLEN + 1]; // UNLEN is defined in lmcons.h 81.57 + GetUserName(szWinusername, &dwWinusernamesize); 81.58 + m_Name = qt_winQString(szWinusername); 81.59 +#else // Not unicode 81.60 + char szWinusername[UNLEN + 1]; // UNLEN is defined in lmcons.h 81.61 + GetUserNameA(szWinusername, &dwWinusernamesize); 81.62 + this->setName(szWinusername); 81.63 + } 81.64 +#endif // #if defined(UNICODE) 81.65 +#else // Not windows 81.66 + { 81.67 +//#include <stdio.h> 81.68 +// char *szUser = NULL; 81.69 +// szUser = cuserid(); 81.70 +// m_Name = QString::fromLocal8Bit(szUser); 81.71 + 81.72 + // Get the user name from the environment 81.73 + char *szLogin = getenv(TITRAQ_ENVUSERNAME); 81.74 + if (szLogin == NULL) // Is the user name in the environment? 81.75 + szLogin = getlogin(); // No, so fetch it from the system 81.76 + 81.77 + // Get the home directory from the environment 81.78 + char *szHomedir = getenv(TITRAQ_ENVHOMEDIR); 81.79 + if (szHomedir == NULL) { // Is the home directory in the environment? 81.80 + passwd *pUserpwd = getpwnam(szLogin); // No, so fetch it from the system 81.81 + szHomedir = pUserpwd->pw_dir; // Drill into the password struct 81.82 + } 81.83 + 81.84 + this->setName(szLogin); 81.85 + this->setHomedir(szHomedir); 81.86 + } 81.87 +#endif // #if defined(Q_OS_WIN32) 81.88 +}
82.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 82.2 +++ b/as_user.h Fri Nov 28 11:21:08 2008 +0100 82.3 @@ -0,0 +1,60 @@ 82.4 +// 82.5 +// OSSP asgui - Accounting system graphical user interface 82.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 82.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 82.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 82.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 82.10 +// 82.11 +// This file is part of OSSP asgui, an accounting system graphical user 82.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 82.13 +// 82.14 +// Permission to use, copy, modify, and distribute this software for 82.15 +// any purpose with or without fee is hereby granted, provided that 82.16 +// the above copyright notice and this permission notice appear in all 82.17 +// copies. 82.18 +// 82.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 82.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 82.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 82.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 82.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 82.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 82.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 82.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 82.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 82.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 82.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 82.30 +// SUCH DAMAGE. 82.31 +// 82.32 +// as_user.h: ISO C++ interface 82.33 +// 82.34 + 82.35 +#ifndef USER_H 82.36 +#define USER_H 82.37 + 82.38 +// System headers 82.39 +#include <string> 82.40 + 82.41 +using std::string; 82.42 + 82.43 + 82.44 +class User 82.45 +{ 82.46 +private: 82.47 + string m_Name; // Holds the user name 82.48 + string m_Homedir; // Holds the user homedir 82.49 + 82.50 +public: 82.51 + User(void); 82.52 + 82.53 + // Accessors 82.54 + string getName(void) const {return m_Name;}; 82.55 + string getHomedir(void) const {return m_Homedir;}; 82.56 + 82.57 +protected: 82.58 + // Accessors 82.59 + void setName(const string Namein) {m_Name = Namein;}; 82.60 + void setHomedir(const string Dirin) {m_Homedir = Dirin;}; 82.61 +}; 82.62 + 82.63 +#endif // USER_H
83.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 83.2 +++ b/as_uuid.cpp Fri Nov 28 11:21:08 2008 +0100 83.3 @@ -0,0 +1,145 @@ 83.4 +// 83.5 +// OSSP asgui - Accounting system graphical user interface 83.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 83.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 83.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 83.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 83.10 +// 83.11 +// This file is part of OSSP asgui, an accounting system graphical user 83.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 83.13 +// 83.14 +// Permission to use, copy, modify, and distribute this software for 83.15 +// any purpose with or without fee is hereby granted, provided that 83.16 +// the above copyright notice and this permission notice appear in all 83.17 +// copies. 83.18 +// 83.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 83.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 83.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 83.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 83.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 83.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 83.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 83.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 83.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 83.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 83.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 83.30 +// SUCH DAMAGE. 83.31 +// 83.32 +// as_uuid.cpp: ISO C++ implementation 83.33 +// 83.34 + 83.35 +// System headers 83.36 +#include <string> 83.37 +#include <sys/socket.h> 83.38 + 83.39 +// Local headers 83.40 +#include "as_uuid.h" 83.41 +#include "as_rand.h" 83.42 + 83.43 +// All of these are for detecting 83.44 +// the MAC address in setMac() 83.45 +#ifdef HAVE_UNISTD_H 83.46 +#include <unistd.h> 83.47 +#endif // HAVE_UNISTD_H 83.48 +#ifdef HAVE_SYS_SOCKIO_H 83.49 +#include <sys/sockio.h> 83.50 +#endif // HAVE_SYS_SOCKIO_H 83.51 +#ifdef HAVE_NET_IF_H 83.52 +#include <net/if.h> 83.53 +#endif // HAVE_NET_IF_H 83.54 +#ifdef HAVE_NETINET_IN_H 83.55 +#include <netinet/in.h> 83.56 +#endif // HAVE_NETINET_IN_H 83.57 + 83.58 + 83.59 +namespace AS { 83.60 + 83.61 +// 83.62 +// Generate a DCE standard UUID 83.63 +// 83.64 +void Uuid::genId(void) 83.65 +{ 83.66 + Rand Temprand; // For random numbers 83.67 + unsigned char szChardata[16]; // Intermediate data 83.68 + 83.69 + // Generate random data and fill in our UUID member fields with it 83.70 + Temprand.genData(szChardata, sizeof(szChardata)); 83.71 + setId(szChardata); 83.72 + 83.73 + // Since we don't just want random data, lets take some clock sequences also 83.74 + this->clock_seq = (this->clock_seq & 0x3FFF) | 0x8000; 83.75 + this->time_hi_and_version = (this->time_hi_and_version & 0x0FFF) | 0x4000; 83.76 + 83.77 + // In every case that we can, set the node ID to the real MAC address 83.78 + setMac(this->node); 83.79 + 83.80 + setString(); // Set the human readable string 83.81 +} 83.82 + 83.83 +// 83.84 +// Helper method to set the UUID private member data 83.85 +// 83.86 +void Uuid::setId(const unsigned char *pkucData) 83.87 +{ 83.88 + const U8 *pOctet = pkucData; 83.89 + U32 Tmpdat; 83.90 + 83.91 + Tmpdat = *pOctet++; // Tmpdat is our iterator 83.92 + 83.93 + // Copy data chunks one octet at a time 83.94 + Tmpdat = (Tmpdat << 8) | *pOctet++; 83.95 + Tmpdat = (Tmpdat << 8) | *pOctet++; 83.96 + Tmpdat = (Tmpdat << 8) | *pOctet++; 83.97 + this->time_low = Tmpdat; 83.98 + 83.99 + Tmpdat = *pOctet++; 83.100 + Tmpdat = (Tmpdat << 8) | *pOctet++; 83.101 + this->time_mid = Tmpdat; 83.102 + 83.103 + Tmpdat = *pOctet++; 83.104 + Tmpdat = (Tmpdat << 8) | *pOctet++; 83.105 + this->time_hi_and_version = Tmpdat; 83.106 + 83.107 + Tmpdat = *pOctet++; 83.108 + Tmpdat = (Tmpdat << 8) | *pOctet++; 83.109 + this->clock_seq = Tmpdat; 83.110 + 83.111 + // Put in the MAC address 83.112 + memcpy(this->node, pOctet, 6); 83.113 +} 83.114 + 83.115 +// 83.116 +// Helper method to set up the MAC address node ID member data 83.117 +// 83.118 +int Uuid::setMac(unsigned char *pucNode) 83.119 +{ 83.120 + return 0; 83.121 +} 83.122 + 83.123 +// 83.124 +// Returns a formatted representation of a DCE standard UUID 83.125 +// 83.126 +std::string Uuid::getString(void) 83.127 +{ 83.128 + return m_Fmtstr; 83.129 +} 83.130 + 83.131 +// 83.132 +// Helper method to set the private formatted 83.133 +// representation of a DCE standard UUID 83.134 +// 83.135 +void Uuid::setString(void) 83.136 +{ 83.137 + char szTemp[48]; // To perform intermediate manipulation 83.138 + 83.139 + sprintf(szTemp, // The DCE standard UUID format 83.140 + "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", 83.141 + this->time_low, this->time_mid, this->time_hi_and_version, 83.142 + this->clock_seq >> 8, this->clock_seq & 0xFF, 83.143 + node[0], node[1], node[2], 83.144 + node[3], node[4], node[5]); 83.145 + 83.146 + m_Fmtstr = szTemp; // Finally copy the temporary to our object 83.147 +} 83.148 +} // namespace AS
84.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 84.2 +++ b/as_uuid.h Fri Nov 28 11:21:08 2008 +0100 84.3 @@ -0,0 +1,67 @@ 84.4 +// 84.5 +// OSSP asgui - Accounting system graphical user interface 84.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 84.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 84.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 84.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 84.10 +// 84.11 +// This file is part of OSSP asgui, an accounting system graphical user 84.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 84.13 +// 84.14 +// Permission to use, copy, modify, and distribute this software for 84.15 +// any purpose with or without fee is hereby granted, provided that 84.16 +// the above copyright notice and this permission notice appear in all 84.17 +// copies. 84.18 +// 84.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 84.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 84.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 84.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 84.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 84.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 84.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 84.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 84.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 84.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 84.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 84.30 +// SUCH DAMAGE. 84.31 +// 84.32 +// as_uuid.h: ISO C++ interface 84.33 +// 84.34 + 84.35 +#ifndef UUIDGEN_H 84.36 +#define UUIDGEN_H 84.37 + 84.38 +#include <string> 84.39 + 84.40 +#include "as_gui.h" 84.41 + 84.42 + 84.43 +namespace AS { 84.44 + 84.45 +// 84.46 +// A DCE standard UUID, can generate (multiple) 84.47 +// IDs and format them for a printed output 84.48 +// 84.49 +class Uuid 84.50 +{ 84.51 +private: 84.52 + std::string m_Fmtstr; // Human readable format 84.53 + U32 time_low; // 84.54 + U16 time_mid; // Fields according to 84.55 + U16 time_hi_and_version; // the IETF specification 84.56 + U16 clock_seq; // draft-mealling-uuid-urn-00 84.57 + U8 node[6]; // 84.58 + 84.59 +public: 84.60 + void genId(void); // Generate an UUID 84.61 + void setString(void); // Sets the formatted representation 84.62 + std::string getString(void); // Return a formatted representation 84.63 + 84.64 +private: 84.65 + void setId(const unsigned char *); // Helper method to set data members 84.66 + int setMac(unsigned char *); // Helper method to set MAC node ID 84.67 +}; 84.68 +} // namespace AS 84.69 + 84.70 +#endif // UUIDGEN_H
85.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 85.2 +++ b/as_version.cpp Fri Nov 28 11:21:08 2008 +0100 85.3 @@ -0,0 +1,46 @@ 85.4 +/* 85.5 +** as_version.cpp -- Version Information for OSSP as-gui (syntax: C/C++) 85.6 +** [automatically generated and maintained by GNU shtool] 85.7 +*/ 85.8 + 85.9 +#ifdef _AS_VERSION_CPP_AS_HEADER_ 85.10 + 85.11 +#ifndef _AS_VERSION_CPP_ 85.12 +#define _AS_VERSION_CPP_ 85.13 + 85.14 +#define ASGUI_VERSION 0x007207 85.15 + 85.16 +typedef struct { 85.17 + const int v_hex; 85.18 + const char *v_short; 85.19 + const char *v_long; 85.20 + const char *v_tex; 85.21 + const char *v_gnu; 85.22 + const char *v_web; 85.23 + const char *v_sccs; 85.24 + const char *v_rcs; 85.25 +} asgui_version_t; 85.26 + 85.27 +extern asgui_version_t asgui_version; 85.28 + 85.29 +#endif /* _AS_VERSION_CPP_ */ 85.30 + 85.31 +#else /* _AS_VERSION_CPP_AS_HEADER_ */ 85.32 + 85.33 +#define _AS_VERSION_CPP_AS_HEADER_ 85.34 +#include "as_version.cpp" 85.35 +#undef _AS_VERSION_CPP_AS_HEADER_ 85.36 + 85.37 +asgui_version_t asgui_version = { 85.38 + 0x007207, 85.39 + "0.7.7", 85.40 + "0.7.7 (24-Aug-2004)", 85.41 + "This is OSSP as-gui, Version 0.7.7 (24-Aug-2004)", 85.42 + "OSSP as-gui 0.7.7 (24-Aug-2004)", 85.43 + "OSSP as-gui/0.7.7", 85.44 + "@(#)OSSP as-gui 0.7.7 (24-Aug-2004)", 85.45 + "$Id: as_version.cpp,v 1.45 2004/08/24 22:00:30 ms Exp $" 85.46 +}; 85.47 + 85.48 +#endif /* _AS_VERSION_CPP_AS_HEADER_ */ 85.49 +
86.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 86.2 +++ b/config.guess Fri Nov 28 11:21:08 2008 +0100 86.3 @@ -0,0 +1,1363 @@ 86.4 +#! /bin/sh 86.5 +# Attempt to guess a canonical system name. 86.6 +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 86.7 +# 2000, 2001, 2002 Free Software Foundation, Inc. 86.8 + 86.9 +timestamp='2002-09-03' 86.10 + 86.11 +# This file is free software; you can redistribute it and/or modify it 86.12 +# under the terms of the GNU General Public License as published by 86.13 +# the Free Software Foundation; either version 2 of the License, or 86.14 +# (at your option) any later version. 86.15 +# 86.16 +# This program is distributed in the hope that it will be useful, but 86.17 +# WITHOUT ANY WARRANTY; without even the implied warranty of 86.18 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 86.19 +# General Public License for more details. 86.20 +# 86.21 +# You should have received a copy of the GNU General Public License 86.22 +# along with this program; if not, write to the Free Software 86.23 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 86.24 +# 86.25 +# As a special exception to the GNU General Public License, if you 86.26 +# distribute this file as part of a program that contains a 86.27 +# configuration script generated by Autoconf, you may include it under 86.28 +# the same distribution terms that you use for the rest of that program. 86.29 + 86.30 +# Originally written by Per Bothner <per@bothner.com>. 86.31 +# Please send patches to <config-patches@gnu.org>. Submit a context 86.32 +# diff and a properly formatted ChangeLog entry. 86.33 +# 86.34 +# This script attempts to guess a canonical system name similar to 86.35 +# config.sub. If it succeeds, it prints the system name on stdout, and 86.36 +# exits with 0. Otherwise, it exits with 1. 86.37 +# 86.38 +# The plan is that this can be called by configure scripts if you 86.39 +# don't specify an explicit build system type. 86.40 + 86.41 +me=`echo "$0" | sed -e 's,.*/,,'` 86.42 + 86.43 +usage="\ 86.44 +Usage: $0 [OPTION] 86.45 + 86.46 +Output the configuration name of the system \`$me' is run on. 86.47 + 86.48 +Operation modes: 86.49 + -h, --help print this help, then exit 86.50 + -t, --time-stamp print date of last modification, then exit 86.51 + -v, --version print version number, then exit 86.52 + 86.53 +Report bugs and patches to <config-patches@gnu.org>." 86.54 + 86.55 +version="\ 86.56 +GNU config.guess ($timestamp) 86.57 + 86.58 +Originally written by Per Bothner. 86.59 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 86.60 +Free Software Foundation, Inc. 86.61 + 86.62 +This is free software; see the source for copying conditions. There is NO 86.63 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 86.64 + 86.65 +help=" 86.66 +Try \`$me --help' for more information." 86.67 + 86.68 +# Parse command line 86.69 +while test $# -gt 0 ; do 86.70 + case $1 in 86.71 + --time-stamp | --time* | -t ) 86.72 + echo "$timestamp" ; exit 0 ;; 86.73 + --version | -v ) 86.74 + echo "$version" ; exit 0 ;; 86.75 + --help | --h* | -h ) 86.76 + echo "$usage"; exit 0 ;; 86.77 + -- ) # Stop option processing 86.78 + shift; break ;; 86.79 + - ) # Use stdin as input. 86.80 + break ;; 86.81 + -* ) 86.82 + echo "$me: invalid option $1$help" >&2 86.83 + exit 1 ;; 86.84 + * ) 86.85 + break ;; 86.86 + esac 86.87 +done 86.88 + 86.89 +if test $# != 0; then 86.90 + echo "$me: too many arguments$help" >&2 86.91 + exit 1 86.92 +fi 86.93 + 86.94 +trap 'exit 1' 1 2 15 86.95 + 86.96 +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a 86.97 +# compiler to aid in system detection is discouraged as it requires 86.98 +# temporary files to be created and, as you can see below, it is a 86.99 +# headache to deal with in a portable fashion. 86.100 + 86.101 +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 86.102 +# use `HOST_CC' if defined, but it is deprecated. 86.103 + 86.104 +# This shell variable is my proudest work .. or something. --bje 86.105 + 86.106 +set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ; 86.107 +(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old) 86.108 + || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ; 86.109 +dummy=$tmpdir/dummy ; 86.110 +files="$dummy.c $dummy.o $dummy.rel $dummy" ; 86.111 +trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ; 86.112 +case $CC_FOR_BUILD,$HOST_CC,$CC in 86.113 + ,,) echo "int x;" > $dummy.c ; 86.114 + for c in cc gcc c89 c99 ; do 86.115 + if ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; then 86.116 + CC_FOR_BUILD="$c"; break ; 86.117 + fi ; 86.118 + done ; 86.119 + rm -f $files ; 86.120 + if test x"$CC_FOR_BUILD" = x ; then 86.121 + CC_FOR_BUILD=no_compiler_found ; 86.122 + fi 86.123 + ;; 86.124 + ,,*) CC_FOR_BUILD=$CC ;; 86.125 + ,*,*) CC_FOR_BUILD=$HOST_CC ;; 86.126 +esac ; 86.127 +unset files' 86.128 + 86.129 +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 86.130 +# (ghazi@noc.rutgers.edu 1994-08-24) 86.131 +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then 86.132 + PATH=$PATH:/.attbin ; export PATH 86.133 +fi 86.134 + 86.135 +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 86.136 +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 86.137 +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 86.138 +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 86.139 + 86.140 +# Note: order is significant - the case branches are not exclusive. 86.141 + 86.142 +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 86.143 + *:NetBSD:*:*) 86.144 + # NetBSD (nbsd) targets should (where applicable) match one or 86.145 + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, 86.146 + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 86.147 + # switched to ELF, *-*-netbsd* would select the old 86.148 + # object file format. This provides both forward 86.149 + # compatibility and a consistent mechanism for selecting the 86.150 + # object file format. 86.151 + # 86.152 + # Note: NetBSD doesn't particularly care about the vendor 86.153 + # portion of the name. We always set it to "unknown". 86.154 + sysctl="sysctl -n hw.machine_arch" 86.155 + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 86.156 + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 86.157 + case "${UNAME_MACHINE_ARCH}" in 86.158 + armeb) machine=armeb-unknown ;; 86.159 + arm*) machine=arm-unknown ;; 86.160 + sh3el) machine=shl-unknown ;; 86.161 + sh3eb) machine=sh-unknown ;; 86.162 + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 86.163 + esac 86.164 + # The Operating System including object format, if it has switched 86.165 + # to ELF recently, or will in the future. 86.166 + case "${UNAME_MACHINE_ARCH}" in 86.167 + arm*|i386|m68k|ns32k|sh3*|sparc|vax) 86.168 + eval $set_cc_for_build 86.169 + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 86.170 + | grep __ELF__ >/dev/null 86.171 + then 86.172 + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 86.173 + # Return netbsd for either. FIX? 86.174 + os=netbsd 86.175 + else 86.176 + os=netbsdelf 86.177 + fi 86.178 + ;; 86.179 + *) 86.180 + os=netbsd 86.181 + ;; 86.182 + esac 86.183 + # The OS release 86.184 + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 86.185 + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 86.186 + # contains redundant information, the shorter form: 86.187 + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 86.188 + echo "${machine}-${os}${release}" 86.189 + exit 0 ;; 86.190 + amiga:OpenBSD:*:*) 86.191 + echo m68k-unknown-openbsd${UNAME_RELEASE} 86.192 + exit 0 ;; 86.193 + arc:OpenBSD:*:*) 86.194 + echo mipsel-unknown-openbsd${UNAME_RELEASE} 86.195 + exit 0 ;; 86.196 + hp300:OpenBSD:*:*) 86.197 + echo m68k-unknown-openbsd${UNAME_RELEASE} 86.198 + exit 0 ;; 86.199 + mac68k:OpenBSD:*:*) 86.200 + echo m68k-unknown-openbsd${UNAME_RELEASE} 86.201 + exit 0 ;; 86.202 + macppc:OpenBSD:*:*) 86.203 + echo powerpc-unknown-openbsd${UNAME_RELEASE} 86.204 + exit 0 ;; 86.205 + mvme68k:OpenBSD:*:*) 86.206 + echo m68k-unknown-openbsd${UNAME_RELEASE} 86.207 + exit 0 ;; 86.208 + mvme88k:OpenBSD:*:*) 86.209 + echo m88k-unknown-openbsd${UNAME_RELEASE} 86.210 + exit 0 ;; 86.211 + mvmeppc:OpenBSD:*:*) 86.212 + echo powerpc-unknown-openbsd${UNAME_RELEASE} 86.213 + exit 0 ;; 86.214 + pmax:OpenBSD:*:*) 86.215 + echo mipsel-unknown-openbsd${UNAME_RELEASE} 86.216 + exit 0 ;; 86.217 + sgi:OpenBSD:*:*) 86.218 + echo mipseb-unknown-openbsd${UNAME_RELEASE} 86.219 + exit 0 ;; 86.220 + sun3:OpenBSD:*:*) 86.221 + echo m68k-unknown-openbsd${UNAME_RELEASE} 86.222 + exit 0 ;; 86.223 + wgrisc:OpenBSD:*:*) 86.224 + echo mipsel-unknown-openbsd${UNAME_RELEASE} 86.225 + exit 0 ;; 86.226 + *:OpenBSD:*:*) 86.227 + echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} 86.228 + exit 0 ;; 86.229 + alpha:OSF1:*:*) 86.230 + if test $UNAME_RELEASE = "V4.0"; then 86.231 + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 86.232 + fi 86.233 + # A Vn.n version is a released version. 86.234 + # A Tn.n version is a released field test version. 86.235 + # A Xn.n version is an unreleased experimental baselevel. 86.236 + # 1.2 uses "1.2" for uname -r. 86.237 + eval $set_cc_for_build 86.238 + cat <<EOF >$dummy.s 86.239 + .data 86.240 +\$Lformat: 86.241 + .byte 37,100,45,37,120,10,0 # "%d-%x\n" 86.242 + 86.243 + .text 86.244 + .globl main 86.245 + .align 4 86.246 + .ent main 86.247 +main: 86.248 + .frame \$30,16,\$26,0 86.249 + ldgp \$29,0(\$27) 86.250 + .prologue 1 86.251 + .long 0x47e03d80 # implver \$0 86.252 + lda \$2,-1 86.253 + .long 0x47e20c21 # amask \$2,\$1 86.254 + lda \$16,\$Lformat 86.255 + mov \$0,\$17 86.256 + not \$1,\$18 86.257 + jsr \$26,printf 86.258 + ldgp \$29,0(\$26) 86.259 + mov 0,\$16 86.260 + jsr \$26,exit 86.261 + .end main 86.262 +EOF 86.263 + $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null 86.264 + if test "$?" = 0 ; then 86.265 + case `$dummy` in 86.266 + 0-0) 86.267 + UNAME_MACHINE="alpha" 86.268 + ;; 86.269 + 1-0) 86.270 + UNAME_MACHINE="alphaev5" 86.271 + ;; 86.272 + 1-1) 86.273 + UNAME_MACHINE="alphaev56" 86.274 + ;; 86.275 + 1-101) 86.276 + UNAME_MACHINE="alphapca56" 86.277 + ;; 86.278 + 2-303) 86.279 + UNAME_MACHINE="alphaev6" 86.280 + ;; 86.281 + 2-307) 86.282 + UNAME_MACHINE="alphaev67" 86.283 + ;; 86.284 + 2-1307) 86.285 + UNAME_MACHINE="alphaev68" 86.286 + ;; 86.287 + 3-1307) 86.288 + UNAME_MACHINE="alphaev7" 86.289 + ;; 86.290 + esac 86.291 + fi 86.292 + rm -f $dummy.s $dummy && rmdir $tmpdir 86.293 + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 86.294 + exit 0 ;; 86.295 + Alpha\ *:Windows_NT*:*) 86.296 + # How do we know it's Interix rather than the generic POSIX subsystem? 86.297 + # Should we change UNAME_MACHINE based on the output of uname instead 86.298 + # of the specific Alpha model? 86.299 + echo alpha-pc-interix 86.300 + exit 0 ;; 86.301 + 21064:Windows_NT:50:3) 86.302 + echo alpha-dec-winnt3.5 86.303 + exit 0 ;; 86.304 + Amiga*:UNIX_System_V:4.0:*) 86.305 + echo m68k-unknown-sysv4 86.306 + exit 0;; 86.307 + *:[Aa]miga[Oo][Ss]:*:*) 86.308 + echo ${UNAME_MACHINE}-unknown-amigaos 86.309 + exit 0 ;; 86.310 + *:[Mm]orph[Oo][Ss]:*:*) 86.311 + echo ${UNAME_MACHINE}-unknown-morphos 86.312 + exit 0 ;; 86.313 + *:OS/390:*:*) 86.314 + echo i370-ibm-openedition 86.315 + exit 0 ;; 86.316 + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 86.317 + echo arm-acorn-riscix${UNAME_RELEASE} 86.318 + exit 0;; 86.319 + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 86.320 + echo hppa1.1-hitachi-hiuxmpp 86.321 + exit 0;; 86.322 + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 86.323 + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 86.324 + if test "`(/bin/universe) 2>/dev/null`" = att ; then 86.325 + echo pyramid-pyramid-sysv3 86.326 + else 86.327 + echo pyramid-pyramid-bsd 86.328 + fi 86.329 + exit 0 ;; 86.330 + NILE*:*:*:dcosx) 86.331 + echo pyramid-pyramid-svr4 86.332 + exit 0 ;; 86.333 + DRS?6000:UNIX_SV:4.2*:7*) 86.334 + case `/usr/bin/uname -p` in 86.335 + sparc) echo sparc-icl-nx7 && exit 0 ;; 86.336 + esac ;; 86.337 + sun4H:SunOS:5.*:*) 86.338 + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 86.339 + exit 0 ;; 86.340 + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 86.341 + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 86.342 + exit 0 ;; 86.343 + i86pc:SunOS:5.*:*) 86.344 + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 86.345 + exit 0 ;; 86.346 + sun4*:SunOS:6*:*) 86.347 + # According to config.sub, this is the proper way to canonicalize 86.348 + # SunOS6. Hard to guess exactly what SunOS6 will be like, but 86.349 + # it's likely to be more like Solaris than SunOS4. 86.350 + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 86.351 + exit 0 ;; 86.352 + sun4*:SunOS:*:*) 86.353 + case "`/usr/bin/arch -k`" in 86.354 + Series*|S4*) 86.355 + UNAME_RELEASE=`uname -v` 86.356 + ;; 86.357 + esac 86.358 + # Japanese Language versions have a version number like `4.1.3-JL'. 86.359 + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 86.360 + exit 0 ;; 86.361 + sun3*:SunOS:*:*) 86.362 + echo m68k-sun-sunos${UNAME_RELEASE} 86.363 + exit 0 ;; 86.364 + sun*:*:4.2BSD:*) 86.365 + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 86.366 + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 86.367 + case "`/bin/arch`" in 86.368 + sun3) 86.369 + echo m68k-sun-sunos${UNAME_RELEASE} 86.370 + ;; 86.371 + sun4) 86.372 + echo sparc-sun-sunos${UNAME_RELEASE} 86.373 + ;; 86.374 + esac 86.375 + exit 0 ;; 86.376 + aushp:SunOS:*:*) 86.377 + echo sparc-auspex-sunos${UNAME_RELEASE} 86.378 + exit 0 ;; 86.379 + # The situation for MiNT is a little confusing. The machine name 86.380 + # can be virtually everything (everything which is not 86.381 + # "atarist" or "atariste" at least should have a processor 86.382 + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" 86.383 + # to the lowercase version "mint" (or "freemint"). Finally 86.384 + # the system name "TOS" denotes a system which is actually not 86.385 + # MiNT. But MiNT is downward compatible to TOS, so this should 86.386 + # be no problem. 86.387 + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 86.388 + echo m68k-atari-mint${UNAME_RELEASE} 86.389 + exit 0 ;; 86.390 + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 86.391 + echo m68k-atari-mint${UNAME_RELEASE} 86.392 + exit 0 ;; 86.393 + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 86.394 + echo m68k-atari-mint${UNAME_RELEASE} 86.395 + exit 0 ;; 86.396 + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 86.397 + echo m68k-milan-mint${UNAME_RELEASE} 86.398 + exit 0 ;; 86.399 + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 86.400 + echo m68k-hades-mint${UNAME_RELEASE} 86.401 + exit 0 ;; 86.402 + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 86.403 + echo m68k-unknown-mint${UNAME_RELEASE} 86.404 + exit 0 ;; 86.405 + powerpc:machten:*:*) 86.406 + echo powerpc-apple-machten${UNAME_RELEASE} 86.407 + exit 0 ;; 86.408 + RISC*:Mach:*:*) 86.409 + echo mips-dec-mach_bsd4.3 86.410 + exit 0 ;; 86.411 + RISC*:ULTRIX:*:*) 86.412 + echo mips-dec-ultrix${UNAME_RELEASE} 86.413 + exit 0 ;; 86.414 + VAX*:ULTRIX*:*:*) 86.415 + echo vax-dec-ultrix${UNAME_RELEASE} 86.416 + exit 0 ;; 86.417 + 2020:CLIX:*:* | 2430:CLIX:*:*) 86.418 + echo clipper-intergraph-clix${UNAME_RELEASE} 86.419 + exit 0 ;; 86.420 + mips:*:*:UMIPS | mips:*:*:RISCos) 86.421 + eval $set_cc_for_build 86.422 + sed 's/^ //' << EOF >$dummy.c 86.423 +#ifdef __cplusplus 86.424 +#include <stdio.h> /* for printf() prototype */ 86.425 + int main (int argc, char *argv[]) { 86.426 +#else 86.427 + int main (argc, argv) int argc; char *argv[]; { 86.428 +#endif 86.429 + #if defined (host_mips) && defined (MIPSEB) 86.430 + #if defined (SYSTYPE_SYSV) 86.431 + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); 86.432 + #endif 86.433 + #if defined (SYSTYPE_SVR4) 86.434 + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); 86.435 + #endif 86.436 + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 86.437 + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); 86.438 + #endif 86.439 + #endif 86.440 + exit (-1); 86.441 + } 86.442 +EOF 86.443 + $CC_FOR_BUILD $dummy.c -o $dummy \ 86.444 + && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ 86.445 + && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 86.446 + rm -f $dummy.c $dummy && rmdir $tmpdir 86.447 + echo mips-mips-riscos${UNAME_RELEASE} 86.448 + exit 0 ;; 86.449 + Motorola:PowerMAX_OS:*:*) 86.450 + echo powerpc-motorola-powermax 86.451 + exit 0 ;; 86.452 + Motorola:*:4.3:PL8-*) 86.453 + echo powerpc-harris-powermax 86.454 + exit 0 ;; 86.455 + Night_Hawk:*:*:PowerMAX_OS) 86.456 + echo powerpc-harris-powermax 86.457 + exit 0 ;; 86.458 + Night_Hawk:Power_UNIX:*:*) 86.459 + echo powerpc-harris-powerunix 86.460 + exit 0 ;; 86.461 + m88k:CX/UX:7*:*) 86.462 + echo m88k-harris-cxux7 86.463 + exit 0 ;; 86.464 + m88k:*:4*:R4*) 86.465 + echo m88k-motorola-sysv4 86.466 + exit 0 ;; 86.467 + m88k:*:3*:R3*) 86.468 + echo m88k-motorola-sysv3 86.469 + exit 0 ;; 86.470 + AViiON:dgux:*:*) 86.471 + # DG/UX returns AViiON for all architectures 86.472 + UNAME_PROCESSOR=`/usr/bin/uname -p` 86.473 + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 86.474 + then 86.475 + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 86.476 + [ ${TARGET_BINARY_INTERFACE}x = x ] 86.477 + then 86.478 + echo m88k-dg-dgux${UNAME_RELEASE} 86.479 + else 86.480 + echo m88k-dg-dguxbcs${UNAME_RELEASE} 86.481 + fi 86.482 + else 86.483 + echo i586-dg-dgux${UNAME_RELEASE} 86.484 + fi 86.485 + exit 0 ;; 86.486 + M88*:DolphinOS:*:*) # DolphinOS (SVR3) 86.487 + echo m88k-dolphin-sysv3 86.488 + exit 0 ;; 86.489 + M88*:*:R3*:*) 86.490 + # Delta 88k system running SVR3 86.491 + echo m88k-motorola-sysv3 86.492 + exit 0 ;; 86.493 + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 86.494 + echo m88k-tektronix-sysv3 86.495 + exit 0 ;; 86.496 + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 86.497 + echo m68k-tektronix-bsd 86.498 + exit 0 ;; 86.499 + *:IRIX*:*:*) 86.500 + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 86.501 + exit 0 ;; 86.502 + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 86.503 + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 86.504 + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 86.505 + i*86:AIX:*:*) 86.506 + echo i386-ibm-aix 86.507 + exit 0 ;; 86.508 + ia64:AIX:*:*) 86.509 + if [ -x /usr/bin/oslevel ] ; then 86.510 + IBM_REV=`/usr/bin/oslevel` 86.511 + else 86.512 + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 86.513 + fi 86.514 + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 86.515 + exit 0 ;; 86.516 + *:AIX:2:3) 86.517 + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 86.518 + eval $set_cc_for_build 86.519 + sed 's/^ //' << EOF >$dummy.c 86.520 + #include <sys/systemcfg.h> 86.521 + 86.522 + main() 86.523 + { 86.524 + if (!__power_pc()) 86.525 + exit(1); 86.526 + puts("powerpc-ibm-aix3.2.5"); 86.527 + exit(0); 86.528 + } 86.529 +EOF 86.530 + $CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 86.531 + rm -f $dummy.c $dummy && rmdir $tmpdir 86.532 + echo rs6000-ibm-aix3.2.5 86.533 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 86.534 + echo rs6000-ibm-aix3.2.4 86.535 + else 86.536 + echo rs6000-ibm-aix3.2 86.537 + fi 86.538 + exit 0 ;; 86.539 + *:AIX:*:[45]) 86.540 + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 86.541 + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 86.542 + IBM_ARCH=rs6000 86.543 + else 86.544 + IBM_ARCH=powerpc 86.545 + fi 86.546 + if [ -x /usr/bin/oslevel ] ; then 86.547 + IBM_REV=`/usr/bin/oslevel` 86.548 + else 86.549 + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 86.550 + fi 86.551 + echo ${IBM_ARCH}-ibm-aix${IBM_REV} 86.552 + exit 0 ;; 86.553 + *:AIX:*:*) 86.554 + echo rs6000-ibm-aix 86.555 + exit 0 ;; 86.556 + ibmrt:4.4BSD:*|romp-ibm:BSD:*) 86.557 + echo romp-ibm-bsd4.4 86.558 + exit 0 ;; 86.559 + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 86.560 + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 86.561 + exit 0 ;; # report: romp-ibm BSD 4.3 86.562 + *:BOSX:*:*) 86.563 + echo rs6000-bull-bosx 86.564 + exit 0 ;; 86.565 + DPX/2?00:B.O.S.:*:*) 86.566 + echo m68k-bull-sysv3 86.567 + exit 0 ;; 86.568 + 9000/[34]??:4.3bsd:1.*:*) 86.569 + echo m68k-hp-bsd 86.570 + exit 0 ;; 86.571 + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 86.572 + echo m68k-hp-bsd4.4 86.573 + exit 0 ;; 86.574 + 9000/[34678]??:HP-UX:*:*) 86.575 + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 86.576 + case "${UNAME_MACHINE}" in 86.577 + 9000/31? ) HP_ARCH=m68000 ;; 86.578 + 9000/[34]?? ) HP_ARCH=m68k ;; 86.579 + 9000/[678][0-9][0-9]) 86.580 + if [ -x /usr/bin/getconf ]; then 86.581 + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 86.582 + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 86.583 + case "${sc_cpu_version}" in 86.584 + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 86.585 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 86.586 + 532) # CPU_PA_RISC2_0 86.587 + case "${sc_kernel_bits}" in 86.588 + 32) HP_ARCH="hppa2.0n" ;; 86.589 + 64) HP_ARCH="hppa2.0w" ;; 86.590 + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 86.591 + esac ;; 86.592 + esac 86.593 + fi 86.594 + if [ "${HP_ARCH}" = "" ]; then 86.595 + eval $set_cc_for_build 86.596 + sed 's/^ //' << EOF >$dummy.c 86.597 + 86.598 + #define _HPUX_SOURCE 86.599 + #include <stdlib.h> 86.600 + #include <unistd.h> 86.601 + 86.602 + int main () 86.603 + { 86.604 + #if defined(_SC_KERNEL_BITS) 86.605 + long bits = sysconf(_SC_KERNEL_BITS); 86.606 + #endif 86.607 + long cpu = sysconf (_SC_CPU_VERSION); 86.608 + 86.609 + switch (cpu) 86.610 + { 86.611 + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 86.612 + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 86.613 + case CPU_PA_RISC2_0: 86.614 + #if defined(_SC_KERNEL_BITS) 86.615 + switch (bits) 86.616 + { 86.617 + case 64: puts ("hppa2.0w"); break; 86.618 + case 32: puts ("hppa2.0n"); break; 86.619 + default: puts ("hppa2.0"); break; 86.620 + } break; 86.621 + #else /* !defined(_SC_KERNEL_BITS) */ 86.622 + puts ("hppa2.0"); break; 86.623 + #endif 86.624 + default: puts ("hppa1.0"); break; 86.625 + } 86.626 + exit (0); 86.627 + } 86.628 +EOF 86.629 + (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`$dummy` 86.630 + if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi 86.631 + rm -f $dummy.c $dummy && rmdir $tmpdir 86.632 + fi ;; 86.633 + esac 86.634 + echo ${HP_ARCH}-hp-hpux${HPUX_REV} 86.635 + exit 0 ;; 86.636 + ia64:HP-UX:*:*) 86.637 + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 86.638 + echo ia64-hp-hpux${HPUX_REV} 86.639 + exit 0 ;; 86.640 + 3050*:HI-UX:*:*) 86.641 + eval $set_cc_for_build 86.642 + sed 's/^ //' << EOF >$dummy.c 86.643 + #include <unistd.h> 86.644 + int 86.645 + main () 86.646 + { 86.647 + long cpu = sysconf (_SC_CPU_VERSION); 86.648 + /* The order matters, because CPU_IS_HP_MC68K erroneously returns 86.649 + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct 86.650 + results, however. */ 86.651 + if (CPU_IS_PA_RISC (cpu)) 86.652 + { 86.653 + switch (cpu) 86.654 + { 86.655 + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; 86.656 + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; 86.657 + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; 86.658 + default: puts ("hppa-hitachi-hiuxwe2"); break; 86.659 + } 86.660 + } 86.661 + else if (CPU_IS_HP_MC68K (cpu)) 86.662 + puts ("m68k-hitachi-hiuxwe2"); 86.663 + else puts ("unknown-hitachi-hiuxwe2"); 86.664 + exit (0); 86.665 + } 86.666 +EOF 86.667 + $CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 86.668 + rm -f $dummy.c $dummy && rmdir $tmpdir 86.669 + echo unknown-hitachi-hiuxwe2 86.670 + exit 0 ;; 86.671 + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 86.672 + echo hppa1.1-hp-bsd 86.673 + exit 0 ;; 86.674 + 9000/8??:4.3bsd:*:*) 86.675 + echo hppa1.0-hp-bsd 86.676 + exit 0 ;; 86.677 + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 86.678 + echo hppa1.0-hp-mpeix 86.679 + exit 0 ;; 86.680 + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 86.681 + echo hppa1.1-hp-osf 86.682 + exit 0 ;; 86.683 + hp8??:OSF1:*:*) 86.684 + echo hppa1.0-hp-osf 86.685 + exit 0 ;; 86.686 + i*86:OSF1:*:*) 86.687 + if [ -x /usr/sbin/sysversion ] ; then 86.688 + echo ${UNAME_MACHINE}-unknown-osf1mk 86.689 + else 86.690 + echo ${UNAME_MACHINE}-unknown-osf1 86.691 + fi 86.692 + exit 0 ;; 86.693 + parisc*:Lites*:*:*) 86.694 + echo hppa1.1-hp-lites 86.695 + exit 0 ;; 86.696 + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 86.697 + echo c1-convex-bsd 86.698 + exit 0 ;; 86.699 + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 86.700 + if getsysinfo -f scalar_acc 86.701 + then echo c32-convex-bsd 86.702 + else echo c2-convex-bsd 86.703 + fi 86.704 + exit 0 ;; 86.705 + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 86.706 + echo c34-convex-bsd 86.707 + exit 0 ;; 86.708 + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 86.709 + echo c38-convex-bsd 86.710 + exit 0 ;; 86.711 + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 86.712 + echo c4-convex-bsd 86.713 + exit 0 ;; 86.714 + CRAY*Y-MP:*:*:*) 86.715 + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 86.716 + exit 0 ;; 86.717 + CRAY*[A-Z]90:*:*:*) 86.718 + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 86.719 + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 86.720 + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 86.721 + -e 's/\.[^.]*$/.X/' 86.722 + exit 0 ;; 86.723 + CRAY*TS:*:*:*) 86.724 + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 86.725 + exit 0 ;; 86.726 + CRAY*T3D:*:*:*) 86.727 + echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 86.728 + exit 0 ;; 86.729 + CRAY*T3E:*:*:*) 86.730 + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 86.731 + exit 0 ;; 86.732 + CRAY*SV1:*:*:*) 86.733 + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 86.734 + exit 0 ;; 86.735 + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 86.736 + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 86.737 + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 86.738 + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 86.739 + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 86.740 + exit 0 ;; 86.741 + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 86.742 + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 86.743 + exit 0 ;; 86.744 + sparc*:BSD/OS:*:*) 86.745 + echo sparc-unknown-bsdi${UNAME_RELEASE} 86.746 + exit 0 ;; 86.747 + *:BSD/OS:*:*) 86.748 + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 86.749 + exit 0 ;; 86.750 + *:FreeBSD:*:*) 86.751 + # Determine whether the default compiler uses glibc. 86.752 + eval $set_cc_for_build 86.753 + sed 's/^ //' << EOF >$dummy.c 86.754 + #include <features.h> 86.755 + #if __GLIBC__ >= 2 86.756 + LIBC=gnu 86.757 + #else 86.758 + LIBC= 86.759 + #endif 86.760 +EOF 86.761 + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` 86.762 + rm -f $dummy.c && rmdir $tmpdir 86.763 + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} 86.764 + exit 0 ;; 86.765 + i*:CYGWIN*:*) 86.766 + echo ${UNAME_MACHINE}-pc-cygwin 86.767 + exit 0 ;; 86.768 + i*:MINGW*:*) 86.769 + echo ${UNAME_MACHINE}-pc-mingw32 86.770 + exit 0 ;; 86.771 + i*:PW*:*) 86.772 + echo ${UNAME_MACHINE}-pc-pw32 86.773 + exit 0 ;; 86.774 + x86:Interix*:3*) 86.775 + echo i386-pc-interix3 86.776 + exit 0 ;; 86.777 + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 86.778 + # How do we know it's Interix rather than the generic POSIX subsystem? 86.779 + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 86.780 + # UNAME_MACHINE based on the output of uname instead of i386? 86.781 + echo i386-pc-interix 86.782 + exit 0 ;; 86.783 + i*:UWIN*:*) 86.784 + echo ${UNAME_MACHINE}-pc-uwin 86.785 + exit 0 ;; 86.786 + p*:CYGWIN*:*) 86.787 + echo powerpcle-unknown-cygwin 86.788 + exit 0 ;; 86.789 + prep*:SunOS:5.*:*) 86.790 + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 86.791 + exit 0 ;; 86.792 + *:GNU:*:*) 86.793 + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 86.794 + exit 0 ;; 86.795 + i*86:Minix:*:*) 86.796 + echo ${UNAME_MACHINE}-pc-minix 86.797 + exit 0 ;; 86.798 + arm*:Linux:*:*) 86.799 + echo ${UNAME_MACHINE}-unknown-linux-gnu 86.800 + exit 0 ;; 86.801 + ia64:Linux:*:*) 86.802 + echo ${UNAME_MACHINE}-unknown-linux-gnu 86.803 + exit 0 ;; 86.804 + m68*:Linux:*:*) 86.805 + echo ${UNAME_MACHINE}-unknown-linux-gnu 86.806 + exit 0 ;; 86.807 + mips:Linux:*:*) 86.808 + eval $set_cc_for_build 86.809 + sed 's/^ //' << EOF >$dummy.c 86.810 + #undef CPU 86.811 + #undef mips 86.812 + #undef mipsel 86.813 + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 86.814 + CPU=mipsel 86.815 + #else 86.816 + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 86.817 + CPU=mips 86.818 + #else 86.819 + CPU= 86.820 + #endif 86.821 + #endif 86.822 +EOF 86.823 + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` 86.824 + rm -f $dummy.c && rmdir $tmpdir 86.825 + test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0 86.826 + ;; 86.827 + ppc:Linux:*:*) 86.828 + echo powerpc-unknown-linux-gnu 86.829 + exit 0 ;; 86.830 + ppc64:Linux:*:*) 86.831 + echo powerpc64-unknown-linux-gnu 86.832 + exit 0 ;; 86.833 + alpha:Linux:*:*) 86.834 + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 86.835 + EV5) UNAME_MACHINE=alphaev5 ;; 86.836 + EV56) UNAME_MACHINE=alphaev56 ;; 86.837 + PCA56) UNAME_MACHINE=alphapca56 ;; 86.838 + PCA57) UNAME_MACHINE=alphapca56 ;; 86.839 + EV6) UNAME_MACHINE=alphaev6 ;; 86.840 + EV67) UNAME_MACHINE=alphaev67 ;; 86.841 + EV68*) UNAME_MACHINE=alphaev68 ;; 86.842 + esac 86.843 + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null 86.844 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 86.845 + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 86.846 + exit 0 ;; 86.847 + parisc:Linux:*:* | hppa:Linux:*:*) 86.848 + # Look for CPU level 86.849 + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 86.850 + PA7*) echo hppa1.1-unknown-linux-gnu ;; 86.851 + PA8*) echo hppa2.0-unknown-linux-gnu ;; 86.852 + *) echo hppa-unknown-linux-gnu ;; 86.853 + esac 86.854 + exit 0 ;; 86.855 + parisc64:Linux:*:* | hppa64:Linux:*:*) 86.856 + echo hppa64-unknown-linux-gnu 86.857 + exit 0 ;; 86.858 + s390:Linux:*:* | s390x:Linux:*:*) 86.859 + echo ${UNAME_MACHINE}-ibm-linux 86.860 + exit 0 ;; 86.861 + sh*:Linux:*:*) 86.862 + echo ${UNAME_MACHINE}-unknown-linux-gnu 86.863 + exit 0 ;; 86.864 + sparc:Linux:*:* | sparc64:Linux:*:*) 86.865 + echo ${UNAME_MACHINE}-unknown-linux-gnu 86.866 + exit 0 ;; 86.867 + x86_64:Linux:*:*) 86.868 + echo x86_64-unknown-linux-gnu 86.869 + exit 0 ;; 86.870 + i*86:Linux:*:*) 86.871 + # The BFD linker knows what the default object file format is, so 86.872 + # first see if it will tell us. cd to the root directory to prevent 86.873 + # problems with other programs or directories called `ld' in the path. 86.874 + # Set LC_ALL=C to ensure ld outputs messages in English. 86.875 + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ 86.876 + | sed -ne '/supported targets:/!d 86.877 + s/[ ][ ]*/ /g 86.878 + s/.*supported targets: *// 86.879 + s/ .*// 86.880 + p'` 86.881 + case "$ld_supported_targets" in 86.882 + elf32-i386) 86.883 + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" 86.884 + ;; 86.885 + a.out-i386-linux) 86.886 + echo "${UNAME_MACHINE}-pc-linux-gnuaout" 86.887 + exit 0 ;; 86.888 + coff-i386) 86.889 + echo "${UNAME_MACHINE}-pc-linux-gnucoff" 86.890 + exit 0 ;; 86.891 + "") 86.892 + # Either a pre-BFD a.out linker (linux-gnuoldld) or 86.893 + # one that does not give us useful --help. 86.894 + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" 86.895 + exit 0 ;; 86.896 + esac 86.897 + # Determine whether the default compiler is a.out or elf 86.898 + eval $set_cc_for_build 86.899 + sed 's/^ //' << EOF >$dummy.c 86.900 + #include <features.h> 86.901 + #ifdef __ELF__ 86.902 + # ifdef __GLIBC__ 86.903 + # if __GLIBC__ >= 2 86.904 + LIBC=gnu 86.905 + # else 86.906 + LIBC=gnulibc1 86.907 + # endif 86.908 + # else 86.909 + LIBC=gnulibc1 86.910 + # endif 86.911 + #else 86.912 + #ifdef __INTEL_COMPILER 86.913 + LIBC=gnu 86.914 + #else 86.915 + LIBC=gnuaout 86.916 + #endif 86.917 + #endif 86.918 +EOF 86.919 + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` 86.920 + rm -f $dummy.c && rmdir $tmpdir 86.921 + test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 86.922 + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 86.923 + ;; 86.924 + i*86:DYNIX/ptx:4*:*) 86.925 + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 86.926 + # earlier versions are messed up and put the nodename in both 86.927 + # sysname and nodename. 86.928 + echo i386-sequent-sysv4 86.929 + exit 0 ;; 86.930 + i*86:UNIX_SV:4.2MP:2.*) 86.931 + # Unixware is an offshoot of SVR4, but it has its own version 86.932 + # number series starting with 2... 86.933 + # I am not positive that other SVR4 systems won't match this, 86.934 + # I just have to hope. -- rms. 86.935 + # Use sysv4.2uw... so that sysv4* matches it. 86.936 + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 86.937 + exit 0 ;; 86.938 + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 86.939 + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 86.940 + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 86.941 + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 86.942 + else 86.943 + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 86.944 + fi 86.945 + exit 0 ;; 86.946 + i*86:*:5:[78]*) 86.947 + case `/bin/uname -X | grep "^Machine"` in 86.948 + *486*) UNAME_MACHINE=i486 ;; 86.949 + *Pentium) UNAME_MACHINE=i586 ;; 86.950 + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 86.951 + esac 86.952 + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 86.953 + exit 0 ;; 86.954 + i*86:*:3.2:*) 86.955 + if test -f /usr/options/cb.name; then 86.956 + UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 86.957 + echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 86.958 + elif /bin/uname -X 2>/dev/null >/dev/null ; then 86.959 + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 86.960 + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 86.961 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ 86.962 + && UNAME_MACHINE=i586 86.963 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ 86.964 + && UNAME_MACHINE=i686 86.965 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 86.966 + && UNAME_MACHINE=i686 86.967 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 86.968 + else 86.969 + echo ${UNAME_MACHINE}-pc-sysv32 86.970 + fi 86.971 + exit 0 ;; 86.972 + i*86:*DOS:*:*) 86.973 + echo ${UNAME_MACHINE}-pc-msdosdjgpp 86.974 + exit 0 ;; 86.975 + pc:*:*:*) 86.976 + # Left here for compatibility: 86.977 + # uname -m prints for DJGPP always 'pc', but it prints nothing about 86.978 + # the processor, so we play safe by assuming i386. 86.979 + echo i386-pc-msdosdjgpp 86.980 + exit 0 ;; 86.981 + Intel:Mach:3*:*) 86.982 + echo i386-pc-mach3 86.983 + exit 0 ;; 86.984 + paragon:*:*:*) 86.985 + echo i860-intel-osf1 86.986 + exit 0 ;; 86.987 + i860:*:4.*:*) # i860-SVR4 86.988 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 86.989 + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 86.990 + else # Add other i860-SVR4 vendors below as they are discovered. 86.991 + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 86.992 + fi 86.993 + exit 0 ;; 86.994 + mini*:CTIX:SYS*5:*) 86.995 + # "miniframe" 86.996 + echo m68010-convergent-sysv 86.997 + exit 0 ;; 86.998 + mc68k:UNIX:SYSTEM5:3.51m) 86.999 + echo m68k-convergent-sysv 86.1000 + exit 0 ;; 86.1001 + M68*:*:R3V[567]*:*) 86.1002 + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 86.1003 + 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0) 86.1004 + OS_REL='' 86.1005 + test -r /etc/.relid \ 86.1006 + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 86.1007 + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 86.1008 + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 86.1009 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 86.1010 + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 86.1011 + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 86.1012 + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 86.1013 + && echo i486-ncr-sysv4 && exit 0 ;; 86.1014 + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 86.1015 + echo m68k-unknown-lynxos${UNAME_RELEASE} 86.1016 + exit 0 ;; 86.1017 + mc68030:UNIX_System_V:4.*:*) 86.1018 + echo m68k-atari-sysv4 86.1019 + exit 0 ;; 86.1020 + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) 86.1021 + echo i386-unknown-lynxos${UNAME_RELEASE} 86.1022 + exit 0 ;; 86.1023 + TSUNAMI:LynxOS:2.*:*) 86.1024 + echo sparc-unknown-lynxos${UNAME_RELEASE} 86.1025 + exit 0 ;; 86.1026 + rs6000:LynxOS:2.*:*) 86.1027 + echo rs6000-unknown-lynxos${UNAME_RELEASE} 86.1028 + exit 0 ;; 86.1029 + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) 86.1030 + echo powerpc-unknown-lynxos${UNAME_RELEASE} 86.1031 + exit 0 ;; 86.1032 + SM[BE]S:UNIX_SV:*:*) 86.1033 + echo mips-dde-sysv${UNAME_RELEASE} 86.1034 + exit 0 ;; 86.1035 + RM*:ReliantUNIX-*:*:*) 86.1036 + echo mips-sni-sysv4 86.1037 + exit 0 ;; 86.1038 + RM*:SINIX-*:*:*) 86.1039 + echo mips-sni-sysv4 86.1040 + exit 0 ;; 86.1041 + *:SINIX-*:*:*) 86.1042 + if uname -p 2>/dev/null >/dev/null ; then 86.1043 + UNAME_MACHINE=`(uname -p) 2>/dev/null` 86.1044 + echo ${UNAME_MACHINE}-sni-sysv4 86.1045 + else 86.1046 + echo ns32k-sni-sysv 86.1047 + fi 86.1048 + exit 0 ;; 86.1049 + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 86.1050 + # says <Richard.M.Bartel@ccMail.Census.GOV> 86.1051 + echo i586-unisys-sysv4 86.1052 + exit 0 ;; 86.1053 + *:UNIX_System_V:4*:FTX*) 86.1054 + # From Gerald Hewes <hewes@openmarket.com>. 86.1055 + # How about differentiating between stratus architectures? -djm 86.1056 + echo hppa1.1-stratus-sysv4 86.1057 + exit 0 ;; 86.1058 + *:*:*:FTX*) 86.1059 + # From seanf@swdc.stratus.com. 86.1060 + echo i860-stratus-sysv4 86.1061 + exit 0 ;; 86.1062 + *:VOS:*:*) 86.1063 + # From Paul.Green@stratus.com. 86.1064 + echo hppa1.1-stratus-vos 86.1065 + exit 0 ;; 86.1066 + mc68*:A/UX:*:*) 86.1067 + echo m68k-apple-aux${UNAME_RELEASE} 86.1068 + exit 0 ;; 86.1069 + news*:NEWS-OS:6*:*) 86.1070 + echo mips-sony-newsos6 86.1071 + exit 0 ;; 86.1072 + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 86.1073 + if [ -d /usr/nec ]; then 86.1074 + echo mips-nec-sysv${UNAME_RELEASE} 86.1075 + else 86.1076 + echo mips-unknown-sysv${UNAME_RELEASE} 86.1077 + fi 86.1078 + exit 0 ;; 86.1079 + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 86.1080 + echo powerpc-be-beos 86.1081 + exit 0 ;; 86.1082 + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 86.1083 + echo powerpc-apple-beos 86.1084 + exit 0 ;; 86.1085 + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 86.1086 + echo i586-pc-beos 86.1087 + exit 0 ;; 86.1088 + SX-4:SUPER-UX:*:*) 86.1089 + echo sx4-nec-superux${UNAME_RELEASE} 86.1090 + exit 0 ;; 86.1091 + SX-5:SUPER-UX:*:*) 86.1092 + echo sx5-nec-superux${UNAME_RELEASE} 86.1093 + exit 0 ;; 86.1094 + SX-6:SUPER-UX:*:*) 86.1095 + echo sx6-nec-superux${UNAME_RELEASE} 86.1096 + exit 0 ;; 86.1097 + Power*:Rhapsody:*:*) 86.1098 + echo powerpc-apple-rhapsody${UNAME_RELEASE} 86.1099 + exit 0 ;; 86.1100 + *:Rhapsody:*:*) 86.1101 + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 86.1102 + exit 0 ;; 86.1103 + *:Darwin:*:*) 86.1104 + echo `uname -p`-apple-darwin${UNAME_RELEASE} 86.1105 + exit 0 ;; 86.1106 + *:procnto*:*:* | *:QNX:[0123456789]*:*) 86.1107 + UNAME_PROCESSOR=`uname -p` 86.1108 + if test "$UNAME_PROCESSOR" = "x86"; then 86.1109 + UNAME_PROCESSOR=i386 86.1110 + UNAME_MACHINE=pc 86.1111 + fi 86.1112 + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 86.1113 + exit 0 ;; 86.1114 + *:QNX:*:4*) 86.1115 + echo i386-pc-qnx 86.1116 + exit 0 ;; 86.1117 + NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) 86.1118 + echo nsr-tandem-nsk${UNAME_RELEASE} 86.1119 + exit 0 ;; 86.1120 + *:NonStop-UX:*:*) 86.1121 + echo mips-compaq-nonstopux 86.1122 + exit 0 ;; 86.1123 + BS2000:POSIX*:*:*) 86.1124 + echo bs2000-siemens-sysv 86.1125 + exit 0 ;; 86.1126 + DS/*:UNIX_System_V:*:*) 86.1127 + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 86.1128 + exit 0 ;; 86.1129 + *:Plan9:*:*) 86.1130 + # "uname -m" is not consistent, so use $cputype instead. 386 86.1131 + # is converted to i386 for consistency with other x86 86.1132 + # operating systems. 86.1133 + if test "$cputype" = "386"; then 86.1134 + UNAME_MACHINE=i386 86.1135 + else 86.1136 + UNAME_MACHINE="$cputype" 86.1137 + fi 86.1138 + echo ${UNAME_MACHINE}-unknown-plan9 86.1139 + exit 0 ;; 86.1140 + i*86:OS/2:*:*) 86.1141 + # If we were able to find `uname', then EMX Unix compatibility 86.1142 + # is probably installed. 86.1143 + echo ${UNAME_MACHINE}-pc-os2-emx 86.1144 + exit 0 ;; 86.1145 + *:TOPS-10:*:*) 86.1146 + echo pdp10-unknown-tops10 86.1147 + exit 0 ;; 86.1148 + *:TENEX:*:*) 86.1149 + echo pdp10-unknown-tenex 86.1150 + exit 0 ;; 86.1151 + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 86.1152 + echo pdp10-dec-tops20 86.1153 + exit 0 ;; 86.1154 + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 86.1155 + echo pdp10-xkl-tops20 86.1156 + exit 0 ;; 86.1157 + *:TOPS-20:*:*) 86.1158 + echo pdp10-unknown-tops20 86.1159 + exit 0 ;; 86.1160 + *:ITS:*:*) 86.1161 + echo pdp10-unknown-its 86.1162 + exit 0 ;; 86.1163 + i*86:XTS-300:*:STOP) 86.1164 + echo ${UNAME_MACHINE}-unknown-stop 86.1165 + exit 0 ;; 86.1166 + i*86:atheos:*:*) 86.1167 + echo ${UNAME_MACHINE}-unknown-atheos 86.1168 + exit 0 ;; 86.1169 +esac 86.1170 + 86.1171 +#echo '(No uname command or uname output not recognized.)' 1>&2 86.1172 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 86.1173 + 86.1174 +eval $set_cc_for_build 86.1175 +cat >$dummy.c <<EOF 86.1176 +#ifdef _SEQUENT_ 86.1177 +# include <sys/types.h> 86.1178 +# include <sys/utsname.h> 86.1179 +#endif 86.1180 +main () 86.1181 +{ 86.1182 +#if defined (sony) 86.1183 +#if defined (MIPSEB) 86.1184 + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, 86.1185 + I don't know.... */ 86.1186 + printf ("mips-sony-bsd\n"); exit (0); 86.1187 +#else 86.1188 +#include <sys/param.h> 86.1189 + printf ("m68k-sony-newsos%s\n", 86.1190 +#ifdef NEWSOS4 86.1191 + "4" 86.1192 +#else 86.1193 + "" 86.1194 +#endif 86.1195 + ); exit (0); 86.1196 +#endif 86.1197 +#endif 86.1198 + 86.1199 +#if defined (__arm) && defined (__acorn) && defined (__unix) 86.1200 + printf ("arm-acorn-riscix"); exit (0); 86.1201 +#endif 86.1202 + 86.1203 +#if defined (hp300) && !defined (hpux) 86.1204 + printf ("m68k-hp-bsd\n"); exit (0); 86.1205 +#endif 86.1206 + 86.1207 +#if defined (NeXT) 86.1208 +#if !defined (__ARCHITECTURE__) 86.1209 +#define __ARCHITECTURE__ "m68k" 86.1210 +#endif 86.1211 + int version; 86.1212 + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; 86.1213 + if (version < 4) 86.1214 + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); 86.1215 + else 86.1216 + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); 86.1217 + exit (0); 86.1218 +#endif 86.1219 + 86.1220 +#if defined (MULTIMAX) || defined (n16) 86.1221 +#if defined (UMAXV) 86.1222 + printf ("ns32k-encore-sysv\n"); exit (0); 86.1223 +#else 86.1224 +#if defined (CMU) 86.1225 + printf ("ns32k-encore-mach\n"); exit (0); 86.1226 +#else 86.1227 + printf ("ns32k-encore-bsd\n"); exit (0); 86.1228 +#endif 86.1229 +#endif 86.1230 +#endif 86.1231 + 86.1232 +#if defined (__386BSD__) 86.1233 + printf ("i386-pc-bsd\n"); exit (0); 86.1234 +#endif 86.1235 + 86.1236 +#if defined (sequent) 86.1237 +#if defined (i386) 86.1238 + printf ("i386-sequent-dynix\n"); exit (0); 86.1239 +#endif 86.1240 +#if defined (ns32000) 86.1241 + printf ("ns32k-sequent-dynix\n"); exit (0); 86.1242 +#endif 86.1243 +#endif 86.1244 + 86.1245 +#if defined (_SEQUENT_) 86.1246 + struct utsname un; 86.1247 + 86.1248 + uname(&un); 86.1249 + 86.1250 + if (strncmp(un.version, "V2", 2) == 0) { 86.1251 + printf ("i386-sequent-ptx2\n"); exit (0); 86.1252 + } 86.1253 + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ 86.1254 + printf ("i386-sequent-ptx1\n"); exit (0); 86.1255 + } 86.1256 + printf ("i386-sequent-ptx\n"); exit (0); 86.1257 + 86.1258 +#endif 86.1259 + 86.1260 +#if defined (vax) 86.1261 +# if !defined (ultrix) 86.1262 +# include <sys/param.h> 86.1263 +# if defined (BSD) 86.1264 +# if BSD == 43 86.1265 + printf ("vax-dec-bsd4.3\n"); exit (0); 86.1266 +# else 86.1267 +# if BSD == 199006 86.1268 + printf ("vax-dec-bsd4.3reno\n"); exit (0); 86.1269 +# else 86.1270 + printf ("vax-dec-bsd\n"); exit (0); 86.1271 +# endif 86.1272 +# endif 86.1273 +# else 86.1274 + printf ("vax-dec-bsd\n"); exit (0); 86.1275 +# endif 86.1276 +# else 86.1277 + printf ("vax-dec-ultrix\n"); exit (0); 86.1278 +# endif 86.1279 +#endif 86.1280 + 86.1281 +#if defined (alliant) && defined (i860) 86.1282 + printf ("i860-alliant-bsd\n"); exit (0); 86.1283 +#endif 86.1284 + 86.1285 + exit (1); 86.1286 +} 86.1287 +EOF 86.1288 + 86.1289 +$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 86.1290 +rm -f $dummy.c $dummy && rmdir $tmpdir 86.1291 + 86.1292 +# Apollos put the system type in the environment. 86.1293 + 86.1294 +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } 86.1295 + 86.1296 +# Convex versions that predate uname can use getsysinfo(1) 86.1297 + 86.1298 +if [ -x /usr/convex/getsysinfo ] 86.1299 +then 86.1300 + case `getsysinfo -f cpu_type` in 86.1301 + c1*) 86.1302 + echo c1-convex-bsd 86.1303 + exit 0 ;; 86.1304 + c2*) 86.1305 + if getsysinfo -f scalar_acc 86.1306 + then echo c32-convex-bsd 86.1307 + else echo c2-convex-bsd 86.1308 + fi 86.1309 + exit 0 ;; 86.1310 + c34*) 86.1311 + echo c34-convex-bsd 86.1312 + exit 0 ;; 86.1313 + c38*) 86.1314 + echo c38-convex-bsd 86.1315 + exit 0 ;; 86.1316 + c4*) 86.1317 + echo c4-convex-bsd 86.1318 + exit 0 ;; 86.1319 + esac 86.1320 +fi 86.1321 + 86.1322 +cat >&2 <<EOF 86.1323 +$0: unable to guess system type 86.1324 + 86.1325 +This script, last modified $timestamp, has failed to recognize 86.1326 +the operating system you are using. It is advised that you 86.1327 +download the most up to date version of the config scripts from 86.1328 + 86.1329 + ftp://ftp.gnu.org/pub/gnu/config/ 86.1330 + 86.1331 +If the version you run ($0) is already up to date, please 86.1332 +send the following data and any information you think might be 86.1333 +pertinent to <config-patches@gnu.org> in order to provide the needed 86.1334 +information to handle your system. 86.1335 + 86.1336 +config.guess timestamp = $timestamp 86.1337 + 86.1338 +uname -m = `(uname -m) 2>/dev/null || echo unknown` 86.1339 +uname -r = `(uname -r) 2>/dev/null || echo unknown` 86.1340 +uname -s = `(uname -s) 2>/dev/null || echo unknown` 86.1341 +uname -v = `(uname -v) 2>/dev/null || echo unknown` 86.1342 + 86.1343 +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` 86.1344 +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` 86.1345 + 86.1346 +hostinfo = `(hostinfo) 2>/dev/null` 86.1347 +/bin/universe = `(/bin/universe) 2>/dev/null` 86.1348 +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` 86.1349 +/bin/arch = `(/bin/arch) 2>/dev/null` 86.1350 +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` 86.1351 +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` 86.1352 + 86.1353 +UNAME_MACHINE = ${UNAME_MACHINE} 86.1354 +UNAME_RELEASE = ${UNAME_RELEASE} 86.1355 +UNAME_SYSTEM = ${UNAME_SYSTEM} 86.1356 +UNAME_VERSION = ${UNAME_VERSION} 86.1357 +EOF 86.1358 + 86.1359 +exit 1 86.1360 + 86.1361 +# Local variables: 86.1362 +# eval: (add-hook 'write-file-hooks 'time-stamp) 86.1363 +# time-stamp-start: "timestamp='" 86.1364 +# time-stamp-format: "%:y-%02m-%02d" 86.1365 +# time-stamp-end: "'" 86.1366 +# End:
87.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 87.2 +++ b/config.sub Fri Nov 28 11:21:08 2008 +0100 87.3 @@ -0,0 +1,1470 @@ 87.4 +#! /bin/sh 87.5 +# Configuration validation subroutine script. 87.6 +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 87.7 +# 2000, 2001, 2002 Free Software Foundation, Inc. 87.8 + 87.9 +timestamp='2002-09-05' 87.10 + 87.11 +# This file is (in principle) common to ALL GNU software. 87.12 +# The presence of a machine in this file suggests that SOME GNU software 87.13 +# can handle that machine. It does not imply ALL GNU software can. 87.14 +# 87.15 +# This file is free software; you can redistribute it and/or modify 87.16 +# it under the terms of the GNU General Public License as published by 87.17 +# the Free Software Foundation; either version 2 of the License, or 87.18 +# (at your option) any later version. 87.19 +# 87.20 +# This program is distributed in the hope that it will be useful, 87.21 +# but WITHOUT ANY WARRANTY; without even the implied warranty of 87.22 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 87.23 +# GNU General Public License for more details. 87.24 +# 87.25 +# You should have received a copy of the GNU General Public License 87.26 +# along with this program; if not, write to the Free Software 87.27 +# Foundation, Inc., 59 Temple Place - Suite 330, 87.28 +# Boston, MA 02111-1307, USA. 87.29 + 87.30 +# As a special exception to the GNU General Public License, if you 87.31 +# distribute this file as part of a program that contains a 87.32 +# configuration script generated by Autoconf, you may include it under 87.33 +# the same distribution terms that you use for the rest of that program. 87.34 + 87.35 +# Please send patches to <config-patches@gnu.org>. Submit a context 87.36 +# diff and a properly formatted ChangeLog entry. 87.37 +# 87.38 +# Configuration subroutine to validate and canonicalize a configuration type. 87.39 +# Supply the specified configuration type as an argument. 87.40 +# If it is invalid, we print an error message on stderr and exit with code 1. 87.41 +# Otherwise, we print the canonical config type on stdout and succeed. 87.42 + 87.43 +# This file is supposed to be the same for all GNU packages 87.44 +# and recognize all the CPU types, system types and aliases 87.45 +# that are meaningful with *any* GNU software. 87.46 +# Each package is responsible for reporting which valid configurations 87.47 +# it does not support. The user should be able to distinguish 87.48 +# a failure to support a valid configuration from a meaningless 87.49 +# configuration. 87.50 + 87.51 +# The goal of this file is to map all the various variations of a given 87.52 +# machine specification into a single specification in the form: 87.53 +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM 87.54 +# or in some cases, the newer four-part form: 87.55 +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM 87.56 +# It is wrong to echo any other type of specification. 87.57 + 87.58 +me=`echo "$0" | sed -e 's,.*/,,'` 87.59 + 87.60 +usage="\ 87.61 +Usage: $0 [OPTION] CPU-MFR-OPSYS 87.62 + $0 [OPTION] ALIAS 87.63 + 87.64 +Canonicalize a configuration name. 87.65 + 87.66 +Operation modes: 87.67 + -h, --help print this help, then exit 87.68 + -t, --time-stamp print date of last modification, then exit 87.69 + -v, --version print version number, then exit 87.70 + 87.71 +Report bugs and patches to <config-patches@gnu.org>." 87.72 + 87.73 +version="\ 87.74 +GNU config.sub ($timestamp) 87.75 + 87.76 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 87.77 +Free Software Foundation, Inc. 87.78 + 87.79 +This is free software; see the source for copying conditions. There is NO 87.80 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 87.81 + 87.82 +help=" 87.83 +Try \`$me --help' for more information." 87.84 + 87.85 +# Parse command line 87.86 +while test $# -gt 0 ; do 87.87 + case $1 in 87.88 + --time-stamp | --time* | -t ) 87.89 + echo "$timestamp" ; exit 0 ;; 87.90 + --version | -v ) 87.91 + echo "$version" ; exit 0 ;; 87.92 + --help | --h* | -h ) 87.93 + echo "$usage"; exit 0 ;; 87.94 + -- ) # Stop option processing 87.95 + shift; break ;; 87.96 + - ) # Use stdin as input. 87.97 + break ;; 87.98 + -* ) 87.99 + echo "$me: invalid option $1$help" 87.100 + exit 1 ;; 87.101 + 87.102 + *local*) 87.103 + # First pass through any local machine types. 87.104 + echo $1 87.105 + exit 0;; 87.106 + 87.107 + * ) 87.108 + break ;; 87.109 + esac 87.110 +done 87.111 + 87.112 +case $# in 87.113 + 0) echo "$me: missing argument$help" >&2 87.114 + exit 1;; 87.115 + 1) ;; 87.116 + *) echo "$me: too many arguments$help" >&2 87.117 + exit 1;; 87.118 +esac 87.119 + 87.120 +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). 87.121 +# Here we must recognize all the valid KERNEL-OS combinations. 87.122 +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 87.123 +case $maybe_os in 87.124 + nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*) 87.125 + os=-$maybe_os 87.126 + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` 87.127 + ;; 87.128 + *) 87.129 + basic_machine=`echo $1 | sed 's/-[^-]*$//'` 87.130 + if [ $basic_machine != $1 ] 87.131 + then os=`echo $1 | sed 's/.*-/-/'` 87.132 + else os=; fi 87.133 + ;; 87.134 +esac 87.135 + 87.136 +### Let's recognize common machines as not being operating systems so 87.137 +### that things like config.sub decstation-3100 work. We also 87.138 +### recognize some manufacturers as not being operating systems, so we 87.139 +### can provide default operating systems below. 87.140 +case $os in 87.141 + -sun*os*) 87.142 + # Prevent following clause from handling this invalid input. 87.143 + ;; 87.144 + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ 87.145 + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ 87.146 + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ 87.147 + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ 87.148 + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ 87.149 + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ 87.150 + -apple | -axis) 87.151 + os= 87.152 + basic_machine=$1 87.153 + ;; 87.154 + -sim | -cisco | -oki | -wec | -winbond) 87.155 + os= 87.156 + basic_machine=$1 87.157 + ;; 87.158 + -scout) 87.159 + ;; 87.160 + -wrs) 87.161 + os=-vxworks 87.162 + basic_machine=$1 87.163 + ;; 87.164 + -chorusos*) 87.165 + os=-chorusos 87.166 + basic_machine=$1 87.167 + ;; 87.168 + -chorusrdb) 87.169 + os=-chorusrdb 87.170 + basic_machine=$1 87.171 + ;; 87.172 + -hiux*) 87.173 + os=-hiuxwe2 87.174 + ;; 87.175 + -sco5) 87.176 + os=-sco3.2v5 87.177 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 87.178 + ;; 87.179 + -sco4) 87.180 + os=-sco3.2v4 87.181 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 87.182 + ;; 87.183 + -sco3.2.[4-9]*) 87.184 + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` 87.185 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 87.186 + ;; 87.187 + -sco3.2v[4-9]*) 87.188 + # Don't forget version if it is 3.2v4 or newer. 87.189 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 87.190 + ;; 87.191 + -sco*) 87.192 + os=-sco3.2v2 87.193 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 87.194 + ;; 87.195 + -udk*) 87.196 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 87.197 + ;; 87.198 + -isc) 87.199 + os=-isc2.2 87.200 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 87.201 + ;; 87.202 + -clix*) 87.203 + basic_machine=clipper-intergraph 87.204 + ;; 87.205 + -isc*) 87.206 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 87.207 + ;; 87.208 + -lynx*) 87.209 + os=-lynxos 87.210 + ;; 87.211 + -ptx*) 87.212 + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` 87.213 + ;; 87.214 + -windowsnt*) 87.215 + os=`echo $os | sed -e 's/windowsnt/winnt/'` 87.216 + ;; 87.217 + -psos*) 87.218 + os=-psos 87.219 + ;; 87.220 + -mint | -mint[0-9]*) 87.221 + basic_machine=m68k-atari 87.222 + os=-mint 87.223 + ;; 87.224 +esac 87.225 + 87.226 +# Decode aliases for certain CPU-COMPANY combinations. 87.227 +case $basic_machine in 87.228 + # Recognize the basic CPU types without company name. 87.229 + # Some are omitted here because they have special meanings below. 87.230 + 1750a | 580 \ 87.231 + | a29k \ 87.232 + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ 87.233 + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ 87.234 + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ 87.235 + | clipper \ 87.236 + | d10v | d30v | dlx | dsp16xx \ 87.237 + | fr30 | frv \ 87.238 + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 87.239 + | i370 | i860 | i960 | ia64 \ 87.240 + | ip2k \ 87.241 + | m32r | m68000 | m68k | m88k | mcore \ 87.242 + | mips | mipsbe | mipseb | mipsel | mipsle \ 87.243 + | mips16 \ 87.244 + | mips64 | mips64el \ 87.245 + | mips64vr | mips64vrel \ 87.246 + | mips64orion | mips64orionel \ 87.247 + | mips64vr4100 | mips64vr4100el \ 87.248 + | mips64vr4300 | mips64vr4300el \ 87.249 + | mips64vr5000 | mips64vr5000el \ 87.250 + | mipsisa32 | mipsisa32el \ 87.251 + | mipsisa64 | mipsisa64el \ 87.252 + | mipsisa64sb1 | mipsisa64sb1el \ 87.253 + | mipsisa64sr71k | mipsisa64sr71kel \ 87.254 + | mipstx39 | mipstx39el \ 87.255 + | mn10200 | mn10300 \ 87.256 + | ns16k | ns32k \ 87.257 + | openrisc | or32 \ 87.258 + | pdp10 | pdp11 | pj | pjl \ 87.259 + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ 87.260 + | pyramid \ 87.261 + | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ 87.262 + | sh64 | sh64le \ 87.263 + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ 87.264 + | strongarm \ 87.265 + | tahoe | thumb | tic80 | tron \ 87.266 + | v850 | v850e \ 87.267 + | we32k \ 87.268 + | x86 | xscale | xstormy16 | xtensa \ 87.269 + | z8k) 87.270 + basic_machine=$basic_machine-unknown 87.271 + ;; 87.272 + m6811 | m68hc11 | m6812 | m68hc12) 87.273 + # Motorola 68HC11/12. 87.274 + basic_machine=$basic_machine-unknown 87.275 + os=-none 87.276 + ;; 87.277 + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) 87.278 + ;; 87.279 + 87.280 + # We use `pc' rather than `unknown' 87.281 + # because (1) that's what they normally are, and 87.282 + # (2) the word "unknown" tends to confuse beginning users. 87.283 + i*86 | x86_64) 87.284 + basic_machine=$basic_machine-pc 87.285 + ;; 87.286 + # Object if more than one company name word. 87.287 + *-*-*) 87.288 + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 87.289 + exit 1 87.290 + ;; 87.291 + # Recognize the basic CPU types with company name. 87.292 + 580-* \ 87.293 + | a29k-* \ 87.294 + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ 87.295 + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ 87.296 + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ 87.297 + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ 87.298 + | avr-* \ 87.299 + | bs2000-* \ 87.300 + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \ 87.301 + | clipper-* | cydra-* \ 87.302 + | d10v-* | d30v-* | dlx-* \ 87.303 + | elxsi-* \ 87.304 + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ 87.305 + | h8300-* | h8500-* \ 87.306 + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 87.307 + | i*86-* | i860-* | i960-* | ia64-* \ 87.308 + | ip2k-* \ 87.309 + | m32r-* \ 87.310 + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ 87.311 + | m88110-* | m88k-* | mcore-* \ 87.312 + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ 87.313 + | mips16-* \ 87.314 + | mips64-* | mips64el-* \ 87.315 + | mips64vr-* | mips64vrel-* \ 87.316 + | mips64orion-* | mips64orionel-* \ 87.317 + | mips64vr4100-* | mips64vr4100el-* \ 87.318 + | mips64vr4300-* | mips64vr4300el-* \ 87.319 + | mips64vr5000-* | mips64vr5000el-* \ 87.320 + | mipsisa32-* | mipsisa32el-* \ 87.321 + | mipsisa64-* | mipsisa64el-* \ 87.322 + | mipsisa64sb1-* | mipsisa64sb1el-* \ 87.323 + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ 87.324 + | mipstx39 | mipstx39el \ 87.325 + | none-* | np1-* | ns16k-* | ns32k-* \ 87.326 + | orion-* \ 87.327 + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ 87.328 + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ 87.329 + | pyramid-* \ 87.330 + | romp-* | rs6000-* \ 87.331 + | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \ 87.332 + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 87.333 + | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ 87.334 + | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ 87.335 + | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \ 87.336 + | v850-* | v850e-* | vax-* \ 87.337 + | we32k-* \ 87.338 + | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ 87.339 + | xtensa-* \ 87.340 + | ymp-* \ 87.341 + | z8k-*) 87.342 + ;; 87.343 + # Recognize the various machine names and aliases which stand 87.344 + # for a CPU type and a company and sometimes even an OS. 87.345 + 386bsd) 87.346 + basic_machine=i386-unknown 87.347 + os=-bsd 87.348 + ;; 87.349 + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) 87.350 + basic_machine=m68000-att 87.351 + ;; 87.352 + 3b*) 87.353 + basic_machine=we32k-att 87.354 + ;; 87.355 + a29khif) 87.356 + basic_machine=a29k-amd 87.357 + os=-udi 87.358 + ;; 87.359 + adobe68k) 87.360 + basic_machine=m68010-adobe 87.361 + os=-scout 87.362 + ;; 87.363 + alliant | fx80) 87.364 + basic_machine=fx80-alliant 87.365 + ;; 87.366 + altos | altos3068) 87.367 + basic_machine=m68k-altos 87.368 + ;; 87.369 + am29k) 87.370 + basic_machine=a29k-none 87.371 + os=-bsd 87.372 + ;; 87.373 + amdahl) 87.374 + basic_machine=580-amdahl 87.375 + os=-sysv 87.376 + ;; 87.377 + amiga | amiga-*) 87.378 + basic_machine=m68k-unknown 87.379 + ;; 87.380 + amigaos | amigados) 87.381 + basic_machine=m68k-unknown 87.382 + os=-amigaos 87.383 + ;; 87.384 + amigaunix | amix) 87.385 + basic_machine=m68k-unknown 87.386 + os=-sysv4 87.387 + ;; 87.388 + apollo68) 87.389 + basic_machine=m68k-apollo 87.390 + os=-sysv 87.391 + ;; 87.392 + apollo68bsd) 87.393 + basic_machine=m68k-apollo 87.394 + os=-bsd 87.395 + ;; 87.396 + aux) 87.397 + basic_machine=m68k-apple 87.398 + os=-aux 87.399 + ;; 87.400 + balance) 87.401 + basic_machine=ns32k-sequent 87.402 + os=-dynix 87.403 + ;; 87.404 + c90) 87.405 + basic_machine=c90-cray 87.406 + os=-unicos 87.407 + ;; 87.408 + convex-c1) 87.409 + basic_machine=c1-convex 87.410 + os=-bsd 87.411 + ;; 87.412 + convex-c2) 87.413 + basic_machine=c2-convex 87.414 + os=-bsd 87.415 + ;; 87.416 + convex-c32) 87.417 + basic_machine=c32-convex 87.418 + os=-bsd 87.419 + ;; 87.420 + convex-c34) 87.421 + basic_machine=c34-convex 87.422 + os=-bsd 87.423 + ;; 87.424 + convex-c38) 87.425 + basic_machine=c38-convex 87.426 + os=-bsd 87.427 + ;; 87.428 + cray | j90) 87.429 + basic_machine=j90-cray 87.430 + os=-unicos 87.431 + ;; 87.432 + crds | unos) 87.433 + basic_machine=m68k-crds 87.434 + ;; 87.435 + cris | cris-* | etrax*) 87.436 + basic_machine=cris-axis 87.437 + ;; 87.438 + da30 | da30-*) 87.439 + basic_machine=m68k-da30 87.440 + ;; 87.441 + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) 87.442 + basic_machine=mips-dec 87.443 + ;; 87.444 + decsystem10* | dec10*) 87.445 + basic_machine=pdp10-dec 87.446 + os=-tops10 87.447 + ;; 87.448 + decsystem20* | dec20*) 87.449 + basic_machine=pdp10-dec 87.450 + os=-tops20 87.451 + ;; 87.452 + delta | 3300 | motorola-3300 | motorola-delta \ 87.453 + | 3300-motorola | delta-motorola) 87.454 + basic_machine=m68k-motorola 87.455 + ;; 87.456 + delta88) 87.457 + basic_machine=m88k-motorola 87.458 + os=-sysv3 87.459 + ;; 87.460 + dpx20 | dpx20-*) 87.461 + basic_machine=rs6000-bull 87.462 + os=-bosx 87.463 + ;; 87.464 + dpx2* | dpx2*-bull) 87.465 + basic_machine=m68k-bull 87.466 + os=-sysv3 87.467 + ;; 87.468 + ebmon29k) 87.469 + basic_machine=a29k-amd 87.470 + os=-ebmon 87.471 + ;; 87.472 + elxsi) 87.473 + basic_machine=elxsi-elxsi 87.474 + os=-bsd 87.475 + ;; 87.476 + encore | umax | mmax) 87.477 + basic_machine=ns32k-encore 87.478 + ;; 87.479 + es1800 | OSE68k | ose68k | ose | OSE) 87.480 + basic_machine=m68k-ericsson 87.481 + os=-ose 87.482 + ;; 87.483 + fx2800) 87.484 + basic_machine=i860-alliant 87.485 + ;; 87.486 + genix) 87.487 + basic_machine=ns32k-ns 87.488 + ;; 87.489 + gmicro) 87.490 + basic_machine=tron-gmicro 87.491 + os=-sysv 87.492 + ;; 87.493 + go32) 87.494 + basic_machine=i386-pc 87.495 + os=-go32 87.496 + ;; 87.497 + h3050r* | hiux*) 87.498 + basic_machine=hppa1.1-hitachi 87.499 + os=-hiuxwe2 87.500 + ;; 87.501 + h8300hms) 87.502 + basic_machine=h8300-hitachi 87.503 + os=-hms 87.504 + ;; 87.505 + h8300xray) 87.506 + basic_machine=h8300-hitachi 87.507 + os=-xray 87.508 + ;; 87.509 + h8500hms) 87.510 + basic_machine=h8500-hitachi 87.511 + os=-hms 87.512 + ;; 87.513 + harris) 87.514 + basic_machine=m88k-harris 87.515 + os=-sysv3 87.516 + ;; 87.517 + hp300-*) 87.518 + basic_machine=m68k-hp 87.519 + ;; 87.520 + hp300bsd) 87.521 + basic_machine=m68k-hp 87.522 + os=-bsd 87.523 + ;; 87.524 + hp300hpux) 87.525 + basic_machine=m68k-hp 87.526 + os=-hpux 87.527 + ;; 87.528 + hp3k9[0-9][0-9] | hp9[0-9][0-9]) 87.529 + basic_machine=hppa1.0-hp 87.530 + ;; 87.531 + hp9k2[0-9][0-9] | hp9k31[0-9]) 87.532 + basic_machine=m68000-hp 87.533 + ;; 87.534 + hp9k3[2-9][0-9]) 87.535 + basic_machine=m68k-hp 87.536 + ;; 87.537 + hp9k6[0-9][0-9] | hp6[0-9][0-9]) 87.538 + basic_machine=hppa1.0-hp 87.539 + ;; 87.540 + hp9k7[0-79][0-9] | hp7[0-79][0-9]) 87.541 + basic_machine=hppa1.1-hp 87.542 + ;; 87.543 + hp9k78[0-9] | hp78[0-9]) 87.544 + # FIXME: really hppa2.0-hp 87.545 + basic_machine=hppa1.1-hp 87.546 + ;; 87.547 + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) 87.548 + # FIXME: really hppa2.0-hp 87.549 + basic_machine=hppa1.1-hp 87.550 + ;; 87.551 + hp9k8[0-9][13679] | hp8[0-9][13679]) 87.552 + basic_machine=hppa1.1-hp 87.553 + ;; 87.554 + hp9k8[0-9][0-9] | hp8[0-9][0-9]) 87.555 + basic_machine=hppa1.0-hp 87.556 + ;; 87.557 + hppa-next) 87.558 + os=-nextstep3 87.559 + ;; 87.560 + hppaosf) 87.561 + basic_machine=hppa1.1-hp 87.562 + os=-osf 87.563 + ;; 87.564 + hppro) 87.565 + basic_machine=hppa1.1-hp 87.566 + os=-proelf 87.567 + ;; 87.568 + i370-ibm* | ibm*) 87.569 + basic_machine=i370-ibm 87.570 + ;; 87.571 +# I'm not sure what "Sysv32" means. Should this be sysv3.2? 87.572 + i*86v32) 87.573 + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 87.574 + os=-sysv32 87.575 + ;; 87.576 + i*86v4*) 87.577 + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 87.578 + os=-sysv4 87.579 + ;; 87.580 + i*86v) 87.581 + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 87.582 + os=-sysv 87.583 + ;; 87.584 + i*86sol2) 87.585 + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 87.586 + os=-solaris2 87.587 + ;; 87.588 + i386mach) 87.589 + basic_machine=i386-mach 87.590 + os=-mach 87.591 + ;; 87.592 + i386-vsta | vsta) 87.593 + basic_machine=i386-unknown 87.594 + os=-vsta 87.595 + ;; 87.596 + iris | iris4d) 87.597 + basic_machine=mips-sgi 87.598 + case $os in 87.599 + -irix*) 87.600 + ;; 87.601 + *) 87.602 + os=-irix4 87.603 + ;; 87.604 + esac 87.605 + ;; 87.606 + isi68 | isi) 87.607 + basic_machine=m68k-isi 87.608 + os=-sysv 87.609 + ;; 87.610 + m88k-omron*) 87.611 + basic_machine=m88k-omron 87.612 + ;; 87.613 + magnum | m3230) 87.614 + basic_machine=mips-mips 87.615 + os=-sysv 87.616 + ;; 87.617 + merlin) 87.618 + basic_machine=ns32k-utek 87.619 + os=-sysv 87.620 + ;; 87.621 + mingw32) 87.622 + basic_machine=i386-pc 87.623 + os=-mingw32 87.624 + ;; 87.625 + miniframe) 87.626 + basic_machine=m68000-convergent 87.627 + ;; 87.628 + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) 87.629 + basic_machine=m68k-atari 87.630 + os=-mint 87.631 + ;; 87.632 + mips3*-*) 87.633 + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` 87.634 + ;; 87.635 + mips3*) 87.636 + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown 87.637 + ;; 87.638 + mmix*) 87.639 + basic_machine=mmix-knuth 87.640 + os=-mmixware 87.641 + ;; 87.642 + monitor) 87.643 + basic_machine=m68k-rom68k 87.644 + os=-coff 87.645 + ;; 87.646 + morphos) 87.647 + basic_machine=powerpc-unknown 87.648 + os=-morphos 87.649 + ;; 87.650 + msdos) 87.651 + basic_machine=i386-pc 87.652 + os=-msdos 87.653 + ;; 87.654 + mvs) 87.655 + basic_machine=i370-ibm 87.656 + os=-mvs 87.657 + ;; 87.658 + ncr3000) 87.659 + basic_machine=i486-ncr 87.660 + os=-sysv4 87.661 + ;; 87.662 + netbsd386) 87.663 + basic_machine=i386-unknown 87.664 + os=-netbsd 87.665 + ;; 87.666 + netwinder) 87.667 + basic_machine=armv4l-rebel 87.668 + os=-linux 87.669 + ;; 87.670 + news | news700 | news800 | news900) 87.671 + basic_machine=m68k-sony 87.672 + os=-newsos 87.673 + ;; 87.674 + news1000) 87.675 + basic_machine=m68030-sony 87.676 + os=-newsos 87.677 + ;; 87.678 + news-3600 | risc-news) 87.679 + basic_machine=mips-sony 87.680 + os=-newsos 87.681 + ;; 87.682 + necv70) 87.683 + basic_machine=v70-nec 87.684 + os=-sysv 87.685 + ;; 87.686 + next | m*-next ) 87.687 + basic_machine=m68k-next 87.688 + case $os in 87.689 + -nextstep* ) 87.690 + ;; 87.691 + -ns2*) 87.692 + os=-nextstep2 87.693 + ;; 87.694 + *) 87.695 + os=-nextstep3 87.696 + ;; 87.697 + esac 87.698 + ;; 87.699 + nh3000) 87.700 + basic_machine=m68k-harris 87.701 + os=-cxux 87.702 + ;; 87.703 + nh[45]000) 87.704 + basic_machine=m88k-harris 87.705 + os=-cxux 87.706 + ;; 87.707 + nindy960) 87.708 + basic_machine=i960-intel 87.709 + os=-nindy 87.710 + ;; 87.711 + mon960) 87.712 + basic_machine=i960-intel 87.713 + os=-mon960 87.714 + ;; 87.715 + nonstopux) 87.716 + basic_machine=mips-compaq 87.717 + os=-nonstopux 87.718 + ;; 87.719 + np1) 87.720 + basic_machine=np1-gould 87.721 + ;; 87.722 + nsr-tandem) 87.723 + basic_machine=nsr-tandem 87.724 + ;; 87.725 + op50n-* | op60c-*) 87.726 + basic_machine=hppa1.1-oki 87.727 + os=-proelf 87.728 + ;; 87.729 + or32 | or32-*) 87.730 + basic_machine=or32-unknown 87.731 + os=-coff 87.732 + ;; 87.733 + OSE68000 | ose68000) 87.734 + basic_machine=m68000-ericsson 87.735 + os=-ose 87.736 + ;; 87.737 + os68k) 87.738 + basic_machine=m68k-none 87.739 + os=-os68k 87.740 + ;; 87.741 + pa-hitachi) 87.742 + basic_machine=hppa1.1-hitachi 87.743 + os=-hiuxwe2 87.744 + ;; 87.745 + paragon) 87.746 + basic_machine=i860-intel 87.747 + os=-osf 87.748 + ;; 87.749 + pbd) 87.750 + basic_machine=sparc-tti 87.751 + ;; 87.752 + pbb) 87.753 + basic_machine=m68k-tti 87.754 + ;; 87.755 + pc532 | pc532-*) 87.756 + basic_machine=ns32k-pc532 87.757 + ;; 87.758 + pentium | p5 | k5 | k6 | nexgen | viac3) 87.759 + basic_machine=i586-pc 87.760 + ;; 87.761 + pentiumpro | p6 | 6x86 | athlon | athlon_*) 87.762 + basic_machine=i686-pc 87.763 + ;; 87.764 + pentiumii | pentium2) 87.765 + basic_machine=i686-pc 87.766 + ;; 87.767 + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) 87.768 + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` 87.769 + ;; 87.770 + pentiumpro-* | p6-* | 6x86-* | athlon-*) 87.771 + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 87.772 + ;; 87.773 + pentiumii-* | pentium2-*) 87.774 + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 87.775 + ;; 87.776 + pn) 87.777 + basic_machine=pn-gould 87.778 + ;; 87.779 + power) basic_machine=power-ibm 87.780 + ;; 87.781 + ppc) basic_machine=powerpc-unknown 87.782 + ;; 87.783 + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` 87.784 + ;; 87.785 + ppcle | powerpclittle | ppc-le | powerpc-little) 87.786 + basic_machine=powerpcle-unknown 87.787 + ;; 87.788 + ppcle-* | powerpclittle-*) 87.789 + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` 87.790 + ;; 87.791 + ppc64) basic_machine=powerpc64-unknown 87.792 + ;; 87.793 + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` 87.794 + ;; 87.795 + ppc64le | powerpc64little | ppc64-le | powerpc64-little) 87.796 + basic_machine=powerpc64le-unknown 87.797 + ;; 87.798 + ppc64le-* | powerpc64little-*) 87.799 + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` 87.800 + ;; 87.801 + ps2) 87.802 + basic_machine=i386-ibm 87.803 + ;; 87.804 + pw32) 87.805 + basic_machine=i586-unknown 87.806 + os=-pw32 87.807 + ;; 87.808 + rom68k) 87.809 + basic_machine=m68k-rom68k 87.810 + os=-coff 87.811 + ;; 87.812 + rm[46]00) 87.813 + basic_machine=mips-siemens 87.814 + ;; 87.815 + rtpc | rtpc-*) 87.816 + basic_machine=romp-ibm 87.817 + ;; 87.818 + s390 | s390-*) 87.819 + basic_machine=s390-ibm 87.820 + ;; 87.821 + s390x | s390x-*) 87.822 + basic_machine=s390x-ibm 87.823 + ;; 87.824 + sa29200) 87.825 + basic_machine=a29k-amd 87.826 + os=-udi 87.827 + ;; 87.828 + sb1) 87.829 + basic_machine=mipsisa64sb1-unknown 87.830 + ;; 87.831 + sb1el) 87.832 + basic_machine=mipsisa64sb1el-unknown 87.833 + ;; 87.834 + sequent) 87.835 + basic_machine=i386-sequent 87.836 + ;; 87.837 + sh) 87.838 + basic_machine=sh-hitachi 87.839 + os=-hms 87.840 + ;; 87.841 + sparclite-wrs | simso-wrs) 87.842 + basic_machine=sparclite-wrs 87.843 + os=-vxworks 87.844 + ;; 87.845 + sps7) 87.846 + basic_machine=m68k-bull 87.847 + os=-sysv2 87.848 + ;; 87.849 + spur) 87.850 + basic_machine=spur-unknown 87.851 + ;; 87.852 + st2000) 87.853 + basic_machine=m68k-tandem 87.854 + ;; 87.855 + stratus) 87.856 + basic_machine=i860-stratus 87.857 + os=-sysv4 87.858 + ;; 87.859 + sun2) 87.860 + basic_machine=m68000-sun 87.861 + ;; 87.862 + sun2os3) 87.863 + basic_machine=m68000-sun 87.864 + os=-sunos3 87.865 + ;; 87.866 + sun2os4) 87.867 + basic_machine=m68000-sun 87.868 + os=-sunos4 87.869 + ;; 87.870 + sun3os3) 87.871 + basic_machine=m68k-sun 87.872 + os=-sunos3 87.873 + ;; 87.874 + sun3os4) 87.875 + basic_machine=m68k-sun 87.876 + os=-sunos4 87.877 + ;; 87.878 + sun4os3) 87.879 + basic_machine=sparc-sun 87.880 + os=-sunos3 87.881 + ;; 87.882 + sun4os4) 87.883 + basic_machine=sparc-sun 87.884 + os=-sunos4 87.885 + ;; 87.886 + sun4sol2) 87.887 + basic_machine=sparc-sun 87.888 + os=-solaris2 87.889 + ;; 87.890 + sun3 | sun3-*) 87.891 + basic_machine=m68k-sun 87.892 + ;; 87.893 + sun4) 87.894 + basic_machine=sparc-sun 87.895 + ;; 87.896 + sun386 | sun386i | roadrunner) 87.897 + basic_machine=i386-sun 87.898 + ;; 87.899 + sv1) 87.900 + basic_machine=sv1-cray 87.901 + os=-unicos 87.902 + ;; 87.903 + symmetry) 87.904 + basic_machine=i386-sequent 87.905 + os=-dynix 87.906 + ;; 87.907 + t3d) 87.908 + basic_machine=alpha-cray 87.909 + os=-unicos 87.910 + ;; 87.911 + t3e) 87.912 + basic_machine=alphaev5-cray 87.913 + os=-unicos 87.914 + ;; 87.915 + t90) 87.916 + basic_machine=t90-cray 87.917 + os=-unicos 87.918 + ;; 87.919 + tic4x | c4x*) 87.920 + basic_machine=tic4x-unknown 87.921 + os=-coff 87.922 + ;; 87.923 + tic54x | c54x*) 87.924 + basic_machine=tic54x-unknown 87.925 + os=-coff 87.926 + ;; 87.927 + tx39) 87.928 + basic_machine=mipstx39-unknown 87.929 + ;; 87.930 + tx39el) 87.931 + basic_machine=mipstx39el-unknown 87.932 + ;; 87.933 + toad1) 87.934 + basic_machine=pdp10-xkl 87.935 + os=-tops20 87.936 + ;; 87.937 + tower | tower-32) 87.938 + basic_machine=m68k-ncr 87.939 + ;; 87.940 + udi29k) 87.941 + basic_machine=a29k-amd 87.942 + os=-udi 87.943 + ;; 87.944 + ultra3) 87.945 + basic_machine=a29k-nyu 87.946 + os=-sym1 87.947 + ;; 87.948 + v810 | necv810) 87.949 + basic_machine=v810-nec 87.950 + os=-none 87.951 + ;; 87.952 + vaxv) 87.953 + basic_machine=vax-dec 87.954 + os=-sysv 87.955 + ;; 87.956 + vms) 87.957 + basic_machine=vax-dec 87.958 + os=-vms 87.959 + ;; 87.960 + vpp*|vx|vx-*) 87.961 + basic_machine=f301-fujitsu 87.962 + ;; 87.963 + vxworks960) 87.964 + basic_machine=i960-wrs 87.965 + os=-vxworks 87.966 + ;; 87.967 + vxworks68) 87.968 + basic_machine=m68k-wrs 87.969 + os=-vxworks 87.970 + ;; 87.971 + vxworks29k) 87.972 + basic_machine=a29k-wrs 87.973 + os=-vxworks 87.974 + ;; 87.975 + w65*) 87.976 + basic_machine=w65-wdc 87.977 + os=-none 87.978 + ;; 87.979 + w89k-*) 87.980 + basic_machine=hppa1.1-winbond 87.981 + os=-proelf 87.982 + ;; 87.983 + windows32) 87.984 + basic_machine=i386-pc 87.985 + os=-windows32-msvcrt 87.986 + ;; 87.987 + xps | xps100) 87.988 + basic_machine=xps100-honeywell 87.989 + ;; 87.990 + ymp) 87.991 + basic_machine=ymp-cray 87.992 + os=-unicos 87.993 + ;; 87.994 + z8k-*-coff) 87.995 + basic_machine=z8k-unknown 87.996 + os=-sim 87.997 + ;; 87.998 + none) 87.999 + basic_machine=none-none 87.1000 + os=-none 87.1001 + ;; 87.1002 + 87.1003 +# Here we handle the default manufacturer of certain CPU types. It is in 87.1004 +# some cases the only manufacturer, in others, it is the most popular. 87.1005 + w89k) 87.1006 + basic_machine=hppa1.1-winbond 87.1007 + ;; 87.1008 + op50n) 87.1009 + basic_machine=hppa1.1-oki 87.1010 + ;; 87.1011 + op60c) 87.1012 + basic_machine=hppa1.1-oki 87.1013 + ;; 87.1014 + romp) 87.1015 + basic_machine=romp-ibm 87.1016 + ;; 87.1017 + rs6000) 87.1018 + basic_machine=rs6000-ibm 87.1019 + ;; 87.1020 + vax) 87.1021 + basic_machine=vax-dec 87.1022 + ;; 87.1023 + pdp10) 87.1024 + # there are many clones, so DEC is not a safe bet 87.1025 + basic_machine=pdp10-unknown 87.1026 + ;; 87.1027 + pdp11) 87.1028 + basic_machine=pdp11-dec 87.1029 + ;; 87.1030 + we32k) 87.1031 + basic_machine=we32k-att 87.1032 + ;; 87.1033 + sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele) 87.1034 + basic_machine=sh-unknown 87.1035 + ;; 87.1036 + sh64) 87.1037 + basic_machine=sh64-unknown 87.1038 + ;; 87.1039 + sparc | sparcv9 | sparcv9b) 87.1040 + basic_machine=sparc-sun 87.1041 + ;; 87.1042 + cydra) 87.1043 + basic_machine=cydra-cydrome 87.1044 + ;; 87.1045 + orion) 87.1046 + basic_machine=orion-highlevel 87.1047 + ;; 87.1048 + orion105) 87.1049 + basic_machine=clipper-highlevel 87.1050 + ;; 87.1051 + mac | mpw | mac-mpw) 87.1052 + basic_machine=m68k-apple 87.1053 + ;; 87.1054 + pmac | pmac-mpw) 87.1055 + basic_machine=powerpc-apple 87.1056 + ;; 87.1057 + *-unknown) 87.1058 + # Make sure to match an already-canonicalized machine name. 87.1059 + ;; 87.1060 + *) 87.1061 + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 87.1062 + exit 1 87.1063 + ;; 87.1064 +esac 87.1065 + 87.1066 +# Here we canonicalize certain aliases for manufacturers. 87.1067 +case $basic_machine in 87.1068 + *-digital*) 87.1069 + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` 87.1070 + ;; 87.1071 + *-commodore*) 87.1072 + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` 87.1073 + ;; 87.1074 + *) 87.1075 + ;; 87.1076 +esac 87.1077 + 87.1078 +# Decode manufacturer-specific aliases for certain operating systems. 87.1079 + 87.1080 +if [ x"$os" != x"" ] 87.1081 +then 87.1082 +case $os in 87.1083 + # First match some system type aliases 87.1084 + # that might get confused with valid system types. 87.1085 + # -solaris* is a basic system type, with this one exception. 87.1086 + -solaris1 | -solaris1.*) 87.1087 + os=`echo $os | sed -e 's|solaris1|sunos4|'` 87.1088 + ;; 87.1089 + -solaris) 87.1090 + os=-solaris2 87.1091 + ;; 87.1092 + -svr4*) 87.1093 + os=-sysv4 87.1094 + ;; 87.1095 + -unixware*) 87.1096 + os=-sysv4.2uw 87.1097 + ;; 87.1098 + -gnu/linux*) 87.1099 + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` 87.1100 + ;; 87.1101 + # First accept the basic system types. 87.1102 + # The portable systems comes first. 87.1103 + # Each alternative MUST END IN A *, to match a version number. 87.1104 + # -sysv* is not here because it comes later, after sysvr4. 87.1105 + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ 87.1106 + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ 87.1107 + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ 87.1108 + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ 87.1109 + | -aos* \ 87.1110 + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 87.1111 + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ 87.1112 + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ 87.1113 + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ 87.1114 + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 87.1115 + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 87.1116 + | -chorusos* | -chorusrdb* \ 87.1117 + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 87.1118 + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ 87.1119 + | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ 87.1120 + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ 87.1121 + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ 87.1122 + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ 87.1123 + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*) 87.1124 + # Remember, each alternative MUST END IN *, to match a version number. 87.1125 + ;; 87.1126 + -qnx*) 87.1127 + case $basic_machine in 87.1128 + x86-* | i*86-*) 87.1129 + ;; 87.1130 + *) 87.1131 + os=-nto$os 87.1132 + ;; 87.1133 + esac 87.1134 + ;; 87.1135 + -nto*) 87.1136 + os=-nto-qnx 87.1137 + ;; 87.1138 + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ 87.1139 + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ 87.1140 + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) 87.1141 + ;; 87.1142 + -mac*) 87.1143 + os=`echo $os | sed -e 's|mac|macos|'` 87.1144 + ;; 87.1145 + -linux*) 87.1146 + os=`echo $os | sed -e 's|linux|linux-gnu|'` 87.1147 + ;; 87.1148 + -sunos5*) 87.1149 + os=`echo $os | sed -e 's|sunos5|solaris2|'` 87.1150 + ;; 87.1151 + -sunos6*) 87.1152 + os=`echo $os | sed -e 's|sunos6|solaris3|'` 87.1153 + ;; 87.1154 + -opened*) 87.1155 + os=-openedition 87.1156 + ;; 87.1157 + -wince*) 87.1158 + os=-wince 87.1159 + ;; 87.1160 + -osfrose*) 87.1161 + os=-osfrose 87.1162 + ;; 87.1163 + -osf*) 87.1164 + os=-osf 87.1165 + ;; 87.1166 + -utek*) 87.1167 + os=-bsd 87.1168 + ;; 87.1169 + -dynix*) 87.1170 + os=-bsd 87.1171 + ;; 87.1172 + -acis*) 87.1173 + os=-aos 87.1174 + ;; 87.1175 + -atheos*) 87.1176 + os=-atheos 87.1177 + ;; 87.1178 + -386bsd) 87.1179 + os=-bsd 87.1180 + ;; 87.1181 + -ctix* | -uts*) 87.1182 + os=-sysv 87.1183 + ;; 87.1184 + -nova*) 87.1185 + os=-rtmk-nova 87.1186 + ;; 87.1187 + -ns2 ) 87.1188 + os=-nextstep2 87.1189 + ;; 87.1190 + -nsk*) 87.1191 + os=-nsk 87.1192 + ;; 87.1193 + # Preserve the version number of sinix5. 87.1194 + -sinix5.*) 87.1195 + os=`echo $os | sed -e 's|sinix|sysv|'` 87.1196 + ;; 87.1197 + -sinix*) 87.1198 + os=-sysv4 87.1199 + ;; 87.1200 + -triton*) 87.1201 + os=-sysv3 87.1202 + ;; 87.1203 + -oss*) 87.1204 + os=-sysv3 87.1205 + ;; 87.1206 + -svr4) 87.1207 + os=-sysv4 87.1208 + ;; 87.1209 + -svr3) 87.1210 + os=-sysv3 87.1211 + ;; 87.1212 + -sysvr4) 87.1213 + os=-sysv4 87.1214 + ;; 87.1215 + # This must come after -sysvr4. 87.1216 + -sysv*) 87.1217 + ;; 87.1218 + -ose*) 87.1219 + os=-ose 87.1220 + ;; 87.1221 + -es1800*) 87.1222 + os=-ose 87.1223 + ;; 87.1224 + -xenix) 87.1225 + os=-xenix 87.1226 + ;; 87.1227 + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 87.1228 + os=-mint 87.1229 + ;; 87.1230 + -none) 87.1231 + ;; 87.1232 + *) 87.1233 + # Get rid of the `-' at the beginning of $os. 87.1234 + os=`echo $os | sed 's/[^-]*-//'` 87.1235 + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 87.1236 + exit 1 87.1237 + ;; 87.1238 +esac 87.1239 +else 87.1240 + 87.1241 +# Here we handle the default operating systems that come with various machines. 87.1242 +# The value should be what the vendor currently ships out the door with their 87.1243 +# machine or put another way, the most popular os provided with the machine. 87.1244 + 87.1245 +# Note that if you're going to try to match "-MANUFACTURER" here (say, 87.1246 +# "-sun"), then you have to tell the case statement up towards the top 87.1247 +# that MANUFACTURER isn't an operating system. Otherwise, code above 87.1248 +# will signal an error saying that MANUFACTURER isn't an operating 87.1249 +# system, and we'll never get to this point. 87.1250 + 87.1251 +case $basic_machine in 87.1252 + *-acorn) 87.1253 + os=-riscix1.2 87.1254 + ;; 87.1255 + arm*-rebel) 87.1256 + os=-linux 87.1257 + ;; 87.1258 + arm*-semi) 87.1259 + os=-aout 87.1260 + ;; 87.1261 + # This must come before the *-dec entry. 87.1262 + pdp10-*) 87.1263 + os=-tops20 87.1264 + ;; 87.1265 + pdp11-*) 87.1266 + os=-none 87.1267 + ;; 87.1268 + *-dec | vax-*) 87.1269 + os=-ultrix4.2 87.1270 + ;; 87.1271 + m68*-apollo) 87.1272 + os=-domain 87.1273 + ;; 87.1274 + i386-sun) 87.1275 + os=-sunos4.0.2 87.1276 + ;; 87.1277 + m68000-sun) 87.1278 + os=-sunos3 87.1279 + # This also exists in the configure program, but was not the 87.1280 + # default. 87.1281 + # os=-sunos4 87.1282 + ;; 87.1283 + m68*-cisco) 87.1284 + os=-aout 87.1285 + ;; 87.1286 + mips*-cisco) 87.1287 + os=-elf 87.1288 + ;; 87.1289 + mips*-*) 87.1290 + os=-elf 87.1291 + ;; 87.1292 + or32-*) 87.1293 + os=-coff 87.1294 + ;; 87.1295 + *-tti) # must be before sparc entry or we get the wrong os. 87.1296 + os=-sysv3 87.1297 + ;; 87.1298 + sparc-* | *-sun) 87.1299 + os=-sunos4.1.1 87.1300 + ;; 87.1301 + *-be) 87.1302 + os=-beos 87.1303 + ;; 87.1304 + *-ibm) 87.1305 + os=-aix 87.1306 + ;; 87.1307 + *-wec) 87.1308 + os=-proelf 87.1309 + ;; 87.1310 + *-winbond) 87.1311 + os=-proelf 87.1312 + ;; 87.1313 + *-oki) 87.1314 + os=-proelf 87.1315 + ;; 87.1316 + *-hp) 87.1317 + os=-hpux 87.1318 + ;; 87.1319 + *-hitachi) 87.1320 + os=-hiux 87.1321 + ;; 87.1322 + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) 87.1323 + os=-sysv 87.1324 + ;; 87.1325 + *-cbm) 87.1326 + os=-amigaos 87.1327 + ;; 87.1328 + *-dg) 87.1329 + os=-dgux 87.1330 + ;; 87.1331 + *-dolphin) 87.1332 + os=-sysv3 87.1333 + ;; 87.1334 + m68k-ccur) 87.1335 + os=-rtu 87.1336 + ;; 87.1337 + m88k-omron*) 87.1338 + os=-luna 87.1339 + ;; 87.1340 + *-next ) 87.1341 + os=-nextstep 87.1342 + ;; 87.1343 + *-sequent) 87.1344 + os=-ptx 87.1345 + ;; 87.1346 + *-crds) 87.1347 + os=-unos 87.1348 + ;; 87.1349 + *-ns) 87.1350 + os=-genix 87.1351 + ;; 87.1352 + i370-*) 87.1353 + os=-mvs 87.1354 + ;; 87.1355 + *-next) 87.1356 + os=-nextstep3 87.1357 + ;; 87.1358 + *-gould) 87.1359 + os=-sysv 87.1360 + ;; 87.1361 + *-highlevel) 87.1362 + os=-bsd 87.1363 + ;; 87.1364 + *-encore) 87.1365 + os=-bsd 87.1366 + ;; 87.1367 + *-sgi) 87.1368 + os=-irix 87.1369 + ;; 87.1370 + *-siemens) 87.1371 + os=-sysv4 87.1372 + ;; 87.1373 + *-masscomp) 87.1374 + os=-rtu 87.1375 + ;; 87.1376 + f30[01]-fujitsu | f700-fujitsu) 87.1377 + os=-uxpv 87.1378 + ;; 87.1379 + *-rom68k) 87.1380 + os=-coff 87.1381 + ;; 87.1382 + *-*bug) 87.1383 + os=-coff 87.1384 + ;; 87.1385 + *-apple) 87.1386 + os=-macos 87.1387 + ;; 87.1388 + *-atari*) 87.1389 + os=-mint 87.1390 + ;; 87.1391 + *) 87.1392 + os=-none 87.1393 + ;; 87.1394 +esac 87.1395 +fi 87.1396 + 87.1397 +# Here we handle the case where we know the os, and the CPU type, but not the 87.1398 +# manufacturer. We pick the logical manufacturer. 87.1399 +vendor=unknown 87.1400 +case $basic_machine in 87.1401 + *-unknown) 87.1402 + case $os in 87.1403 + -riscix*) 87.1404 + vendor=acorn 87.1405 + ;; 87.1406 + -sunos*) 87.1407 + vendor=sun 87.1408 + ;; 87.1409 + -aix*) 87.1410 + vendor=ibm 87.1411 + ;; 87.1412 + -beos*) 87.1413 + vendor=be 87.1414 + ;; 87.1415 + -hpux*) 87.1416 + vendor=hp 87.1417 + ;; 87.1418 + -mpeix*) 87.1419 + vendor=hp 87.1420 + ;; 87.1421 + -hiux*) 87.1422 + vendor=hitachi 87.1423 + ;; 87.1424 + -unos*) 87.1425 + vendor=crds 87.1426 + ;; 87.1427 + -dgux*) 87.1428 + vendor=dg 87.1429 + ;; 87.1430 + -luna*) 87.1431 + vendor=omron 87.1432 + ;; 87.1433 + -genix*) 87.1434 + vendor=ns 87.1435 + ;; 87.1436 + -mvs* | -opened*) 87.1437 + vendor=ibm 87.1438 + ;; 87.1439 + -ptx*) 87.1440 + vendor=sequent 87.1441 + ;; 87.1442 + -vxsim* | -vxworks* | -windiss*) 87.1443 + vendor=wrs 87.1444 + ;; 87.1445 + -aux*) 87.1446 + vendor=apple 87.1447 + ;; 87.1448 + -hms*) 87.1449 + vendor=hitachi 87.1450 + ;; 87.1451 + -mpw* | -macos*) 87.1452 + vendor=apple 87.1453 + ;; 87.1454 + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 87.1455 + vendor=atari 87.1456 + ;; 87.1457 + -vos*) 87.1458 + vendor=stratus 87.1459 + ;; 87.1460 + esac 87.1461 + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` 87.1462 + ;; 87.1463 +esac 87.1464 + 87.1465 +echo $basic_machine$os 87.1466 +exit 0 87.1467 + 87.1468 +# Local variables: 87.1469 +# eval: (add-hook 'write-file-hooks 'time-stamp) 87.1470 +# time-stamp-start: "timestamp='" 87.1471 +# time-stamp-format: "%:y-%02m-%02d" 87.1472 +# time-stamp-end: "'" 87.1473 +# End:
88.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 88.2 +++ b/configure.in Fri Nov 28 11:21:08 2008 +0100 88.3 @@ -0,0 +1,120 @@ 88.4 +## 88.5 +## OSSP asgui - Accounting system graphical user interface 88.6 +## Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 88.7 +## Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 88.8 +## Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 88.9 +## Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 88.10 +## 88.11 +## This file is part of OSSP asgui, an accounting system graphical user 88.12 +## interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 88.13 +## 88.14 +## Permission to use, copy, modify, and distribute this software for 88.15 +## any purpose with or without fee is hereby granted, provided that 88.16 +## the above copyright notice and this permission notice appear in all 88.17 +## copies. 88.18 +## 88.19 +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 88.20 +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 88.21 +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 88.22 +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 88.23 +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 88.24 +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 88.25 +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 88.26 +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 88.27 +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 88.28 +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 88.29 +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 88.30 +## SUCH DAMAGE. 88.31 +## 88.32 +## configure.in: Autoconf configure template 88.33 +## 88.34 + 88.35 +dnl Version requirement and information 88.36 +AC_PREREQ(2.53) 88.37 +AC_REVISION(1.0) 88.38 +AC_INIT 88.39 + 88.40 +ASGUI_VERSION_STR=`./shtool version -l c -d long as_version.cpp` 88.41 +./shtool echo -e "Configuring %BOSSP as-gui%b, version %B${ASGUI_VERSION_STR}%b" 88.42 +AC_SUBST(ASGUI_VERSION_STR) 88.43 + 88.44 +dnl Process this file with autoconf 88.45 +AC_CONFIG_HEADERS(ac_config.h) 88.46 +AC_LANG_CPLUSPLUS 88.47 + 88.48 +dnl Checks basic requirements 88.49 +AC_PROG_CXX 88.50 +AC_PROG_CXXCPP 88.51 +AC_PROG_INSTALL 88.52 + 88.53 +AC_PROG_CC 88.54 +AC_PROG_CPP 88.55 +AC_PROG_CC_STDC 88.56 + 88.57 +dnl Checks header requirements 88.58 +AC_HEADER_STDC 88.59 +AC_HEADER_TIME 88.60 +AC_CHECK_HEADERS(sys/sockio.h net/if.h netinet/in.h) 88.61 + 88.62 +dnl Portable thread conf from acx_pthread.m4 autoconf macro 88.63 +ACX_PTHREAD 88.64 +CFLAGS="$CFLAGS $PTHREAD_CFLAGS" 88.65 +CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS" 88.66 +LIBS="`echo $PTHREAD_CFLAGS | sed -e 's;.*\(-[[pmk]]thread[[s]]*\).*;\1;'` $LIBS" 88.67 + 88.68 +dnl Do Qt checks 88.69 +PKG_CHECK_MODULES(QT, qt >= 3.2.0, have_qt=true, AC_MSG_ERROR([No qt installation found])) 88.70 + AC_SUBST(QT_LIBS) 88.71 + AC_SUBST(QT_CFLAGS) 88.72 + 88.73 +dnl Find Qt locations 88.74 +AC_CHECK_QT 88.75 +AC_SUBST(QTBASE) 88.76 +AC_CHECK_UIC 88.77 +AC_SUBST(UIC) 88.78 +AC_CHECK_MOC 88.79 +AC_SUBST(MOC) 88.80 + 88.81 +dnl Check generic libraries 88.82 +AC_CHECK_LIB(dl, dlopen, [LIBS="$LIBS -ldl"]) 88.83 +AC_CHECK_LIB(rt, sched_get_priority_min, [LIBS="$LIBS -lrt"]) 88.84 + 88.85 +dnl Check other requirements 88.86 +AC_PROG_MAKE_SET 88.87 +AC_CHECK_DEBUGGING 88.88 + 88.89 +dnl Check low level network device necessities 88.90 +# AC_CHECK_SIOCGIFHWADDR 88.91 +# AC_CHECK_SIOGHWADDR 88.92 +# AC_CHECK_SIOCGIFCONF 88.93 +# AC_CHECK_SIOCGENADDR 88.94 +# AC_STRUCT_SA_LEN 88.95 + 88.96 +dnl Check for Dmalloc library 88.97 +AC_CHECK_EXTLIB([Dmalloc], 88.98 + dmalloc, dmalloc_debug, dmalloc.h, 88.99 + [AC_DEFINE(WITH_DMALLOC, 1, [Define to 1 if building with Dmalloc])]) 88.100 + 88.101 +dnl Test for the local CORBA implementation 88.102 +AC_TEST_MICO 88.103 +AC_SUBST(CORBABASE) 88.104 + 88.105 +dnl Test for the local SOAP implementation 88.106 +AC_TEST_ESOAP 88.107 +AC_SUBST(SOAPBASE) 88.108 + 88.109 +dnl Check data type sizes of particular architecture 88.110 +dnl Hack: We're really interested in the unsigned types, 88.111 +dnl but they're the same size according to ISO C++ 88.112 +AC_CHECK_SIZEOF(char) 88.113 +AC_CHECK_SIZEOF(short) 88.114 +AC_CHECK_SIZEOF(int) 88.115 +AC_CHECK_SIZEOF(long) 88.116 + 88.117 +enable_shared=no 88.118 +export enable_shared 88.119 +enable_headline=no 88.120 +export enable_headline 88.121 + 88.122 +dnl Make all the necessary Makefiles 88.123 +AC_OUTPUT(Makefile)
89.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 89.2 +++ b/devtool Fri Nov 28 11:21:08 2008 +0100 89.3 @@ -0,0 +1,46 @@ 89.4 +#! /bin/sh 89.5 +## 89.6 +## devtool -- Development Tool 89.7 +## Copyright (c) 2001-2002 Ralf S. Engelschall <rse@engelschall.com> 89.8 +## 89.9 + 89.10 +if [ $# -eq 0 ]; then 89.11 + echo "devtool:USAGE: devtool <command> [<arg> ...]" 1>&2 89.12 + exit 1 89.13 +fi 89.14 + 89.15 +cmd="$1" 89.16 +shift 89.17 + 89.18 +devtoolfunc="./devtool.func" 89.19 + 89.20 +if [ ! -f devtool.conf ]; then 89.21 + echo "devtool:ERROR: no devtool.conf in current directory" 1>&2 89.22 + exit 1 89.23 +fi 89.24 + 89.25 +cmdline=`grep "^%$cmd" devtool.conf` 89.26 +if [ ".$cmdline" = . ]; then 89.27 + echo "devtool:ERROR: command $cmd not found in devtool.conf" 1>&2 89.28 + exit 1 89.29 +fi 89.30 + 89.31 +if [ ".$TMPDIR" != . ]; then 89.32 + tmpdir="$TMPDIR" 89.33 +elif [ ".$TEMPDIR" != . ]; then 89.34 + tmpdir="$TEMPDIR" 89.35 +else 89.36 + tmpdir="/tmp" 89.37 +fi 89.38 +tmpfile="$tmpdir/as-gui.$$.tmp" 89.39 + 89.40 +rm -f $tmpfile 89.41 +touch $tmpfile 89.42 +echo ". $devtoolfunc" >>$tmpfile 89.43 +( sed <devtool.conf -e "1,/^%common/d" -e '/^%.*/,$d' 89.44 + sed <devtool.conf -e "1,/^%$cmd/d" -e '/^%.*/,$d' ) |\ 89.45 +sed -e 's;\([ ]\)@\([a-zA-Z_][a-zA-Z0-9_]*\);\1devtool_\2;' >>$tmpfile 89.46 + 89.47 +sh $tmpfile "$@" 89.48 + 89.49 +rm -f $tmpfile >/dev/null 2>&1 || true
90.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 90.2 +++ b/devtool.conf Fri Nov 28 11:21:08 2008 +0100 90.3 @@ -0,0 +1,65 @@ 90.4 +## 90.5 +## devtool.conf -- Development Tool Configuration 90.6 +## 90.7 + 90.8 +%autogen 90.9 + @autogen shtool 2.0.0 "2.0.*" echo fixperm install mkdir tarball version 90.10 + @autogen autoconf 2.59 "2.5[3-9]*" 90.11 + 90.12 +%autoclean 90.13 + @autoclean shtool 90.14 + @autoclean autoconf 90.15 + 90.16 +%configure 90.17 + ./configure \ 90.18 + --prefix=/tmp/as_gui/ \ 90.19 + --datadir=/tmp/as_gui/share/ \ 90.20 + --with-mico \ 90.21 + --with-esoap \ 90.22 + "$@" 90.23 + 90.24 +%release 90.25 + ./devtool dist 90.26 + ./devtool upload 90.27 + 90.28 +%version 90.29 + ./shtool version -l c -n "OSSP as-gui" -p "asgui_" -e as_version.cpp 90.30 + V=`./shtool version -l c -d long as_version.cpp` 90.31 + sed -e "s/Version .*(.*)/Version $V/g" <README >README.n 90.32 + mv README.n README 90.33 + 90.34 +%tag 90.35 + V=`./shtool version -l c -d short as_version.cpp | sed -e 's;\.;_;g'` 90.36 + echo "+++ tagging CVS sources as ASGUI_${V}" 90.37 + cvs tag ASGUI_${V} 90.38 + 90.39 +%dist 90.40 + echo "+++ cleaning" 90.41 + rm -f as-gui-*.tar.gz 90.42 + ./devtool autoclean 90.43 + echo "+++ generating" 90.44 + ./devtool autogen 90.45 + echo "+++ configuring" 90.46 + ./devtool configure 90.47 + echo "+++ building" 90.48 + make clean all -j4 90.49 + echo "+++ cleaning" 90.50 + make distclean >/dev/null 2>&1 90.51 + echo "+++ fixing" 90.52 + ./shtool fixperm -v . 90.53 + echo "+++ rolling" 90.54 + V=`./shtool version -l c -d short as_version.cpp` 90.55 + ./shtool tarball -o as-gui-${V}.tar.gz -d as-gui-${V} \ 90.56 + -e 'CVS,\.cvsignore,\.[ao]$,^\.,devtool*,*.tar.gz,^#.*,.*~$,*.bak' \ 90.57 + -e 'autom4te\.cache,as_stub.cpp,as_stub.h,as_scrap,as_gfx/*.png' \ 90.58 + -c 'gzip --best' . 90.59 + ls -l as-gui-${V}.tar.gz 90.60 + echo "+++ testing" 90.61 + gunzip <as-gui-${V}.tar.gz | tar tvf - | head -10 90.62 + echo "[...]" 90.63 + gunzip <as-gui-${V}.tar.gz | tar tvf - | tail -10 90.64 + 90.65 +%upload 90.66 + echo "+++ copying to http://as.is.eu.cw.com/source/" 90.67 + V=`./shtool version -l c -d short as_version.cpp` 90.68 + scp as-gui-${V}.tar.gz root@as.de.cw.net:/v/as/web/source/
91.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 91.2 +++ b/devtool.func Fri Nov 28 11:21:08 2008 +0100 91.3 @@ -0,0 +1,72 @@ 91.4 +## 91.5 +## devtool.func -- Development Tool Functions 91.6 +## Copyright (c) 2001-2002 Ralf S. Engelschall <rse@engelschall.com> 91.7 +## 91.8 + 91.9 +devtool_require () { 91.10 + t="$1"; o="$2"; p="$3"; e="$4"; a="$5" 91.11 + v=`($t $o | head -1 | awk "{ print \\\$$p; }") 2>/dev/null` 91.12 + if [ ".$v" = . ]; then 91.13 + echo "devtool:ERROR: unable to determine version of $t" 1>&2 91.14 + exit 1 91.15 + fi 91.16 + case "$v" in 91.17 + $e ) 91.18 + ;; 91.19 + $a ) 91.20 + echo "devtool:WARNING: $t version $v still accepted, although expected $e." 1>&2 91.21 + ;; 91.22 + * ) 91.23 + echo "devtool:ERROR: $t version $e expected, but found $v." 1>&2 91.24 + exit 1 91.25 + ;; 91.26 + esac 91.27 + echo "$v" 91.28 +} 91.29 + 91.30 +devtool_autogen () { 91.31 + tool=$1 91.32 + shift 91.33 + case $tool in 91.34 + autoconf ) 91.35 + autoconf_version=`devtool_require autoconf --version 4 "$1" "$2"` 91.36 + echo "generating (GNU Autoconf $autoconf_version): configure ac_config.h.in" 91.37 + autoconf 91.38 + autoheader 2>&1 | grep -v "is unchanged" 91.39 + rm -rf autom4te.cache >/dev/null 2>&1 91.40 + ;; 91.41 + libtool ) 91.42 + libtoolize_version=`devtool_require libtoolize --version 4 "$1" "$2"` 91.43 + echo "generating (GNU Libtool $libtoolize_version): ltmain.sh, libtool.m4, config.guess, config.sub" 91.44 + libtoolize --force --copy >/dev/null 2>&1 91.45 + cp `libtoolize --force --copy --dry-run | grep "add the contents of" |\ 91.46 + sed -e 's;^[^\`]*\`;;' -e "s;'.*;;"` libtool.m4 91.47 + ;; 91.48 + shtool ) 91.49 + shtoolize_version=`devtool_require shtoolize -v 3 "$1" "$2"` 91.50 + echo "generating (GNU Shtool $shtoolize_version): shtool" 91.51 + shift 91.52 + shift 91.53 + shtoolize -q "$@" 91.54 + ;; 91.55 + esac 91.56 +} 91.57 + 91.58 +devtool_autoclean () { 91.59 + tool=$1 91.60 + shift 91.61 + case $tool in 91.62 + autoconf ) 91.63 + echo "removing: configure ac_config.h.in" 91.64 + rm -f configure ac_config.h.in 91.65 + ;; 91.66 + libtool ) 91.67 + echo "removing: ltmain.sh libtool.m4 config.guess config.sub" 91.68 + rm -f ltmain.sh libtool.m4 config.guess config.sub 91.69 + ;; 91.70 + shtool ) 91.71 + echo "removing: shtool" 91.72 + rm -f shtool 91.73 + ;; 91.74 + esac 91.75 +}