OSSP CVS Repository

ossp - Check-in [3685]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 3685
Date: 2003-Nov-20 12:31:19 (local)
2003-Nov-20 11:31:19 (UTC)
User:ms
Branch:
Comment: Handle the time consuming bureaucracy of changing a company name.
Tickets:
Inspections:
Files:
ossp-pkg/as/as-gui/Makefile.in      1.50 -> 1.51     1 inserted, 1 deleted
ossp-pkg/as/as-gui/README      1.44 -> 1.45     3 inserted, 1 deleted
ossp-pkg/as/as-gui/aclocal.m4      1.16 -> 1.17     5 inserted, 4 deleted
ossp-pkg/as/as-gui/as-accounts.pod      added-> 1.2
ossp-pkg/as/as-gui/as-events.pod      added-> 1.3
ossp-pkg/as/as-gui/as-gui.conf.pod      added-> 1.5
ossp-pkg/as/as-gui/as-gui.pod      added-> 1.7
ossp-pkg/as/as-gui/as_amount.cpp      added-> 1.7
ossp-pkg/as/as-gui/as_amount.h      added-> 1.5
ossp-pkg/as/as-gui/as_assist.cpp      added-> 1.116
ossp-pkg/as/as-gui/as_const.h      added-> 1.62
ossp-pkg/as/as-gui/as_crc.cpp      added-> 1.2
ossp-pkg/as/as-gui/as_crc.h      added-> 1.3
ossp-pkg/as/as-gui/as_dataop.cpp      added-> 1.52
ossp-pkg/as/as-gui/as_datedit.h      added-> 1.2
ossp-pkg/as/as-gui/as_except.cpp      added-> 1.5
ossp-pkg/as/as-gui/as_except.h      added-> 1.4
ossp-pkg/as/as-gui/as_generic.cpp      added-> 1.6
ossp-pkg/as/as-gui/as_generic.h      added-> 1.4
ossp-pkg/as/as-gui/as_gfx/cwlogo.xpm      1.2 -> 1.3     1 inserted, 1 deleted
ossp-pkg/as/as-gui/as_gfx/osspicon.xpm      1.2 -> 1.3     1 inserted, 1 deleted
ossp-pkg/as/as-gui/as_gfx/ossplogo.xpm      1.5 -> 1.6     1 inserted, 1 deleted
ossp-pkg/as/as-gui/as_gfx/refresh.xpm      added-> 1.3
ossp-pkg/as/as-gui/as_gfx/refreshd.xpm      added-> 1.3
ossp-pkg/as/as-gui/as_gfx/revcolour.xpm      added-> 1.2
ossp-pkg/as/as-gui/as_gfx/rowadd.xpm      1.2 -> 1.3     1 inserted, 1 deleted
ossp-pkg/as/as-gui/as_gfx/rowaddd.xpm      added-> 1.4
ossp-pkg/as/as-gui/as_gfx/rowdel.xpm      1.2 -> 1.3     1 inserted, 1 deleted
ossp-pkg/as/as-gui/as_gfx/rowdeld.xpm      added-> 1.3
ossp-pkg/as/as-gui/as_gfx/sync.xpm      added-> 1.3
ossp-pkg/as/as-gui/as_gui.cpp      added-> 1.41
ossp-pkg/as/as-gui/as_gui.h      added-> 1.78
ossp-pkg/as/as-gui/as_gui_test.sh      added-> 1.6
ossp-pkg/as/as-gui/as_helpanel.cpp      added-> 1.3
ossp-pkg/as/as-gui/as_helpanel.h      added-> 1.3
ossp-pkg/as/as-gui/as_main.cpp      added-> 1.15
ossp-pkg/as/as-gui/as_numdial.cpp      added-> 1.2
ossp-pkg/as/as-gui/as_numdial.h      added-> 1.2
ossp-pkg/as/as-gui/as_panel.cpp      added-> 1.17
ossp-pkg/as/as-gui/as_panel.h      added-> 1.15
ossp-pkg/as/as-gui/as_rand.cpp      added-> 1.4
ossp-pkg/as/as-gui/as_rand.h      added-> 1.2
ossp-pkg/as/as-gui/as_reportpanel.cpp      added-> 1.16
ossp-pkg/as/as-gui/as_reportpanel.h      added-> 1.8
ossp-pkg/as/as-gui/as_sfile.cpp      added-> 1.4
ossp-pkg/as/as-gui/as_sfile.h      added-> 1.2
ossp-pkg/as/as-gui/as_slot.cpp      added-> 1.139
ossp-pkg/as/as-gui/as_stub.idl      added-> 1.6
ossp-pkg/as/as-gui/as_table.cpp      added-> 1.24
ossp-pkg/as/as-gui/as_table.h      added-> 1.16
ossp-pkg/as/as-gui/as_tableitem.h      added-> 1.6
ossp-pkg/as/as-gui/as_user.cpp      added-> 1.2
ossp-pkg/as/as-gui/as_user.h      added-> 1.2
ossp-pkg/as/as-gui/as_uuid.cpp      added-> 1.11
ossp-pkg/as/as-gui/as_uuid.h      added-> 1.9
ossp-pkg/as/as-gui/configure.in      1.23 -> 1.24     1 inserted, 1 deleted

ossp-pkg/as/as-gui/Makefile.in 1.50 -> 1.51

--- Makefile.in  2003/11/17 19:03:50     1.50
+++ Makefile.in  2003/11/20 11:31:19     1.51
@@ -1,9 +1,9 @@
 ##
 ##  OSSP asgui - Accounting system graphical user interface
 ##  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
-##  Copyright (c) 2002-2003 Cable & Wireless Deutschland (http://www.cw.com/de/)
 ##  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
 ##  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+##  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
 ##
 ##  This file is part of OSSP asgui, an accounting system graphical user
 ##  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.


ossp-pkg/as/as-gui/README 1.44 -> 1.45

--- README       2003/08/06 18:06:36     1.44
+++ README       2003/11/20 11:31:20     1.45
@@ -16,7 +16,9 @@
   COPYRIGHT AND LICENSE
 
   Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
-  Copyright (c) 2002-2003 Cable & Wireless Deutschland (http://www.cw.com/de/)
+  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
 
   This file is part of OSSP asgui, an accounting system interface which
   can be found at http://www.ossp.org/pkg/tool/asgui/.


ossp-pkg/as/as-gui/aclocal.m4 1.16 -> 1.17

--- aclocal.m4   2003/11/17 19:03:50     1.16
+++ aclocal.m4   2003/11/20 11:31:20     1.17
@@ -1,8 +1,9 @@
 ##
-##  OSSP titraq - Graphical user interface for time accounting
-##  Copyright (c) 2002 Cable & Wireless Deutschland GmbH
-##  Copyright (c) 2002 The OSSP Project <http://www.ossp.org/>
-##  Copyright (c) 2002 Ralf S. Engelschall
+##  OSSP asgui - Accounting system graphical user interface
+##  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+##  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+##  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+##  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
 ##
 ##  This file is part of OSSP GUI, a graphical user interface
 ##  for OSSP which can be found at http://www.ossp.org/


ossp-pkg/as/as-gui/as-accounts.pod -> 1.2

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:20 2024
***************
*** 0 ****
--- 1,103 ----
+ ##
+ ##  OSSP asgui - Accounting system graphical user interface
+ ##  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ ##  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ ##  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ ##  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ ##
+ ##  This file is part of OSSP asgui, an accounting system graphical user
+ ##  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ ##
+ ##  Permission to use, copy, modify, and distribute this software for
+ ##  any purpose with or without fee is hereby granted, provided that
+ ##  the above copyright notice and this permission notice appear in all
+ ##  copies.
+ ##
+ ##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ ##  SUCH DAMAGE.
+ ##
+ ##  as-accounts.pod: Plain old documentation file
+ ##
+ 
+ =pod
+ 
+ =head1 NAME
+ 
+ B<as-accounts> - accounting system accounts document format
+ 
+ =head1 DESCRIPTION
+ 
+ The B<as-gui> application specifies a user entry as including many individual
+ pieces of information (see as-events.5). One of these is the account,
+ describing a task on which the user worked. While the account field may
+ contain free text, there are a number of atomic values which are typical in
+ the work atmosphere. The B<as-gui> client reads a file of such values to offer
+ the user a listing in which to choose from. This file is called the
+ B<as-accounts> file, and is typically named F<accounts>. Its name and location
+ are arbitrary and may be changed through the user preferences.
+ 
+ =head1 FILE FORMAT
+ 
+ The B<as-accounts> file contains ASCII text. The first line consists of an
+ identifier to associate the file type and version. Following text may contain
+ white space, comments, and data tuples.
+ 
+ =head1 GRAMMAR
+ 
+ B<accounts>    ::= B<accid> B<acclist>
+ 
+ B<accid>       ::= "%!AS-ACCOUNTS-" [0-9] '.' [0-9]
+ 
+ B<acclist>     ::= B<acclist> | B<acctuple> | B<comment> | EMPTY
+ 
+ B<comment>     ::= ($#.*)
+ 
+ B<acctuple>    ::= B<acctype> B<accfull> | B<acctype> B<accfull> B<comment>
+ 
+ B<accfull>     ::= B<accfull> | B<accpart>
+ 
+ B<accpart>     ::= B<accsep> B<acctext>
+ 
+ B<acctype>     ::= [RM]
+ 
+ B<accsep>      ::= '/'
+ 
+ B<acctext>     ::= [a-zA-Z0-9_-]*
+ 
+ =head1 EXAMPLE
+ 
+ A typical B<as-accounts> file might look like this:
+ 
+ %!AS-ACCOUNTS-0.6
+ 
+ ## Internet Services (IS) department ##
+ 
+ # General
+ 
+ R /is/common/meeting         # Specify type
+ 
+ R /is/common/meeting/weekly  # A weekly meeting
+ 
+ # Special
+ 
+ R /is/sales/absence/illness  # Approved absence (illness)
+ 
+ R /is/sales/absence/vacation # Approved absence (vacation)
+ 
+ =head1 SEE ALSO
+ 
+ as-gui(1),
+ as-gui.conf(5),
+ as-events(5)
+ 
+ =cut


ossp-pkg/as/as-gui/as-events.pod -> 1.3

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:20 2024
***************
*** 0 ****
--- 1,142 ----
+ ##
+ ##  OSSP asgui - Accounting system graphical user interface
+ ##  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ ##  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ ##  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ ##  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ ##
+ ##  This file is part of OSSP asgui, an accounting system graphical user
+ ##  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ ##
+ ##  Permission to use, copy, modify, and distribute this software for
+ ##  any purpose with or without fee is hereby granted, provided that
+ ##  the above copyright notice and this permission notice appear in all
+ ##  copies.
+ ##
+ ##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ ##  SUCH DAMAGE.
+ ##
+ ##  as-events.pod: Plain old documentation file
+ ##
+ 
+ =pod
+ 
+ =head1 NAME
+ 
+ B<as-events> - accounting system events document format
+ 
+ =head1 DESCRIPTION
+ 
+ The B<as-gui> application takes input from the user and may store its data to
+ a file on the local filesystem. Among other functions, a user can enter time,
+ amounts, remarks, and other values. This data tuple is termed an I<event>, and
+ may either be transmitted to a B<AS> server or stored to a local file. Should
+ it be stored to a local file, the file name is arbitrary and is shown in the
+ title bar of B<as-gui>. Typically, the file is called F<events.as>. In most
+ cases the postfix B<.as> is appended to the file name, although this behaviour
+ can be turned on or off through the user preferences.
+ 
+ =head1 FILE FORMAT
+ 
+ The B<as-events> file contains ASCII text. The first line consists of an
+ identifier to associate the file type and version. Following text may contain
+ white space, comments, and data tuples.
+ 
+ =head1 GRAMMAR
+ 
+ B<events.as>    ::= B<eventsid> B<tuplelist>
+ 
+ B<eventsid>     ::= "%!AS-EVENTS-" [0-9] '.' [0-9]
+ 
+ B<tuplelist>    ::= B<tuplelist> | B<tuple> | B<comment> | EMPTY
+ 
+ B<tuple>        ::= B<user> B<uuid> B<crc> B<revision> B<date> B<begin> B<end> B<amount> B<account> B<remark>
+ 
+ B<comment>      ::= ($#.*)
+ 
+ (* user field *)
+ 
+ B<user>         ::= [a-zA-Z][a-zA-Z0-9]+
+ 
+ (* uuid field *)
+ 
+ B<uuid>         ::= B<hexoctet> '-' B<hexquartet> '-' B<hexquartet> '-' B<hexquartet> '-' B<hextwelvetet>
+ 
+ (* crc field *)
+ 
+ B<crc>          ::= B<hexoctet>
+ 
+ B<hextwelvetet> ::= B<hexoctet> | B<hexquartet>
+ 
+ B<hexoctet>     ::= B<hexquartet> | B<hexquartet>
+ 
+ B<hexquartet>   ::= B<hexdigit> | B<hexdigit> | B<hexdigit> | B<hexdigit>
+ 
+ B<hexdigit>     ::= B<a-zA-Z0-9>
+ 
+ (* revision field *)
+ 
+ B<revision>     ::= [0-9]
+ 
+ (* date field *)
+ 
+ B<date>         ::= [0-9][0-9][0-9][0-9] '-' [01][0-9] '-' [0123][0-9]
+ 
+ (* time fields *)
+ 
+ B<begin>        ::= B<timeval>
+ 
+ B<end>          ::= B<endval>
+  
+ B<amount>       ::= B<timeval>
+ 
+ B<timeval>      ::= B<hourval> ':' B<minuteval>
+ 
+ B<endval>       ::= B<hourinc> ':' B<minuteval>
+ 
+ B<hourval>      ::= [01][0-9]
+ 
+ B<hourinc>      ::= B<hourval> | 2[0-4]
+ 
+ B<minval>       ::= [0-5][0-9]
+ 
+ (* account field *)
+ 
+ B<account>      ::= B<account> | B<accpart>
+ 
+ B<accpart>      ::= B<accsep> B<acctext>
+ 
+ B<accsep>       ::= '/'
+ 
+ B<acctext>      ::= [a-zA-Z0-9_-]*
+ 
+ (* remark field *)
+ 
+ B<remark>       ::= '"' .* '"'
+ 
+ =head1 EXAMPLE
+ 
+ A typical B<as-events> file might look like this:
+ 
+ %!AS-EVENTS-0.6
+ harvey 0ccf1d42-743b-43df-9b5d-202451b3c26f e8f212b6 0 2002-09-30 00:00 00:00 02:00 /it/development/meeting/weekly "Code review"
+ harvey 9c497382-ae88-4a1a-91b5-202451b3c26f c8637e9a 0 2002-09-30 00:00 00:00 00:30 /it/common/office/communication "Conference call"
+ harvey e230eae7-367f-4c35-bee1-202451b3c26f 02cb1abb 0 2002-09-30 00:00 00:00 00:30 /sales/travel/customer "Simontech visit"
+ 
+ =head1 SEE ALSO
+ 
+ as-gui(1),
+ as-gui.conf(5),
+ as-accounts(5),
+ 
+ =cut


ossp-pkg/as/as-gui/as-gui.conf.pod -> 1.5

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:20 2024
***************
*** 0 ****
--- 1,105 ----
+ ##
+ ##  OSSP asgui - Accounting system graphical user interface
+ ##  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ ##  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ ##  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ ##  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ ##
+ ##  This file is part of OSSP asgui, an accounting system graphical user
+ ##  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ ##
+ ##  Permission to use, copy, modify, and distribute this software for
+ ##  any purpose with or without fee is hereby granted, provided that
+ ##  the above copyright notice and this permission notice appear in all
+ ##  copies.
+ ##
+ ##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ ##  SUCH DAMAGE.
+ ##
+ ##  as-gui.conf.pod: Plain old documentation file
+ ##
+ 
+ =pod
+ 
+ =head1 NAME
+ 
+ B<as-gui.conf> - as-gui configuration file
+ 
+ =head1 DESCRIPTION
+ 
+ The B<as-gui> accounting system graphical client allows for easy yet flexible
+ accounting of time and tasks. It caters to a variety of user interface tastes
+ by offering a variety of parameterized options.
+ 
+ Many such options influence direct rendering of the graphical representation
+ of all data and the controls which operate on the data. However, other options
+ control communication with the B<AS> server, local report formatting, or
+ backup storage.
+ 
+ Features such as macro processing, rulesets, account aliases, and session
+ tuning will be stored as well (when these future preferences are finally
+ implemented).
+ 
+ Because of the many possibilities offered, there exists a system to manage the
+ preferences involved. The system depends on the preferences file F<~/.as-gui>,
+ reading data from it when starting and running B<as-gui>, and storing data to
+ it when finally terminating.
+ 
+ The file F<~/.as-gui> is stored in XML format, and is parsed internally by
+ B<as-gui>. There is no need to edit this file, although there is also no harm
+ in doing so. Please remember that all parameters may change during runtime, so
+ it is wisest to edit after quitting the B<as-gui> application.
+ 
+ Attenzione! During runtime, all parameters are user-defined and are accessible
+ by selecting the 'Preferences...' subitem under the 'Edit' menu.
+ 
+ =head1 EXAMPLES
+ 
+ Entries taken from a preferences file:
+ 
+ =over 4
+ 
+ =item B<Location of events file>
+ 
+ <option key="asfile" value="~/.as/events" />
+ 
+ =item B<Location of accounts file>
+ 
+ <option key="accounts" value="~/.as/accounts" />
+ 
+ =item B<Visibility indicator of the amount column>
+ 
+ <option key="amountcolshow" value="true" />
+ 
+ =item B<Width in pixels of the amount column>
+ 
+ <option key="amountcolwidth" value="60" />
+ 
+ =item B<Flag to enable automatic file backups>
+ 
+ <option key="autobackup" value="true" />
+ 
+ =back
+ 
+ =head1 SEE ALSO
+ 
+ as-gui(1),
+ as-events(5),
+ as-accounts(5)
+ 
+ =head1 AUTHOR
+ 
+ Michael Schloh von Bennewitz
+ (michael@schloh.com)
+ 
+ =cut


ossp-pkg/as/as-gui/as-gui.pod -> 1.7

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:20 2024
***************
*** 0 ****
--- 1,242 ----
+ ##
+ ##  OSSP asgui - Accounting system graphical user interface
+ ##  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ ##  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ ##  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ ##  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ ##
+ ##  This file is part of OSSP asgui, an accounting system graphical user
+ ##  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ ##
+ ##  Permission to use, copy, modify, and distribute this software for
+ ##  any purpose with or without fee is hereby granted, provided that
+ ##  the above copyright notice and this permission notice appear in all
+ ##  copies.
+ ##
+ ##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ ##  SUCH DAMAGE.
+ ##
+ ##  as-gui.pod: Plain old documentation file
+ ##
+ 
+ =pod
+ 
+ =head1 NAME
+ 
+ B<as-gui> - accounting system graphical client
+ 
+ =head1 VERSION
+ 
+ as-gui ASGUI_VERSION_STR
+ 
+ =head1 SYNOPSIS
+ 
+ B<as-gui>
+ [I<X11_options>]
+ [I<Qt_options>]
+ [file]
+ 
+ =head1 DESCRIPTION
+ 
+ The B<as-gui> application tracks the time a person spends on a number of
+ predefined tasks. This is the graphical client to the B<Accounting System>
+ server (B<AS>). Although the two can interact through means of interprocess
+ communication mechanisms, B<as-gui> is a generic stand-alone tool which can be
+ used with no B<AS> server.
+ 
+ When logging to a local file, B<as-gui> takes input and waits until receiving
+ a save request from the user. Then, the time sheet will save its data entries
+ to the associated file name (as shown in the title bar).
+ 
+ Logging to a remote B<AS> server follows a similar input scheme, but at least
+ one B<AS> server must be specified in the preferences. A simple 'syncronize
+ with server' operation does the rest.
+ 
+ =head1 X11 OPTIONS
+ 
+ The following I<X11 options> are passed directly to the X11 subsystem, and
+ allow for the typical customization of a X11 application.
+ 
+ =over 4
+ 
+ =item B<-display display>
+ 
+ Sets the X display (host:server.screen). The default value is $DISPLAY.
+ 
+ =item B<-geometry geometry>
+ 
+ Sets the client geometry (width x height + xoffset + yoffset) of the main widget.
+ 
+ =item B<-fn font>, B<-font font>
+ 
+ Defines the application font. The font should be specified using a X logical
+ font description.
+ 
+ =item B<-bg color>, B<-background color>
+ 
+ Sets the default background color and an application palette (light and dark
+ shades are calculated).
+ 
+ =item B<-fg color>, B<-foreground color>
+ 
+ Sets the default foreground color.
+ 
+ =item B<-btn color>, B<-button color>
+ 
+ Sets the default button color.
+ 
+ =item B<-name name>
+ 
+ Sets the application name.
+ 
+ =item B<-title title>
+ 
+ Sets the application title (caption).
+ 
+ =item B<-visual TrueColor>
+ 
+ Forces the application to use a TrueColor visual on an 8-bit display.
+ 
+ =item B<-ncols count>
+ 
+ Limits the number of colors allocated in the color cube on an 8-bit display,
+ if the application is using the QApplication::ManyColor color specification.
+ If count is 216 then a 6x6x6 color cube is used (i.e. 6 levels of red, 6 of
+ green, and 6 of blue). For other values, a cube approximately proportional to
+ a 2x3x1 cube is used.
+ 
+ =item B<-cmap>
+ 
+ Causes the application to install a private color map on an 8-bit display.
+ 
+ =back
+ 
+ =head1 Qt OPTIONS
+ 
+ The following I<Qt options> are used when rendering the graphics of the Qt
+ widget library. They are not compatible with other X11 or Win32 applications,
+ unless they were first linked with the Qt widget library.
+ 
+ =over 4
+ 
+ =item B<-session session>
+ 
+ Restores the application from an earlier session.
+ 
+ =item B<-widgetcount>
+ 
+ Prints debug message at the end about number of widgets left undestroyed and
+ maximum number of widgets existed at the same time.
+ 
+ =back
+ 
+ =head1 ENVIRONMENT
+ 
+ C<USER> The user name to use when accounting.
+ 
+ C<HOME> The full path of the user's home directory.
+ 
+ =head1 RETURN VALUES
+ 
+ C<0> The application exited sucessfully.
+ 
+ C<E<gt>0 or E<lt>0> At least one error ocurred.
+ 
+ =head1 EXAMPLES
+ 
+ Try out some of these examples to customize B<as-gui> from the command
+ line. Remember that options can be mixed.
+ 
+ Initially editing the document 'figo.as':
+ 
+ =over 4
+ 
+ $ as-gui figo.as
+ 
+ =back
+ 
+ Showing lovely blue shades in most widgets:
+ 
+ =over 4
+ 
+ $ as-gui -bg lightblue -fg darkblue
+ 
+ =back
+ 
+ Starting with a title bar that reads 'Yours here':
+ 
+ =over 4
+ 
+ $ as-gui -title 'Yours here'
+ 
+ =back
+ 
+ Displaying graphics output on the host borchert:
+ 
+ =over 4
+ 
+ $ as-gui -display borchert:0.0
+ 
+ =back
+ 
+ A slim window slightly left of the top right corner:
+ 
+ =over 4
+ 
+ $ as-gui -geometry 761x347-120+0
+ 
+ =back
+ 
+ =head1 FILES
+ 
+ =over 4
+ 
+ =item ~/.as-gui
+ 
+ User preferences file.
+ 
+ =item as-gui.html
+ 
+ Help reference.
+ 
+ =back
+ 
+ =head1 BUGS
+ 
+ Sometimes a click on a widget (like a toolbar button) is seemingly ignored.
+ 
+ Consistent row shading is not always maintained. This means that the sharp
+ colour difference between one row and the next may not correctly follow the
+ chosen sort order. Press 'refresh' to work around this problem.
+ 
+ The row highlight may be wrong after resorting the entire time sheet. Press
+ the arrow keys a few times to find the currently selected row if this happens.
+ 
+ Double clicking on column separators should automatically expand or shrink
+ the corresponding column to the exact size needed. Broken.
+ 
+ Local reports only take datewise sorting into account. Attention! This is not
+ a bug, and local reports are almost always only useful when sorted by date.
+ 
+ =head1 SEE ALSO
+ 
+ as-gui.conf(5),
+ as-events(5),
+ as-accounts(5)
+ 
+ =head1 AUTHOR
+ 
+ Michael Schloh von Bennewitz
+ (michael@schloh.com)
+ 
+ =cut


ossp-pkg/as/as-gui/as_amount.cpp -> 1.7

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:20 2024
***************
*** 0 ****
--- 1,70 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  titamount.cpp: ISO C++ implementation
+ //
+ 
+ //#include <qregexp.h>
+ 
+ //#include "as_amount.h"
+ //#include "as_const.h"
+ 
+ 
+ //// Sets a text formatted representation
+ //void AmountBox::setText(const QString &Strval)
+ //{
+ //    int nTotal = 0;                                 // The total amount of minutes
+ //    QRegExp Strexpr("(\\d+):(\\d+)");               // Pattern in amount text
+ //    QString Stramount = QRegExp::escape(Strval);    // Incoming string escaped
+ //
+ //    if (Strval.isEmpty()) {                         // Shortcircuit in the
+ //        this->setValue(0);                          // case of empty string
+ //    }
+ //    else {                                          // Do the real work then
+ //        Strexpr.search(Stramount);
+ //        nTotal = Strexpr.cap(Strexpr.numCaptures() - 1).toInt() * TITRAQ_MINSINHOUR;
+ //        nTotal += Strexpr.cap(Strexpr.numCaptures()).toInt();
+ //        this->setValue(nTotal);
+ //    }
+ //}
+ 
+ //// Return a text formatted representation
+ //QString AmountBox::text(void) const
+ //{
+ //    QString Strfirst, Strsecond;
+ //    int nHours = 0;
+ //    int nMins = this->value();
+ //
+ //    nHours    = nMins / TITRAQ_MINSINHOUR;      // Calculate total hours
+ //    nMins     = nMins % TITRAQ_MINSINHOUR;      // Calculate total minutes
+ //    Strfirst  = trUtf8("%1:").arg(nHours);      // Format the first part
+ //    Strsecond = trUtf8("%1").arg(nMins);        // Format the second part
+ //
+ //    // Pad the resulting concatination before sending it out the back
+ //    return Strfirst.rightJustify(3, '0') + Strsecond.rightJustify(2, '0');
+ //}


ossp-pkg/as/as-gui/as_amount.h -> 1.5

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:20 2024
***************
*** 0 ****
--- 1,55 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  titamount.h: ISO C++ interface
+ //
+ 
+ #ifndef AMOUNTBOX_H
+ #define AMOUNTBOX_H
+ 
+ #include <qdatetimeedit.h>
+ 
+ 
+ class ASTimeEdit : public QTimeEdit
+ {
+ public:
+     ASTimeEdit(QWidget *pParent = 0, const char *szName = 0) : QTimeEdit(pParent, szName)
+     {
+         this->setTime(QTime::QTime(0, 0));
+         this->setDisplay(QTimeEdit::Hours | QTimeEdit::Minutes);
+         this->setAutoAdvance(true);
+ //        this->setMaxValue();
+ //        this->setSuffix(trUtf8(" Mins"));
+ //        this->setButtonSymbols(QSpinBox::PlusMinus);
+ //        this->setSpecialValueText(trUtf8("In progress"));
+     };
+ //    void setText(const QString &);  // Sets a text formatted representation
+ //    QString text(void) const;       // Return a text formatted representation
+ };
+ 
+ #endif // AMOUNTBOX_H


ossp-pkg/as/as-gui/as_assist.cpp -> 1.116

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:20 2024
***************
*** 0 ****
--- 1,1102 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  titassist.cpp: ISO C++ implementation
+ //
+ 
+ // Qt style headers
+ #include <qcdestyle.h>
+ #include <qsgistyle.h>
+ #include <qmotifstyle.h>
+ #include <qmotifplusstyle.h>
+ #include <qplatinumstyle.h>
+ #include <qwindowsstyle.h>
+ 
+ // Qt general headers
+ #include <qtooltip.h>
+ #include <qwhatsthis.h>
+ #include <qstringlist.h>
+ #include <qpopupmenu.h>
+ #include <qcombobox.h>
+ #include <qlistbox.h>
+ #include <qstatusbar.h>
+ #include <qmenubar.h>
+ #include <qcursor.h>
+ #include <qaction.h>
+ #include <qrect.h>
+ #include <qdir.h>
+ 
+ // User interface
+ #include "as_amount.h"          // AmountBox class
+ #include "as_user.h"            // User class
+ #include "as_const.h"           // Application constants
+ #include "as_table.h"           // Class TiTable
+ #include "as_pref.h"            // Class Preferences
+ #include "as_panel.h"           // Class Prefpanel
+ #include "as_datedit.h"         // Class Daydateedit
+ 
+ // Icon pixel maps
+ #include "as_gfx/filenew.xpm"   // static const char *s_kpcFilenew_xpm[]
+ #include "as_gfx/fileopen.xpm"  // static const char *s_kpcFileopen_xpm[]
+ #include "as_gfx/filesave.xpm"  // static const char *s_kpcFilesave_xpm[]
+ #include "as_gfx/filesaved.xpm" // static const char *s_kpcDfilesave_xpm[]
+ #include "as_gfx/cut.xpm"       // static const char *s_kpcCut_xpm[]
+ #include "as_gfx/cutd.xpm"      // static const char *s_kpcDcut_xpm[]
+ #include "as_gfx/copy.xpm"      // static const char *s_kpcCopy_xpm[]
+ #include "as_gfx/copyd.xpm"     // static const char *s_kpcDcopy_xpm[]
+ #include "as_gfx/paste.xpm"     // static const char *s_kpcPaste_xpm[]
+ #include "as_gfx/pasted.xpm"    // static const char *s_kpcDcaste_xpm[]
+ #include "as_gfx/rowadd.xpm"    // static const char *s_kpcRowadd_xpm[]
+ #include "as_gfx/rowdel.xpm"    // static const char *s_kpcRowdel_xpm[]
+ #include "as_gfx/rowaddd.xpm"   // static const char *s_kpcDrowadd_xpm[]
+ #include "as_gfx/rowdeld.xpm"   // static const char *s_kpcDrowdel_xpm[]
+ #include "as_gfx/osspicon.xpm"  // static const char *s_kpcOsspicon_xpm[]
+ #include "as_gfx/whatsthis.xpm" // static const char *s_kpcWhatsthis_xpm[]
+ #include "as_gfx/statok.xpm"    // static const char *s_kpcStatokay_xpm[]
+ #include "as_gfx/staterr.xpm"   // static const char *s_kpcStaterror_xpm[]
+ #include "as_gfx/statwrn.xpm"   // static const char *s_kpcStatwarn_xpm[]
+ #include "as_gfx/statvoid.xpm"  // static const char *s_kpcStatvoid_xpm[]
+ #include "as_gfx/refresh.xpm"   // static const char *s_kpcRefresh_xpm[]
+ #include "as_gfx/refreshd.xpm"  // static const char *s_kpcDrefresh_xpm[]
+ #include "as_gfx/sync.xpm"      // static const char *s_kpcSync_xpm[]
+ #include "as_gfx/syncd.xpm"     // static const char *s_kpcDsync_xpm[]
+ #include "as_gfx/report.xpm"    // static const char *s_kpcReport_xpm[]
+ #include "as_gfx/reportd.xpm"   // static const char *s_kpcDreport_xpm[]
+ #include "as_gfx/prefs.xpm"     // static const char *s_kpcPrefs_xpm[]
+ 
+ 
+ //
+ // Construct the preferences
+ //
+ void Titraqform::setupPrefs(void)
+ {
+     // Can't bootstrap until we know who is using our tool, so find out
+     User Localuser   = User();
+     QString Username = Localuser.getName();
+     QString Homedir  = Localuser.getHomedir();
+ 
+     // Bootstrap a user preferences object from operating system info
+     m_pPrefs = new Preferences(Homedir + QChar('/') +
+                                QString::fromLocal8Bit(TITRAQ_PREFNAME),
+                                QString::fromLocal8Bit(TITRAQ_APPTITLE),
+                                QString::fromLocal8Bit(TITRAQ_PREFVER));
+     if (!m_pPrefs->fileState()) {   // No file was found, so assume a null state
+         if (!Homedir.isEmpty())
+             m_pPrefs->setString(TITRAQ_PREFHOME, Homedir);
+         else
+             m_pPrefs->setString(TITRAQ_PREFHOME, TITRAQ_DEFHOME);
+         if (!Username.isEmpty())
+             m_pPrefs->setString(TITRAQ_PREFUSER, Username);
+         else
+             m_pPrefs->setString(TITRAQ_PREFUSER, TITRAQ_DEFUSER);
+ 
+         m_pPrefs->setNumber(TITRAQ_PREFSTYLE, TITRAQ_STYLECDE);
+         m_pPrefs->setString(TITRAQ_PREFACCOUNTS, TITRAQ_DEFACCOUNTS);
+         m_pPrefs->setString(TITRAQ_PREFASDIR, TITRAQ_DEFASDIR);
+         m_pPrefs->setString(TITRAQ_PREFVIEW, TITRAQ_DEFVIEW);
+         m_pPrefs->setNumber(TITRAQ_PREFSORTCOL, TITRAQ_DEFSORTCOL);
+         m_pPrefs->setBool(TITRAQ_PREFSORTDIR, TITRAQ_DEFSORTDIR);
+         m_pPrefs->setString(TITRAQ_PREFREMOTELOG, TITRAQ_DEFREMOTELOG);
+         m_pPrefs->setString(TITRAQ_PREFLOCALLOG, TITRAQ_DEFLOCALLOG);
+         m_pPrefs->setString(TITRAQ_PREFCORBHOST, TITRAQ_DEFCORBHOST);
+         m_pPrefs->setString(TITRAQ_PREFSOAPHOST, TITRAQ_DEFSOAPHOST);
+         m_pPrefs->setBool(TITRAQ_PREFCORBON, TITRAQ_DEFCORBON);
+         m_pPrefs->setBool(TITRAQ_PREFSOAPON, TITRAQ_DEFSOAPON);
+         m_pPrefs->setBool(TITRAQ_PREFBAKON, TITRAQ_DEFBAKON);
+         m_pPrefs->setBool(TITRAQ_PREFEXTENDON, TITRAQ_DEFEXTENDON);
+         m_pPrefs->setBool(TITRAQ_PREFDETAILON, TITRAQ_DEFDETAILON);
+         m_pPrefs->setBool(TITRAQ_PREFSIGNATON, TITRAQ_DEFSIGNATON);
+         m_pPrefs->setNumber(TITRAQ_PREFREPORTYPE, TITRAQ_DEFREPORTYPE);
+         m_pPrefs->setNumber(TITRAQ_PREFREPORTWEEKS, TITRAQ_DEFREPORTWEEKS);
+         m_pPrefs->setNumber(TITRAQ_PREFREPORTMONTHS, TITRAQ_DEFREPORTMONTHS);
+         m_pPrefs->setNumber(TITRAQ_PREFLIGHTRED, TITRAQ_DEFLIGHTRED);
+         m_pPrefs->setNumber(TITRAQ_PREFLIGHTGREEN, TITRAQ_DEFLIGHTGREEN);
+         m_pPrefs->setNumber(TITRAQ_PREFLIGHTBLUE, TITRAQ_DEFLIGHTBLUE);
+         m_pPrefs->setNumber(TITRAQ_PREFDARKRED, TITRAQ_DEFDARKRED);
+         m_pPrefs->setNumber(TITRAQ_PREFDARKGREEN, TITRAQ_DEFDARKGREEN);
+         m_pPrefs->setNumber(TITRAQ_PREFDARKBLUE, TITRAQ_DEFDARKBLUE);
+         m_pPrefs->flush();  // Write the new conf file
+         QTextStream cerr(stderr, IO_WriteOnly);
+         cerr << trUtf8("Created new preferences file ") << Homedir << QChar('/')
+              << QString::fromLocal8Bit(TITRAQ_PREFNAME) << endl;
+     }
+ 
+     // Use the preferred configuration values to initialize titraq
+     switch (m_pPrefs->getNumber(TITRAQ_PREFSTYLE, TITRAQ_STYLECDE)) {
+     case TITRAQ_STYLECDE:
+         qApp->setStyle(new QCDEStyle);
+         break;
+     case TITRAQ_STYLESGI:
+         qApp->setStyle(new QSGIStyle);
+         break;
+     case TITRAQ_STYLEMOTIF:
+         qApp->setStyle(new QMotifStyle);
+         break;
+     case TITRAQ_STYLEMPLUS:
+         qApp->setStyle(new QMotifPlusStyle);
+         break;
+     case TITRAQ_STYLEPLAT:
+         qApp->setStyle(new QPlatinumStyle);
+         break;
+     case TITRAQ_STYLEMSOFT:
+         qApp->setStyle(new QWindowsStyle);
+         break;
+     default:
+         qApp->setStyle(new QCDEStyle);
+         break;
+     }
+ }
+ 
+ //
+ // Construct various actions
+ //
+ void Titraqform::setupActions(void)
+ {
+     QIconSet Saveiset, Cutiset, Copyiset, Pasteiset;
+     QIconSet Rowaddiset, Rowdeliset, Refreshiset;
+     QIconSet Synciset, Reportiset;
+ 
+     // Construct iconsets to use later for multistate action images
+     Saveiset.setPixmap(QPixmap(s_kpcFilesave_xpm), QIconSet::Automatic, QIconSet::Normal);
+     Saveiset.setPixmap(QPixmap(s_kpcDfilesave_xpm), QIconSet::Automatic, QIconSet::Disabled);
+     Cutiset.setPixmap(QPixmap(s_kpcCut_xpm), QIconSet::Automatic, QIconSet::Normal);
+     Cutiset.setPixmap(QPixmap(s_kpcDcut_xpm), QIconSet::Automatic, QIconSet::Disabled);
+     Copyiset.setPixmap(QPixmap(s_kpcCopy_xpm), QIconSet::Automatic, QIconSet::Normal);
+     Copyiset.setPixmap(QPixmap(s_kpcDcopy_xpm), QIconSet::Automatic, QIconSet::Disabled);
+     Pasteiset.setPixmap(QPixmap(s_kpcPaste_xpm), QIconSet::Automatic, QIconSet::Normal);
+     Pasteiset.setPixmap(QPixmap(s_kpcDpaste_xpm), QIconSet::Automatic, QIconSet::Disabled);
+     Rowaddiset.setPixmap(QPixmap(s_kpcRowadd_xpm), QIconSet::Automatic, QIconSet::Normal);
+     Rowaddiset.setPixmap(QPixmap(s_kpcDrowadd_xpm), QIconSet::Automatic, QIconSet::Disabled);
+     Rowdeliset.setPixmap(QPixmap(s_kpcRowdel_xpm), QIconSet::Automatic, QIconSet::Normal);
+     Rowdeliset.setPixmap(QPixmap(s_kpcDrowdel_xpm), QIconSet::Automatic, QIconSet::Disabled);
+     Refreshiset.setPixmap(QPixmap(s_kpcRefresh_xpm), QIconSet::Automatic, QIconSet::Normal);
+     Refreshiset.setPixmap(QPixmap(s_kpcDrefresh_xpm), QIconSet::Automatic, QIconSet::Disabled);
+     Synciset.setPixmap(QPixmap(s_kpcSync_xpm), QIconSet::Automatic, QIconSet::Normal);
+     Synciset.setPixmap(QPixmap(s_kpcDsync_xpm), QIconSet::Automatic, QIconSet::Disabled);
+     Reportiset.setPixmap(QPixmap(s_kpcReport_xpm), QIconSet::Automatic, QIconSet::Normal);
+     Reportiset.setPixmap(QPixmap(s_kpcDreport_xpm), QIconSet::Automatic, QIconSet::Disabled);
+ 
+     // First associate the graphics with MIME types
+     QMimeSourceFactory::defaultFactory()->setPixmap("osspicon", QPixmap(s_kpcOsspicon_xpm));
+     QMimeSourceFactory::defaultFactory()->setPixmap("filenew", QPixmap(s_kpcFilenew_xpm));
+     QMimeSourceFactory::defaultFactory()->setPixmap("fileopen", QPixmap(s_kpcFileopen_xpm));
+     QMimeSourceFactory::defaultFactory()->setPixmap("filesave", QPixmap(s_kpcFilesave_xpm));
+     QMimeSourceFactory::defaultFactory()->setPixmap("cut", QPixmap(s_kpcCut_xpm));
+     QMimeSourceFactory::defaultFactory()->setPixmap("copy", QPixmap(s_kpcCopy_xpm));
+     QMimeSourceFactory::defaultFactory()->setPixmap("paste", QPixmap(s_kpcPaste_xpm));
+     QMimeSourceFactory::defaultFactory()->setPixmap("rowadd", QPixmap(s_kpcRowadd_xpm));
+     QMimeSourceFactory::defaultFactory()->setPixmap("rowdel", QPixmap(s_kpcRowdel_xpm));
+     QMimeSourceFactory::defaultFactory()->setPixmap("refresh", QPixmap(s_kpcRefresh_xpm));
+     QMimeSourceFactory::defaultFactory()->setPixmap("syncrpc", QPixmap(s_kpcSync_xpm));
+     QMimeSourceFactory::defaultFactory()->setPixmap("locreport", QPixmap(s_kpcReport_xpm));
+     QMimeSourceFactory::defaultFactory()->setPixmap("prefs", QPixmap(s_kpcPrefs_xpm));
+ 
+     // File new action
+     m_pFilenewact = new QAction(trUtf8("New File"), QPixmap(s_kpcFilenew_xpm), trUtf8("&New"), CTRL+Key_N, this, "New");
+     if (m_pFilenewact == NULL)  // Sanity check
+         throw Genexcept("Main window file new action creation failed.");
+     connect(m_pFilenewact, SIGNAL(activated()), SLOT(newDoc()));
+     const char *kszFilenewtext = "<p><img source=\"filenew\"> "
+                                         "Click this button to make a "
+                                         "<em>blank file</em>. You can also "
+                                         "select the <b>New</b> command from "
+                                         "the <b>File</b> menu.</p>";
+     m_pFilenewact->setWhatsThis(kszFilenewtext);
+ 
+     // File open action
+     m_pFileopenact = new QAction(trUtf8("Open File"), QPixmap(s_kpcFileopen_xpm), trUtf8("&Open..."), CTRL+Key_O, this, "Open");
+     if (m_pFileopenact == NULL) // Sanity check
+         throw Genexcept("Main window file open action creation failed.");
+     connect(m_pFileopenact, SIGNAL(activated()), SLOT(openDoc()));
+     const char *kszFileopentext = "<p><img source=\"fileopen\"> "
+                                   "Click this button to open a "
+                                   "<em>new file</em>. You can also select "
+                                   "the <b>Open</b> command from the "
+                                   "<b>File</b> menu.</p>";
+     m_pFileopenact->setWhatsThis(kszFileopentext);
+ 
+     // File save current action
+     m_pFilesaveact = new QAction(trUtf8("Save File"), Saveiset, trUtf8("&Save"), CTRL+Key_S, this, "Save");
+     if (m_pFilesaveact == NULL) // Sanity check
+         throw Genexcept("Main window file save action creation failed.");
+     connect(m_pFilesaveact, SIGNAL(activated()), SLOT(saveFile()));
+     const char *kszFilesavetext = "<p><img source=\"filesave\"> "
+                                   "Click this button to <em>save</em> "
+                                   "the file you are editing. You will be "
+                                   "prompted for a file name. You can also "
+                                   "select the<b> Save</b> command from "
+                                   "the <b>File</b> menu.</p>";
+     m_pFilesaveact->setWhatsThis(kszFilesavetext);
+ 
+     // File save selected action
+     m_pFilesaveasact = new QAction(trUtf8("Save File As"), trUtf8("Save &As..."), 0, this, "SaveAs");
+     if (m_pFilesaveasact == NULL)   // Sanity check
+         throw Genexcept("Main window file save as action creation failed.");
+     connect(m_pFilesaveasact, SIGNAL(activated()), SLOT(saveAs()));
+     m_pFilesaveasact->setWhatsThis(kszFilesavetext);
+ 
+     // File close current action
+     m_pFilecloseact = new QAction(trUtf8("Close"), trUtf8("&Close"), CTRL+Key_W, this, "Close");
+     if (m_pFilecloseact == NULL)    // Sanity check
+         throw Genexcept("Main window file close action creation failed.");
+     connect(m_pFilecloseact, SIGNAL(activated()), SLOT(close()));
+ 
+     // File quit action
+     m_pFilequitact = new QAction(trUtf8("Exit"), trUtf8("E&xit"), CTRL+Key_Q, this, "Exit");
+     if (m_pFilequitact == NULL)     // Sanity check
+         throw Genexcept("Main window file quit action creation failed.");
+     connect(m_pFilequitact, SIGNAL(activated()), SLOT(quitApp()));
+ 
+     // Cut action
+     m_pCutact = new QAction(trUtf8("Cut"), Cutiset, trUtf8("&Cut"), CTRL+Key_X, this, "Cut");
+     if (m_pCutact == NULL)      // Sanity check
+         throw Genexcept("Main window cut edit action creation failed.");
+     connect(m_pCutact, SIGNAL(activated()), SLOT(cutEntry()));
+     const char *kszCuttext = "<p><img source=\"cut\"> "
+                                    "Click this button to cut an <em>entry</em>. "
+                                    "You can also select the <b>Cut</b> command "
+                                    "from the <b>Edit</b> menu.</p>";
+     m_pCutact->setWhatsThis(kszCuttext);
+ 
+     // Copy action
+     m_pCopyact = new QAction(trUtf8("Copy"), Copyiset, trUtf8("&Copy"), CTRL+Key_C, this, "Copy");
+     if (m_pCopyact == NULL)     // Sanity check
+         throw Genexcept("Main window copy edit action creation failed.");
+     connect(m_pCopyact, SIGNAL(activated()), SLOT(copyEntry()));
+     const char *kszCopytext = "<p><img source=\"copy\"> "
+                                    "Click this button to copy an <em>entry</em>. "
+                                    "You can also select the <b>Copy</b> command "
+                                    "from the <b>Edit</b> menu.</p>";
+     m_pCopyact->setWhatsThis(kszCopytext);
+ 
+     // Paste action
+     m_pPasteact = new QAction(trUtf8("Paste"), Pasteiset, trUtf8("&Paste"), CTRL+Key_V, this, "Paste");
+     if (m_pPasteact == NULL)    // Sanity check
+         throw Genexcept("Main window paste edit action creation failed.");
+     connect(m_pPasteact, SIGNAL(activated()), SLOT(pasteEntry()));
+     const char *kszPastetext = "<p><img source=\"paste\"> "
+                                    "Click this button to paste an <em>entry</em>. "
+                                    "You can also select the <b>Paste</b> command "
+                                    "from the <b>Edit</b> menu.</p>";
+     m_pPasteact->setWhatsThis(kszPastetext);
+ 
+     // Add data row action
+     m_pAddrowact = new QAction(trUtf8("Add Entry"), Rowaddiset, trUtf8("&Add entry"), Key_Insert, this, "Addentry");
+     if (m_pAddrowact == NULL)   // Sanity check
+         throw Genexcept("Main window add entry action creation failed.");
+     connect(m_pAddrowact, SIGNAL(activated()), SLOT(addEntry()));
+     const char *kszAddrowtext = "<p><img source=\"rowadd\"> "
+                                 "Click this button to add a <em>new entry</em>. "
+                                 "You can also select the <b>Add</b> command "
+                                 "from the <b>Edit</b> menu.</p>";
+     m_pAddrowact->setWhatsThis(kszAddrowtext);
+ 
+     // Delete data row action
+     m_pDelrowact = new QAction(trUtf8("Delete Entry"), Rowdeliset, trUtf8("&Delete entry"), Key_Delete, this, "Delentry");
+     if (m_pDelrowact == NULL)   // Sanity check
+         throw Genexcept("Main window delete entry action creation failed.");
+     connect(m_pDelrowact, SIGNAL(activated()), SLOT(delEntry()));
+     const char *kszDelrowtext = "<p><img source=\"rowdel\"> "
+                                    "Click this button to delete a <em>entry</em>. "
+                                    "You can also select the <b>Delete</b> command "
+                                    "from the <b>Edit</b> menu.</p>";
+     m_pDelrowact->setWhatsThis(kszDelrowtext);
+ 
+     // Refresh data display action
+     m_pRefreshact = new QAction(trUtf8("Refresh Display"), Refreshiset, trUtf8("&Refresh display"), CTRL+Key_R, this, "Refresh");
+     if (m_pRefreshact == NULL)  // Sanity check
+         throw Genexcept("Main window refresh action creation failed.");
+     connect(m_pRefreshact, SIGNAL(activated()), SLOT(refreshDisplay()));
+     const char *kszRefreshtext = "<p><img source=\"refresh\"> "
+                                  "Click this button to <em>refresh the display</em>. "
+                                  "You can also select the <b>Refresh</b> command "
+                                  "from the <b>View</b> menu.</p>";
+     m_pRefreshact->setWhatsThis(kszRefreshtext);
+ 
+     // Syncronize data with remote server over IIOP or SOAP action
+     m_pSyncact = new QAction(trUtf8("Synchronize with server"), Synciset, trUtf8("&Synchronize"), CTRL+Key_E, this, "Synchronize");
+     if (m_pSyncact == NULL) // Sanity check
+         throw Genexcept("Main window synchronize RPC action creation failed.");
+     connect(m_pSyncact, SIGNAL(activated()), SLOT(syncIiop()));
+     connect(m_pSyncact, SIGNAL(activated()), SLOT(syncSoap()));
+     const char *kszSynctext = "<p><img source=\"syncrpc\"> "
+                               "Click this button to <em>synchronize the data</em>. "
+                               "Your changed entries will be sent to the server. "
+                               "You can also select the <b>Synchronize</b> command "
+                               "from the <b>Report</b> menu.</p>";
+     m_pSyncact->setWhatsThis(kszSynctext);
+ 
+     // Local report generation action
+     m_pReportact = new QAction(trUtf8("Generate a local report"), Reportiset, trUtf8("&Report"), CTRL+Key_T, this, "LocalReport");
+     if (m_pReportact == NULL) // Sanity check
+         throw Genexcept("Main window local report action creation failed.");
+     connect(m_pReportact, SIGNAL(activated()), SLOT(genReport()));
+     const char *kszReporttext = "<p><img source=\"locreport\"> "
+                                 "Click this button to <em>report your data</em>. "
+                                 "A local report will be generated for you to view. "
+                                 "You can also select the <b>Local Report</b> command "
+                                 "from the <b>Report</b> menu.</p>";
+     m_pReportact->setWhatsThis(kszReporttext);
+ 
+     // Offer a formatted preferences panel for intuitive prefs object editing
+     m_pPrefsact = new QAction(trUtf8("Edit the preferences"), QPixmap(s_kpcPrefs_xpm), trUtf8("P&references..."), CTRL+Key_F, this, "Prefspanel");
+     if (m_pPrefsact == NULL) // Sanity check
+         throw Genexcept("Main window preferences panel action creation failed.");
+     connect(m_pPrefsact, SIGNAL(activated()), SLOT(configPrefs()));
+     const char *kszPrefstext = "<p><img source=\"prefs\"> "
+                                "Click this button to <em>edit the preferences</em>. "
+                                "You can then apply, accept, or cancel your changes. "
+                                "You can also select the <b>Preferences</b> command "
+                                "from the <b>Edit</b> menu.</p>";
+     m_pPrefsact->setWhatsThis(kszPrefstext);
+ }
+ 
+ //
+ // Construct the menu bar
+ //
+ void Titraqform::setupMenubar(void)
+ {
+     int nMenuid = 0;        // Used to store id during menu item creation
+ 
+     m_pMenubar = menuBar(); // Grab menu bar owned by QMainWindow
+     if (m_pMenubar == NULL) // Sanity check
+         throw Genexcept("Main window menu bar nonexistant.");
+ 
+ //    // Make an easter egg ;-)
+ //    QToolTip::add(m_pMenubar, QRect(0, 0, 2, 2), trUtf8("Easter Egg"));
+ 
+     // Construct and populate the file menu with actions
+     QPopupMenu *pFilepopup = new QPopupMenu(this);
+     if (pFilepopup == NULL) // Sanity check
+         throw Genexcept("Main window file popup creation failed.");
+     m_pMenubar->insertItem(trUtf8("&File"), pFilepopup);
+     m_pFilenewact->addTo(pFilepopup);
+     m_pFileopenact->addTo(pFilepopup);
+     pFilepopup->insertSeparator();
+     m_pFilecloseact->addTo(pFilepopup);
+     pFilepopup->insertSeparator();
+     m_pFilesaveact->addTo(pFilepopup);
+     m_pFilesaveasact->addTo(pFilepopup);
+     pFilepopup->insertSeparator();
+     m_pFilequitact->addTo(pFilepopup);
+ 
+     // Construct and populate the edit menu with subitems
+     QPopupMenu *pEditpopup = new QPopupMenu(this);
+     if (pEditpopup == NULL) // Sanity check
+         throw Genexcept("Main window edit popup creation failed.");
+     m_pMenubar->insertItem(trUtf8("&Edit"), pEditpopup);
+     m_pCutact->addTo(pEditpopup);
+     m_pCopyact->addTo(pEditpopup);
+     m_pPasteact->addTo(pEditpopup);
+     pEditpopup->insertSeparator();
+     m_pAddrowact->addTo(pEditpopup);
+     m_pDelrowact->addTo(pEditpopup);
+     pEditpopup->insertSeparator();
+     m_pPrefsact->addTo(pEditpopup);
+ 
+     // Construct the view menu and submenus
+     m_pViewpopup = new QPopupMenu(this);
+     m_pTbarspopup = new QPopupMenu(this);
+     m_pColspopup = new QPopupMenu(this);
+ 
+     // Give the new menus krass attributes
+     m_pTbarspopup->insertTearOffHandle();
+     m_pTbarspopup->setCheckable(true);
+     m_pColspopup->insertTearOffHandle();
+     m_pColspopup->setCheckable(true);
+ 
+     // Major sanity check wrapped in one call
+     if (!(m_pViewpopup && m_pTbarspopup && m_pColspopup))
+         throw Genexcept("Main window view popups creation failed.");
+ 
+     // Populate the view menu with subitems
+     m_pMenubar->insertItem(trUtf8("&View"), m_pViewpopup);
+     m_pViewpopup->insertItem(trUtf8("&Normal"), this, SLOT(normalView()));
+     nMenuid = m_pViewpopup->insertItem(trUtf8("&Editing"), this, SLOT(editingView()));
+     m_pViewpopup->setItemEnabled(nMenuid, false);
+     nMenuid = m_pViewpopup->insertItem(trUtf8("&Timing"), this, SLOT(timingView()));
+     m_pViewpopup->setItemEnabled(nMenuid, false);
+     m_pViewpopup->insertSeparator();
+     m_pRefreshact->addTo(m_pViewpopup); // Refresh action
+     m_pViewpopup->insertSeparator();
+     m_pViewpopup->insertItem(trUtf8("&Toolbars"), m_pTbarspopup);
+     nMenuid = m_pTbarspopup->insertItem(trUtf8("&File"), this, SLOT(showFilebar()));
+     m_pTbarspopup->setItemChecked(nMenuid, true);
+     nMenuid = m_pTbarspopup->insertItem(trUtf8("&Edit"), this, SLOT(showEditbar()));
+     m_pTbarspopup->setItemChecked(nMenuid, true);
+     nMenuid = m_pTbarspopup->insertItem(trUtf8("&View"), this, SLOT(showViewbar()));
+     m_pTbarspopup->setItemChecked(nMenuid, true);
+     nMenuid = m_pTbarspopup->insertItem(trUtf8("&Prefs"), this, SLOT(showPrefsbar()));
+     m_pTbarspopup->setItemChecked(nMenuid, true);
+     nMenuid = m_pTbarspopup->insertItem(trUtf8("&Whats"), this, SLOT(showWhatsbar()));
+     m_pTbarspopup->setItemChecked(nMenuid, true);
+     m_pViewpopup->insertItem(trUtf8("&Columns"), m_pColspopup);
+     nMenuid = m_pColspopup->insertItem(trUtf8("&Status"), this, SLOT(showStatcol()));
+     m_pColspopup->setItemChecked(nMenuid, true);
+     nMenuid = m_pColspopup->insertItem(trUtf8("&Line"), this, SLOT(showLinecol()));
+     m_pColspopup->setItemChecked(nMenuid, true);
+     nMenuid = m_pColspopup->insertItem(trUtf8("&User"), this, SLOT(showUsercol()));
+     m_pColspopup->setItemChecked(nMenuid, true);
+     nMenuid = m_pColspopup->insertItem(trUtf8("&GUID"), this, SLOT(showGuidcol()));
+     m_pColspopup->setItemChecked(nMenuid, true);
+     nMenuid = m_pColspopup->insertItem(trUtf8("&CRC"), this, SLOT(showCrccol()));
+     m_pColspopup->setItemChecked(nMenuid, true);
+     nMenuid = m_pColspopup->insertItem(trUtf8("&Rev"), this, SLOT(showRevcol()));
+     m_pColspopup->setItemChecked(nMenuid, true);
+     nMenuid = m_pColspopup->insertItem(trUtf8("&Date"), this, SLOT(showDatecol()));
+     m_pColspopup->setItemChecked(nMenuid, true);
+     nMenuid = m_pColspopup->insertItem(trUtf8("&Start"), this, SLOT(showStartcol()));
+     m_pColspopup->setItemChecked(nMenuid, true);
+     nMenuid = m_pColspopup->insertItem(trUtf8("&Finish"), this, SLOT(showFinishcol()));
+     m_pColspopup->setItemChecked(nMenuid, true);
+     nMenuid = m_pColspopup->insertItem(trUtf8("&Amount"), this, SLOT(showAmountcol()));
+     m_pColspopup->setItemChecked(nMenuid, true);
+     nMenuid = m_pColspopup->insertItem(trUtf8("&Task"), this, SLOT(showTaskcol()));
+     m_pColspopup->setItemChecked(nMenuid, true);
+     nMenuid = m_pColspopup->insertItem(trUtf8("&Remark"), this, SLOT(showRemarkcol()));
+     m_pColspopup->setItemChecked(nMenuid, true);
+ 
+     // Construct and populate the report menu with subitems
+     QPopupMenu *pReportpopup = new QPopupMenu(this);
+     if (pReportpopup == NULL) // Sanity check
+         throw Genexcept("Main window report popup creation failed.");
+     m_pMenubar->insertItem(trUtf8("&Report"), pReportpopup);
+ #if defined HAVE_MICO || defined HAVE_ESOAP
+     m_pSyncact->addTo(pReportpopup);
+     m_pSyncact->setEnabled(m_pPrefs->getBool(TITRAQ_PREFCORBON, TITRAQ_DEFCORBON)
+         | m_pPrefs->getBool(TITRAQ_PREFSOAPON, TITRAQ_DEFSOAPON));
+ #endif // defined HAVE_MICO || defined HAVE_ESOAP
+     m_pReportact->addTo(pReportpopup);
+ 
+     // Pad spacing to force help menu to appear far right
+     m_pMenubar->insertSeparator();
+ 
+     // Construct and populate the help menu with subitems
+     QPopupMenu *pHelppopup = new QPopupMenu(this);
+     if (pHelppopup == NULL) // Sanity check
+         throw Genexcept("Main window help popup creation failed.");
+     m_pMenubar->insertItem(trUtf8("&Help"), pHelppopup);
+     pHelppopup->insertItem(trUtf8("&Contents"), this, SLOT(helpContents()), Key_F1);
+     pHelppopup->insertSeparator();
+     pHelppopup->insertItem(trUtf8("About &as-gui"), this, SLOT(aboutTitraq()));
+     pHelppopup->insertItem(trUtf8("About &OSSP"), this, SLOT(aboutOSSP()));
+     pHelppopup->insertItem(trUtf8("About &Qt"), this, SLOT(aboutQt()));
+     pHelppopup->insertSeparator();
+     pHelppopup->insertItem(QPixmap(s_kpcWhatsthis_xpm), trUtf8("What's &This"), this, SLOT(whatsThis()), SHIFT+Key_F1);
+ }
+ 
+ //
+ // Construct the tool bars
+ //
+ void Titraqform::setupToolbars(void)
+ {
+     // Construct and populate the file tool bar
+     m_pFiletools = new QToolBar("Toolfile", this, DockTop);
+     if (m_pFiletools == NULL)                   // Sanity check
+         throw Genexcept("File tool bar creation failed.");
+     m_pFiletools->setLabel(trUtf8("File Ops"));
+     m_pFiletools->setOpaqueMoving(false);
+     m_pFiletools->setCloseMode(QDockWindow::Never);
+     m_pFilenewact->addTo(m_pFiletools);
+     m_pFileopenact->addTo(m_pFiletools);
+     m_pFilesaveact->addTo(m_pFiletools);
+ 
+     // Construct and populate the edit tool bar
+     m_pEdittools = new QToolBar("Tooledit", this, DockTop);
+     if (m_pEdittools == NULL)                   // Sanity check
+         throw Genexcept("Edit tool bar creation failed.");
+     m_pEdittools->setLabel(trUtf8("Edit Ops"));
+     m_pEdittools->setOpaqueMoving(false);
+     m_pEdittools->setCloseMode(QDockWindow::Never);
+     m_pCutact->addTo(m_pEdittools);
+     m_pCopyact->addTo(m_pEdittools);
+     m_pPasteact->addTo(m_pEdittools);
+     m_pEdittools->addSeparator();
+     m_pAddrowact->addTo(m_pEdittools);
+     m_pDelrowact->addTo(m_pEdittools);
+ 
+     // Construct and populate the view tool bar
+     m_pViewtools = new QToolBar("Toolview", this, DockTop);
+     if (m_pViewtools == NULL)                   // Sanity check
+         throw Genexcept("View tool bar creation failed.");
+     m_pViewtools->setLabel(trUtf8("View Ops"));
+     m_pViewtools->setOpaqueMoving(false);
+     m_pViewtools->setCloseMode(QDockWindow::Never);
+     m_pRefreshact->addTo(m_pViewtools);
+     m_pReportact->addTo(m_pViewtools);
+     m_pSyncact->addTo(m_pViewtools);
+ 
+     // Construct and populate the lonely preferences tool bar
+     m_pPrefstools = new QToolBar("Preferences", this, DockTop);
+     if (m_pPrefstools == NULL)                   // Sanity check
+         throw Genexcept("Prefs tool bar creation failed.");
+     m_pPrefstools->setLabel(trUtf8("Preferences editor"));
+     m_pPrefstools->setOpaqueMoving(false);
+     m_pPrefstools->setCloseMode(QDockWindow::Never);
+     m_pPrefsact->addTo(m_pPrefstools);
+ 
+     // Construct and populate the lonely whatsthis tool bar
+     m_pWhatstools = new QToolBar("Toolwhats", this, DockTop);
+     if (m_pWhatstools == NULL)                  // Sanity check
+         throw Genexcept("Whats this tool bar creation failed.");
+     m_pWhatstools->setLabel(trUtf8("Whats this"));
+     m_pWhatstools->setOpaqueMoving(false);
+     m_pWhatstools->setCloseMode(QDockWindow::Never);
+     QWhatsThis::whatsThisButton(m_pWhatstools); // Preconfigured whats this button
+ }
+ 
+ //
+ // Construct the central frame
+ //
+ void Titraqform::setupCentralwidget(void)
+ {
+     // Create a central frame and associated layout for QMainWindow
+     m_pCenframe = new QFrame(this, "Centralframe");
+     if (m_pCenframe == NULL)    // Sanity check
+         throw Genexcept("Main window central frame creation failed.");
+     m_pCenframe->setFrameShape(QFrame::StyledPanel);
+     m_pCenframe->setFrameShadow(QFrame::Sunken);
+     this->setCentralWidget(m_pCenframe);
+ 
+     // Layout controls for table, editing widgets
+     m_pMainlayout = new QVBoxLayout(m_pCenframe, TITRAQ_MARGIN, TITRAQ_SPACING, "Mainlayout");  // For layouts
+     m_pPackagelayout = new QVBoxLayout(0, 0, TITRAQ_SPACING, "Packagelayout");  // For table
+     m_pEditlayout = new QHBoxLayout(0, 0, TITRAQ_SPACING, "Editlayout");        // For edits
+ 
+     // Major sanity check wrapped in one call
+     if (!(m_pMainlayout && m_pPackagelayout && m_pEditlayout))
+         throw Genexcept("Main window layout creation failed.");
+ 
+     // Specify ordering of the layouts
+     m_pMainlayout->addLayout(m_pPackagelayout);
+     m_pMainlayout->addLayout(m_pEditlayout);
+ }
+ 
+ //
+ // Construct the status bar
+ //
+ void Titraqform::setupStatusbar(void)
+ {
+     m_pStatbar = statusBar();   // Grab status bar owned by QMainWindow
+     if (m_pStatbar == NULL)     // Sanity check
+         throw Genexcept("Main window status bar nonexistant.");
+ }
+ 
+ //
+ // Construct the table
+ //
+ void Titraqform::setupTable(void)
+ {
+     // Create, configure, and setup the table itself
+     m_pMaintable = new TiTable(m_pPrefs, m_pCenframe, "Maintable");
+     if (m_pMaintable == NULL)   // Sanity check
+         throw Genexcept("Main window table creation failed.");
+     m_pMaintable->setNumCols(TITRAQ_IDXTAIL);
+     m_pMaintable->setDirty(false);              // Reset data to clean state
+     m_pMaintable->setReadOnly(true);                    // Table is read only
+     m_pMaintable->setColumnMovingEnabled(false);        // Ctrl-drag disabled
+     m_pMaintable->setSelectionMode(QTable::MultiRow);   // Multi row selection
+     m_pMaintable->setFocusStyle(QTable::FollowStyle);   // How cells are drawn
+     m_pMaintable->setLeftMargin(0);             // Get rid of the vertical header
+     m_pMaintable->verticalHeader()->hide();     // by hiding it with a margin of 0
+     m_pMaintable->horizontalHeader()->setResizeEnabled(true);
+     m_pMaintable->horizontalHeader()->setClickEnabled(true); // Allow click signals
+     m_pMaintable->horizontalHeader()->setTracking(false); // No continuous tracking
+     m_pMaintable->setColumnStretchable(TITRAQ_IDXTAIL - 1, true);
+ 
+     // Allow for user determined data sorting and use saved values
+     m_pMaintable->setSortcol((int)m_pPrefs->getNumber(TITRAQ_PREFSORTCOL, TITRAQ_DEFSORTCOL));
+     m_pMaintable->setSortdir(m_pPrefs->getBool(TITRAQ_PREFSORTDIR, TITRAQ_DEFSORTDIR));
+     m_pMaintable->setSorting(true);
+ 
+     // Table header row
+     m_pTablehead = m_pMaintable->horizontalHeader();
+     m_pMaintable->setHScrollBarMode(QScrollView::AlwaysOff);
+     m_pTablehead->setLabel(TITRAQ_IDXSTATUS, QObject::trUtf8("Stat"),
+         m_pPrefs->getNumber(TITRAQ_PREFSTATCOLWIDTH, TITRAQ_DEFSTATCOLWIDTH));
+     m_pMaintable->setColumnReadOnly (TITRAQ_IDXSTATUS, true);
+     m_pTablehead->setLabel(TITRAQ_IDXLINE, QObject::trUtf8("Line"),
+         m_pPrefs->getNumber(TITRAQ_PREFLCOLWIDTH, TITRAQ_DEFLCOLWIDTH));
+     m_pMaintable->setColumnReadOnly (TITRAQ_IDXLINE, true);
+     m_pTablehead->setLabel(TITRAQ_IDXUSER, QObject::trUtf8("User"),
+         m_pPrefs->getNumber(TITRAQ_PREFUCOLWIDTH, TITRAQ_DEFUCOLWIDTH));
+     m_pTablehead->setLabel(TITRAQ_IDXGUID, QObject::trUtf8("GUID"),
+         m_pPrefs->getNumber(TITRAQ_PREFGCOLWIDTH, TITRAQ_DEFGCOLWIDTH));
+     m_pMaintable->setColumnReadOnly (TITRAQ_IDXGUID, true);
+     m_pTablehead->setLabel(TITRAQ_IDXCRC, QObject::trUtf8("CRC"),
+         m_pPrefs->getNumber(TITRAQ_PREFCCOLWIDTH, TITRAQ_DEFCCOLWIDTH));
+     m_pMaintable->setColumnReadOnly (TITRAQ_IDXCRC, true);
+     m_pTablehead->setLabel(TITRAQ_IDXREV, QObject::trUtf8("Rev"),
+         m_pPrefs->getNumber(TITRAQ_PREFREVCOLWIDTH, TITRAQ_DEFREVCOLWIDTH));
+     m_pMaintable->setColumnReadOnly (TITRAQ_IDXREV, true);
+     m_pTablehead->setLabel(TITRAQ_IDXDATE, QObject::trUtf8("Date"),
+         m_pPrefs->getNumber(TITRAQ_PREFDCOLWIDTH, TITRAQ_DEFDCOLWIDTH));
+     m_pTablehead->setLabel(TITRAQ_IDXSTART, QObject::trUtf8("Begin"),
+         m_pPrefs->getNumber(TITRAQ_PREFSTARTCOLWIDTH, TITRAQ_DEFSTARTCOLWIDTH));
+     m_pTablehead->setLabel(TITRAQ_IDXFINISH, QObject::trUtf8("End"),
+         m_pPrefs->getNumber(TITRAQ_PREFFCOLWIDTH, TITRAQ_DEFFCOLWIDTH));
+     m_pTablehead->setLabel(TITRAQ_IDXAMOUNT, QObject::trUtf8("Amount"),
+         m_pPrefs->getNumber(TITRAQ_PREFACOLWIDTH, TITRAQ_DEFACOLWIDTH));
+     m_pTablehead->setLabel(TITRAQ_IDXTASK, QObject::trUtf8("Task"),
+         m_pPrefs->getNumber(TITRAQ_PREFTCOLWIDTH, TITRAQ_DEFTCOLWIDTH));
+     m_pTablehead->setLabel(TITRAQ_IDXREMARK, QObject::trUtf8("Remark"));
+ 
+     m_pPackagelayout->addWidget(m_pMaintable);  // Finally add the damn table
+ 
+     // Table update signals
+     connect(m_pMaintable, SIGNAL(currentChanged(int, int)), SLOT(updEdit(int, int)));
+     connect(m_pMaintable, SIGNAL(clicked(int, int, int, const QPoint&)), SLOT(onClick(int, int, int, const QPoint&)));
+     connect(m_pMaintable, SIGNAL(doubleClicked(int, int, int, const QPoint&)), SLOT(inplaceEdit(int, int, int, const QPoint&)));
+     connect(m_pTablehead, SIGNAL(sizeChange(int, int, int)), SLOT(updSizes(int, int, int)));
+     connect(m_pMaintable, SIGNAL(textEdited(int, int)), SLOT(dataChanged(int, int)));
+ }
+ 
+ //
+ // Construct the bottom edit widgets
+ //
+ void Titraqform::setupEditlay(void)
+ {
+ //    QSpacerItem Pad(TITRAQ_SPACING / 2, 0, QSizePolicy::Fixed);
+ //    m_pEditlayout->addWidget(&Pad); // Padd left side of control layout
+ 
+     // Make the status edit
+     m_pStatusedit = new QLabel(m_pCenframe, "Status");
+     if (m_pStatusedit == NULL) // Sanity check
+         throw Genexcept("Main window status edit creation failed.");
+     m_pStatusedit->setPixmap(QPixmap(s_kpcStatvoid_xpm));   // Placeholder
+ 
+ 
+     // Whatsthis info for the item status edit
+     const char *kszStatustext = "The <em>item status</em> shows a green "
+                                 "symbol for valid entries, a yellow symbol "
+                                 "for warning, and a red symbol for flawed entries.";
+     QWhatsThis::add(m_pStatusedit, kszStatustext);
+     QToolTip::add(m_pStatusedit, trUtf8("Status Indicator"));
+     m_pEditlayout->addWidget(m_pStatusedit);  // Finally add the item status edit
+ 
+     // Make the line number edit
+     m_pLineedit = new QLineEdit(m_pCenframe, "Lineno");
+     if (m_pLineedit == NULL) // Sanity check
+         throw Genexcept("Main window line number edit creation failed.");
+     m_pLineedit->setFrameShape(QLineEdit::LineEditPanel);
+     m_pLineedit->setFrameShadow(QLineEdit::Sunken);
+     m_pLineedit->setFrame(true);
+     m_pLineedit->setReadOnly(true);
+     m_pLineedit->setEnabled(false);
+     m_pLineedit->setAlignment(Qt::AlignRight);
+ 
+     // Whatsthis info for the line number edit
+     const char *kszLinenotext = "The <em>line number</em> helps identify "
+                                 "an entry when a warning or error message "
+                                 "appears.";
+     QWhatsThis::add(m_pLineedit, kszLinenotext);
+     QToolTip::add(m_pLineedit, trUtf8("Line Number"));
+     m_pEditlayout->addWidget(m_pLineedit);  // Finally add the line number edit
+ 
+     // Make the user edit
+     m_pUseredit = new QLineEdit(m_pCenframe, "User");
+     if (m_pUseredit == NULL) // Sanity check
+         throw Genexcept("Main window user edit creation failed.");
+     m_pUseredit->setFrameShape(QLineEdit::LineEditPanel);
+     m_pUseredit->setFrameShadow(QLineEdit::Sunken);
+     m_pUseredit->setFrame(true);
+     m_pUseredit->setReadOnly(false);
+     m_pUseredit->setEnabled(false);
+ 
+     // Whatsthis info for the user edit
+     const char *kszUsertext = "Edit the <em>user name</em> by clicking "
+                               "on this control and typing the user name "
+                               "you want to account.";
+     QWhatsThis::add(m_pUseredit, kszUsertext);
+     QToolTip::add(m_pUseredit, trUtf8("User Name"));
+     m_pEditlayout->addWidget(m_pUseredit);  // Finally add the user edit
+ 
+     // Make the GUID edit
+     m_pGuidedit = new QLineEdit(m_pCenframe, "Guid");
+     if (m_pGuidedit == NULL) // Sanity check
+         throw Genexcept("Main window GUID edit creation failed.");
+     m_pGuidedit->setFrameShape(QLineEdit::LineEditPanel);
+     m_pGuidedit->setFrameShadow(QLineEdit::Sunken);
+     m_pGuidedit->setFrame(true);
+     m_pGuidedit->setReadOnly(true);
+     m_pGuidedit->setEnabled(false);
+ 
+     // Whatsthis info for the GUID edit
+     const char *kszGuidtext = "Edit the <em>GUID</em> by clicking "
+                               "on this control and typing the GUID "
+                               "corresponding to this account item.";
+     QWhatsThis::add(m_pGuidedit, kszGuidtext);
+     QToolTip::add(m_pGuidedit, trUtf8("GUID"));
+     m_pEditlayout->addWidget(m_pGuidedit);  // Finally add the GUID edit
+ 
+     // Make the CRC edit
+     m_pCrcedit = new QLineEdit(m_pCenframe, "Crc");
+     if (m_pCrcedit == NULL) // Sanity check
+         throw Genexcept("Main window CRC edit creation failed.");
+     m_pCrcedit->setFrameShape(QLineEdit::LineEditPanel);
+     m_pCrcedit->setFrameShadow(QLineEdit::Sunken);
+     m_pCrcedit->setFrame(true);
+     m_pCrcedit->setReadOnly(true);
+     m_pCrcedit->setEnabled(false);
+ 
+     // Whatsthis info for the CRC edit
+     const char *kszCrctext = "Edit the <em>CRC</em> by clicking "
+                              "on this control and typing the new "
+                              "value for this account item.";
+     QWhatsThis::add(m_pCrcedit, kszCrctext);
+     QToolTip::add(m_pCrcedit, trUtf8("CRC"));
+     m_pEditlayout->addWidget(m_pCrcedit);  // Finally add the CRC edit
+ 
+     // Make the revision edit
+     m_pRevedit = new QLineEdit(m_pCenframe, "Revision");
+     if (m_pRevedit == NULL) // Sanity check
+         throw Genexcept("Main window revision edit creation failed.");
+     m_pRevedit->setFrameShape(QLineEdit::LineEditPanel);
+     m_pRevedit->setFrameShadow(QLineEdit::Sunken);
+     m_pRevedit->setFrame(true);
+     m_pRevedit->setReadOnly(true);
+     m_pRevedit->setEnabled(false);
+ 
+     // Whatsthis info for the revision edit
+     const char *kszRevtext = "Edit the <em>revision</em> by clicking "
+                              "on this control and typing the new value "
+                              "for this account type.";
+     QWhatsThis::add(m_pRevedit, kszRevtext);
+     QToolTip::add(m_pRevedit, trUtf8("Revision"));
+     m_pEditlayout->addWidget(m_pRevedit);  // Finally add the revision edit
+ 
+     // Make the date selector
+     m_pDateedit = new Daydatedit(QDate::currentDate(), m_pCenframe, "Date");
+     if (m_pDateedit == NULL)                                        // Sanity check
+         throw Genexcept("Main window date edit creation failed.");  // Spew errors
+ 
+     // Configure attributes
+     m_pDateedit->setOrder(QDateEdit::YMD);
+     m_pDateedit->setAutoAdvance(true);
+     m_pDateedit->setSeparator(trUtf8("-"));
+     m_pDateedit->setEnabled(false);
+ 
+     // Whatsthis info for the date editor
+     const char *kszDateedit = "Edit the <em>task date</em> by clicking on "
+                               "the year, month, or day, and then changing their "
+                               "values with the arrow buttons.";
+     QWhatsThis::add(m_pDateedit, kszDateedit);
+     QToolTip::add(m_pDateedit, trUtf8("Task Date"));
+     m_pEditlayout->addWidget(m_pDateedit);                          // Finally add the date editor
+ 
+     // Make the start time selector
+     m_pStarttime = new QTimeEdit(m_pCenframe, "StartTime");
+     if (m_pStarttime == NULL)                                       // Sanity check
+         throw Genexcept("Main window start time creation failed."); // Spew errors
+ 
+     // Configure attributes
+     m_pStarttime->setDisplay(QTimeEdit::Hours | QTimeEdit::Minutes);
+     m_pStarttime->setAutoAdvance(true);
+     m_pStarttime->setEnabled(false);
+ 
+     // Whatsthis info for the time editor
+     const char *kszStarttime = "Edit the <em>task starting time</em> by clicking on "
+                                "the hour and minute, and then changing their "
+                                "values with the arrow buttons.";
+     QWhatsThis::add(m_pStarttime, kszStarttime);
+     QToolTip::add(m_pStarttime, trUtf8("Task Starting Time"));
+     m_pEditlayout->addWidget(m_pStarttime);                         // Finally add the start editor
+ 
+     // Make the end time selector
+     m_pEndtime = new QTimeEdit(m_pCenframe, "EndTime");
+     if (m_pEndtime == NULL)                                         // Sanity check
+         throw Genexcept("Main window end time creation failed.");   // Spew errors
+ 
+     // Configure attributes
+     m_pEndtime->setDisplay(QTimeEdit::Hours | QTimeEdit::Minutes);
+     m_pEndtime->setAutoAdvance(true);
+     m_pEndtime->setEnabled(false);
+ 
+     // Whatsthis info for the time editor
+     const char *kszEndtime = "Edit the <em>task ending time</em> by clicking on "
+                              "the hour and minute, and then changing their "
+                              "values with the arrow buttons.";
+     QWhatsThis::add(m_pEndtime, kszEndtime);
+     QToolTip::add(m_pEndtime, trUtf8("Task Ending Time"));
+     m_pEditlayout->addWidget(m_pEndtime);                           // Finally add the end editor
+ 
+ //    // Make the total time amount selector
+ //    m_pAmount = new QTimeEdit(m_pCenframe, "TotalAmount");
+ //    if (m_pAmount == NULL)                                          // Sanity check
+ //        throw Genexcept("Main window amount creation failed.");     // Spew errors
+ //
+ //    // Configure attributes
+ //    m_pAmount->setDisplay(QTimeEdit::Hours | QTimeEdit::Minutes);
+ //    m_pAmount->setAutoAdvance(true);
+ //    m_pAmount->setEnabled(false);
+ 
+     // Make the amount selector
+     m_pAmount = new ASTimeEdit(m_pCenframe, "TotalAmount");
+     if (m_pAmount == NULL)                                      // Sanity check
+         throw Genexcept("Main window amount creation failed."); // Spew errors
+ 
+     // Whatsthis info for the amount editor
+     const char *kszAmount = "Edit the <em>task amount</em> by clicking on "
+                             "the amount, and then changing its "
+                             "value with the arrow buttons.";
+     QWhatsThis::add(m_pAmount, kszAmount);
+     QToolTip::add(m_pAmount, trUtf8("Task Amount"));
+     m_pAmount->setEnabled(false);           // Don't enable until it's ready
+     m_pEditlayout->addWidget(m_pAmount);    // Finally add the amount editor
+ 
+     // Construct a stringlist just to hold task values
+     m_pTaskentries = new QStringList;
+     if (m_pTaskentries == NULL) // Sanity check
+         throw Genexcept("Main window task entries creation failed.");
+ 
+     // Populate the stringlist with fresh accounts, taken from filename in prefs
+     QString Asdir = m_pPrefs->getString(TITRAQ_PREFACCOUNTS, TITRAQ_DEFACCOUNTS);
+     if (Asdir.startsWith(TITRAQ_HOMEDIRTOK))
+         Asdir = QDir::homeDirPath() + Asdir.remove(0, QString(TITRAQ_HOMEDIRTOK).length() - 1);
+     QFile Filetemp(Asdir);
+     this->loadAccounts(Filetemp);   // Load account helper method
+ 
+     // Make the combobox task edit
+     m_pTasks = new QComboBox(true, m_pCenframe, "Tasks");
+     if (m_pTasks == NULL)   // Sanity check
+         throw Genexcept("Main window task edit creation failed.");
+     m_pTasks->insertStringList(*m_pTaskentries);
+     m_pTasks->setCurrentText(NULL);
+     m_pTasks->setSizeLimit(TITRAQ_ACCTBOXHEIGHT);
+     m_pTasks->setAutoCompletion(true);
+     m_pTasks->setDuplicatesEnabled(false);
+     m_pTasks->setEnabled(false);
+ //    m_pTasks->setEditable(false);   // Only idiots define noneditable and autocompletion
+ 
+     // Add an auto scroll bar if possible under current GUI style
+     if (m_pTasks->listBox()) {  // Motif style has no list box
+         int nPopupwidth = m_pTasks->listBox()->maxItemWidth();
+         nPopupwidth += m_pTasks->listBox()->horizontalScrollBar()->height();
+         m_pTasks->listBox()->setFixedWidth(nPopupwidth);
+         m_pTasks->listBox()->setHScrollBarMode(QScrollView::Auto);
+         m_pTasks->listBox()->sort();
+     }
+ 
+     // Whatsthis info for the task editor
+     const char *kszTasktext = "Choose a <em>task account</em> by clicking on "
+                               "this box, and choosing whichever item most "
+                               "closely resembles your task.";
+     QWhatsThis::add(m_pTasks, kszTasktext);
+     QToolTip::add(m_pTasks, trUtf8("Task Selector"));
+     m_pEditlayout->addWidget(m_pTasks); // Finally add the task edit
+ 
+     // Make the Remark line
+     m_pRemark = new QLineEdit(m_pCenframe, "Remark");
+     if (m_pRemark == NULL)  // Sanity check
+         throw Genexcept("Main window remark line creation failed.");
+     m_pRemark->setFrameShape(QLineEdit::LineEditPanel);
+     m_pRemark->setFrameShadow(QLineEdit::Sunken);
+     m_pRemark->setFrame(true);
+     m_pRemark->setReadOnly(false);
+     m_pRemark->setEnabled(false);
+ 
+     // Whatsthis info for the remark line
+     const char *kszRemarktext = "Edit the <em>task remarks</em> by clicking on "
+                                 "this line control and typing the remarks you "
+                                 "have about the task.";
+     QWhatsThis::add(m_pRemark, kszRemarktext);
+     QToolTip::add(m_pRemark, trUtf8("Remark Line"));
+     m_pEditlayout->addWidget(m_pRemark);    // Finally add the remark line
+ 
+     // Start edit controls off at right size
+     this->updSizes(TITRAQ_IDXALLCTRLS, -1, -1);
+ 
+     // Validate data just as it is being entered
+     connect(m_pDateedit, SIGNAL(valueChanged(const QDate &)), SLOT(validateData(void)));
+     connect(m_pStarttime, SIGNAL(valueChanged(const QTime &)), SLOT(validateData(void)));
+     connect(m_pEndtime, SIGNAL(valueChanged(const QTime &)), SLOT(validateData(void)));
+     connect(m_pAmount, SIGNAL(valueChanged(const QTime &)), SLOT(validateData(void)));
+     connect(m_pTasks, SIGNAL(textChanged(const QString &)), SLOT(validateData(void)));
+     connect(m_pRemark, SIGNAL(textChanged(const QString &)), SLOT(validateData(void)));
+ 
+     // Signals sent between table cells and corresponding edit control widgets
+     connect(m_pLineedit, SIGNAL(textChanged(const QString &)), SLOT(updateLine(const QString &)));
+     connect(m_pUseredit, SIGNAL(textChanged(const QString &)), SLOT(updateUser(const QString &)));
+     connect(m_pGuidedit, SIGNAL(textChanged(const QString &)), SLOT(updateGuid(const QString &)));
+     connect(m_pCrcedit, SIGNAL(textChanged(const QString &)), SLOT(updateCrc(const QString &)));
+     connect(m_pRevedit, SIGNAL(textChanged(const QString &)), SLOT(updateRev(const QString &)));
+     connect(m_pDateedit, SIGNAL(valueChanged(const QDate &)), SLOT(updateDate(const QDate &)));
+     connect(m_pStarttime, SIGNAL(valueChanged(const QTime &)), SLOT(updateStart(const QTime &)));
+     connect(m_pEndtime, SIGNAL(valueChanged(const QTime &)), SLOT(updateFinish(const QTime &)));
+     connect(m_pAmount, SIGNAL(valueChanged(const QTime &)), SLOT(updateAmount(const QTime &)));
+     connect(m_pTasks, SIGNAL(textChanged(const QString &)), SLOT(updateTask(const QString &)));
+     connect(m_pRemark, SIGNAL(textChanged(const QString &)), SLOT(updateRemark(const QString &)));
+ 
+     // Correctly update checksum and revision fields also
+     connect(m_pUseredit, SIGNAL(textChanged(const QString &)), SLOT(calcCrc(void)));
+     connect(m_pDateedit, SIGNAL(valueChanged(const QDate &)), SLOT(calcCrc(void)));
+     connect(m_pStarttime, SIGNAL(valueChanged(const QTime &)), SLOT(calcCrc(void)));
+     connect(m_pEndtime, SIGNAL(valueChanged(const QTime &)), SLOT(calcCrc(void)));
+     connect(m_pAmount, SIGNAL(valueChanged(const QTime &)), SLOT(calcCrc(void)));
+     connect(m_pTasks, SIGNAL(textChanged(const QString &)), SLOT(calcCrc(void)));
+     connect(m_pRemark, SIGNAL(textChanged(const QString &)), SLOT(calcCrc(void)));
+ }
+ 
+ //
+ // Arrange and configure columns
+ //
+ void Titraqform::setupColumns(void)
+ {
+     // Handle column view handling presets and defaults
+     if (!m_pPrefs->getBool(TITRAQ_PREFSTATCOLON, TITRAQ_DEFSTATCOLON))
+         showStatcol();
+     if (!m_pPrefs->getBool(TITRAQ_PREFLCOLON, TITRAQ_DEFLCOLON))
+         showLinecol();
+     if (!m_pPrefs->getBool(TITRAQ_PREFUCOLON, TITRAQ_DEFUCOLON))
+         showUsercol();
+     if (!m_pPrefs->getBool(TITRAQ_PREFGCOLON, TITRAQ_DEFGCOLON))
+         showGuidcol();
+     if (!m_pPrefs->getBool(TITRAQ_PREFCCOLON, TITRAQ_DEFCCOLON))
+         showCrccol();
+     if (!m_pPrefs->getBool(TITRAQ_PREFREVCOLON, TITRAQ_DEFREVCOLON))
+         showRevcol();
+     if (!m_pPrefs->getBool(TITRAQ_PREFDCOLON, TITRAQ_DEFDCOLON))
+         showDatecol();
+     if (!m_pPrefs->getBool(TITRAQ_PREFSTARTCOLON, TITRAQ_DEFSTARTCOLON))
+         showStartcol();
+     if (!m_pPrefs->getBool(TITRAQ_PREFFCOLON, TITRAQ_DEFFCOLON))
+         showFinishcol();
+     if (!m_pPrefs->getBool(TITRAQ_PREFACOLON, TITRAQ_DEFACOLON))
+         showAmountcol();
+     if (!m_pPrefs->getBool(TITRAQ_PREFTCOLON, TITRAQ_DEFTCOLON))
+         showTaskcol();
+     if (!m_pPrefs->getBool(TITRAQ_PREFREMCOLON, TITRAQ_DEFREMCOLON))
+         showRemarkcol();
+ 
+     // Handle tool bar view handling presets and defaults
+     if (!m_pPrefs->getBool(TITRAQ_PREFFILEBAR, TITRAQ_DEFFILEBAR)) {
+         m_pFiletools->hide();
+         m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXFILEBAR), false);
+     }
+     if (!m_pPrefs->getBool(TITRAQ_PREFEDITBAR, TITRAQ_DEFEDITBAR)) {
+         m_pEdittools->hide();
+         m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXEDITBAR), false);
+     }
+     if (!m_pPrefs->getBool(TITRAQ_PREFVIEWBAR, TITRAQ_DEFVIEWBAR)) {
+         m_pViewtools->hide();
+         m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXVIEWBAR), false);
+     }
+     if (!m_pPrefs->getBool(TITRAQ_PREFPREFBAR, TITRAQ_DEFPREFBAR)) {
+         m_pPrefstools->hide();
+         m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXPREFBAR), false);
+     }
+     if (!m_pPrefs->getBool(TITRAQ_PREFWHATBAR, TITRAQ_DEFWHATBAR)) {
+         m_pWhatstools->hide();
+         m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXWHATBAR), false);
+     }
+ }
+ 
+ //
+ // [En|dis]able most ui pieces to suit or restrict user
+ //
+ void Titraqform::enableIface(bool bTurned)
+ {
+     // FIXME: Does not belong here, so relocate
+     if (bTurned)                       // Turn off the interface
+         m_pDateedit->setDayfocus();     // Default focus is on day
+     else {                              // Turn on the interface
+         m_pMaintable->setNumRows(0);    // Remove table data
+         m_pStatusedit->setPixmap(QPixmap(s_kpcStatvoid_xpm));
+     }
+ 
+     // Enable or disable the widgets
+     m_pMaintable->setEnabled(bTurned);
+     m_pLineedit->setEnabled(bTurned);
+     m_pUseredit->setEnabled(bTurned);
+     m_pGuidedit->setEnabled(bTurned);
+     m_pCrcedit->setEnabled(bTurned);
+     m_pRevedit->setEnabled(bTurned);
+     m_pDateedit->setEnabled(bTurned);
+     m_pStarttime->setEnabled(bTurned);
+     m_pEndtime->setEnabled(bTurned);
+     m_pAmount->setEnabled(bTurned);
+     m_pTasks->setEnabled(bTurned);
+     m_pRemark->setEnabled(bTurned);
+ 
+     // Enable or disable the actions
+     m_pFilesaveact->setEnabled(bTurned);
+     m_pFilesaveasact->setEnabled(bTurned);
+     m_pFilecloseact->setEnabled(bTurned);
+     m_pAddrowact->setEnabled(bTurned);
+     m_pDelrowact->setEnabled(bTurned);
+     m_pRefreshact->setEnabled(bTurned);
+     m_pCutact->setEnabled(bTurned);
+     m_pCopyact->setEnabled(bTurned);
+     m_pPasteact->setEnabled(bTurned);
+     m_pReportact->setEnabled(bTurned);
+ #if defined HAVE_MICO || defined HAVE_ESOAP
+     if (bTurned)
+         m_pSyncact->setEnabled(m_pPrefs->getBool(TITRAQ_PREFCORBON, TITRAQ_DEFCORBON)
+             | m_pPrefs->getBool(TITRAQ_PREFSOAPON, TITRAQ_DEFSOAPON));
+     else
+         m_pSyncact->setEnabled(false);
+ #endif // defined HAVE_MICO || defined HAVE_ESOAP
+ 
+     // Unconditional settings
+     m_pMaintable->setDirty(false);                  // Reset to clean data
+ }
+ 
+ //
+ // Parse command line arguments for an existing filename, and
+ // open it to edit the intended (but optional) initial data
+ //
+ void Titraqform::loadInit(void)
+ {
+     // If the user gives a filename argument to the shell, then open that file
+     int nNumargs = qApp->argc();    // Holds the number of cmd arguments
+     int nValid = 0;                 // Holds the return value
+     QFile Initial;                  // Initial event data file
+ 
+     if (nNumargs > 1) { // Warm up a nice cascade, to set my mind on four weeks of vacation
+         for (int nIter = 1; nIter < nNumargs; nIter++) {    // Salad in New Zealand
+             if (QChar(*qApp->argv()[nIter]) != '-') {       // Bunuelos in Colombia
+                 try {
+                     this->setFilename(qApp->argv()[nIter]); // Store inital filename
+                     Initial.setName(*this->getFilename());  // Initial file to load
+                     if (Initial.exists(*getFilename())) {
+                         this->loadData(Initial);            // Pass to helper method
+                         enableIface(true);                  // Turn on the lights
+                         m_pStatbar->message(trUtf8("Loaded document ") + *this->getFilename());
+                     }
+                     else // The inital file name does not correspond to a file
+                         m_pStatbar->message(trUtf8(QString("The file ") + *this->getFilename() + QString(" does not exist.")));
+                 }
+                 catch (Genexcept& Genex) {
+                     Genex.reportErr();
+                 }
+             }
+         }
+     }
+     else
+         m_pStatbar->message(trUtf8("Ready"));   // Signal a ready condition
+ }


ossp-pkg/as/as-gui/as_const.h -> 1.62

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:20 2024
***************
*** 0 ****
--- 1,284 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  titconst.h: ISO C++ interface
+ //
+ 
+ #ifndef TITCONST_H
+ #define TITCONST_H
+ 
+ 
+ // General preferences
+ #define TITRAQ_PREFNAME         ".asgui"
+ #define TITRAQ_APPTITLE         "AS Accounting System"
+ #define TITRAQ_STR_ID           "OSSPASGUI"                         /* APPID */
+ #define TITRAQ_UID_ID           0x84fae747e1a64016bf049e98bbc4bd96  /* UUID */
+ #define TITRAQ_PREFVER          "0.6"
+ #define TITRAQ_PREFHOME         "homedir"
+ #define TITRAQ_DEFHOME          "."
+ #define TITRAQ_PREFUSER         "user"
+ #define TITRAQ_DEFUSER          "username"
+ #define TITRAQ_PREFASDIR        "asdir"
+ #define TITRAQ_DEFASDIR         "~/.as/"
+ #define TITRAQ_PREFACCOUNTS     "accounts"
+ #define TITRAQ_DEFACCOUNTS      "~/.as/accounts"
+ #define TITRAQ_PREFSTYLE        "uistyle"
+ #define TITRAQ_PREFVIEW         "view"
+ #define TITRAQ_DEFVIEW          "normal"
+ #define TITRAQ_PREFREMOTELOG    "logremote"
+ #define TITRAQ_DEFREMOTELOG     "no"
+ #define TITRAQ_PREFLOCALLOG     "loglocal"
+ #define TITRAQ_DEFLOCALLOG      "no"
+ #define TITRAQ_PREFCORBHOST     "corbahost"
+ #define TITRAQ_DEFCORBHOST      "localhost:8914"
+ #define TITRAQ_PREFSOAPHOST     "soaphost"
+ #define TITRAQ_DEFSOAPHOST      "localhost/cgi-bin/asdbserv"
+ #define TITRAQ_PREFCORBON       "corbaenable"
+ #define TITRAQ_DEFCORBON        0
+ #define TITRAQ_PREFSOAPON       "soapenable"
+ #define TITRAQ_DEFSOAPON        0
+ #define TITRAQ_PREFBAKON        "autobackup"
+ #define TITRAQ_DEFBAKON         1
+ #define TITRAQ_PREFEXTENDON     "filextension"
+ #define TITRAQ_DEFEXTENDON      1
+ #define TITRAQ_PREFDETAILON     "detailisting"
+ #define TITRAQ_DEFDETAILON      0
+ #define TITRAQ_PREFSIGNATON     "signatureline"
+ #define TITRAQ_DEFSIGNATON      0
+ #define TITRAQ_PREFREPORTYPE    "reportperiod"
+ #define TITRAQ_DEFREPORTYPE     TITRAQ_REPORTWEEK
+ #define TITRAQ_PREFREPORTWEEKS  "reportweeks"
+ #define TITRAQ_DEFREPORTWEEKS   1
+ #define TITRAQ_PREFREPORTMONTHS "reportmonths"
+ #define TITRAQ_DEFREPORTMONTHS  1
+ #define TITRAQ_PREFLIGHTRED     "lightred"
+ #define TITRAQ_DEFLIGHTRED      248
+ #define TITRAQ_PREFLIGHTGREEN   "lightgreen"
+ #define TITRAQ_DEFLIGHTGREEN    248
+ #define TITRAQ_PREFLIGHTBLUE    "lightblue"
+ #define TITRAQ_DEFLIGHTBLUE     240
+ #define TITRAQ_PREFDARKRED      "darkred"
+ #define TITRAQ_DEFDARKRED       224
+ #define TITRAQ_PREFDARKGREEN    "darkgreen"
+ #define TITRAQ_DEFDARKGREEN     224
+ #define TITRAQ_PREFDARKBLUE     "darkblue"
+ #define TITRAQ_DEFDARKBLUE      216
+ #define TITRAQ_PREFLTALTRED     "lightred"
+ #define TITRAQ_DEFLTALTRED      240
+ #define TITRAQ_PREFLTALTGREEN   "lightgreen"
+ #define TITRAQ_DEFLTALTGREEN    240
+ #define TITRAQ_PREFLTALTBLUE    "lightblue"
+ #define TITRAQ_DEFLTALTBLUE     212
+ #define TITRAQ_PREFDKALTRED     "darkred"
+ #define TITRAQ_DEFDKALTRED      214
+ #define TITRAQ_PREFDKALTGREEN   "darkgreen"
+ #define TITRAQ_DEFDKALTGREEN    210
+ #define TITRAQ_PREFDKALTBLUE    "darkblue"
+ #define TITRAQ_DEFDKALTBLUE     160
+ 
+ // Column show preferences
+ #define TITRAQ_PREFSTATCOLON    "statcolshow"
+ #define TITRAQ_DEFSTATCOLON     true
+ #define TITRAQ_PREFLCOLON       "linecolshow"
+ #define TITRAQ_DEFLCOLON        false
+ #define TITRAQ_PREFUCOLON       "usercolshow"
+ #define TITRAQ_DEFUCOLON        false
+ #define TITRAQ_PREFGCOLON       "guidcolshow"
+ #define TITRAQ_DEFGCOLON        false
+ #define TITRAQ_PREFCCOLON       "crccolshow"
+ #define TITRAQ_DEFCCOLON        false
+ #define TITRAQ_PREFREVCOLON     "revcolshow"
+ #define TITRAQ_DEFREVCOLON      false
+ #define TITRAQ_PREFDCOLON       "datecolshow"
+ #define TITRAQ_DEFDCOLON        true
+ #define TITRAQ_PREFSTARTCOLON   "startcolshow"
+ #define TITRAQ_DEFSTARTCOLON    false
+ #define TITRAQ_PREFFCOLON       "finishcolshow"
+ #define TITRAQ_DEFFCOLON        false
+ #define TITRAQ_PREFACOLON       "amountcolshow"
+ #define TITRAQ_DEFACOLON        true
+ #define TITRAQ_PREFTCOLON       "taskcolshow"
+ #define TITRAQ_DEFTCOLON        true
+ #define TITRAQ_PREFREMCOLON     "remarkcolshow"
+ #define TITRAQ_DEFREMCOLON      true
+ 
+ // Frame geometry preferences
+ #define TITRAQ_PREFFRAMELAY     "framelayout"
+ #define TITRAQ_PREFFRAMEWIDTH   "framewidth"
+ #define TITRAQ_DEFFRAMEWIDTH    640
+ #define TITRAQ_PREFFRAMEHEIGHT  "frameheight"
+ #define TITRAQ_DEFFRAMEHEIGHT   400
+ 
+ // Column width preferences
+ #define TITRAQ_PREFSTATCOLWIDTH   "statcolwidth"
+ #define TITRAQ_DEFSTATCOLWIDTH    24
+ #define TITRAQ_PREFLCOLWIDTH      "linecolwidth"
+ #define TITRAQ_DEFLCOLWIDTH       32
+ #define TITRAQ_PREFUCOLWIDTH      "usercolwidth"
+ #define TITRAQ_DEFUCOLWIDTH       32
+ #define TITRAQ_PREFGCOLWIDTH      "guidcolwidth"
+ #define TITRAQ_DEFGCOLWIDTH       254
+ #define TITRAQ_PREFCCOLWIDTH      "crccolwidth"
+ #define TITRAQ_DEFCCOLWIDTH       84
+ #define TITRAQ_PREFREVCOLWIDTH    "revcolwidth"
+ #define TITRAQ_DEFREVCOLWIDTH     32
+ #define TITRAQ_PREFDCOLWIDTH      "datecolwidth"
+ #define TITRAQ_DEFDCOLWIDTH       98
+ #define TITRAQ_PREFSTARTCOLWIDTH  "startcolwidth"
+ #define TITRAQ_DEFSTARTCOLWIDTH   60
+ #define TITRAQ_PREFFCOLWIDTH      "finishcolwidth"
+ #define TITRAQ_DEFFCOLWIDTH       60
+ #define TITRAQ_PREFACOLWIDTH      "amountcolwidth"
+ #define TITRAQ_DEFACOLWIDTH       60
+ #define TITRAQ_PREFTCOLWIDTH      "taskcolwidth"
+ #define TITRAQ_DEFTCOLWIDTH       148
+ #define TITRAQ_PREFREMCOLWIDTH    "remarkcolwidth"
+ #define TITRAQ_DEFREMCOLWIDTH     120
+ 
+ // Column appearance preferences
+ #define TITRAQ_PREFFILEBAR      "filetoolbar"
+ #define TITRAQ_DEFFILEBAR       true
+ #define TITRAQ_PREFEDITBAR      "edittoolbar"
+ #define TITRAQ_DEFEDITBAR       true
+ #define TITRAQ_PREFVIEWBAR      "viewtoolbar"
+ #define TITRAQ_DEFVIEWBAR       true
+ #define TITRAQ_PREFPREFBAR      "preftoolbar"
+ #define TITRAQ_DEFPREFBAR       true
+ #define TITRAQ_PREFWHATBAR      "whattoolbar"
+ #define TITRAQ_DEFWHATBAR       true
+ 
+ // Other value preferences
+ #define TITRAQ_PREFSORTCOL      "sortordering"
+ #define TITRAQ_DEFSORTCOL       TITRAQ_IDXDATE
+ #define TITRAQ_PREFSORTDIR      "sortascending"
+ #define TITRAQ_DEFSORTDIR       true
+ 
+ // Other value constants
+ #define TITRAQ_DATAVERSIONMAJ   0
+ #define TITRAQ_DATAVERSIONMIN   6
+ 
+ // Environment string constants
+ #define TITRAQ_ENVUSERNAME      "USER"
+ #define TITRAQ_ENVHOMEDIR       "HOME"
+ 
+ // Falsified incoming ORB initilization arguments
+ #define TITRAQ_ORBINIT          "-ORBGIOPVersion 1.2 -ORBIIOPVersion 1.2 -ORBInitRef"
+ #define TITRAQ_COSSPART1        "NameService=corbaloc::"
+ #define TITRAQ_COSSPART2        "/NameService"
+ #define TITRAQ_SOAPSPACE        "http://soap.europalab.com/asdb"
+ #define TITRAQ_PREFIXHTTP       "http://"
+ 
+ // Style string constants
+ #define TITRAQ_STRCDE           "CDE"
+ #define TITRAQ_STRSGI           "SGI"
+ #define TITRAQ_STRMOTIF         "Motif"
+ #define TITRAQ_STRMPLUS         "MotifPlus"
+ #define TITRAQ_STRPLAT          "Platinum"
+ #define TITRAQ_STRMSOFT         "Windows"
+ 
+ // Other string constants
+ #define TITRAQ_SEPARATORTOK     " "
+ #define TITRAQ_HOMEDIRTOK       "~/"
+ #define TITRAQ_FEXTENSION       ".as"
+ #define TITRAQ_REFHELP          "as-gui.html"
+ #define TITRAQ_DATAPATTERN      "%!AS-EVENTS-"
+ #define TITRAQ_SAVEFIRST        "The timesheet contains unsaved changes.\nDo you want to save the changes or discard them?"
+ #define TITRAQ_OVERWRITE        "A file already exists with the chosen name.\nDo you want to overwrite it with new data?"
+ #define TITRAQ_NOPATTERNFOUND   "This data file appears to be invalid,\nbecause the AS data symbol\n        "
+ #define TITRAQ_WASNOTFOUNDIN    "\nwas not found inside of it."
+ #define TITRAQ_BADVERSIONMAJ    "Incompatible data format. Please\neither upgrade this application or\nthe data you are using with it."
+ #define TITRAQ_BADVERSIONMIN    "Incompatible data format. Please either\nupgrade this application or downgrade\nthe data you are using with it."
+ #define TITRAQ_INCOMPATDATA     "Error: incompatible data format."
+ #define TITRAQ_INVALIDDATA      "Error: invalid data format."
+ #define TITRAQ_SAVECANCELLED    "Warning: save operation failed, because the user cancelled."
+ 
+ // Indexes of table columns
+ #define TITRAQ_IDXALLCTRLS     -1
+ #define TITRAQ_IDXSTATUS        0
+ #define TITRAQ_IDXLINE          1
+ #define TITRAQ_IDXUSER          2
+ #define TITRAQ_IDXGUID          3
+ #define TITRAQ_IDXCRC           4
+ #define TITRAQ_IDXREV           5
+ #define TITRAQ_IDXDATE          6
+ #define TITRAQ_IDXSTART         7
+ #define TITRAQ_IDXFINISH        8
+ #define TITRAQ_IDXAMOUNT        9
+ #define TITRAQ_IDXTASK          10
+ #define TITRAQ_IDXREMARK        11
+ #define TITRAQ_IDXTAIL          12
+ 
+ // Indexes of col popup menu items
+ #define TITRAQ_IDXSTATCOL       1
+ #define TITRAQ_IDXLCOL          2
+ #define TITRAQ_IDXUCOL          3
+ #define TITRAQ_IDXGCOL          4
+ #define TITRAQ_IDXCCOL          5
+ #define TITRAQ_IDXREVCOL        6
+ #define TITRAQ_IDXDCOL          7
+ #define TITRAQ_IDXSTARTCOL      8
+ #define TITRAQ_IDXFCOL          9
+ #define TITRAQ_IDXACOL          10
+ #define TITRAQ_IDXTCOL          11
+ #define TITRAQ_IDXREMCOL        12
+ 
+ // Indexes of popup menu submenus
+ #define TITRAQ_IDXFILEBAR       1
+ #define TITRAQ_IDXEDITBAR       2
+ #define TITRAQ_IDXVIEWBAR       3
+ #define TITRAQ_IDXPREFBAR       4
+ #define TITRAQ_IDXWHATBAR       5
+ 
+ // Indexes of character tokens in strings
+ #define TITRAQ_IDXSTATERROR     0
+ #define TITRAQ_IDXSTATCOLOR     1
+ 
+ // Offsets
+ #define TITRAQ_OFFSETYEAR       4
+ #define TITRAQ_OFFSETMONTH      7
+ #define TITRAQ_OFFSETHOUR       2
+ 
+ // Report periods
+ #define TITRAQ_REPORTWEEK       0
+ #define TITRAQ_REPORTMONTH      1
+ #define TITRAQ_POPUPMSECS       200
+ 
+ // Values
+ #define TITRAQ_MARGIN           10          // Default layout margin
+ #define TITRAQ_SPACING          6           // Default layout spacing
+ #define TITRAQ_NUMBLOCKS        32          // Block size of a timesheet
+ #define TITRAQ_MAXAMOUNT        960         // Maximum valid amount
+ #define TITRAQ_MINAMOUNT        0           // Minimum valid amount
+ #define TITRAQ_STEPAMOUNT       15          // Line step interval
+ #define TITRAQ_MINSINHOUR       60          // Only idiots don't know this
+ #define TITRAQ_BRIGHT           'H'         // For coloring rows
+ #define TITRAQ_DARK             'D'         // For coloring rows
+ #define TITRAQ_BIGMAGIC         700000      // For unreasonably large numbers
+ #define TITRAQ_ACCTBOXHEIGHT    24          // Number rows in account combobox
+ 
+ #endif // TITCONST_H


ossp-pkg/as/as-gui/as_crc.cpp -> 1.2

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:20 2024
***************
*** 0 ****
--- 1,148 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  as_crc.cpp: ISO C++ implementation
+ //
+ 
+ #include "as_crc.h"
+ 
+ 
+ //
+ // Calculate a CRC32 value, as devised by Mark ADLER
+ // Returns 0xffffffff on empty or zero length strings
+ //
+ U32 Qualistring::getCrc(void)
+ {
+     U32 Hash = 0xffffffff;
+     unsigned int unLen = 0;
+     const char *pText = this->ascii();
+ 
+     unLen = this->length();
+ 
+     while (unLen-- > 0)
+         Hash = m_pkHash[(Hash ^ *pText++) & 0xff] ^ (Hash >> 8);
+ 
+     Hash ^= 0xffffffff;
+     return Hash;
+ }
+ 
+ //
+ // Overloaded equals operator, use with regular QString objects
+ //
+ Qualistring &Qualistring::operator=(const QString &Convertin)
+ {
+     this->setAscii((const char *)Convertin);    // This hack is a big loop
+     return *this;                               // to move data inefficiently
+ }
+ 
+ //
+ // Reflect the bits of Ref, just like a mirror
+ //
+ U32 Qualistring::mirrorBits(U32 Ref, U8 Bytes)
+ {
+     U32 unMirror = 0;
+ 
+     // Swap bits starting at 1 and moving up to Bytes
+     for(int nIter = 1; nIter < (Bytes + 1); nIter++) {
+         if (Ref & 1)
+             unMirror |= 1 << (Bytes - nIter);
+         Ref >>= 1;
+     }
+     return unMirror;
+ }
+ 
+ //
+ // Initialize the hash table for fast CRC32 value generation
+ //
+ void Qualistring::initCrc(void)
+ {
+     const unsigned long unPolynomial = 0x04c11db7;
+ 
+     // Match 256 values representing the ASCII character codes
+     for(int nOuter = 0; nOuter <= 0xFF; nOuter++) {
+         m_pkHash[nOuter] = mirrorBits(nOuter, 8) << 24;
+         for (int nInner = 0; nInner < 8; nInner++)
+             m_pkHash[nOuter] = (m_pkHash[nOuter] << 1) ^ (m_pkHash[nOuter] & (1 << 31) ? unPolynomial : 0);
+         m_pkHash[nOuter] = mirrorBits(m_pkHash[nOuter], 32);
+     }
+ 
+ /*    m_pkHash[256] = {
+         0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L,
+         0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L,
+         0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L,
+         0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL,
+         0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L,
+         0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L,
+         0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L,
+         0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL,
+         0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L,
+         0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL,
+         0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L,
+         0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L,
+         0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L,
+         0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL,
+         0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL,
+         0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L,
+         0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL,
+         0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L,
+         0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L,
+         0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L,
+         0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL,
+         0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L,
+         0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L,
+         0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL,
+         0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L,
+         0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L,
+         0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L,
+         0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L,
+         0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L,
+         0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL,
+         0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL,
+         0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L,
+         0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L,
+         0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL,
+         0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL,
+         0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L,
+         0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL,
+         0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L,
+         0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL,
+         0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L,
+         0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL,
+         0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L,
+         0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L,
+         0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL,
+         0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L,
+         0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L,
+         0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L,
+         0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L,
+         0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L,
+         0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L,
+         0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL,
+         0x2d02ef8dL
+     };*/
+ }


ossp-pkg/as/as-gui/as_crc.h -> 1.3

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:20 2024
***************
*** 0 ****
--- 1,60 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  as_crc.h: ISO C++ interface
+ //
+ 
+ #ifndef CRC_H
+ #define CRC_H
+ 
+ #include <string>       // For copy constructor using string
+ #include <qstring.h>    // For deriving from QString
+ 
+ #include "as_gui.h"     // General definitions like U32 typedefs
+ 
+ 
+ class Qualistring : public QString
+ {
+ private:
+     U32 m_pkHash[256];          // Used for CRC32 value generation
+ 
+ private:
+     U32 mirrorBits(U32, U8);    // Helper method, mirror a bitstream
+     void initCrc(void);         // Helper method, fill hash table
+ 
+ public:                                                                 // Constructors
+     Qualistring(void) : QString() {initCrc();};                          // Default
+     Qualistring(const QString &kCopy) : QString(kCopy) {initCrc();};     // Copy
+     Qualistring(const char *pkcCopy) : QString(pkcCopy) {initCrc();};    // Copy
+     Qualistring(const std::string &kCopy) : QString(kCopy) {initCrc();}; // Copy
+ 
+     U32 getCrc(void);                           // Generate and return a CRC32
+     Qualistring &operator=(const QString &);    // Overload equals operator
+ };
+ 
+ #endif // CRC_H


ossp-pkg/as/as-gui/as_dataop.cpp -> 1.52

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,582 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  tidatops.cpp: ISO C++ implementation
+ //
+ 
+ // System headers
+ #include <map>
+ #include <string>
+ 
+ // Qt general headers
+ #include <qregexp.h>            // Portable regular expressions
+ #include <qdatetime.h>
+ #include <qmessagebox.h>
+ #include <qtextstream.h>
+ #include <qpopupmenu.h>
+ #include <qfile.h>
+ 
+ // User interface
+ #include "as_const.h"           // Application constants
+ #include "as_tableitem.h"       // For class RtTableItem
+ #include "as_crc.h"             // For quality strings
+ #include "as_uuid.h"            // UUID classes
+ #include "as_table.h"           // TiTable class
+ 
+ // Icon pixel maps
+ #include "as_gfx/statok.xpm"    // static const char *s_kpcStatokay_xpm[]
+ #include "as_gfx/staterr.xpm"   // static const char *s_kpcStaterror_xpm[]
+ #include "as_gfx/statwrn.xpm"   // static const char *s_kpcStatwarn_xpm[]
+ 
+ 
+ //
+ // Convenience method to load accounts from a file
+ //
+ void Titraqform::loadAccounts(QFile &Fileobj)
+ {
+     if (Fileobj.isOpen()) {             // Check state of file
+         Fileobj.flush();                // Begin processing file cleanly
+         QTextStream Account(&Fileobj);  // Convert data to stream
+         this->loadAccounts(Account);    // Pass off to do the real work
+     }
+     else {
+         if (!Fileobj.open(IO_ReadOnly)) // Try to open file
+             throw Genexcept("Could not open account file for reading.");
+         else
+             Fileobj.flush();                // Begin processing file cleanly
+             QTextStream Account(&Fileobj);  // Convert data to stream
+             this->loadAccounts(Account);    // Pass off to do the real work
+             Fileobj.close();                // Finish fileop by closing
+     }
+ }
+ 
+ //
+ // Load accounts themselves data from a stream
+ //
+ void Titraqform::loadAccounts(QTextStream &Tstream)
+ {
+     using namespace std;                // Needed for hash tables with hmap
+     map<string, int> Hashnames;         // Hashtable for storing names
+     map<int, string> Hashnums;          // Hashtable for storing repetitions
+     map<string, int>::iterator Nameiter; // The hashtable name iterator
+     map<int, string>::iterator Numiter;  // The hashtable number iterator
+ 
+     QString Line;           // Used for linewise editing and whitespace eating
+ 
+     // Eat lines until reading the start accounts token
+     while (!Line.startsWith(trUtf8("%!AS-ACCOUNTS")) && !Tstream.atEnd()) {
+         Line = QString("");         // Empty line for later inspection
+         Line = Tstream.readLine();  // Get a new line to examine
+     }
+ 
+     // Strip out extra line feeds in stream
+     while (Line.isEmpty() && !Tstream.atEnd()) {
+         Tstream.skipWhiteSpace();       // Strip and get
+         Line = Tstream.readLine();      // the new line
+         if (Line.at(0) == QChar('#'))   // Remove comments
+             Line = QString("");
+     }
+ 
+     // Set the accounts choices by linewise reading from the input
+     // stream and parsing the corresponding account fields out of it
+     while (!Line.isEmpty()) {
+         QString Temp;                           // For reading from stream
+         QTextStream Asline(&Line, IO_ReadOnly); // Convert a single line
+ 
+         Asline.skipWhiteSpace();            // Remove whitespaces
+         Asline >> Temp;                     // Copy revision indicator
+ 
+         if (Temp == QString(QChar('R'))) {  // Copy the account field
+             Asline >> Temp;                 // to temporary for transfer
+             string Convstring = Temp;       // Convert to string (can't cast?)
+             Hashnames[Convstring] += Hashnames[Convstring];
+         }
+ 
+         Line = QString(""); // Clear line for next round
+         while (Line.isEmpty() && !Tstream.atEnd()) {
+             Tstream.skipWhiteSpace();       // Strip and get
+             Line = Tstream.readLine();      // the new line
+             if (Line.at(0) == QChar('#'))   // Remove comments
+                 Line = QString("");
+         }
+     }
+ 
+ //    Hashnames.insert(map<string, int>::value_type((string)QString, int));
+     for (Nameiter = Hashnames.begin(); Nameiter != Hashnames.end(); Nameiter++)
+         Hashnums[Nameiter->second] += Nameiter->first + '\n';
+ 
+ // FIXME: Put this in loadData, to load custom and most used task names before
+ // FIXME: default listings are sorted and inserted
+     for (Numiter = Hashnums.begin(); Numiter != Hashnums.end(); Numiter++) {
+ 
+         // Count the number of lines of sorted task names
+         int nNumlines = QString(Numiter->second).contains('\n');
+ 
+         // Iterate through the lines of task names, feeding them into the menu
+         for (int nIter = 0; nIter < nNumlines; nIter++)
+             *m_pTaskentries << QString(Numiter->second).section('\n', nIter, nIter);
+     }
+ }
+ 
+ //
+ // Convenience method to load personal data from a file
+ //
+ void Titraqform::loadData(QFile &Fileobj)
+ {
+     if (Fileobj.isOpen()) {             // Check state of file
+         Fileobj.flush();                // Begin processing file cleanly
+         QTextStream Asentry(&Fileobj);  // Convert data to stream
+         this->loadData(Asentry);        // Pass off to do the real work
+     }
+     else {
+         if (!Fileobj.open(IO_ReadOnly)) // Try to open file
+             throw Genexcept("Could not open personal data file for reading.");
+         else
+             Fileobj.flush();                // Begin processing file cleanly
+             QTextStream Asentry(&Fileobj);  // Convert data to stream
+             this->loadData(Asentry);        // Pass off to do the real work
+             Fileobj.close();                // Finish fileop by closing
+     }
+ }
+ 
+ //
+ // Load personal data from a stream
+ //
+ void Titraqform::loadData(QTextStream &Tstream)
+ {
+     bool bValid = true; // Used to warn on globally invalid accounting data
+     int nIter = 0;      // Iterator used in loop and also as a count
+     QString Line;       // Used for linewise editing and whitespace eating
+     QString Bitbucket;  // Used for null device until we find a better way
+ 
+     QPixmap Statokay(s_kpcStatokay_xpm);
+     QPixmap Statwarn(s_kpcStatwarn_xpm);
+     QPixmap Staterror(s_kpcStaterror_xpm);
+ 
+     // Strip out extra line feeds at stream start
+     while (Line.isEmpty() && !Tstream.atEnd()) {
+         Tstream.skipWhiteSpace();       // Strip and get
+         Line = Tstream.readLine();      // the new line
+         if (Line.at(0) == QChar('#'))   // Remove comments
+             Line = QString("");
+     }
+ 
+     // Ensure that the right data version pattern precedes the data
+     QString Datapattern = QString(TITRAQ_DATAPATTERN);
+     if (!Line.startsWith(Datapattern)) { // Incompatible data format
+         QMessageBox Problema(QString(TITRAQ_APPTITLE) + ' ' + asgui_version.v_short,
+             TITRAQ_NOPATTERNFOUND + QString(TITRAQ_DATAPATTERN) + TITRAQ_WASNOTFOUNDIN,
+             QMessageBox::Critical, QMessageBox::Ok | QMessageBox::Escape,
+             QMessageBox::NoButton, QMessageBox::NoButton);
+         Problema.exec(); // Give the user the bad news
+         throw Genexcept(TITRAQ_INVALIDDATA);
+     }
+     else if (Line.section(Datapattern, 1).section('.', 0, 0).toInt() != TITRAQ_DATAVERSIONMAJ) {
+         QMessageBox Problema(QString(TITRAQ_APPTITLE) + ' ' + asgui_version.v_short,
+             TITRAQ_BADVERSIONMAJ, QMessageBox::Warning, QMessageBox::Ok | QMessageBox::Escape,
+             QMessageBox::NoButton, QMessageBox::NoButton);
+         Problema.exec(); // Give the user the bad news
+         throw Genexcept(TITRAQ_INCOMPATDATA);
+     }
+     else if (Line.section(Datapattern, 1).section('.', 1, 1).toInt() > TITRAQ_DATAVERSIONMIN) {
+         QMessageBox Problema(QString(TITRAQ_APPTITLE) + ' ' + asgui_version.v_short,
+             TITRAQ_BADVERSIONMIN, QMessageBox::Warning, QMessageBox::Ok | QMessageBox::Escape,
+             QMessageBox::NoButton, QMessageBox::NoButton);
+         Problema.exec(); // Give the user the bad news
+         throw Genexcept(TITRAQ_INCOMPATDATA);
+     }
+ 
+     // Strip out extra line feeds after reading the data symbol
+     Line = QString("");                 // Reset our line
+     while (Line.isEmpty() && !Tstream.atEnd()) {
+         Tstream.skipWhiteSpace();       // Strip and get
+         Line = Tstream.readLine();      // the new line
+         if (Line.at(0) == QChar('#'))   // Remove comments
+             Line = QString("");
+     }
+ 
+ //    // Going into data churning, so prepare date and time parsing and conversion
+ //    Converdate.setSeparator(trUtf8("."));
+ //    Convertime.setSeparator(trUtf8(":"));
+ 
+     // Optimize viewing by repainting cells only once after processing
+     m_pMaintable->setUpdatesEnabled(false);
+ 
+     // Set the table text by linewise reading from the input stream
+     // and parsing date, time, account, and other columns out of it
+     while (!Line.isEmpty()) {
+         bool bValid = true; // Warns on linewise invalid accounting data
+         QString User, Guid, Crc, Rev;                           // Valid admin fields
+         QString Date, Start, Finish, Account, Amount, Remark;   // Valid user fields
+         QTextStream Asline(&Line, IO_ReadOnly); // Convert a single line now
+ 
+         if (nIter % g_knBlocks == 0) // Add blocks of rows to optimize loading
+             m_pMaintable->setNumRows(m_pMaintable->numRows() + g_knBlocks);
+ 
+         Asline.skipWhiteSpace();    // Remove whitespaces
+         Asline >> User;             // Copy the user field
+         if (!User.isEmpty())
+             m_pMaintable->setText(nIter, TITRAQ_IDXUSER, User);
+         else
+             bValid = false;
+ 
+         Asline.skipWhiteSpace();    // Remove whitespaces
+         Asline >> Guid;             // Copy the GUID field
+         // Postpone actual text delivery, to autoinsert GUIDs!
+ 
+         Asline.skipWhiteSpace();    // Remove whitespaces
+         Asline >> Crc;              // Copy the CRC field
+         // Postpone actual text delivery, to autoinsert CRCs!
+ 
+         Asline.skipWhiteSpace();    // Remove whitespaces
+         Asline >> Rev;              // Copy the rev field
+         if (!Rev.isEmpty())
+             m_pMaintable->setText(nIter, TITRAQ_IDXREV, Rev);
+         else
+             bValid = false;
+ 
+         Asline.skipWhiteSpace();    // Remove whitespaces
+         Asline >> Date;             // Copy the date field
+         if (!Date.isEmpty())
+             m_pMaintable->setText(nIter, TITRAQ_IDXDATE, Date);
+         else
+             bValid = false;
+ 
+         Asline.skipWhiteSpace();    // Remove whitespaces
+         Asline >> Start;            // Copy the start field
+         if (!Start.isEmpty())
+             m_pMaintable->setText(nIter, TITRAQ_IDXSTART, Start);
+         else
+             bValid = false;
+ 
+         Asline.skipWhiteSpace();    // Remove whitespaces
+         Asline >> Finish;           // Copy the finish field
+         if (!Finish.isEmpty())
+             m_pMaintable->setText(nIter, TITRAQ_IDXFINISH, Finish);
+         else
+             bValid = false;
+ 
+         Asline.skipWhiteSpace();    // Remove whitespaces
+         Asline >> Amount;           // Copy the amount field
+         if (!Amount.isEmpty())
+             m_pMaintable->setText(nIter, TITRAQ_IDXAMOUNT, Amount);
+         else
+             bValid = false;
+ 
+         Asline.skipWhiteSpace();    // Remove whitespaces
+         Asline >> Account;          // Copy the account field
+         if (!Account.isEmpty()) {
+             QTableItem *pOld = m_pMaintable->item(nIter, TITRAQ_IDXTASK);
+             delete(pOld);   // Get rid of the old before going with the new
+             RtTableItem *pSwapitem = new RtTableItem(m_pMaintable, QTableItem::WhenCurrent, Account);
+             pSwapitem->setAlignment(AlignLeft | AlignVCenter);
+             m_pMaintable->setItem(nIter, TITRAQ_IDXTASK, pSwapitem);
+         }
+         else
+             bValid = false;
+ 
+         Asline.skipWhiteSpace();    // Remove whitespaces
+         Remark = Asline.read();     // Copy the remark field
+ 
+         QRegExp Quoted("\"(.*[^\\\\])\"");                  // Get rid of
+         Quoted.search(Remark);                              // surrounding double
+         Remark = Quoted.cap(Quoted.numCaptures());          // quotes, and
+         Remark.replace(QRegExp("\\\\(.)"), QString("\\1")); // escape backslashes
+ 
+         if (!Remark.isEmpty())
+             m_pMaintable->setText(nIter, TITRAQ_IDXREMARK, Remark);
+ 
+         if (bValid) { // Show a bitmap to signal valid or error state
+             m_pMaintable->setText(nIter, TITRAQ_IDXSTATUS, QString(QChar('O')));
+             m_pMaintable->setPixmap(nIter, TITRAQ_IDXSTATUS, Statokay);
+         }
+         else {
+             m_pMaintable->setText(nIter, TITRAQ_IDXSTATUS, QString(QChar('E')));
+             m_pMaintable->setPixmap(nIter, TITRAQ_IDXSTATUS, Staterror);
+         }
+ 
+         // Set the GUID text here, in case we need to generate a fresh value
+         if (!Guid.isEmpty()) {
+             if (Guid != ".")    // This means, generate a fresh GUID value
+                 m_pMaintable->setText(nIter, TITRAQ_IDXGUID, Guid);
+             else {
+                 AS::Uuid Guidi; // For GUID production
+                 Guidi.genId();
+                 m_pMaintable->setText(nIter, TITRAQ_IDXGUID, Guidi.getString());
+             }
+         }
+         else // if isEmpty()
+             bValid = false;
+ 
+         // Set the CRC text here, in case we need to generate a fresh value
+         if (!Crc.isEmpty()) {
+             if (Crc != ".") // This means, generate a fresh CRC value
+                 m_pMaintable->setText(nIter, TITRAQ_IDXCRC, "0x" + Crc);
+             else {
+                 // Make our long tuple to run through the CRC32 generator
+                 Qualistring Testuple = User + Guid + Rev + Date + Start;
+                             Testuple += Finish + Amount + Account + Remark;
+                 U32 Valcrc = Testuple.getCrc(); // Finally set the checksum to its new value
+                 QString Crcstr = QString::number(Valcrc, 16).rightJustify(8, '0');
+                 m_pMaintable->setText(nIter, TITRAQ_IDXCRC, "0x" + Crcstr);
+             }
+         }
+         else // if isEmpty()
+             bValid = false;
+ 
+         nIter++;            // The big increment
+         Line = QString(""); // Clear line for next round
+ 
+         while (Line.isEmpty() && !Tstream.atEnd()) {    // Strip and get
+             Tstream.skipWhiteSpace();                   // Remove white
+             Line = Tstream.readLine();                  // the new line
+             if (Line.at(0) == QChar('#'))               // Remove comments
+                 Line = QString("");
+         }
+     }
+ 
+ //    // Start sorting order and direction correctly according to user preferences
+ //    int nSortcol = (int)m_pPrefs->getNumber(TITRAQ_PREFSORTCOL, TITRAQ_DEFSORTCOL);
+ //    bool bSortdir = m_pPrefs->getBool(TITRAQ_PREFSORTDIR, TITRAQ_DEFSORTDIR);
+ //    m_pMaintable->setSortdir(!bSortdir); // Hack! Fake sortdir so we start right
+ //    m_pMaintable->sortColumn(nSortcol, bSortdir);
+ 
+     // Write nonsaving line numbers for all rows
+     for (int nIter = m_pMaintable->numRows() - 1; nIter >= 0; nIter--)
+         m_pMaintable->setText(nIter, TITRAQ_IDXLINE, QString::number(nIter).rightJustify(4, QChar('0')));
+ 
+     m_pMaintable->setUpdatesEnabled(true);      // Update and repaint
+     m_pMaintable->setNumRows(nIter);            // No excess rows
+     m_pMaintable->setCurrentCell(nIter - 1, 0); // Move focus to last row
+     m_pMaintable->ensureCellVisible(nIter - 1, 0); // Scroll please
+ 
+     if (!bValid)
+         throw Genexcept("Warning: invalid accounting data.");
+ }
+ 
+ //
+ // Convenience method to save accounting data to a file
+ //
+ void Titraqform::saveData(QFile &Fileobj)
+ {
+     if (Fileobj.isOpen()) {             // Check state of file
+         Fileobj.flush();                // Begin processing file cleanly
+         QTextStream Asentry(&Fileobj);  // Convert data to stream
+         this->saveData(Asentry);        // Pass off to do the real work
+     }
+     else {
+         if (!Fileobj.open(IO_WriteOnly)) // Try to open file
+             throw Genexcept("Could not open personal data file for writing.");
+         QTextStream Asentry(&Fileobj);  // Convert data to stream
+         this->saveData(Asentry);        // Pass off to do the real work
+         Fileobj.close();                // Finish fileop by closing
+     }
+ }
+ 
+ //
+ // Save accounting data to a stream
+ //
+ void Titraqform::saveData(QTextStream &Tstream)
+ {
+     const int nRows = m_pMaintable->numRows();      // Max rows used in loop
+     QString Tempfield;                              // Current field string
+     QString Strsearch;                              // String to strip search
+     QRegExp Stripper("\\s*$");                      // Pattern to strip off
+ 
+     // Start by prepending the AS data format version symbol
+     Tstream << TITRAQ_DATAPATTERN << TITRAQ_DATAVERSIONMAJ
+             << QChar('.') << TITRAQ_DATAVERSIONMIN << endl;
+ 
+     // Linewise save from the main table date, time, account, and others
+     for (int nIter = 0; nIter < nRows; nIter++) {
+         Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXUSER);      // Load user field text
+         if (Tempfield != NULL)
+             Tstream << Tempfield;                                   // Save user field text
+ 
+         Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXGUID);      // Load GUID field text
+         if (Tempfield != NULL)
+             Tstream << trUtf8(" ") << Tempfield;                    // Save GUID field text
+ 
+         Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXCRC);       // Load CRC field text
+         Tempfield.remove("0x");
+         if (Tempfield != NULL)
+             Tstream << trUtf8(" ") << Tempfield;                    // Save CRC field text
+ 
+         Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXREV);       // Load rev field text
+         if (Tempfield != NULL)
+             Tstream << trUtf8(" ") << Tempfield;                    // Save rev field text
+ 
+         Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXDATE);      // Load date field text
+         if (Tempfield != NULL)
+             Tstream << trUtf8(" ") << Tempfield;                    // Save date field text
+ 
+         Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXSTART);     // Load start field text
+         if (Tempfield != NULL)
+             Tstream << trUtf8(" ") << Tempfield;                    // Save start field text
+ 
+         Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXFINISH);    // Load end field text
+         if (Tempfield != NULL)
+             Tstream << trUtf8(" ") << Tempfield;                    // Save end field text
+ 
+         Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXAMOUNT);    // Load amount field text
+         if (Tempfield != NULL)
+             Tstream << trUtf8(" ") << Tempfield;                    // Save amount
+ 
+         Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXTASK);      // Load acct field text
+         if (Tempfield != NULL)
+             Tstream << trUtf8(" ") << Tempfield;                    // Save acct field text
+ 
+         Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXREMARK);    // Load remark field text
+         Tstream << trUtf8(" \"");                                   // Save beginning double quote
+         if (Tempfield != NULL) {
+             Strsearch = QRegExp::escape(Tempfield);                 // Incoming string escaped
+             Stripper.search(Strsearch);
+             Tempfield.truncate(Stripper.pos());                     // Cut off whitespace
+             Tempfield.replace(QChar('\\'), QString("\\\\"));        // Escape back slashes
+             Tempfield.replace(QChar('\"'), QString("\\\""));        // Escape double quotes
+             Tstream << Tempfield;                                   // Save remark field text
+         }
+         Tstream << trUtf8("\"");                                    // Save ending double quote
+ 
+         Tstream << endl;                                            // Append a newline
+     }
+ }
+ 
+ //
+ // Get a whole row of data
+ //
+ const QString Titraqform::getRowdata(void) const
+ {
+     QString Rowdata, Tempstring;                            // For output string
+     QTableSelection Select = m_pMaintable->selection(0);    // Highlighted text
+     int nTotal = Select.bottomRow() - Select.topRow() + 1;  // Total row select
+ 
+     // Calculate rows to delete from selection highlight
+     for (int nIter = 0; nIter < nTotal; ++nIter) {
+         // Build the row data string one field at a time, adding seps inbetween
+         Tempstring = m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXLINE);
+         if (!Tempstring.isEmpty())
+             Rowdata += Tempstring;
+         Tempstring = m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXUSER);
+         if (!Tempstring.isEmpty())
+             Rowdata += TITRAQ_SEPARATORTOK + Tempstring;
+         Tempstring = m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXGUID);
+         if (!Tempstring.isEmpty())
+             Rowdata += TITRAQ_SEPARATORTOK + Tempstring;
+         Tempstring = m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXCRC);
+         if (!Tempstring.isEmpty())
+             Rowdata += TITRAQ_SEPARATORTOK + Tempstring;
+         Tempstring = m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXREV);
+         if (!Tempstring.isEmpty())
+             Rowdata += TITRAQ_SEPARATORTOK + Tempstring;
+         Tempstring = m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXDATE);
+         if (!Tempstring.isEmpty())
+             Rowdata += TITRAQ_SEPARATORTOK + Tempstring;
+         Tempstring = m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXSTART);
+         if (!Tempstring.isEmpty())
+             Rowdata += TITRAQ_SEPARATORTOK + Tempstring;
+         Tempstring = m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXFINISH);
+         if (!Tempstring.isEmpty())
+             Rowdata += TITRAQ_SEPARATORTOK + Tempstring;
+         Tempstring = m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXAMOUNT);
+         if (!Tempstring.isEmpty())
+             Rowdata += TITRAQ_SEPARATORTOK + Tempstring;
+         Tempstring = m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXTASK);
+         if (!Tempstring.isEmpty())
+             Rowdata += TITRAQ_SEPARATORTOK + Tempstring;
+         Tempstring = m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXREMARK);
+         if (!Tempstring.isEmpty())
+             Rowdata += TITRAQ_SEPARATORTOK + Tempstring;
+         Rowdata += trUtf8("\n");    // Finish off line
+     }
+ 
+     return Rowdata;
+ }
+ 
+ //
+ // Set a whole row of data
+ //
+ void Titraqform::setRowdata(QString &Rowdata) const
+ {
+     int nRows = Rowdata.contains(QChar('\n'));          // Set so many rows
+     int nCurrentrow = m_pMaintable->currentRow();       // Current table row
+     QTableItem *pItem = NULL;                           // Old item to change out
+     QString Line, User, Guid, Crc, Rev;                 // Admin fields in table
+     QString Date, Start, Finish, Amount, Task, Remark;  // Viewable fields in table
+     QTextStream Datastream(&Rowdata, IO_ReadOnly);      // Convert data to stream
+ 
+     for (int nIter = 0; nIter < nRows; ++nIter) {
+         QString Singlerow = Datastream.readLine();              // For linewise operation
+         QTextStream Rowstream(&Singlerow, IO_ReadOnly);         // Convert row to stream
+ 
+         Rowstream >> Line >> User >> Guid >> Crc >> Rev;        // Stream data fields
+         Rowstream >> Date >> Start >> Finish >> Amount >> Task; // to corresponding vars
+         Remark = Rowstream.readLine();                          // Remark is a whole line
+ 
+         // Set the table row data one field at a time, skipping seps inbetween
+         // Importantly, do not copy over the GUID, which must be unique each row
+         m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXLINE, Line);
+         m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXUSER, User);
+         m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXCRC, Crc);
+         m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXREV, Rev);
+         m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXDATE, Date);
+         m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXSTART, Start);
+         m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXFINISH, Finish);
+         m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXAMOUNT, Amount);
+ 
+ //        // FIXME: Why doesn't this code change the RtTableItem text in place?
+ //        RtTableItem *pTask = NULL;                      // Derived and special
+ //        pItem = m_pMaintable->item(nCurrentrow + nIter, TITRAQ_IDXTASK);
+ //        pTask = static_cast<RtTableItem *>(pItem);
+ //        pTask->setText(Task);
+ 
+         // Change out old item and replace with new task data
+         pItem = m_pMaintable->item(nCurrentrow + nIter, TITRAQ_IDXTASK);
+         delete(pItem);  // Get rid of the old before going with the new
+         RtTableItem *pSwapitem = new RtTableItem(m_pMaintable, QTableItem::WhenCurrent, Task);
+         pSwapitem->setAlignment(AlignLeft | AlignVCenter);
+         m_pMaintable->setItem(nCurrentrow + nIter, TITRAQ_IDXTASK, pSwapitem);
+ 
+         // Continue with field processing business as usual
+         m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXREMARK, Remark.simplifyWhiteSpace());
+     }
+ }
+ 
+ //
+ // Discover which column is the first in view
+ //
+ const int Titraqform::getFirstcol(void) const
+ {
+     int nIter = 0;  // Is both iterator in loop and column number returned
+ 
+     // Use column selector menu popup as sole key to determining column state
+     while (nIter < TITRAQ_IDXTAIL && !m_pColspopup->isItemChecked(m_pColspopup->idAt(++nIter)))
+         TITRAQ_NOP;
+ 
+     return nIter - 1; // Return one less to account for start of item offset
+ }


ossp-pkg/as/as-gui/as_datedit.h -> 1.2

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,49 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  as_datedit.h: ISO C++ interface
+ //
+ 
+ #ifndef DATEDIT_H
+ #define DATEDIT_H
+ 
+ #include <qdatetimeedit.h>
+ 
+ #define TITRAQ_DAYSECTION 2
+ 
+ class Daydatedit : public QDateEdit
+ {
+ public:
+     Daydatedit(QWidget *pParent = 0,  const char *m_kszName = NULL) :
+         QDateEdit(pParent, m_kszName) {};
+     Daydatedit(const QDate &Date, QWidget *pParent = 0,  const char *m_kszName = NULL) :
+         QDateEdit(Date, pParent, m_kszName) {};
+     bool setDayfocus(void) {return setFocusSection(TITRAQ_DAYSECTION);};
+ };
+ 
+ #endif // DATEDIT_H


ossp-pkg/as/as-gui/as_except.cpp -> 1.5

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,47 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  titrex.cpp: ISO C++ implementation
+ //
+ 
+ #include "as_except.h"
+ 
+ 
+ // Report general exception
+ void Genexcept::reportErr(void)
+ {
+     QTextOStream Errstream(stderr);
+ 
+     // Basically, print the message and exit
+     Errstream << szMessage << endl;
+ }
+ 
+ // Destroy general exception
+ Genexcept::~Genexcept(void)
+ {
+ }


ossp-pkg/as/as-gui/as_except.h -> 1.4

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,52 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  titrex.h: ISO C++ interface
+ //
+ 
+ #ifndef TITRAQEXCEPT_H
+ #define TITRAQEXCEPT_H
+ 
+ #include <qtextstream.h>
+ 
+ 
+ // General string-based exceptions
+ // FIXME: Rewrite according to
+ // OSSP error handling policy
+ class Genexcept
+ {
+ private:
+     char *szMessage;
+ 
+ public:
+     Genexcept(char *szInmess) {szMessage = szInmess;};
+     void reportErr(void);
+     ~Genexcept(void);
+ };
+ 
+ #endif // TITRAQEXCEPT_H


ossp-pkg/as/as-gui/as_generic.cpp -> 1.6

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,72 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  generic.cpp: ISO C++ implementation
+ //
+ 
+ #include <qobject.h>
+ 
+ #include "as_generic.h"
+ 
+ 
+ // Construct a Prototype object
+ Prototype::Prototype()
+ {
+     // For display of a prototype implementation
+     QString Namever = QString("AS Accounting System");
+     m_pProtomsg = new QMessageBox(Namever,
+         QObject::trUtf8("This method is not implemented yet."),
+         QMessageBox::NoIcon, QMessageBox::Ok | QMessageBox::Default,
+         QMessageBox::Cancel | QMessageBox::Escape, QMessageBox::NoButton,
+         NULL, "Prototypemsg", true, Qt::WStyle_NormalBorder);
+ }
+ 
+ // Destroy a Prototype object
+ Prototype::~Prototype()
+ {
+     // Destroy our QMessageBox
+     delete m_pProtomsg;
+ }
+ 
+ // Display a message box, acting as an implementation prototype
+ void Prototype::doMbox()
+ {
+     int nRet; // Return value
+ 
+     // Launch our QMessageBox
+     nRet = m_pProtomsg->exec();
+ 
+     // Handle message box modality
+     switch (nRet) {
+     case QMessageBox::Ok:
+         break;
+     case QMessageBox::Cancel:
+     default: // Just for sanity
+         break;
+     }
+ }


ossp-pkg/as/as-gui/as_generic.h -> 1.4

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,52 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  generic.h: ISO C++ interface
+ //
+ 
+ #ifndef GENERIC_H
+ #define GENERIC_H
+ 
+ #include <qmessagebox.h>
+ 
+ 
+ // Prototype stubs for unimplemented methods, widgets, and features
+ class Prototype
+ {
+ public:
+     Prototype();
+     void doMbox();
+     ~Prototype(void);
+ 
+ protected:
+ 
+ private:
+     QMessageBox *m_pProtomsg;   // Display prototype implementation
+ };
+ 
+ #endif // GENERIC_H


ossp-pkg/as/as-gui/as_gfx/cwlogo.xpm 1.2 -> 1.3

--- cwlogo.xpm   2002/11/28 20:44:39     1.2
+++ cwlogo.xpm   2003/11/20 11:31:48     1.3
@@ -1,9 +1,9 @@
 /*
 **  OSSP asgui - Accounting system graphical user interface
 **  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
-**  Copyright (c) 2002-2003 Cable & Wireless Deutschland (http://www.cw.com/de/)
 **  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
 **  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+**  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
 **
 **  This file is part of OSSP asgui, an accounting system graphical user
 **  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.


ossp-pkg/as/as-gui/as_gfx/osspicon.xpm 1.2 -> 1.3

--- osspicon.xpm 2002/11/28 20:44:39     1.2
+++ osspicon.xpm 2003/11/20 11:31:48     1.3
@@ -1,9 +1,9 @@
 /*
 **  OSSP asgui - Accounting system graphical user interface
 **  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
-**  Copyright (c) 2002-2003 Cable & Wireless Deutschland (http://www.cw.com/de/)
 **  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
 **  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+**  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
 **
 **  This file is part of OSSP asgui, an accounting system graphical user
 **  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.


ossp-pkg/as/as-gui/as_gfx/ossplogo.xpm 1.5 -> 1.6

--- ossplogo.xpm 2002/11/28 20:44:39     1.5
+++ ossplogo.xpm 2003/11/20 11:31:48     1.6
@@ -1,9 +1,9 @@
 /*
 **  OSSP asgui - Accounting system graphical user interface
 **  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
-**  Copyright (c) 2002-2003 Cable & Wireless Deutschland (http://www.cw.com/de/)
 **  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
 **  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+**  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
 **
 **  This file is part of OSSP asgui, an accounting system graphical user
 **  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.


ossp-pkg/as/as-gui/as_gfx/refresh.xpm -> 1.3

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,124 ----
+ /*
+ **  OSSP asgui - Accounting system graphical user interface
+ **  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ **  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ **  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ **  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ **
+ **  This file is part of OSSP asgui, an accounting system graphical user
+ **  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ **
+ **  Permission to use, copy, modify, and distribute this software for
+ **  any purpose with or without fee is hereby granted, provided that
+ **  the above copyright notice and this permission notice appear in all
+ **  copies.
+ **
+ **  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ **  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ **  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ **  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ **  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ **  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ **  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ **  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ **  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ **  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ **  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ **  SUCH DAMAGE.
+ **
+ **  refresh.xpm: X pixmap image
+ */
+ 
+ /* XPM */
+ static const char *s_kpcRefresh_xpm[] = {
+ "22 22 68 1",
+ "      c None",
+ ".     c #000000",
+ "+     c #624F1D",
+ "@     c #A7852B",
+ "#     c #997514",
+ "$     c #906C0D",
+ "%     c #4B3704",
+ "&     c #0F0C04",
+ "*     c #BE9A38",
+ "=     c #A87E0E",
+ "-     c #9B7100",
+ ";     c #956C00",
+ ">     c #8D6600",
+ ",     c #7F5C00",
+ "'     c #090600",
+ ")     c #A38128",
+ "!     c #B6870A",
+ "~     c #AB7C00",
+ "{     c #A37700",
+ "]     c #906900",
+ "^     c #594100",
+ "/     c #271C00",
+ "(     c #7E5C00",
+ "_     c #201806",
+ ":     c #1F1808",
+ "<     c #D5AA36",
+ "[     c #C4920D",
+ "}     c #B98700",
+ "|     c #B28200",
+ "1     c #A47700",
+ "2     c #5C4300",
+ "3     c #9B791E",
+ "4     c #342500",
+ "5     c #C99917",
+ "6     c #C19828",
+ "7     c #D39C07",
+ "8     c #C99200",
+ "9     c #C18C00",
+ "0     c #AA7C00",
+ "a     c #674B00",
+ "b     c #100B00",
+ "c     c #433000",
+ "d     c #EEB315",
+ "e     c #E9AD0B",
+ "f     c #E1A70A",
+ "g     c #D89D00",
+ "h     c #D19800",
+ "i     c #BC8900",
+ "j     c #362700",
+ "k     c #F3B715",
+ "l     c #EDAD00",
+ "m     c #E6A800",
+ "n     c #DFA200",
+ "o     c #C38E00",
+ "p     c #745400",
+ "q     c #0D0900",
+ "r     c #F8BA15",
+ "s     c #F2B000",
+ "t     c #FDBE15",
+ "u     c #F8B500",
+ "v     c #EEAD00",
+ "w     c #D99E00",
+ "x     c #4F3900",
+ "y     c #513B00",
+ "z     c #523B00",
+ "A     c #543D00",
+ "B     c #563E00",
+ "C     c #705100",
+ "                      ",
+ "         ...          ",
+ "       .+@#$%.        ",
+ "      &*=-;>,'        ",
+ " .   .)!~{]^/(.       ",
+ " ._ :<[}|12. 34       ",
+ " .5.67890ab   c       ",
+ " .defghia.    j       ",
+ " .klmnopq     .       ",
+ " .rslm(.              ",
+ " .tusvw.     .xyzABC. ",
+ " .CBAzyx.      .wvsut ",
+ "               .(mlsr ",
+ "        .     qponmlk ",
+ "        j    .aihgfed ",
+ "        c   ba09876.5 ",
+ "        43 .21|}[<: _ ",
+ "        .(/^]{~!).    ",
+ "         ',>;-=*&     ",
+ "         .%$#@+.      ",
+ "           ...        ",
+ "                      "};


ossp-pkg/as/as-gui/as_gfx/refreshd.xpm -> 1.3

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,108 ----
+ /*
+ **  OSSP asgui - Accounting system graphical user interface
+ **  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ **  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ **  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ **  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ **
+ **  This file is part of OSSP asgui, an accounting system graphical user
+ **  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ **
+ **  Permission to use, copy, modify, and distribute this software for
+ **  any purpose with or without fee is hereby granted, provided that
+ **  the above copyright notice and this permission notice appear in all
+ **  copies.
+ **
+ **  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ **  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ **  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ **  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ **  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ **  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ **  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ **  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ **  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ **  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ **  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ **  SUCH DAMAGE.
+ **
+ **  refreshd.xpm: X pixmap image
+ */
+ 
+ /* XPM */
+ static const char *s_kpcDrefresh_xpm[] = {
+ "22 22 52 1",
+ "      g None",
+ ".     g #7F7F7F",
+ "+     g #A1A1A1",
+ "@     g #BABABA",
+ "#     g #B3B3B3",
+ "$     g #AFAFAF",
+ "%     g #979797",
+ "&     g #848484",
+ "*     g #C4C4C4",
+ "=     g #B7B7B7",
+ "-     g #B1B1B1",
+ ";     g #ACACAC",
+ ">     g #A7A7A7",
+ ",     g #828282",
+ "'     g #B8B8B8",
+ ")     g #BBBBBB",
+ "!     g #B6B6B6",
+ "~     g #B4B4B4",
+ "{     g #ADADAD",
+ "]     g #9B9B9B",
+ "^     g #8B8B8B",
+ "/     g #898989",
+ "(     g #CCCCCC",
+ "_     g #C0C0C0",
+ ":     g #B9B9B9",
+ "<     g #9C9C9C",
+ "[     g #B5B5B5",
+ "}     g #8F8F8F",
+ "|     g #C3C3C3",
+ "1     g #C5C5C5",
+ "2     g #BEBEBE",
+ "3     g #A0A0A0",
+ "4     g #949494",
+ "5     g #D1D1D1",
+ "6     g #CECECE",
+ "7     g #CBCBCB",
+ "8     g #C6C6C6",
+ "9     g #BCBCBC",
+ "0     g #909090",
+ "a     g #D3D3D3",
+ "b     g #C8C8C8",
+ "c     g #BFBFBF",
+ "d     g #A4A4A4",
+ "e     g #838383",
+ "f     g #D4D4D4",
+ "g     g #CFCFCF",
+ "h     g #D7D7D7",
+ "i     g #D2D2D2",
+ "j     g #989898",
+ "k     g #999999",
+ "l     g #9A9A9A",
+ "m     g #A2A2A2",
+ "                      ",
+ "         ...          ",
+ "       .+@#$%.        ",
+ "      &*=-$;>,        ",
+ " .   .')!~{]^>.       ",
+ " ./ /(_):~<. [}       ",
+ " .*.|1_2!3&   4       ",
+ " .5678|93.    0       ",
+ " .a67bcde     .       ",
+ " .fg67>.              ",
+ " .hig68.     .jkkklm. ",
+ " .mlkkkj.      .86gih ",
+ "               .>76gf ",
+ "        .     edcb76a ",
+ "        0    .39|8765 ",
+ "        4   &3!2_1|.* ",
+ "        }[ .<~:)_(/ / ",
+ "        .>^]{~!)'.    ",
+ "         ,>;$-=*&     ",
+ "         .%$#@+.      ",
+ "           ...        ",
+ "                      "};


ossp-pkg/as/as-gui/as_gfx/revcolour.xpm -> 1.2

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,38 ----
+ /*
+ **  OSSP asgui - Accounting system graphical user interface
+ **  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ **  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ **  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ **  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ **
+ **  This file is part of OSSP asgui, an accounting system graphical user
+ **  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ **
+ **  Permission to use, copy, modify, and distribute this software for
+ **  any purpose with or without fee is hereby granted, provided that
+ **  the above copyright notice and this permission notice appear in all
+ **  copies.
+ **
+ **  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ **  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ **  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ **  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ **  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ **  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ **  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ **  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ **  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ **  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ **  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ **  SUCH DAMAGE.
+ **
+ **  revcolour.xpm: X pixmap image
+ */
+ 
+ /* XPM */
+ static const char *s_kpcRevcolour_xpm[] = {
+ "2 1 3 1",
+ "      c None",
+ ".     c #F8F8F0",
+ "+     c #E0E0D8",
+ ".+"};


ossp-pkg/as/as-gui/as_gfx/rowadd.xpm 1.2 -> 1.3

--- rowadd.xpm   2002/11/28 20:44:39     1.2
+++ rowadd.xpm   2003/11/20 11:31:48     1.3
@@ -1,9 +1,9 @@
 /*
 **  OSSP asgui - Accounting system graphical user interface
 **  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
-**  Copyright (c) 2002-2003 Cable & Wireless Deutschland (http://www.cw.com/de/)
 **  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
 **  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+**  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
 **
 **  This file is part of OSSP asgui, an accounting system graphical user
 **  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.


ossp-pkg/as/as-gui/as_gfx/rowaddd.xpm -> 1.4

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,120 ----
+ /*
+ **  OSSP asgui - Accounting system graphical user interface
+ **  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ **  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ **  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ **  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ **
+ **  This file is part of OSSP asgui, an accounting system graphical user
+ **  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ **
+ **  Permission to use, copy, modify, and distribute this software for
+ **  any purpose with or without fee is hereby granted, provided that
+ **  the above copyright notice and this permission notice appear in all
+ **  copies.
+ **
+ **  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ **  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ **  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ **  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ **  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ **  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ **  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ **  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ **  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ **  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ **  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ **  SUCH DAMAGE.
+ **
+ **  rowaddd.xpm: X pixmap image
+ */
+ 
+ /* XPM */
+ static const char *s_kpcDrowadd_xpm[] = {
+ "22 22 64 1",
+ "      g None",
+ ".     g #BBBBBB",
+ "+     g #B2B2B2",
+ "@     g #ACACAC",
+ "#     g #A5A5A5",
+ "$     g #919191",
+ "%     g #E7E7E7",
+ "&     g #FDFDFD",
+ "*     g #9A9A9A",
+ "=     g #A1A1A1",
+ "-     g #CBCBCB",
+ ";     g #D8D8D8",
+ ">     g #7F7F7F",
+ ",     g #FCFCFC",
+ "'     g #FAFAFA",
+ ")     g #B5B5B5",
+ "!     g #C9C9C9",
+ "~     g #DDDDDD",
+ "{     g #C8C8C8",
+ "]     g #A4A4A4",
+ "^     g #BFBFBF",
+ "/     g #AEAEAE",
+ "(     g #B8B8B8",
+ "_     g #F7F7F7",
+ ":     g #F5F5F5",
+ "<     g #F3F3F3",
+ "[     g #C6C6C6",
+ "}     g #D7D7D7",
+ "|     g #AFAFAF",
+ "1     g #C2C2C2",
+ "2     g #A0A0A0",
+ "3     g #BEBEBE",
+ "4     g #C5C5C5",
+ "5     g #E2E2E2",
+ "6     g #E9E9E9",
+ "7     g #EBEBEB",
+ "8     g #D1D1D1",
+ "9     g #ABABAB",
+ "0     g #E1E1E1",
+ "a     g #E8E8E8",
+ "b     g #C1C1C1",
+ "c     g #D0D0D0",
+ "d     g #D9D9D9",
+ "e     g #B1B1B1",
+ "f     g #DEDEDE",
+ "g     g #A9A9A9",
+ "h     g #B4B4B4",
+ "i     g #A3A3A3",
+ "j     g #E0E0E0",
+ "k     g #E3E3E3",
+ "l     g #CCCCCC",
+ "m     g #BDBDBD",
+ "n     g #AAAAAA",
+ "o     g #BCBCBC",
+ "p     g #CACACA",
+ "q     g #DBDBDB",
+ "r     g #B6B6B6",
+ "s     g #C0C0C0",
+ "t     g #B7B7B7",
+ "u     g #999999",
+ "v     g #939393",
+ "w     g #909090",
+ "x     g #DADADA",
+ "y     g #C7C7C7",
+ "  .+@@@@@@@@@@@@@#$   ",
+ " .%&&&*=&&&&&&&-&&;>  ",
+ " @,'''=)'''''''!''~>  ",
+ " @!{{{]^{{{{{{{/{{(>  ",
+ " @_:::]^:::::::{::;>  ",
+ " @:<<<]^<<<<<<<[<<}>  ",
+ " @*=]]|11|]]]]]]]]]>  ",
+ " @2)^^1{{13^^^^^^^^>  ",
+ "4@55555567777771778>  ",
+ "4@5@>>>90a6a666b66c>  ",
+ "4@5>dde>f^^^^^^g^^e>  ",
+ "4ha>d1i>dj555kk3kkl>  ",
+ ">>>>dmn>>>90jjjojjp>  ",
+ ">dddqmrmse>f...#../>  ",
+ ">d1mmt++@u>djjj3jjl>  ",
+ ">einr+2vww>;jjjojjp>  ",
+ ">>>>m+v>>>]d...#../>  ",
+ "44}>s@w>xxxxxxx3xxl>  ",
+ " @4>euw>xxxxxxx3xxl>  ",
+ " @ >>>>>1111111n13y>  ",
+ " @>>>>>>>>>>>>>>>>>>  ",
+ "                      "};


ossp-pkg/as/as-gui/as_gfx/rowdel.xpm 1.2 -> 1.3

--- rowdel.xpm   2002/11/28 20:44:39     1.2
+++ rowdel.xpm   2003/11/20 11:31:48     1.3
@@ -1,9 +1,9 @@
 /*
 **  OSSP asgui - Accounting system graphical user interface
 **  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
-**  Copyright (c) 2002-2003 Cable & Wireless Deutschland (http://www.cw.com/de/)
 **  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
 **  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+**  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
 **
 **  This file is part of OSSP asgui, an accounting system graphical user
 **  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.


ossp-pkg/as/as-gui/as_gfx/rowdeld.xpm -> 1.3

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,115 ----
+ /*
+ **  OSSP asgui - Accounting system graphical user interface
+ **  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ **  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ **  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ **  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ **
+ **  This file is part of OSSP asgui, an accounting system graphical user
+ **  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ **
+ **  Permission to use, copy, modify, and distribute this software for
+ **  any purpose with or without fee is hereby granted, provided that
+ **  the above copyright notice and this permission notice appear in all
+ **  copies.
+ **
+ **  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ **  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ **  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ **  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ **  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ **  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ **  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ **  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ **  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ **  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ **  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ **  SUCH DAMAGE.
+ **
+ **  rowdeld.xpm: X pixmap image
+ */
+ 
+ /* XPM */
+ static const char *s_kpcDrowdel_xpm[] = {
+ "22 22 59 1",
+ "      g None",
+ ".     g #BBBBBB",
+ "+     g #B2B2B2",
+ "@     g #ACACAC",
+ "#     g #A5A5A5",
+ "$     g #919191",
+ "%     g #E7E7E7",
+ "&     g #FDFDFD",
+ "*     g #9A9A9A",
+ "=     g #A1A1A1",
+ "-     g #CBCBCB",
+ ";     g #D8D8D8",
+ ">     g #7F7F7F",
+ ",     g #FCFCFC",
+ "'     g #FAFAFA",
+ ")     g #B5B5B5",
+ "!     g #C9C9C9",
+ "~     g #DDDDDD",
+ "{     g #C8C8C8",
+ "]     g #A4A4A4",
+ "^     g #BFBFBF",
+ "/     g #AEAEAE",
+ "(     g #B8B8B8",
+ "_     g #F7F7F7",
+ ":     g #F5F5F5",
+ "<     g #F3F3F3",
+ "[     g #C6C6C6",
+ "}     g #D7D7D7",
+ "|     g #AFAFAF",
+ "1     g #C2C2C2",
+ "2     g #A0A0A0",
+ "3     g #BEBEBE",
+ "4     g #C5C5C5",
+ "5     g #EBEBEB",
+ "6     g #D1D1D1",
+ "7     g #E9E9E9",
+ "8     g #E8E8E8",
+ "9     g #C1C1C1",
+ "0     g #D0D0D0",
+ "a     g #A9A9A9",
+ "b     g #B1B1B1",
+ "c     g #B4B4B4",
+ "d     g #E2E2E2",
+ "e     g #E3E3E3",
+ "f     g #CCCCCC",
+ "g     g #ABABAB",
+ "h     g #E1E1E1",
+ "i     g #E0E0E0",
+ "j     g #BCBCBC",
+ "k     g #CACACA",
+ "l     g #D9D9D9",
+ "m     g #DBDBDB",
+ "n     g #DEDEDE",
+ "o     g #BDBDBD",
+ "p     g #999999",
+ "q     g #909090",
+ "r     g #DADADA",
+ "s     g #AAAAAA",
+ "t     g #C7C7C7",
+ "  .+@@@@@@@@@@@@@#$   ",
+ " .%&&&*=&&&&&&&-&&;>  ",
+ " @,'''=)'''''''!''~>  ",
+ " @!{{{]^{{{{{{{/{{(>  ",
+ " @_:::]^:::::::{::;>  ",
+ " @:<<<]^<<<<<<<[<<}>  ",
+ " @*=]]|11|]]]]]]]]]>  ",
+ " @2)^^1{{13^^^^^^^^>  ",
+ "4@55555555555551556>  ",
+ "4@78777777787779770>  ",
+ "4@^^^^^^^^^^^^^a^^b>  ",
+ "4c8dddddeedddee3eef>  ",
+ ">>>>>>>>>>ghiiijiik>  ",
+ ">lllmllllb>n...#../>  ",
+ ">l1oooooop>liii3iif>  ",
+ ">b2222222q>;iiijiik>  ",
+ ">>>>>>>>>>]l...#../>  ",
+ "44}rrrrrrrrrrrr3rrf>  ",
+ " @4rrrrrrrrrrrr3rrf>  ",
+ " @ 111111111111s13t>  ",
+ " @>>>>>>>>>>>>>>>>>>  ",
+ "                      "};


ossp-pkg/as/as-gui/as_gfx/sync.xpm -> 1.3

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,77 ----
+ /*
+ **  OSSP asgui - Accounting system graphical user interface
+ **  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ **  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ **  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ **  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ **
+ **  This file is part of OSSP asgui, an accounting system graphical user
+ **  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ **
+ **  Permission to use, copy, modify, and distribute this software for
+ **  any purpose with or without fee is hereby granted, provided that
+ **  the above copyright notice and this permission notice appear in all
+ **  copies.
+ **
+ **  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ **  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ **  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ **  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ **  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ **  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ **  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ **  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ **  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ **  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ **  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ **  SUCH DAMAGE.
+ **
+ **  sync.xpm: X pixmap image
+ */
+ 
+ /* XPM */
+ static const char *s_kpcSync_xpm[] = {
+ "22 22 21 1",
+ "      c None",
+ ".     c #000000",
+ "+     c #55551D",
+ "@     c #4C4C16",
+ "#     c #343408",
+ "$     c #555555",
+ "%     c #4C4C4C",
+ "&     c #343434",
+ "*     c #B6DB45",
+ "=     c #A7D31C",
+ "-     c #0082F1",
+ ";     c #0075D8",
+ ">     c #4A4A14",
+ ",     c #B2D93A",
+ "'     c #85A900",
+ ")     c #4A4A4A",
+ "!     c #007EEC",
+ "~     c #004ACC",
+ "{     c #363636",
+ "]     c #799A00",
+ "^     c #003AC9",
+ "                      ",
+ "    .          ....   ",
+ "   ..              .  ",
+ "    .           ...   ",
+ "    .          .      ",
+ "    .     ..   .....  ",
+ "                      ",
+ "  +@#.    ..    $%&.  ",
+ "  @*=.          %-;.  ",
+ "  >,'.    ..    )!~.  ",
+ "  >,'.          )!~.  ",
+ "  >,'.    .. .  )!~.  ",
+ "  >,'.       .. )!~.  ",
+ "  >,'...........{!~.  ",
+ "  >,'.       .. )!~.  ",
+ "  >,'.    .. .  )!~.  ",
+ "  >,'.          )!~.  ",
+ "  >,'.    ..    )!~.  ",
+ "  #=].          &;^.  ",
+ "  ....    ..    ....  ",
+ "                      ",
+ "                      "};


ossp-pkg/as/as-gui/as_gui.cpp -> 1.41

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,100 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  titraq.cpp: ISO C++ implementation
+ //
+ 
+ // User interface
+ #include "as_gui.h"     // Main classes
+ #include "as_except.h"  // Exception classes
+ #include "as_table.h"   // Class TiTable
+ #include "as_const.h"   // Application constants
+ #include "as_pref.h"    // Class Preferences
+ 
+ 
+ //
+ // Construct a Titraqform which is a child of 'pParent', with the
+ // name 'kszName' and widget flags set to 'Flags'
+ //
+ Titraqform::Titraqform(QWidget *pParent, const char *kszName, WFlags Flags) :
+     QMainWindow(pParent, kszName, Flags)
+ {
+     // Early initializations
+     m_pFiletools = NULL;
+     m_pEdittools = NULL;
+     m_pViewtools = NULL;
+     m_pWhatstools = NULL;
+     m_szFilename = NULL;
+ 
+     // Atenzione! Order is very important in the following sequence.
+     // FIXME: Reorganize this procedural mess into self contained objects
+     try {
+         setupPrefs();           // Load general preferences
+         setupActions();         // Create and initialize actions
+         setupMenubar();         // Create and initialize menu bar
+         setupToolbars();        // Create and initialize tool bars
+         setupCentralwidget();   // Format the layout of related widgets
+         setupStatusbar();       // Create and initialize status bar
+         setupTable();           // Create and initialize table and cells
+         setupEditlay();         // Create and initialize edit controls
+         setupColumns();         // Prepare columns for viewing, sorting
+         enableIface(false);     // Start things off in a empty state
+     }
+     catch (Genexcept& Genex) {
+         Genex.reportErr();
+         exit(1);
+     }
+ 
+     // Postsetup manipulations
+     m_pMaintable->setDirty(false);
+     if (!kszName)
+         this->setName(trUtf8("ASGuiapp"));
+     this->resize(m_pPrefs->getNumber(TITRAQ_PREFFRAMEWIDTH, TITRAQ_DEFFRAMEWIDTH),
+         m_pPrefs->getNumber(TITRAQ_PREFFRAMEHEIGHT, TITRAQ_DEFFRAMEHEIGHT));
+     connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(savePrefs()));
+     this->setCaption(QString(TITRAQ_APPTITLE) + ' ' + asgui_version.v_short);
+ 
+     // Rehydrate main window layout and doc positions
+     QString Laystring = m_pPrefs->getString(TITRAQ_PREFFRAMELAY, NULL); // FIXME: Handle first case better
+     QTextStream Laystream(&Laystring, IO_ReadOnly);
+     Laystream >> *this;
+ 
+ //    // Lock down window size
+ //    setSizePolicy(QSizePolicy((QSizePolicy::SizeType)0,
+ //        (QSizePolicy::SizeType)0, 0, 0, sizePolicy().hasHeightForWidth()));
+ }
+ 
+ //
+ // Destroy the object and free any allocated resources
+ //
+ Titraqform::~Titraqform(void)
+ {
+     // Qt deletes child widgets for us
+     m_pPrefs->flush();
+     delete m_pPrefs;
+ }


ossp-pkg/as/as-gui/as_gui.h -> 1.78

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,344 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  titraq.h: ISO C++ interface
+ //
+ 
+ #ifndef AS_GUI_MWIN_H
+ #define AS_GUI_MWIN_H
+ 
+ #include <qmainwindow.h>
+ 
+ #ifdef HAVE_CONFIG_H
+ #include "ac_config.h"
+ #endif
+ 
+ #include "as_except.h"  // Exception classes
+ 
+ // Version information
+ #define _AS_VERSION_CPP_AS_HEADER_
+ #include "as_version.cpp"
+ #undef  _AS_VERSION_CPP_AS_HEADER_
+ 
+ // Trolltech class prototypes
+ class QAction;
+ class QHeader;
+ class QTimeEdit;
+ class QComboBox;
+ class QLineEdit;
+ class QLabel;
+ class QDate;
+ class QFile;
+ 
+ // Local class prototypes
+ class ASTimeEdit;
+ class Daydatedit; // Might be replaced with ASTimeEdit throughout
+ class TiTable;
+ class Preferences;
+ class Prefpanel;
+ 
+ // Intentional no operation
+ #define TITRAQ_NOP ((void)0)
+ 
+ #ifdef HAVE_CONFIG_H
+ #if (SIZEOF_CHAR == 1)
+ typedef unsigned char        U8;
+ #else
+ ?==Error: Undefined 8 bit type
+ #endif // U8
+ 
+ #if (SIZEOF_SHORT == 2)
+ typedef unsigned short       U16;
+ #elif (SIZEOF_INT == 2)
+ typedef unsigned int         U16;
+ #elif (SIZEOF_LONG == 2)
+ typedef unsigned long        U16;
+ #else
+ ?==Error: Undefined 16 bit type
+ #endif // U16
+ 
+ #if (SIZEOF_SHORT == 4)
+ typedef unsigned short       U32;
+ #elif (SIZEOF_INT == 4)
+ typedef unsigned int         U32;
+ #elif (SIZEOF_LONG == 4)
+ typedef unsigned long        U32;
+ #else
+ ?==Error: Undefined 32 bit type
+ #endif // U32
+ 
+ #if (SIZEOF_SHORT == 8)
+ typedef unsigned short       U64;
+ #elif (SIZEOF_INT == 8)
+ typedef unsigned int         U64;
+ #elif (SIZEOF_LONG == 8)
+ typedef unsigned long        U64;
+ #elif (SIZEOF_LONG_LONG == 8)
+ typedef unsigned long long   U64;
+ #else
+ ?==Error: Undefined 64 bit type
+ #endif // U64
+ 
+ #else // HAVE_CONFIG_H (not defined)
+ typedef unsigned char        U8;
+ #if (4 == 8)
+ typedef unsigned int         U64;
+ #elif (4 == 8)
+ typedef unsigned long        U64;
+ #elif (8 == 8)
+ typedef unsigned long long   U64;
+ #else
+ ?==Error: Undefined 64 bit type
+ #endif
+ 
+ #if (4 == 2)
+ typedef        unsigned int         U16;
+ #elif (2 == 2)
+ typedef        unsigned short       U16;
+ #else
+ ?==Error: Undefined 16 bit type
+ #endif
+ 
+ #if (4 == 4)
+ typedef        unsigned int         U32;
+ #elif (4 == 4)
+ typedef        unsigned long        U32;
+ #elif (2 == 4)
+ typedef        unsigned short       U32;
+ #else
+ ?== Error: Undefined 32 bit type
+ #endif
+ #endif // HAVE_CONFIG_H
+ 
+ 
+ // Main table size
+ const int g_knBlocks = 32;
+ 
+ // Styles enumeration
+ typedef enum
+ {
+     TITRAQ_STYLECDE,
+     TITRAQ_STYLESGI,
+     TITRAQ_STYLEMOTIF,
+     TITRAQ_STYLEMPLUS,
+     TITRAQ_STYLEPLAT,
+     TITRAQ_STYLEMSOFT
+ } styles_t;
+ 
+ // Main application form window
+ class Titraqform : public QMainWindow
+ {
+     Q_OBJECT    // Generate MOC object model stubs
+ 
+ public:
+     Titraqform(QWidget *pParent = 0, const char *kszName = 0, WFlags Flags = 0);
+     ~Titraqform(void);
+ 
+     // Accessor methods
+     const QString getRowdata(void) const;                   // Get a whole row of data
+     void setRowdata(QString &) const;                       // Set a whole row of data
+     const int getFirstcol(void) const;                      // Learn which col is first
+     const bool isOpen(void) {return (m_szFilename == NULL) ? false : true;}; // Doc state
+     void setOpen(bool bDocopen = true)                      // Set state of document
+     {
+         if (bDocopen) {
+             if (m_szFilename == NULL)
+                 m_szFilename = new QString();
+         }
+         else
+             if (m_szFilename != NULL) {
+                 delete m_szFilename;
+                 m_szFilename = NULL;
+             }
+     };
+     const QString *getFilename(void) // Get the current file name
+     {
+         if (this->isOpen())
+             return m_szFilename;
+         else
+             throw Genexcept("File name does not exist.");
+     };
+     void setFilename(const QString &Fname) // Set file name
+     {
+         if (this->isOpen()) // If a file name exists
+             setOpen(false); // then get rid of it first
+         m_szFilename = new QString(Fname);
+     };
+ 
+     // Utility members
+     void loadInit(void);    // Parse cmds and open initial file
+ 
+     // Top level members
+     Preferences *m_pPrefs;
+ 
+     // Main application actions
+     QAction     *m_pFilenewact,   *m_pFileopenact;
+     QAction     *m_pFilesaveact,  *m_pFilesaveasact;
+     QAction     *m_pFilecloseact, *m_pFilequitact;
+     QAction     *m_pAddrowact,    *m_pDelrowact;
+     QAction     *m_pRefreshact,   *m_pCutact;
+     QAction     *m_pCopyact,      *m_pPasteact;
+     QAction     *m_pSyncact,      *m_pPrefsact;
+     QAction     *m_pReportact;
+ 
+     // Table, cells, and entries in package layout
+     TiTable     *m_pMaintable;
+     QHeader     *m_pTablehead;
+     QStringList *m_pTaskentries;
+ 
+     // Edition widgets
+     QLabel      *m_pStatusedit;         // Control to show entry status
+     QLineEdit   *m_pLineedit;           // Control to line number
+     QLineEdit   *m_pUseredit;           // Control to edit user name
+     QLineEdit   *m_pGuidedit;           // Control to edit GUID
+     QLineEdit   *m_pCrcedit;            // Control to edit CRC
+     QLineEdit   *m_pRevedit;            // Control to edit revision
+     Daydatedit  *m_pDateedit;           // Control to edit date
+     QTimeEdit   *m_pStarttime;          // Control to edit start time
+     QTimeEdit   *m_pEndtime;            // Control to edit finish time
+ //    QTimeEdit   *m_pAmount;             // Control to edit total time
+     ASTimeEdit  *m_pAmount;             // Control to edit total time
+     QComboBox   *m_pTasks;              // Control to choose a task
+     QLineEdit   *m_pRemark;             // Control to edit remark
+ 
+ protected slots:
+     void cutEntry(void);                // Cut task entries from the list
+     void copyEntry(void);               // Copy task entries from the list
+     void pasteEntry(void);              // Paste task entries to the list
+     void addEntry(int nRows= -1);       // Add task entries to the list
+     void delEntry(int nRows= -1);       // Delete task entries from the list
+     void refreshDisplay(void);          // Refresh the display of all data items
+     void syncIiop(void);                // Syncronize data with server using IIOP
+     void syncSoap(void);                // Syncronize data with server using SOAP
+     void newDoc(void);                  // Make and display a new document window
+     void openDoc(void);                 // Open and display an existing document
+     void quitApp(void);                 // Close the current document and quit
+     void saveFile(void);                // Serialize to the current file
+     void saveAs(void);                  // Serialize to a selected file
+     void saveName(void);                // Implicitly serialize to a selected file
+     void helpContents(void);            // Use the help contents
+     void aboutTitraq(void);             // Learn more about this program itself
+     void aboutOSSP(void);               // Learn more about the OSSP
+     void aboutQt(void);                 // Learn more about Qt
+     void selAll(void);                  // Edit menu select all
+     void onClick(int, int, int, const QPoint &); // Table was clicked
+     void inplaceEdit(int, int, int, const QPoint &); // Enter in place edit mode
+     void updEdit(int, int nCol = 0);    // Update edit controls
+     void validateData(void);            // Validate current row of matrix data
+     void validateData(int, int);        // Validate specified row of matrix data
+     void updSizes(int, int, int);       // Update edit sizes
+     void calcCrc(void);                 // Calculate CRC of current row
+     void calcCrc(int, int);             // Calculate CRC of specified row
+     void dataChanged(int, int);         // Timesheet data changed
+     void updateLine(const QString &);   // Update line number column
+     void updateUser(const QString &);   // Update user column
+     void updateGuid(const QString &);   // Update GUID column
+     void updateCrc(const QString &);    // Update CRC column
+     void updateRev(const QString &);    // Update rev column
+     void updateDate(const QDate &);     // Update date column
+     void updateStart(const QTime &);    // Update start column
+     void updateFinish(const QTime &);   // Update finish column
+     void updateAmount(const QTime &);   // Update amount column
+     void updateTask(const QString &);   // Update task column
+     void updateRemark(const QString &); // Update remark column
+     void confirmEdit(void);             // Confirm whole row edition
+     void configPrefs(void);             // Edit menu configure preferences
+     void normalView(void);              // View menu normal
+     void editingView(void);             // View menu editing
+     void timingView(void);              // View menu timing
+     void showFilebar(void);             // View menu show file toolbar
+     void showEditbar(void);             // View menu show edit toolbar
+     void showViewbar(void);             // View menu show view toolbar
+     void showPrefsbar(void);            // View menu show prefs toolbar
+     void showWhatsbar(void);            // View menu show whats this toolbar
+     void showStatcol(void);             // View menu show status column
+     void showLinecol(void);             // View menu show line numbers column
+     void showUsercol(void);             // View menu show Users column
+     void showGuidcol(void);             // View menu show GUIDs column
+     void showCrccol(void);              // View menu show CRC column
+     void showRevcol(void);              // View menu show Rev column
+     void showDatecol(void);             // View menu show Dates column
+     void showStartcol(void);            // View menu show Start time column
+     void showFinishcol(void);           // View menu show Finish time column
+     void showAmountcol(void);           // View menu show Amounts column
+     void showTaskcol(void);             // View menu show Tasks column
+     void showRemarkcol(void);           // View menu show Remarks column
+     void genReport(void);               // Generate a local formatted report
+     void savePrefs(void);               // Save user preferences
+     void applyPrefs(void);              // Apply preferences from applied()
+     void applyPrefs(Prefpanel *);       // Apply preferences from accept()
+ 
+ protected:
+     // Application main events
+     void closeEvent(QCloseEvent *);     // Close current document in main window
+ 
+     // Application main window widgets
+     QFrame      *m_pCenframe;           // Central frame
+     QVBoxLayout *m_pMainlayout;         // Package and control layouts
+     QVBoxLayout *m_pPackagelayout;      // Main table control
+     QHBoxLayout *m_pEditlayout;         // Lower edition widgets
+ 
+ private:
+     // Owned by QMainWindow
+     QMenuBar    *m_pMenubar;
+     QPopupMenu  *m_pViewpopup;          // Saved for manipulating views
+     QPopupMenu  *m_pTbarspopup;         // Saved for manipulating toolbars
+     QPopupMenu  *m_pColspopup;          // Saved for manipulating columns
+     QStatusBar  *m_pStatbar;
+ 
+     // Belong to us
+     QToolBar    *m_pFiletools;
+     QToolBar    *m_pEdittools;
+     QToolBar    *m_pViewtools;
+     QToolBar    *m_pPrefstools;
+     QToolBar    *m_pWhatstools;
+     QString     *m_szFilename;
+ 
+     // Constructor helpers
+     void setupPrefs(void);              // Preferences
+     void setupActions(void);            // Actions
+     void setupMenubar(void);            // Menu bar
+     void setupToolbars(void);           // Tool bars
+     void setupStatusbar(void);          // Status bar
+     void setupCentralwidget(void);      // Assemble main Frame widget
+     void setupTable(void);              // Table widget
+     void setupEditlay(void);            // Editing lay
+     void setupPieces(void);             // Assemble widget pieces
+     void setupColumns(void);            // Arrange and configure columns
+     void enableIface(bool);             // [En/dis]able most ui pieces
+ 
+     // Data processing
+     void loadAccounts(QFile &);         // Load accounts from file
+     void loadAccounts(QTextStream &);   // Load accounts from stream
+     void loadData(QFile &);             // Load personal data from file
+     void loadData(QTextStream &);       // Load personal data from stream
+     void saveData(QFile &);             // Save accounting data to file
+     void saveData(QTextStream &);       // Save accounting data to stream
+ };
+ 
+ #endif // AS_GUI_MWIN_H


ossp-pkg/as/as-gui/as_gui_test.sh -> 1.6

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,33 ----
+ ##
+ ##  OSSP asgui - Accounting system graphical user interface
+ ##  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ ##  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ ##  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ ##  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ ##
+ ##  This file is part of OSSP asgui, an accounting system graphical user
+ ##  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ ##
+ ##  Permission to use, copy, modify, and distribute this software for
+ ##  any purpose with or without fee is hereby granted, provided that
+ ##  the above copyright notice and this permission notice appear in all
+ ##  copies.
+ ##
+ ##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ ##  SUCH DAMAGE.
+ ##
+ ##  titraq_test.sh: Bourne shell script
+ ##
+ 
+ #! /bin/sh
+ ./as-gui


ossp-pkg/as/as-gui/as_helpanel.cpp -> 1.3

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,109 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  as_helpanel.cpp: ISO C++ implementation
+ //
+ 
+ #include <qvariant.h>
+ #include <qpushbutton.h>
+ #include <qtextbrowser.h>
+ #include <qlayout.h>
+ #include <qtooltip.h>
+ #include <qwhatsthis.h>
+ 
+ #include "as_helpanel.h"
+ 
+ 
+ namespace AS {
+ 
+ //
+ // Constructs a Helpanel as a child of 'pParent', with the 
+ // name 'kszName' and widget flags set to 'Flags'.
+ //
+ // The dialog will by default be modal, unless you set 'bModal' to
+ // false to construct a modeless dialog.
+ //
+ Helpanel::Helpanel(const QString &kSource, QWidget *pParent, const char *kszName, bool bModal, WFlags Flags)
+     : QDialog(pParent, kszName, bModal, Flags)
+ {
+     // Boilerplate code to initialize the panel
+     if (!kszName)
+         this->setName("Helpanel");
+ 
+     // Make panel resizeable
+     this->setSizeGripEnabled(true);
+     this->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)5,
+         (QSizePolicy::SizeType)5, 0, 0, this->sizePolicy().hasHeightForWidth()));
+ 
+     // Build panel using already constructed widgets and layouts
+     m_pFormlay = new QVBoxLayout(this, 11, 6, "Formlayout");
+ 
+     // Groupbox and its text display
+     m_pBrowser = new QTextBrowser(this, "Helpbrowser");
+     m_pBrowser->setSource(QString(TITRAQ_DOCDIR) + QChar('/') + kSource);
+     m_pBrowser->setReadOnly(true);
+     m_pBrowser->setFocus();
+ 
+     // Add a spacer to sideline the otherwise massive dismiss button
+     m_pButtlay = new QHBoxLayout(0, 0, 6, "Buttonlayout"); 
+     QSpacerItem *pSpacey = new QSpacerItem(40, 20, QSizePolicy::Minimum, QSizePolicy::Minimum);
+     m_pButtlay->addItem(pSpacey);
+ 
+     // Add dismiss push button
+     m_pDismissbutt = new QPushButton(this, "Dismissbutton");
+     m_pDismissbutt->setPaletteBackgroundColor(QColor(198, 196, 186));
+     m_pDismissbutt->setCursor(QCursor(13));
+     m_pButtlay->addWidget(m_pDismissbutt);
+ 
+     // Add the stuff to our form layout
+     m_pFormlay->addWidget(m_pBrowser);
+     m_pFormlay->addSpacing(6);
+     m_pFormlay->addLayout(m_pButtlay);
+ 
+     // Connect signals to slots, accept() and reject() are Qt implicit
+     connect(m_pDismissbutt, SIGNAL(clicked(void)), SLOT(accept(void)));
+     this->resize(QSize(464, 332).expandedTo(minimumSizeHint()));
+     this->textChange();
+ }
+ 
+ //
+ // Sets the strings of the subwidgets using the current language
+ //
+ void Helpanel::textChange(void)
+ {
+     this->setCaption(trUtf8("AS Accounting System help contents", "Help contents for the AS GUI application."));
+ 
+     // Top level push buttons associated with accept and save slots
+     m_pDismissbutt->setText(trUtf8("Dismiss", "Comment for Dismissbutton"));
+     QToolTip::add(m_pDismissbutt, trUtf8("Closes the help panel", "Comment for tooltip Dismissbutton"));
+     QWhatsThis::add(m_pDismissbutt, trUtf8("The dismiss button dismisses the help panel", "Comment for whatsThis Dismissbutton"));
+ 
+     // The main text browser window which presents the HTML help contents
+     QWhatsThis::add(m_pBrowser, trUtf8("The text browser window displays the help contents", "Comment for whatsThis Browser"));
+ }
+ } // namespace AS


ossp-pkg/as/as-gui/as_helpanel.h -> 1.3

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,68 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  as_helpanel.h: ISO C++ interface
+ //
+ 
+ #ifndef HELPANEL_H
+ #define HELPANEL_H
+ 
+ #include <qvariant.h>
+ #include <qdialog.h>
+ 
+ 
+ class QVBoxLayout;
+ class QHBoxLayout;
+ class QPushButton;
+ class QTextBrowser;
+ 
+ namespace AS {
+ 
+ class Helpanel : public QDialog
+ {
+     Q_OBJECT
+ 
+ public:
+     Helpanel(const QString &, QWidget *pParent = 0, const char *kszName = 0,
+         bool bModal = true, WFlags Flags = 0);
+ //    ~Helpanel(void); // No need to destroy widgets, because qt does it for us
+ 
+ public:
+     QTextBrowser *m_pBrowser;
+     QPushButton  *m_pDismissbutt;
+ 
+ protected:
+     QVBoxLayout *m_pFormlay;
+     QHBoxLayout *m_pButtlay;
+ 
+ protected slots:
+     virtual void textChange(void);
+ };
+ } // namespace AS
+ 
+ #endif // HELPANEL_H


ossp-pkg/as/as-gui/as_main.cpp -> 1.15

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,46 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  main.cpp: ISO C++ implementation
+ //
+ 
+ #include <qapplication.h>
+ 
+ #include "as_gui.h"
+ 
+ 
+ int main(int argc, char **argv)
+ {
+     QApplication App(argc, argv, QApplication::GuiClient);
+ 
+     Titraqform Mainform;            // Main app window
+     App.setMainWidget(&Mainform);
+     Mainform.show();                // Finally start the show
+     Mainform.loadInit();            // Start with initial data
+     return App.exec();
+ }


ossp-pkg/as/as-gui/as_numdial.cpp -> 1.2

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,134 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  as_numdial.cpp: ISO C++ implementation
+ //
+ 
+ #include "as_numdial.h"
+ 
+ #include <qvariant.h>
+ #include <qframe.h>
+ #include <qlabel.h>
+ #include <qpushbutton.h>
+ #include <qspinbox.h>
+ #include <qlayout.h>
+ #include <qtooltip.h>
+ #include <qwhatsthis.h>
+ 
+ #include "as_const.h"
+ 
+ 
+ namespace AS {
+ 
+ //
+ // Constructs a Numdial as a child of 'pParent', with the 
+ // name 'kszName' and widget flags set to 'Flags'.
+ //
+ // The dialog will by default be modal, unless you set 'bModal' to
+ // false to construct a modeless dialog.
+ //
+ Numdial::Numdial(QWidget *pParent, const char *kszName, bool bModal, WFlags Flags)
+     : QDialog(pParent, kszName, bModal, Flags)
+ {
+     // Boilerplate code to initialize the panel
+     if (!kszName)
+         this->setName("Numberdialog");
+ 
+     // Fix dialog size
+     this->setSizeGripEnabled(false);
+     this->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)0,
+         (QSizePolicy::SizeType)0, 0, 0, this->sizePolicy().hasHeightForWidth()));
+ 
+     m_pFrame = new QFrame(this, "Mainframe");
+     m_pFrame->setFrameShape(QFrame::StyledPanel);
+     m_pFrame->setFrameShadow(QFrame::Raised);
+     m_pFramelay = new QVBoxLayout(m_pFrame, 11, 6, "Framelay"); 
+     m_pInputlay = new QHBoxLayout(0, 0, 6, "Horizontallayout"); 
+     m_pFormlayout = new QVBoxLayout(this, 11, 6, "Formlayout"); 
+ 
+     m_pReportlabel = new QLabel(m_pFrame, "Reportlabel");
+     m_pReportlabel->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)4, (QSizePolicy::SizeType)5, 0, 0, m_pReportlabel->sizePolicy().hasHeightForWidth()));
+     m_pInputlay->addWidget(m_pReportlabel);
+ 
+     m_pSpinbox = new QSpinBox(m_pFrame, "Spinbox");
+     m_pSpinbox->setMinValue(1);                 // Must choose at least one week
+     m_pSpinbox->setMaxValue(TITRAQ_BIGMAGIC);   // Must choose less than magic
+ //    m_pSpinbox->setButtonSymbols(QSpinBox::PlusMinus);
+ //    m_pSpinbox->editor()->setAlignment(Qt::AlignRight);
+     m_pInputlay->addWidget(m_pSpinbox);
+ 
+     m_pWeeklabel = new QLabel(m_pFrame, "Weeklabel");
+     m_pWeeklabel->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)4, (QSizePolicy::SizeType)5, 0, 0, m_pWeeklabel->sizePolicy().hasHeightForWidth()));
+     m_pInputlay->addWidget(m_pWeeklabel);
+     m_pFramelay->addLayout(m_pInputlay);
+ 
+     // Push button suite
+     m_pButtlay = new QHBoxLayout(0, 0, 6, "Buttlay");
+     m_pOkaybutt = new QPushButton(m_pFrame, "Okaybutton");
+     m_pOkaybutt->setPaletteBackgroundColor(QColor(198, 196, 186));
+     m_pOkaybutt->setCursor(QCursor(13));
+     m_pOkaybutt->setDefault(true);
+     m_pButtlay->addWidget(m_pOkaybutt);
+     m_pCancelbutt = new QPushButton(m_pFrame, "Cancelbutton");
+     m_pCancelbutt->setPaletteBackgroundColor(QColor(198, 196, 186));
+     m_pCancelbutt->setCursor(QCursor(13));
+     m_pButtlay->addWidget(m_pCancelbutt);
+     m_pFramelay->addLayout(m_pButtlay);
+ 
+     // Add all the junk to our main frame
+     m_pFormlayout->addWidget(m_pFrame);
+ 
+     // Connect signals to slots, accept() and reject() are Qt implicit
+     connect(m_pOkaybutt, SIGNAL(clicked(void)), SLOT(accept(void)));
+     connect(m_pCancelbutt, SIGNAL(clicked(void)), SLOT(reject(void)));
+     this->resize(QSize(272, 111).expandedTo(minimumSizeHint()));
+     this->textChange();
+ }
+ 
+ //
+ //  Sets the strings of the subwidgets using the current language
+ //
+ void Numdial::textChange()
+ {
+     this->setCaption(trUtf8("Numberdialog", "For general input of numbers followed by an accept or cancel operation"));
+     m_pReportlabel->setText(trUtf8("Report"));
+     m_pWeeklabel->setText(trUtf8("weeks of data"));
+ 
+     // Top level push buttons associated with accept slot
+     m_pCancelbutt->setText(trUtf8("Cancel", "Comment for Cancelbutton"));
+     QToolTip::add(m_pCancelbutt, trUtf8("Closes the report panel", "Comment for tooltip Cancelbutton"));
+     QWhatsThis::add(m_pCancelbutt, trUtf8("The cancel button closes the report panel without further action", "Comment for whatsThis Cancelbutton"));
+     m_pOkaybutt->setText(trUtf8("Okay", "Comment for Okaybutton"));
+     QToolTip::add(m_pOkaybutt, trUtf8("Aknowleges your input", "Comment for tooltip Okaybutton"));
+     QWhatsThis::add(m_pOkaybutt, trUtf8("The okay button aknowleges your input and prepares for action", "Comment for whatsThis Okaybutton"));
+ 
+     // Text help for spinbox number input
+     QToolTip::add(m_pSpinbox, trUtf8("Input a number", "Comment for tooltip Spinbox"));
+     QWhatsThis::add(m_pSpinbox, trUtf8("Click on the arrows or type to input a number", "Comment for whatsThis Spinbox"));
+ }
+ } // namespace AS


ossp-pkg/as/as-gui/as_numdial.h -> 1.2

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,80 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  as_numdial.h: ISO C++ interface
+ //
+ 
+ #ifndef NUMDIALOG_H
+ #define NUMDIALOG_H
+ 
+ #include <qvariant.h>
+ #include <qdialog.h>
+ #include <qspinbox.h>
+ 
+ 
+ class QVBoxLayout;
+ class QHBoxLayout;
+ class QGridLayout;
+ class QFrame;
+ class QLabel;
+ class QPushButton;
+ 
+ namespace AS {
+ 
+ class Numdial : public QDialog
+ {
+     Q_OBJECT
+ 
+ public:
+     Numdial(QWidget *pParent = 0, const char *pkcName = 0, bool bModal = true, WFlags Flags = 0);
+ //    ~Numdial(void); // No need to destroy widgets, because qt does it for us
+ 
+     QFrame *m_pFrame;
+     QLabel *m_pReportlabel;
+     QSpinBox *m_pSpinbox;
+     QLabel *m_pWeeklabel;
+     QPushButton *m_pOkaybutt;
+     QPushButton *m_pCancelbutt;
+ 
+ protected:
+     QVBoxLayout *m_pFormlayout;
+     QVBoxLayout *m_pFramelay;
+     QHBoxLayout *m_pInputlay;
+     QHBoxLayout *m_pButtlay;
+ 
+ protected slots:
+     virtual void textChange();
+ 
+ public:
+     // Accessors members
+     int getNum(void) const {return m_pSpinbox->value();};
+     void setNum(int nInit) {m_pSpinbox->setValue(nInit);};
+ };
+ } // namespace AS
+ 
+ #endif // NUMDIALOG_H


ossp-pkg/as/as-gui/as_panel.cpp -> 1.17

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,422 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  as_panel.cpp: ISO C++ implementation
+ //
+ 
+ #include <vector>
+ 
+ #include <qimage.h>
+ 
+ #include "as_panel.h"
+ #include "as_generic.h"
+ #include "as_const.h"
+ 
+ #include "as_gfx/revcolour.xpm"
+ 
+ //
+ // Constructs a Prefpanel as a child of 'pParent', with the 
+ // name 'kszName' and widget flags set to 'Flags'.
+ //
+ // The dialog will by default be modal, unless you set 'bModal' to
+ // false to construct a modeless dialog.
+ //
+ Prefpanel::Prefpanel(QWidget *pParent, const char *kszName, bool bModal, WFlags Flags)
+     : QDialog(pParent, kszName, bModal, Flags)
+ {
+     if (!kszName)
+         this->setName("Prefpanel");
+ 
+     this->setSizeGripEnabled(false);
+     this->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)5,
+         (QSizePolicy::SizeType)5, 0, 0, this->sizePolicy().hasHeightForWidth()));
+ 
+     // Initialize our button colours
+     m_pLight = new QColor();
+     m_pDark = new QColor();
+ 
+     m_pVlayout = new QVBoxLayout(this, 11, 6, "Formlayout");
+     m_pTabselect = new QTabWidget(this, "Tabselector");
+ 
+     // Start of style chooser UI pieces
+     m_pBoolpage = new QWidget(m_pTabselect, "Tabpage");
+     m_pBoolayout = new QHBoxLayout(m_pBoolpage, 11, 6, "Genlayout"); 
+     m_pBinlayout = new QVBoxLayout(0, 0, 6, "Binarylayout"); 
+     m_pStylegroup = new QButtonGroup(m_pBoolpage, "Stylebuttongroup");
+     m_pStylegroup->setColumnLayout(0, Qt::Vertical);
+     m_pStylegroup->layout()->setSpacing(6);
+     m_pStylegroup->layout()->setMargin(11);
+     m_pStylegroup->setExclusive(true);
+ 
+     m_pStylelay = new QVBoxLayout(m_pStylegroup->layout());
+     m_pStylelay->setAlignment(Qt::AlignTop);
+ 
+     // Block to handle a vector of radio buttons
+     int nIter = 0;
+     QStringList Styles = QStyleFactory::keys();
+     std::vector<QRadioButton *> Stylevector(Styles.size());
+ 
+     // Discover which interface styles are available, and
+     // dynamically construct new radio buttons to represent them
+     for (QStringList::Iterator Stylename = Styles.begin();
+         Stylename != Styles.end(); Stylename++) {
+         Stylevector[nIter] = new QRadioButton(m_pStylegroup, *Stylename + "_button");
+         Stylevector[nIter]->setText(trUtf8(*Stylename, "Comment for " + *Stylename));
+         Stylevector[nIter]->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Expanding,
+             Stylevector[nIter]->sizePolicy().hasHeightForWidth());
+         QToolTip::add(Stylevector[nIter], trUtf8("The " + *Stylename + " style",
+             "Comment for toolTip " + *Stylename));
+         QWhatsThis::add(Stylevector[nIter], trUtf8("Click this button to enjoy the style of the "
+             + *Stylename + " user interface", "Comment whatsThis for " + *Stylename));
+         m_pStylelay->addWidget(Stylevector[nIter]);
+         nIter++;
+     }
+ 
+     // Start of binary option UI pieces (like make backups, yes or no)
+     m_pSwitchgroup = new QButtonGroup(m_pBoolpage, "Switchbuttongroup");
+     m_pSwitchgroup->setColumnLayout(0, Qt::Vertical);
+     m_pSwitchgroup->layout()->setSpacing(6);
+     m_pSwitchgroup->layout()->setMargin(11);
+     m_pSwitchgroup->setExclusive(false);
+     m_pSwitchlay = new QVBoxLayout(m_pSwitchgroup->layout());
+     m_pSwitchlay->setAlignment(Qt::AlignTop);
+ 
+     // Optional file backups with hard coded extension .bak
+     m_pBackupcheck = new QCheckBox(m_pSwitchgroup, "Backupbutton");
+     m_pBackupcheck->setText(trUtf8("Make .bak file on save", "Comment for Backupcheck"));
+     QToolTip::add(m_pBackupcheck, trUtf8("Make a .bak file when saving", "Comment for toolTip Backupcheck"));
+     QWhatsThis::add(m_pBackupcheck, trUtf8("Check this box to enable automatic file backups when overwriting an existing file", "Comment whatsThis for Backupcheck"));
+     m_pSwitchlay->addWidget(m_pBackupcheck);
+ 
+     // Optional easy filename appending with hard coded extension .as
+     m_pExtendcheck = new QCheckBox(m_pSwitchgroup, "Extensionbutton");
+     m_pExtendcheck->setText(trUtf8("Append .as extension", "Comment for Extensioncheck"));
+     QToolTip::add(m_pExtendcheck, trUtf8("Use the .as file extension", "Comment for toolTip Extensioncheck"));
+     QWhatsThis::add(m_pExtendcheck, trUtf8("Check this box to automatically append '.as' to new filenames when saving", "Comment whatsThis for Extensioncheck"));
+     m_pSwitchlay->addWidget(m_pExtendcheck);
+ 
+     // Start of report option UI pieces (like detailed report listings)
+     m_pReportgroup = new QButtonGroup(m_pBoolpage, "Reportbuttongroup");
+     m_pReportgroup->setColumnLayout(0, Qt::Vertical);
+     m_pReportgroup->layout()->setSpacing(6);
+     m_pReportgroup->layout()->setMargin(11);
+     m_pReportgroup->setExclusive(false);
+     m_pReportlay = new QVBoxLayout(m_pReportgroup->layout());
+     m_pReportlay->setAlignment(Qt::AlignTop);
+ 
+     // Optional detailed report listings write all events in range
+     m_pDetailcheck = new QCheckBox(m_pReportgroup, "Detailistbutton");
+     m_pDetailcheck->setText(trUtf8("Detailed listing", "Comment for Detailcheck"));
+     QToolTip::add(m_pDetailcheck, trUtf8("Write detailed event listings", "Comment for toolTip Detailcheck"));
+     QWhatsThis::add(m_pDetailcheck, trUtf8("Check this box to enable writing of detailed event listings to the local report", "Comment whatsThis for Detailcheck"));
+     m_pReportlay->addWidget(m_pDetailcheck);
+ 
+     // Optional signature line in report footer
+     m_pSigncheck = new QCheckBox(m_pReportgroup, "Signaturebutton");
+     m_pSigncheck->setText(trUtf8("Signature line", "Comment for Signaturecheck"));
+     QToolTip::add(m_pSigncheck, trUtf8("Append a signature line", "Comment for toolTip Signaturecheck"));
+     QWhatsThis::add(m_pSigncheck, trUtf8("Check this box to write a signature line to the report footer", "Comment whatsThis for Signaturecheck"));
+     m_pReportlay->addWidget(m_pSigncheck);
+     m_pBoolayout->addWidget(m_pStylegroup);
+     m_pBinlayout->addWidget(m_pReportgroup);
+     m_pBinlayout->addWidget(m_pSwitchgroup);
+     m_pBoolayout->addLayout(m_pBinlayout);
+     m_pTabselect->insertTab(m_pBoolpage, "");
+ 
+     // Start of paths page UI pieces
+     m_pGeneralpage = new QWidget(m_pTabselect, "Generalpage");
+     m_pGenlayout = new QHBoxLayout(m_pGeneralpage, 11, 6, "Genlayout");
+     m_pGenbox = new QGroupBox(m_pGeneralpage, "Groupboxlayout");
+     m_pGenbox->setColumnLayout(0, Qt::Vertical);
+     m_pGenbox->layout()->setSpacing(6);
+     m_pGenbox->layout()->setMargin(11);
+     m_pGenboxlay = new QHBoxLayout(m_pGenbox->layout());
+     m_pGenboxlay->setAlignment(Qt::AlignTop);
+ 
+     // Start of path text entry preferences UI pieces
+     m_pGeninner = new QGridLayout(0, 4, 2, 0, 16, "Innergrid");
+     m_pAcctlabel = new QLabel(m_pGenbox, "Accfilelabel");
+     m_pGeninner->addWidget(m_pAcctlabel, 0, 0);
+     m_pAcctline = new QLineEdit(m_pGenbox, "Accountline");
+     m_pGeninner->addWidget(m_pAcctline, 0, 1);
+     m_pEventlabel = new QLabel(m_pGenbox, "Evntdirlabel");
+     m_pGeninner->addWidget(m_pEventlabel, 1, 0);
+     m_pEventline = new QLineEdit(m_pGenbox, "Eventline");
+     m_pGeninner->addWidget(m_pEventline, 1, 1);
+     m_pHomelabel = new QLabel(m_pGenbox, "Homelabel");
+     m_pGeninner->addWidget(m_pHomelabel, 2, 0);
+     m_pHomeline = new QLineEdit(m_pGenbox, "Homeline");
+     m_pGeninner->addWidget(m_pHomeline, 2, 1);
+     m_pUserlabel = new QLabel(m_pGenbox, "Userlabel");
+     m_pGeninner->addWidget(m_pUserlabel, 3, 0);
+     m_pUserline = new QLineEdit(m_pGenbox, "Userline");
+     m_pGeninner->addWidget(m_pUserline, 3, 1);
+     m_pGenboxlay->addLayout(m_pGeninner);
+ 
+     m_pGenlayout->addWidget(m_pGenbox);
+     m_pTabselect->insertTab(m_pGeneralpage, "");
+ 
+     // Start of remote page UI pieces
+     m_pRemotepage = new QWidget(m_pTabselect, "Remotepage");
+     m_pRemlayout = new QHBoxLayout(m_pRemotepage, 11, 6, "Remlayout");
+     m_pRembox = new QGroupBox(m_pRemotepage, "Remoteboxlayout");
+ 
+     m_pRembox->setColumnLayout(0, Qt::Vertical);
+     m_pRembox->layout()->setSpacing(6);
+     m_pRembox->layout()->setMargin(11);
+     m_pRemboxlay = new QHBoxLayout(m_pRembox->layout());
+     m_pRemboxlay->setAlignment(Qt::AlignTop);
+ 
+     // Start of RPC preferences UI pieces
+     m_pReminner = new QGridLayout(0, 5, 2, 0, 12, "Innergrid");
+     m_pCorbalabel = new QLabel(m_pRembox, "Corbalabel");
+     m_pReminner->addWidget(m_pCorbalabel, 0, 0);
+     m_pCorbaline = new QLineEdit(m_pRembox, "Corbaline");
+     m_pReminner->addWidget(m_pCorbaline, 0, 1);
+     m_pCorbacheck = new QCheckBox(m_pRembox, "Corbacheckbox");
+     m_pReminner->addWidget(m_pCorbacheck, 1, 1);
+     QSpacerItem *Spacey = new QSpacerItem(6, 12, QSizePolicy::Minimum, QSizePolicy::Minimum);
+     m_pReminner->addItem(Spacey, 2, 0);
+     m_pSoaplabel = new QLabel(m_pRembox, "Soaplabel");
+     m_pReminner->addWidget(m_pSoaplabel, 3, 0);
+     m_pSoapline = new QLineEdit(m_pRembox, "Soapline");
+     m_pReminner->addWidget(m_pSoapline, 3, 1);
+     m_pSoapcheck = new QCheckBox(m_pRembox, "Corbacheckbox");
+     m_pReminner->addWidget(m_pSoapcheck, 4, 1);
+     m_pRemboxlay->addLayout(m_pReminner);
+ 
+     m_pRemlayout->addWidget(m_pRembox);
+     m_pTabselect->insertTab(m_pRemotepage, "");
+ 
+     // Start of color page UI pieces
+     m_pColourpage = new QWidget(m_pTabselect, "Colourpage");
+     m_pColourlayout = new QHBoxLayout(m_pColourpage, 11, 6, "Colourlayout");
+     m_pShadebox = new QGroupBox(m_pColourpage, "Shadegroupbox");
+     m_pShadebox->setColumnLayout(0, Qt::Horizontal);
+     m_pShadebox->layout()->setSpacing(6);
+     m_pShadebox->layout()->setMargin(11);
+     m_pShadeboxlay = new QVBoxLayout(m_pShadebox->layout());
+     m_pShadeboxlay->setAlignment(Qt::AlignTop);
+ 
+     m_pShadelayout = new QGridLayout(0, 2, 2, 6, 16, "Shadelayout");
+     m_pLightlab = new QLabel(m_pShadebox, "Lightlabel");
+     m_pLightlab->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred, this->sizePolicy().hasHeightForWidth());
+     m_pShadelayout->addWidget(m_pLightlab, 0, 0);
+     m_pLightbutt = new QToolButton(m_pShadebox, "Lightbutton");
+     m_pLightbutt->setFocusPolicy(QToolButton::TabFocus);
+     m_pLightbutt->setCursor(QCursor(13));
+     m_pShadelayout->addWidget(m_pLightbutt, 0, 1);
+ 
+     m_pDarklab = new QLabel(m_pShadebox, "Darklabel");
+     m_pDarklab->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred, this->sizePolicy().hasHeightForWidth());
+     m_pShadelayout->addWidget(m_pDarklab, 1, 0);
+     m_pDarkbutt = new QToolButton(m_pShadebox, "Darkbutton");
+     m_pDarkbutt->setFocusPolicy(QToolButton::TabFocus);
+     m_pDarkbutt->setCursor(QCursor(13));
+     m_pShadelayout->addWidget(m_pDarkbutt, 1, 1);
+ 
+     m_pRevertlab = new QLabel(m_pShadebox, "Revertlabel");
+     m_pShadelayout->addWidget(m_pRevertlab, 2, 0);
+     m_pRevertbutt = new QToolButton(m_pShadebox, "Revertbutton");
+     m_pRevertbutt->setFocusPolicy(QToolButton::TabFocus);
+ //    m_pRevertbutt->setIconSet(QIconSet(QPixmap(s_kpcRevcolour_xpm)));
+     m_pRevertbutt->setCursor(QCursor(13));
+     m_pShadelayout->addWidget(m_pRevertbutt, 2, 1);
+ 
+     m_pThemebox = new QGroupBox(m_pColourpage, "Themegroupbox");
+     m_pThemebox->setColumnLayout(0, Qt::Vertical);
+     m_pThemebox->layout()->setSpacing(6);
+     m_pThemebox->layout()->setMargin(11);
+     m_pThemeboxlay = new QVBoxLayout(m_pThemebox->layout());
+ 
+     QLabel *pPlaceholder = new QLabel(m_pThemebox, "Placeholderlabel");
+     pPlaceholder->setText(trUtf8("Reserved for future use", "Comment for Placeholderlabel"));
+     m_pThemeboxlay->addWidget(pPlaceholder, 1, Qt::AlignCenter);
+ 
+     m_pShadeboxlay->addLayout(m_pShadelayout);
+     m_pColourlayout->addWidget(m_pShadebox);
+     m_pColourlayout->addWidget(m_pThemebox);
+     m_pTabselect->insertTab(m_pColourpage, "");
+ 
+     connect(m_pLightbutt, SIGNAL(clicked(void)), SLOT(shadeLight(void)));
+     connect(m_pDarkbutt, SIGNAL(clicked(void)), SLOT(shadeDark(void)));
+     connect(m_pRevertbutt, SIGNAL(clicked(void)), SLOT(shadeRevert(void)));
+ 
+     // Finally add the damn pages to the tab selector widget!
+     m_pVlayout->addWidget(m_pTabselect);
+ 
+     // Start of bottom buttons for aknowlegement and commital of changes
+     m_pButtlay = new QHBoxLayout(0, 0, 12, "Buttonlayout");
+     m_pOkaybutton = new QPushButton(this, "Okaybutton");
+     m_pOkaybutton->setMinimumWidth(120);
+     m_pOkaybutton->setPaletteBackgroundColor(QColor(202, 194, 182));
+     m_pOkaybutton->setCursor(QCursor(13));
+     m_pButtlay->addWidget(m_pOkaybutton);
+     m_pApplybutton = new QPushButton(this, "Applybutton");
+     m_pApplybutton->setMinimumWidth(120);
+     m_pApplybutton->setPaletteBackgroundColor(QColor(198, 196, 186));
+     m_pApplybutton->setCursor(QCursor(13));
+     m_pButtlay->addWidget(m_pApplybutton);
+ //    QSpacerItem *Spacey = new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
+ //    m_pButtlay->addItem(Spacey);
+     m_pCancelbutton = new QPushButton(this, "Cancelbutton");
+     m_pCancelbutton->setMinimumWidth(120);
+     m_pCancelbutton->setPaletteBackgroundColor(QColor(198, 196, 186));
+     m_pCancelbutton->setCursor(QCursor(13));
+     m_pButtlay->addWidget(m_pCancelbutton);
+     m_pCancelbutton->setDefault(true);
+     m_pVlayout->addLayout(m_pButtlay);
+ 
+     // Connect our signals to slots, accept() and reject() are Qt implicit
+     connect(m_pOkaybutton, SIGNAL(clicked(void)), SLOT(accept(void)));
+     connect(m_pApplybutton, SIGNAL(clicked(void)), SIGNAL(applied(void)));
+     connect(m_pCancelbutton, SIGNAL(clicked(void)), SLOT(reject(void)));
+     connect(m_pCorbacheck, SIGNAL(toggled(bool)), SLOT(enableCorba(bool)));
+     connect(m_pSoapcheck, SIGNAL(toggled(bool)), SLOT(enableSoap(bool)));
+     this->textChange();
+     this->resize(QSize(400, 264).expandedTo(minimumSizeHint()));
+ }
+ 
+ //
+ // Sets the light shading colour for rows
+ //
+ void Prefpanel::shadeLight(void)
+ {
+     QColorDialog::setCustomColor(0, this->getRevlight()->rgb());
+     QColorDialog::setCustomColor(1, this->getRevdark()->rgb());
+     QColorDialog::setCustomColor(2, this->getAltlight()->rgb());
+     QColorDialog::setCustomColor(3, this->getAltdark()->rgb());
+     QColor Colortemp = QColorDialog::getColor(*m_pLight);
+     if (Colortemp.isValid()) {
+         delete m_pLight;
+         m_pLight = new QColor(Colortemp);
+         m_pLightbutt->setPaletteBackgroundColor(*m_pLight);
+     }
+ }
+ 
+ //
+ // Sets the dark shading colour for rows
+ //
+ void Prefpanel::shadeDark(void)
+ {
+     QColorDialog::setCustomColor(0, m_pLight->rgb());
+     QColorDialog::setCustomColor(1, m_pDark->rgb());
+     QColor Colortemp = QColorDialog::getColor(*m_pDark);
+     if (Colortemp.isValid()) {
+         delete m_pDark;
+         m_pDark = new QColor(Colortemp);
+         m_pDarkbutt->setPaletteBackgroundColor(*m_pDark);
+     }
+ }
+ 
+ //
+ // Reverts the shading colours to default values
+ //
+ void Prefpanel::shadeRevert(void)
+ {
+     delete m_pLight;
+     m_pLight = new QColor(*this->getRevlight());
+     m_pLightbutt->setPaletteBackgroundColor(*m_pLight);
+     delete m_pDark;
+     m_pDark = new QColor(*this->getRevdark());
+     m_pDarkbutt->setPaletteBackgroundColor(*m_pDark);
+ }
+ 
+ //
+ // Polish off ending changes after creating and before widget shows
+ //
+ void Prefpanel::polish(void)
+ {
+     // Set our buttons now that user has probably set their colours
+     m_pLightbutt->setPaletteBackgroundColor(*m_pLight);
+     m_pDarkbutt->setPaletteBackgroundColor(*m_pDark);
+ }
+ 
+ //
+ // Sets the strings of the subwidgets using the current language
+ //
+ void Prefpanel::textChange(void)
+ {
+     this->setCaption(trUtf8("AS Applicate Preferences", "Personal preferences are persistent across sessions"));
+ 
+     m_pTabselect->changeTab(m_pBoolpage, trUtf8("General"));
+     m_pTabselect->changeTab(m_pGeneralpage, trUtf8("Paths"));
+     m_pTabselect->changeTab(m_pRemotepage, trUtf8("Hosts"));
+     m_pTabselect->changeTab(m_pColourpage, trUtf8("Colour"));
+ 
+     m_pOkaybutton->setText(trUtf8("Okay", "Comment for Okaybutton"));
+     QToolTip::add(m_pOkaybutton, trUtf8("Applies and saves changes", "Comment for tooltip Okaybutton"));
+     QWhatsThis::add(m_pOkaybutton, trUtf8("The okay button applies and saves changes", "Comment for whatsThis Okaybutton"));
+ 
+     m_pApplybutton->setText(trUtf8("Apply", "Comment for Applybutton"));
+     QToolTip::add(m_pApplybutton, trUtf8("Apply changes immediately", "Comment for toolTip Applybutton"));
+     QWhatsThis::add(m_pApplybutton, trUtf8("The apply button applies changes immediately", "Comment for whatsThis Applybutton"));
+ 
+     m_pCancelbutton->setText(trUtf8("Cancel", "Comment for Cancelbutton"));
+     QToolTip::add(m_pCancelbutton, trUtf8("Cancel any changes", "Comment for toolTip Cancelbutton"));
+     QWhatsThis::add(m_pCancelbutton, trUtf8("The cancel button cancels any changes", "Comment for whatsThis Cancelbutton"));
+ 
+     m_pGenbox->setTitle(trUtf8("File and directory paths", "Comment for Genbox"));
+     m_pAcctlabel->setText(trUtf8("Accounts path", "Comment for Acctlabel"));
+     m_pEventlabel->setText(trUtf8("Events directory", "Comment for Eventlabel"));
+     m_pUserlabel->setText(trUtf8("User name", "Comment for Userlabel"));
+     m_pHomelabel->setText(trUtf8("Home directory", "Comment for Homelabel"));
+     QToolTip::add(m_pAcctline, trUtf8("The accounts file pathname", "Comment for toolTip Acctline"));
+     QToolTip::add(m_pEventline, trUtf8("The default events directory", "Comment for toolTip Eventline"));
+     QToolTip::add(m_pUserline, trUtf8("The user name", "Comment for toolTip Userline"));
+     QToolTip::add(m_pHomeline, trUtf8("The home directory", "Comment for toolTip Homeline"));
+ 
+     m_pRembox->setTitle(trUtf8("Remote host names", "Comment for Rembox"));
+     m_pCorbalabel->setText(trUtf8("CORBA host", "Comment for Corbalabel"));
+     m_pSoaplabel->setText(trUtf8("SOAP host", "Comment for Soaplabel"));
+     QToolTip::add(m_pCorbaline, trUtf8("The CORBA host name", "Comment for toolTip Corbaline"));
+     QToolTip::add(m_pSoapline, trUtf8("The SOAP host name", "Comment for toolTip Soapline"));
+ 
+     m_pCorbacheck->setText(trUtf8("Enable IIOP transmission", "Comment for Corbacheck"));
+     QToolTip::add(m_pCorbacheck, trUtf8("Will enable transmission over IIOP", "Comment for toolTip Corbacheck"));
+     QWhatsThis::add(m_pCorbacheck, trUtf8("Check this box to enable transmission to a CORBA host", "Comment whatsThis for Corbacheck"));
+ 
+     m_pSoapcheck->setText(trUtf8("Enable SOAP transmission", "Comment for Soapcheck"));
+     QToolTip::add(m_pSoapcheck, trUtf8("Will enable transmission over SOAP", "Comment for toolTip Soapcheck"));
+     QWhatsThis::add(m_pSoapcheck, trUtf8("Check this box to enable transmission to a SOAP host", "Comment whatsThis for Soapcheck"));
+ 
+     m_pShadebox->setTitle(trUtf8("Row shading", "Comment for Shadebox"));
+     m_pThemebox->setTitle(trUtf8("Skin themes", "Comment for Themebox"));
+ 
+     m_pLightlab->setText(trUtf8("Light", "Comment for Lightlabel"));
+     m_pDarklab->setText(trUtf8("Dark", "Comment for Darklabel"));
+     m_pRevertlab->setText(trUtf8("Revert", "Comment for Revertlabel"));
+     QToolTip::add(m_pLightbutt, trUtf8("Light row shading colour", "Comment for tooltip Lightbutt"));
+     QWhatsThis::add(m_pLightbutt, trUtf8("The Light button sets the light row shading colour.", "Comment for whatsThis Lightbutt"));
+     QToolTip::add(m_pDarkbutt, trUtf8("Dark row shading colour", "Comment for tooltip Darkbutt"));
+     QWhatsThis::add(m_pDarkbutt, trUtf8("The Dark button sets the light row shading colour.", "Comment for whatsThis Darkbutt"));
+ 
+     m_pStylegroup->setTitle(trUtf8("Available styles", "Comment for Stylebuttons"));
+     m_pReportgroup->setTitle(trUtf8("Report options", "Comment for Reportbox"));
+     m_pSwitchgroup->setTitle(trUtf8("Other options", "Comment for Switchbox"));
+ }


ossp-pkg/as/as-gui/as_panel.h -> 1.15

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,167 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  as_panel.h: ISO C++ interface
+ //
+ 
+ #ifndef PREFPANEL_H
+ #define PREFPANEL_H
+ 
+ #include <qvariant.h>
+ #include <qdialog.h>
+ #include <qbuttongroup.h>
+ #include <qlabel.h>
+ #include <qlineedit.h>
+ #include <qpushbutton.h>
+ #include <qtoolbutton.h>
+ #include <qcolordialog.h>
+ #include <qradiobutton.h>
+ #include <qcheckbox.h>
+ #include <qtabwidget.h>
+ #include <qwidget.h>
+ #include <qlayout.h>
+ #include <qtooltip.h>
+ #include <qwhatsthis.h>
+ #include <qstylefactory.h>
+ #include <qlayout.h>
+ 
+ #include "as_gui.h"     // For usage of style_t
+ 
+ 
+ class Prefpanel : public QDialog
+ {
+     Q_OBJECT
+ 
+ public:
+     Prefpanel(QWidget *pParent = 0, const char *kszName = 0, bool bModal = true, WFlags Flags = 0);
+ //    ~Prefpanel(void); // No need to destroy widgets, because qt does it for us
+ 
+ private:
+     Preferences *m_pPanprefs;
+     QColor *m_pLight, *m_pDark;
+     QColorGroup *m_pOrigcolours, *m_pAltcolours;
+ 
+ public:
+     QGroupBox *m_pGenbox, *m_pRembox, *m_pShadebox, *m_pThemebox;
+     QVBoxLayout *m_pStylelay, *m_pReportlay, *m_pSwitchlay;
+     QVBoxLayout *m_pVlayout, *m_pBinlayout;
+     QHBoxLayout *m_pBoolayout, *m_pGenlayout, *m_pRemlayout;
+     QVBoxLayout *m_pShadeboxlay, *m_pThemeboxlay;
+     QHBoxLayout *m_pGenboxlay, *m_pRemboxlay, *m_pColourlayout;
+     QGridLayout *m_pGeninner, *m_pReminner, *m_pShadelayout;
+ 
+     QWidget *m_pBoolpage, *m_pGeneralpage, *m_pRemotepage, *m_pColourpage;
+ 
+     QHBoxLayout *m_pButtlay;
+     QPushButton *m_pOkaybutton;
+     QPushButton *m_pApplybutton;
+     QPushButton *m_pCancelbutton;
+     QTabWidget *m_pTabselect;
+ 
+     QLabel *m_pAcctlabel, *m_pEventlabel;
+     QLabel *m_pUserlabel, *m_pHomelabel;
+     QLabel *m_pCorbalabel, *m_pSoaplabel;
+     QLineEdit *m_pAcctline, *m_pEventline;
+     QLineEdit *m_pUserline, *m_pHomeline;
+     QLineEdit *m_pCorbaline, *m_pSoapline;
+     QCheckBox *m_pCorbacheck, *m_pSoapcheck;
+ 
+     QLabel *m_pLightlab, *m_pDarklab, *m_pRevertlab;
+     QToolButton *m_pLightbutt, *m_pDarkbutt, *m_pRevertbutt;
+ 
+     QButtonGroup *m_pStylegroup, *m_pReportgroup, *m_pSwitchgroup;
+     QCheckBox *m_pBackupcheck, *m_pExtendcheck;
+     QCheckBox *m_pDetailcheck, *m_pSigncheck;
+ 
+ public:
+     // Accessor get methods
+     QString getStyle(void)     {return (m_pStylegroup->selected()->text());};
+     QString getAccounts(void)  {return (m_pAcctline->text());};
+     QString getEvents(void)    {return (m_pEventline->text());};
+     QString getUser(void)      {return (m_pUserline->text());};
+     QString getHome(void)      {return (m_pHomeline->text());};
+     QString getCorbahost(void) {return (m_pCorbaline->text());};
+     QString getSoaphost(void)  {return (m_pSoapline->text());};
+     bool getCorbaon(void)      {return (m_pCorbacheck->isChecked());};
+     bool getSoapon(void)       {return (m_pSoapcheck->isChecked());};
+     bool getBackon(void)       {return (m_pBackupcheck->isChecked());};
+     bool getExtendon(void)     {return (m_pExtendcheck->isChecked());};
+     bool getDetailon(void)     {return (m_pDetailcheck->isChecked());};
+     bool getSignaton(void)     {return (m_pSigncheck->isChecked());};
+     QColor *getLight(void)     {return m_pLight;};
+     QColor *getDark(void)      {return m_pDark;};
+     QColor *getRevlight(void)  {return (QColor *)&m_pOrigcolours->foreground();};
+     QColor *getRevdark(void)   {return (QColor *)&m_pOrigcolours->background();};
+     QColor *getAltlight(void)  {return (QColor *)&m_pAltcolours->foreground();};
+     QColor *getAltdark(void)   {return (QColor *)&m_pAltcolours->background();};
+ 
+     // Accessor set methods
+     void setAccounts(const QString &kInstr)  {m_pAcctline->setText(kInstr);};
+     void setEvents(const QString &kInstr)    {m_pEventline->setText(kInstr);};
+     void setUser(const QString &kInstr)      {m_pUserline->setText(kInstr);};
+     void setHome(const QString &kInstr)      {m_pHomeline->setText(kInstr);};
+     void setCorbahost(const QString &kInstr) {m_pCorbaline->setText(kInstr);};
+     void setSoaphost(const QString &kInstr)  {m_pSoapline->setText(kInstr);};
+     void setBackon(const bool &kbEnable = true)   {m_pBackupcheck->setChecked(kbEnable);};
+     void setExtendon(const bool &kbEnable = true) {m_pExtendcheck->setChecked(kbEnable);};
+     void setDetailon(const bool &kbEnable = true) {m_pDetailcheck->setChecked(kbEnable);};
+     void setSignaton(const bool &kbEnable = true) {m_pSigncheck->setChecked(kbEnable);};
+     void lockCorba(const bool &kbLock = true)     {m_pCorbacheck->setEnabled(!kbLock);};
+     void lockSoap(const bool &kbLock = true)      {m_pSoapcheck->setEnabled(!kbLock);};
+     void setLight(const QColor *pLight)           {m_pLight = (QColor *)pLight;};
+     void setDark(const QColor *pDark)             {m_pDark = (QColor *)pDark;};
+     void setOrigcolour(QColorGroup *pGroup)       {m_pOrigcolours = pGroup;};
+     void setAltcolour(QColorGroup *pGroup)        {m_pAltcolours  = pGroup;};
+     void setCorbaon(const bool &kbEnable = true)  {
+         m_pCorbaline->setEnabled(kbEnable);
+         m_pCorbacheck->setChecked(kbEnable);
+     };
+     void setSoapon(const bool &kbEnable = true) {
+         m_pSoapline->setEnabled(kbEnable);
+         m_pSoapcheck->setChecked(kbEnable);
+     };
+     void setStyle(const char *pkszStyle) {
+         for (int nIter = 0; nIter < m_pStylegroup->count(); nIter++)
+             if (m_pStylegroup->find(nIter)->text() == pkszStyle)
+                 m_pStylegroup->setButton(nIter);
+     };
+ 
+ protected slots:
+     virtual void polish(void);
+     virtual void textChange(void);
+     virtual void shadeLight(void);
+     virtual void shadeDark(void);
+     virtual void shadeRevert(void);
+     void enableCorba(bool bOn) {m_pCorbaline->setEnabled(bOn);};
+     void enableSoap(bool bOn) {m_pSoapline->setEnabled(bOn);};
+ 
+ signals:
+     void applied(void);
+ };
+ 
+ #endif // PREFPANEL_H


ossp-pkg/as/as-gui/as_rand.cpp -> 1.4

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,137 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  as_rand.cpp: ISO C++ implementation
+ //
+ 
+ #include <fcntl.h>
+ #include <cerrno>
+ 
+ #include "as_rand.h"
+ 
+ #if HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif // HAVE_UNISTD_H
+ #if HAVE_STDLIB_H
+ #include <stdlib.h>
+ #endif // HAVE_STDLIB_H
+ 
+ #if TIME_WITH_SYS_TIME
+ #include <sys/time.h>
+ #include <time.h>
+ #else
+ #if HAVE_SYS_TIME_H
+ #include <sys/time.h>
+ #else
+ #include <time.h>
+ #endif // HAVE_SYS_TIME_H
+ #endif // TIME_WITH_SYS_TIME
+ 
+ 
+ namespace AS {
+ 
+ // Constructor
+ Rand::Rand(void)
+ {
+     this->nFd = -4; // Object fresh status
+     this->openDevice();   // Open the random device
+ //    if (this->nFd < 0)
+ //        throw Genexcept("Could not open /dev/urandom or /dev/random.");
+ }
+ 
+ // Destructor
+ Rand::~Rand(void)
+ {
+     this->closeDevice();  // Close the random device
+     this->nFd = -4; // Return this object to its fresh status
+ }
+ 
+ //
+ // Rand::openDevice(void)
+ // Open the random device associated with this object
+ //
+ void Rand::openDevice(void)
+ {
+     struct timeval Time;
+ 
+     if (this->nFd == -4) {  // -4 indicates a fresh object
+         gettimeofday(&Time, 0);
+         this->nFd = open("/dev/urandom", O_RDONLY);
+         if (this->nFd == -1)
+             this->nFd = open("/dev/random", O_RDONLY | O_NONBLOCK);
+         srand((getpid() << 16) ^ getuid() ^ Time.tv_sec ^ Time.tv_usec); // Seed
+     }
+ 
+     // Improve randomness by stirring in entropy
+     gettimeofday(&Time, 0);
+     for (int nIter = (Time.tv_sec ^ Time.tv_usec) & 0x1F; nIter > 0; nIter--)
+         rand();
+ }
+ 
+ //
+ // Rand::closeDevice(void)
+ // Close the random device associated with this object
+ //
+ void Rand::closeDevice(void)
+ {
+     if (this->nFd >= 0)
+         close(this->nFd);
+ }
+ 
+ //
+ // Rand::genData(void *pvBuf, int nBytes)
+ // Generate a series of random data from the system
+ // standard random devices /dev/[u|s]random
+ //
+ void Rand::genData(void *pBuf, int nBytes)
+ {
+     int nRead = 0;
+     int nLost = 0;
+     char *szOut = (char *)pBuf;
+ 
+     if (this->nFd >= 0) {
+         while (nBytes > 0) {
+             nRead = read(this->nFd, szOut, nBytes);
+             if ((nRead < 0) && ((errno == EINTR) || (errno == EAGAIN)))
+                 continue;
+             if (nRead <= 0) {
+                 if (nLost++ == 8)
+                     break;
+                 continue;
+             }
+             nBytes -= nRead;
+             szOut += nRead;
+             nLost = 0;
+         }
+     }
+ 
+     // For systems with no /dev/random, we do the next best thing
+     for (int nIter = 0;  nIter< nBytes; nIter++)
+         *szOut++ = rand() & 0xFF;
+ }
+ } // namespace AS


ossp-pkg/as/as-gui/as_rand.h -> 1.2

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,63 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  as_rand.h: ISO C++ interface
+ //
+ 
+ #ifndef RAND_H
+ #define RAND_H
+ 
+ #ifdef HAVE_CONFIG_H
+ #include "ac_config.h"
+ #endif
+ 
+ 
+ namespace AS {
+ 
+ //
+ // Generates (multiple) random numbers, using the
+ // system standard random devices or a choppy
+ // home made algorythm if no devices exist
+ //
+ class Rand
+ {
+ private:
+     int nFd;                    // File descriptor of random device
+ 
+ public:
+     Rand(void);                 // Constructor
+     ~Rand(void);                // Destructor
+     void genData(void *, int);  // Generates a number
+ 
+ private:
+     void openDevice(void);      // Opens the random device
+     void closeDevice(void);     // Closes the random device
+ };
+ }
+ 
+ #endif // RAND_H


ossp-pkg/as/as-gui/as_reportpanel.cpp -> 1.16

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,762 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  as_reportpanel.cpp: ISO C++ implementation
+ //
+ 
+ #include <qvariant.h>
+ #include <qpushbutton.h>
+ #include <qtextedit.h>
+ #include <qtoolbutton.h>
+ #include <qbuttongroup.h>
+ #include <qpopupmenu.h>
+ #include <qlayout.h>
+ #include <qtooltip.h>
+ #include <qwhatsthis.h>
+ #include <qtextstream.h>
+ #include <qfiledialog.h>
+ #include <qprinter.h>
+ #include <qpaintdevicemetrics.h>
+ #include <qpainter.h>
+ #include <qfile.h>
+ #include <qdir.h>
+ 
+ #include "as_reportpanel.h"
+ #include "as_numdial.h"
+ #include "as_table.h"
+ #include "as_pref.h"
+ #include "as_generic.h"
+ #include "as_const.h"
+ #include "as_except.h"
+ 
+ // Version information
+ #define _AS_VERSION_CPP_AS_HEADER_
+ #include "as_version.cpp"
+ #undef  _AS_VERSION_CPP_AS_HEADER_
+ 
+ 
+ namespace AS {
+ 
+ //
+ // Constructs a Reportpanel as a child of 'pParent', with the 
+ // name 'kszName' and widget flags set to 'Flags'.
+ //
+ // The dialog will by default be modal, unless you set 'bModal' to
+ // false to construct a modeless dialog.
+ //
+ Reportpanel::Reportpanel(TiTable *pTable, Preferences *pPreferences,
+                          QWidget *pParent, const char *kszName,
+                          bool bModal, WFlags Flags)
+                          : QDialog(pParent, kszName, bModal, Flags)
+ {
+     // Boilerplate code to initialize the panel
+     if (!kszName)
+         this->setName("Reportpanel");
+ 
+     // Make panel resizeable
+     this->setSizeGripEnabled(true);
+     this->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)5,
+         (QSizePolicy::SizeType)5, 0, 0, this->sizePolicy().hasHeightForWidth()));
+ 
+     // Store matrix and prefs members
+     m_pReptable = pTable;
+     m_pReprefs  = pPreferences;
+     m_pPrinter  = new QPrinter;
+ 
+     // Preset number of weeks and months to report
+     m_nWeeks = m_pReprefs->getNumber(TITRAQ_PREFREPORTWEEKS, TITRAQ_DEFREPORTWEEKS);
+     m_nMonths = m_pReprefs->getNumber(TITRAQ_PREFREPORTMONTHS, TITRAQ_DEFREPORTMONTHS);
+ 
+     // Build panel using already constructed widgets and layouts
+     m_pFormlay = new QVBoxLayout(this, 11, 6, "Formlayout");
+     m_pToolay = new QHBoxLayout(0, 0, 6, "Toolbuttonlay"); 
+     m_pPushlay = new QHBoxLayout(0, 0, 6, "Pushbuttonlay"); 
+ 
+     // Groupbox and its text display
+     m_pBrowser = new QTextEdit(this, "Reportbrowser");
+     m_pBrowser->setTextFormat(PlainText);
+     m_pBrowser->setReadOnly(true);
+     m_pBrowser->setFont(QFont("Courier", 10));
+     m_pFormlay->addWidget(m_pBrowser);
+     m_pFormlay->addSpacing(6);
+     m_pFormlay->addLayout(m_pToolay);
+     m_pFormlay->addSpacing(6);
+     m_pFormlay->addLayout(m_pPushlay);
+ 
+     // Tool button suite
+     m_pWeekmonthgroup = new QButtonGroup(this, "Weekmonthgroup");
+     m_pWeekmonthgroup->setColumnLayout(0, Qt::Horizontal);
+     m_pWeekmonthgroup->layout()->setSpacing(11);
+     m_pWeekmonthgroup->layout()->setMargin(0);
+     m_pWeekmonthlay = new QHBoxLayout(m_pWeekmonthgroup->layout());
+     m_pWeekmonthgroup->setFrameShape(QFrame::NoFrame);
+     m_pWeekmonthgroup->setExclusive(true);
+     m_pWeeklybutt = new QToolButton(m_pWeekmonthgroup, "Weeklybutton");
+ //    m_pWeeklybutt->setPaletteBackgroundColor(QColor(198, 196, 186));
+     m_pWeeklybutt->setFocusPolicy(QWidget::TabFocus);
+     m_pWeeklybutt->setCursor(QCursor(13));
+     m_pWeeklybutt->setToggleButton(true);
+     m_pMonthlybutt = new QToolButton(m_pWeekmonthgroup, "Monthlybutton");
+ //    m_pMonthlybutt->setPaletteBackgroundColor(QColor(198, 196, 186));
+     m_pMonthlybutt->setFocusPolicy(QWidget::TabFocus);
+     m_pMonthlybutt->setCursor(QCursor(13));
+     m_pMonthlybutt->setToggleButton(true);
+ 
+     // Popup for number of weeks
+     m_pWeekpop = new QPopupMenu(this);
+     if (m_pWeekpop == NULL) // Sanity check
+         throw Genexcept("Weekly toolbutton popup creation failed.");
+     m_pWeekpop->insertItem(trUtf8("One week"), this, SLOT(reportWeeks(int)));
+     m_pWeekpop->insertItem(trUtf8("Two weeks"), this, SLOT(reportWeeks(int)));
+     m_pWeekpop->insertItem(trUtf8("Three weeks"), this, SLOT(reportWeeks(int)));
+     m_pWeekpop->insertItem(trUtf8("Four weeks"), this, SLOT(reportWeeks(int)));
+     m_pWeekpop->insertItem(trUtf8("N... weeks"), this, SLOT(reportWeeks(int)));
+     m_pWeekpop->setCheckable(true);
+     m_pWeeklybutt->setPopup(m_pWeekpop);
+     m_pWeeklybutt->setPopupDelay(TITRAQ_POPUPMSECS);
+ 
+     { // Initialize check button correctly
+         int nPosition = (m_nWeeks < m_pWeekpop->count()) ? m_nWeeks : m_pWeekpop->count();
+         m_pWeekpop->setItemChecked(m_pWeekpop->idAt(--nPosition), true);
+     }
+ 
+     // Popup for number of months
+     m_pMonthpop = new QPopupMenu(this);
+     if (m_pMonthpop == NULL) // Sanity check
+         throw Genexcept("Monthly toolbutton popup creation failed.");
+     m_pMonthpop->insertItem(trUtf8("One month"), this, SLOT(reportMonths(int)));
+     m_pMonthpop->insertItem(trUtf8("Two months"), this, SLOT(reportMonths(int)));
+     m_pMonthpop->insertItem(trUtf8("Three months"), this, SLOT(reportMonths(int)));
+     m_pMonthpop->insertItem(trUtf8("Four months"), this, SLOT(reportMonths(int)));
+     m_pMonthpop->insertItem(trUtf8("N... months"), this, SLOT(reportMonths(int)));
+     m_pMonthpop->setCheckable(true);
+     m_pMonthlybutt->setPopup(m_pMonthpop);
+     m_pMonthlybutt->setPopupDelay(TITRAQ_POPUPMSECS);
+ 
+     { // Initialize check button correctly
+         int nPosition = (m_nMonths < m_pMonthpop->count()) ? m_nMonths : m_pMonthpop->count();
+         m_pMonthpop->setItemChecked(m_pMonthpop->idAt(--nPosition), true);
+     }
+ 
+     // Add our tool buttons
+     m_pWeekmonthlay->addWidget(m_pWeeklybutt);
+     m_pWeekmonthlay->addWidget(m_pMonthlybutt);
+     m_pToolay->addWidget(m_pWeekmonthgroup);
+ 
+     // Push button suite
+     m_pSavebutt = new QPushButton(this, "Savebutton");
+     m_pSavebutt->setPaletteBackgroundColor(QColor(202, 194, 182));
+     m_pSavebutt->setCursor(QCursor(13));
+     m_pPrintbutt = new QPushButton(this, "Printbutton");
+     m_pPrintbutt->setPaletteBackgroundColor(QColor(198, 196, 186));
+     m_pPrintbutt->setCursor(QCursor(13));
+ #ifdef QT_NO_PRINTER
+     m_pPrintbutt->setEnabled(false);
+ #endif
+     m_pDismissbutt = new QPushButton(this, "Dismissbutton");
+     m_pDismissbutt->setPaletteBackgroundColor(QColor(198, 196, 186));
+     m_pDismissbutt->setCursor(QCursor(13));
+     m_pDismissbutt->setDefault(true);
+     m_pPushlay->addWidget(m_pSavebutt);
+     m_pPushlay->addWidget(m_pPrintbutt);
+     m_pPushlay->addWidget(m_pDismissbutt);
+ 
+     // Connect signals to slots, accept() and reject() are Qt implicit
+     connect(m_pWeeklybutt, SIGNAL(clicked(void)), SLOT(reportWeeks(void)));
+     connect(m_pMonthlybutt, SIGNAL(clicked(void)), SLOT(reportMonths(void)));
+     connect(m_pSavebutt, SIGNAL(clicked(void)), SLOT(saveReport(void)));
+     connect(m_pPrintbutt, SIGNAL(clicked(void)), SLOT(printReport(void)));
+     connect(m_pDismissbutt, SIGNAL(clicked(void)), SLOT(accept(void)));
+     this->resize(QSize(464, 332).expandedTo(minimumSizeHint()));
+     this->textChange();
+ }
+ 
+ //
+ // Overload QDialog::exec(), and generate a report before executing modally
+ //
+ int Reportpanel::exec(void)
+ {
+     int nRet = 0;
+     int nPeriod = m_pReprefs->getNumber(TITRAQ_PREFREPORTYPE, TITRAQ_DEFREPORTYPE);
+ 
+     switch (nPeriod) {
+     case TITRAQ_REPORTWEEK:
+         this->reportWeeks(1);
+         m_pWeekmonthgroup->setButton(TITRAQ_REPORTWEEK);
+         break;
+     case TITRAQ_REPORTMONTH:
+         this->reportMonths(1);
+         m_pWeekmonthgroup->setButton(TITRAQ_REPORTMONTH);
+         break;
+     default:
+         throw Genexcept("Reportpanel: Modal event loop entered with no report period.");
+         break;
+     }
+ 
+     nRet = QDialog::exec(); // Blast off
+ 
+     // Before losing scope, the preferred report period
+     m_pReprefs->setNumber(TITRAQ_PREFREPORTYPE,
+         m_pWeekmonthgroup->id(m_pWeekmonthgroup->selected()));
+     m_pReprefs->setNumber(TITRAQ_PREFREPORTWEEKS, m_nWeeks);
+     m_pReprefs->setNumber(TITRAQ_PREFREPORTMONTHS, m_nMonths);
+     return nRet;
+ }
+ 
+ //
+ // Makes a new weekly report of so many weeks
+ //
+ void Reportpanel::reportWeeks(int nMenuid)
+ {
+     // Range of weeks to report
+     int nFirstweek, nLastweek;
+ 
+     // Menu index, first item is always 0
+     int nIndex = m_pWeekpop->indexOf(nMenuid);      // Corresponds to weeks
+     int nLastid = 0;                                // Last menu id selected
+ 
+     if (m_nWeeks < m_pWeekpop->count())
+         nLastid = m_pWeekpop->idAt(m_nWeeks - 1);   // Probably not last item
+     else
+         nLastid = m_pWeekpop->idAt(m_pWeekpop->count() - 1); // Last item selected
+ 
+     // Set the button in case from a menu selection
+     m_pWeekmonthgroup->setButton(TITRAQ_REPORTWEEK);
+ 
+     // Update m_nWeeks only if user prefers a different number
+     if (nIndex >= 0) {
+         // User selected N... to indicate an arbitrary number
+         if (nIndex == m_pWeekpop->count() - 1) {
+             Numdial Weeksinput;
+             Weeksinput.setNum(m_nWeeks);
+             if (Weeksinput.exec() == QDialog::Accepted) {
+                 m_nWeeks = Weeksinput.getNum();
+                 m_pWeekpop->setItemChecked(nLastid, false);
+                 m_pWeekpop->setItemChecked(nMenuid, true);
+             }
+             else
+                 return;
+         }
+         else { // User selected a preset menu item such as '2 weeks'
+             m_nWeeks = nIndex + 1;
+             m_pWeekpop->setItemChecked(nLastid, false);
+             m_pWeekpop->setItemChecked(nMenuid, true);
+         }
+     }
+ 
+     // Clear data window
+     m_pBrowser->setUpdatesEnabled(false);
+     m_pBrowser->clear();
+ 
+     // Determine first and last week numbers, then write header
+     nLastweek = QDate::currentDate().weekNumber();
+     if (m_nWeeks > 1) {
+         nFirstweek = QDate::currentDate().addDays(m_nWeeks * -7).weekNumber() + 1;
+         this->writeHeader(nFirstweek, nLastweek);
+     }
+     else
+         this->writeHeader(nLastweek);
+ 
+     // Write new contents to data window
+     m_pBrowser->append(this->getWeektotals(QDate::currentDate(), m_nWeeks));
+     if (m_pReprefs->getBool(TITRAQ_PREFDETAILON, TITRAQ_DEFDETAILON))
+         m_pBrowser->append(this->getWeekdetails(QDate::currentDate(), m_nWeeks));
+     this->writeFooter();
+     m_pBrowser->setCursorPosition(0, 0);
+     m_pBrowser->ensureCursorVisible();
+     m_pBrowser->setUpdatesEnabled(true);
+     m_pBrowser->repaint(false);
+ }
+ 
+ //
+ // Makes a new monthly report of so many months
+ //
+ void Reportpanel::reportMonths(int nMenuid)
+ {
+     // Range of months to report
+     QString Firstmonth, Lastmonth;
+ 
+     // Menu index, first item is always 0
+     int nIndex = m_pMonthpop->indexOf(nMenuid);     // Corresponds to months
+     int nLastid = 0;                                // Last menu id selected
+ 
+     if (m_nMonths < m_pMonthpop->count())
+         nLastid = m_pMonthpop->idAt(m_nMonths - 1); // Probably not last item
+     else
+         nLastid = m_pMonthpop->idAt(m_pMonthpop->count() - 1); // Last item selected
+ 
+     // Set the button in case from a menu selection
+     m_pWeekmonthgroup->setButton(TITRAQ_REPORTMONTH);
+ 
+     // Update m_nMonths only if user prefers a different number
+     if (nIndex >= 0) {
+         // User selected N... to indicate an arbitrary number
+         if (nIndex == m_pMonthpop->count() - 1) {
+             Numdial Monthsinput;
+             Monthsinput.setNum(m_nMonths);
+             if (Monthsinput.exec() == QDialog::Accepted) {
+                 m_nMonths = Monthsinput.getNum();
+                 m_pMonthpop->setItemChecked(nLastid, false);
+                 m_pMonthpop->setItemChecked(nMenuid, true);
+             }
+             else
+                 return;
+         }
+         else { // User selected a preset menu item such as '2 months'
+             m_nMonths = nIndex + 1;
+             m_pMonthpop->setItemChecked(nLastid, false);
+             m_pMonthpop->setItemChecked(nMenuid, true);
+         }
+     }
+ 
+     // Clear data window
+     m_pBrowser->setUpdatesEnabled(false);
+     m_pBrowser->clear();
+ 
+     // Determine first and last month names, then write header
+     Lastmonth = QDate::longMonthName(QDate::currentDate().month());
+     if (m_nMonths > 1) {
+         int nMonth = (QDate::currentDate().addMonths(m_nMonths * -1).month() + 12) % 12 + 1;
+         Firstmonth = QDate::longMonthName(nMonth);
+         this->writeHeader(Firstmonth, Lastmonth);
+     }
+     else
+         this->writeHeader(Lastmonth);
+ 
+     // Write new contents to data window
+     m_pBrowser->append(this->getMonthtotals(QDate::currentDate(), m_nMonths));
+     if (m_pReprefs->getBool(TITRAQ_PREFDETAILON, TITRAQ_DEFDETAILON)) {
+         m_pBrowser->append(this->getMonthdetails(QDate::currentDate(), m_nMonths));
+     }
+     this->writeFooter();
+     m_pBrowser->setCursorPosition(0, 0);
+     m_pBrowser->ensureCursorVisible();
+     m_pBrowser->setUpdatesEnabled(true);
+     m_pBrowser->repaint(false);
+ }
+ 
+ //
+ // Writes a report header to the display window
+ //
+ void Reportpanel::writeHeader(int nWeeknum)
+ {
+     QString Header;
+     Header = QString("Accounting System ");
+     Header += QString(asgui_version.v_short);
+     Header += trUtf8("\nLocal report, username '");
+     Header += m_pReprefs->getString(TITRAQ_PREFUSER, TITRAQ_DEFUSER);
+     Header += QString("'\n");
+     Header += trUtf8("Date ");
+     Header += QDate::currentDate().toString(Qt::ISODate);
+     Header += trUtf8(", Time ");
+     Header += QTime::currentTime().toString(Qt::ISODate);
+     Header += trUtf8("\nReporting for week %1...").arg(nWeeknum);
+     Header += QString("\n\n");
+     m_pBrowser->setText(Header);
+ }
+ 
+ //
+ // Writes a report header to the display window
+ //
+ void Reportpanel::writeHeader(QString Month)
+ {
+     QString Header;
+     Header = QString("Accounting System ");
+     Header += QString(asgui_version.v_short);
+     Header += trUtf8("\nLocal report, username '");
+     Header += m_pReprefs->getString(TITRAQ_PREFUSER, TITRAQ_DEFUSER);
+     Header += QString("'\n");
+     Header += trUtf8("Date ");
+     Header += QDate::currentDate().toString(Qt::ISODate);
+     Header += trUtf8(", Time ");
+     Header += QTime::currentTime().toString(Qt::ISODate);
+     Header += trUtf8("\nReporting for month %1...").arg(Month);
+     Header += QString("\n\n");
+     m_pBrowser->setText(Header);
+ }
+ 
+ //
+ // Writes a report header to the display window
+ //
+ void Reportpanel::writeHeader(int nFirst, int nLast)
+ {
+     QString Header;
+     Header = QString("Accounting System ");
+     Header += QString(asgui_version.v_short);
+     Header += trUtf8("\nLocal report, username '");
+     Header += m_pReprefs->getString(TITRAQ_PREFUSER, TITRAQ_DEFUSER);
+     Header += QString("'\n");
+     Header += trUtf8("Date ");
+     Header += QDate::currentDate().toString(Qt::ISODate);
+     Header += trUtf8(", Time ");
+     Header += QTime::currentTime().toString(Qt::ISODate);
+     Header += trUtf8("\nReporting for weeks %1 through %2...").arg(nFirst).arg(nLast);
+     Header += QString("\n\n");
+     m_pBrowser->setText(Header);
+ }
+ 
+ //
+ // Writes a report header to the display window
+ //
+ void Reportpanel::writeHeader(QString First, QString Last)
+ {
+     QString Header;
+     Header = QString("Accounting System ");
+     Header += QString(asgui_version.v_short);
+     Header += trUtf8("\nLocal report, username '");
+     Header += m_pReprefs->getString(TITRAQ_PREFUSER, TITRAQ_DEFUSER);
+     Header += QString("'\n");
+     Header += trUtf8("Date ");
+     Header += QDate::currentDate().toString(Qt::ISODate);
+     Header += trUtf8(", Time ");
+     Header += QTime::currentTime().toString(Qt::ISODate);
+     Header += trUtf8("\nReporting months %1 through %2...").arg(First).arg(Last);
+     Header += QString("\n\n");
+     m_pBrowser->setText(Header);
+ }
+ 
+ //
+ // Writes a report footer to the display window
+ //
+ void Reportpanel::writeFooter(void)
+ {
+     if (m_pReprefs->getBool(TITRAQ_PREFSIGNATON, TITRAQ_DEFSIGNATON)) {
+         m_pBrowser->append(trUtf8("\n\nPrint name ________________________________________\n"));
+         m_pBrowser->append(trUtf8("\n\nSignature  ________________________________________"));
+     }
+ }
+ 
+ //
+ // Returns one week of details data
+ //
+ QString Reportpanel::getWeekdetails(QDate Dayref, int nWeeks)
+ {
+     QString Data;       // Output string
+     QString Tempstring; // Temp churning
+     int nRows = m_pReptable->numRows();
+ 
+     // Find range boundaries
+     Q_ASSERT(nWeeks > 0);
+     QDate Tempdate;
+     QDate Firstday;
+     QDate Lastday;
+     Firstday = Dayref.addDays(Dayref.dayOfWeek() * -1 + 1);
+     Firstday = Firstday.addDays((nWeeks - 1) * -7);
+     Lastday  = Firstday.addDays(7 * nWeeks);
+ 
+     // Write some quick header text to the outgoing string
+     Data  = trUtf8("\nDate       Hours Account details\n");
+     Data += QString("---------- ----- ----------------------------------------\n");
+ 
+     // Build the long week data string
+     for (int nIter = nRows - 1; nIter >= 0; nIter--) {
+         // Work on this tuple only if it within the reporting range
+         Tempstring = m_pReptable->text(nIter, TITRAQ_IDXTASK);
+         Tempdate = QDate::fromString(m_pReptable->text(nIter, TITRAQ_IDXDATE), Qt::ISODate);
+         if (!Tempstring.isEmpty() && Firstday <= Tempdate && Tempdate < Lastday) {
+             Tempstring = m_pReptable->text(nIter, TITRAQ_IDXDATE);
+             if (!Tempstring.isEmpty())
+                 Data += Tempstring;
+             Tempstring = m_pReptable->text(nIter, TITRAQ_IDXAMOUNT);
+             if (!Tempstring.isEmpty())
+                 Data += QString(TITRAQ_SEPARATORTOK) + Tempstring;
+             Tempstring = m_pReptable->text(nIter, TITRAQ_IDXTASK);
+             if (!Tempstring.isEmpty())
+                 Data += QString(TITRAQ_SEPARATORTOK) + Tempstring;
+             Data += QString("\n"); // Finish off line
+         }
+     }
+ 
+     return Data;
+ }
+ 
+ //
+ // Returns one week of totals data
+ //
+ QString Reportpanel::getWeektotals(QDate Dayref, int nWeeks)
+ {
+     using namespace std;                            // Needed for maps and hash
+     map<string, string> Hashtasks;                  // Hashtable to store tasks
+     multimap<string, string> Hashhours;             // Hashtable to store hours
+     map<string, string>::iterator Taskiter;         // Hashtable task iterator
+     multimap<string, string>::iterator Houriter;    // Hashtable hour iterator
+ 
+     QString Totals;                         // Data totals to return for writing
+     QString Tempstring;                     // Temporary processing string
+     QDate   Tempdate;                       // Temporary processing date
+     int     nRows = m_pReptable->numRows();
+ 
+     // Find range boundaries
+     Q_ASSERT(nWeeks > 0);
+     QDate Firstday;
+     QDate Lastday;
+     Firstday = Dayref.addDays(Dayref.dayOfWeek() * -1 + 1);
+     Firstday = Firstday.addDays((nWeeks - 1) * -7);
+     Lastday  = Firstday.addDays(7 * nWeeks);
+ 
+     // Parse the table for interesting values
+     for (int nIter = 0; nIter < nRows; nIter++) {
+         // Work on this tuple only if it within the reporting range
+         Tempstring = m_pReptable->text(nIter, TITRAQ_IDXTASK);
+         Tempdate = QDate::fromString(m_pReptable->text(nIter, TITRAQ_IDXDATE), Qt::ISODate);
+         if (!Tempstring.isEmpty() && Firstday <= Tempdate && Tempdate < Lastday) {
+             string Convstring = Tempstring;         // Convert to string (can't cast?)
+             QTime Intable = QTime::fromString(m_pReptable->text(nIter, TITRAQ_IDXAMOUNT), Qt::ISODate);
+             int nTothours = QString(Hashtasks[Convstring]).section(':', 0, 0).toInt() + Intable.hour();
+             int nTotminut = QString(Hashtasks[Convstring]).section(':', 1, 1).toInt() + Intable.minute();
+             nTothours += nTotminut / 60;
+             nTotminut %= 60;
+             QString Hours = QString::number(nTothours).rightJustify(3, ' ');
+             QString Mins  = QString::number(nTotminut).rightJustify(2, '0');
+             string Timestring = Hours + ':' + Mins; // Convert to string (can't cast?)
+             Hashtasks[Convstring] = Timestring;     // Finally store in hashtable
+         }
+     }
+ 
+     // Reverse copy the tasks hashtable to both sort and index by amount key
+     for (Taskiter = Hashtasks.begin(); Taskiter != Hashtasks.end(); Taskiter++)
+         Hashhours.insert(pair<string, string>(Taskiter->second, Taskiter->first));
+ 
+     // Write the actual data totals to the outgoing string in reverse order
+     for (Houriter = Hashhours.begin(); Houriter != Hashhours.end(); Houriter++)
+         Totals = Houriter->first + ' ' + Houriter->second + '\n' + Totals;
+ 
+     // Write some quick header text to the outgoing string in reverse order
+     Totals = QString("------ ----------------------------------------\n") + Totals;
+     Totals = trUtf8("Total  Account summary\n") + Totals;
+ 
+     return Totals; // The outgoing string... its finally gone, let's go to bed
+ }
+ 
+ //
+ // Returns one month of details data
+ //
+ QString Reportpanel::getMonthdetails(QDate Dayref, int nMonths)
+ {
+     QString Data;       // Output string
+     QString Tempstring; // Temp churning
+     QDate Tempdate;     // For comparing
+     QDate Firstday;     // Minimum boundary
+     QDate Lastday;      // Maximum boundary
+     int nRows = m_pReptable->numRows();
+ 
+     // Find range boundaries
+     Q_ASSERT(nMonths > 0);
+     int nYear = Dayref.year();
+     int nMonth = (Dayref.addMonths(nMonths * -1).month() + 12) % 12 + 1;
+     if (nMonth > Dayref.month())
+         nYear--;
+     Firstday = QDate(nYear, nMonth, 1);
+     Lastday  = QDate(Dayref.year(), Dayref.month(), Dayref.daysInMonth());
+ 
+     // Write some quick header text to the outgoing string
+     Data  = trUtf8("\nDate       Hours Account details\n");
+     Data += QString("---------- ----- ----------------------------------------\n");
+ 
+     // Build the long week data string
+     for (int nIter = nRows - 1; nIter >= 0; nIter--) {
+         // Work on this tuple only if it within the reporting range
+         Tempstring = m_pReptable->text(nIter, TITRAQ_IDXTASK);
+         Tempdate = QDate::fromString(m_pReptable->text(nIter, TITRAQ_IDXDATE), Qt::ISODate);
+         if (!Tempstring.isEmpty() && Firstday <= Tempdate && Tempdate < Lastday) {
+             Tempstring = m_pReptable->text(nIter, TITRAQ_IDXDATE);
+             if (!Tempstring.isEmpty())
+                 Data += Tempstring;
+             Tempstring = m_pReptable->text(nIter, TITRAQ_IDXAMOUNT);
+             if (!Tempstring.isEmpty())
+                 Data += QString(TITRAQ_SEPARATORTOK) + Tempstring;
+             Tempstring = m_pReptable->text(nIter, TITRAQ_IDXTASK);
+             if (!Tempstring.isEmpty())
+                 Data += QString(TITRAQ_SEPARATORTOK) + Tempstring;
+             Data += trUtf8("\n"); // Finish off line
+         }
+     }
+ 
+     return Data;
+ }
+ 
+ //
+ // Returns one month of totals data
+ //
+ QString Reportpanel::getMonthtotals(QDate Dayref, int nMonths)
+ {
+     using namespace std;                            // Needed for maps and hash
+     map<string, string> Hashtasks;                  // Hashtable to store tasks
+     multimap<string, string> Hashhours;             // Hashtable to store hours
+     map<string, string>::iterator Taskiter;         // Hashtable task iterator
+     multimap<string, string>::iterator Houriter;    // Hashtable hour iterator
+ 
+     QString Totals;                         // Data totals to return for writing
+     QString Tempstring;                     // Temporary processing string
+     QDate   Tempdate;                       // Temporary processing date
+     int     nRows = m_pReptable->numRows();
+ 
+     // Find range boundaries
+     Q_ASSERT(nMonths > 0);
+     int nYear = Dayref.year();
+     int nMonth = (Dayref.addMonths(nMonths * -1).month() + 12) % 12 + 1;
+     if (nMonth > Dayref.month())
+         nYear--;
+     QDate Firstday = QDate(nYear, nMonth, 1);
+     QDate Lastday  = QDate(Dayref.year(), Dayref.month(), Dayref.daysInMonth());
+ 
+     // Parse the table for interesting values
+     for (int nIter = 0; nIter < nRows; nIter++) {
+         // Work on this tuple only if it within the reporting range
+         Tempstring = m_pReptable->text(nIter, TITRAQ_IDXTASK);
+         Tempdate = QDate::fromString(m_pReptable->text(nIter, TITRAQ_IDXDATE), Qt::ISODate);
+         if (!Tempstring.isEmpty() && Firstday <= Tempdate && Tempdate < Lastday) {
+             string Convstring = Tempstring;         // Convert to string (can't cast?)
+             QTime Intable = QTime::fromString(m_pReptable->text(nIter, TITRAQ_IDXAMOUNT), Qt::ISODate);
+             int nTothours = QString(Hashtasks[Convstring]).section(':', 0, 0).toInt() + Intable.hour();
+             int nTotminut = QString(Hashtasks[Convstring]).section(':', 1, 1).toInt() + Intable.minute();
+             nTothours += nTotminut / 60;
+             nTotminut %= 60;
+             QString Hours = QString::number(nTothours).rightJustify(3, ' ');
+             QString Mins  = QString::number(nTotminut).rightJustify(2, '0');
+             string Timestring = Hours + ':' + Mins; // Convert to string (can't cast?)
+             Hashtasks[Convstring] = Timestring;     // Finally store in hashtable
+         }
+     }
+ 
+     // Reverse copy the tasks hashtable to both sort and index by amount key
+     for (Taskiter = Hashtasks.begin(); Taskiter != Hashtasks.end(); Taskiter++)
+         Hashhours.insert(pair<string, string>(Taskiter->second, Taskiter->first));
+ 
+     // Write the actual data totals to the outgoing string in reverse order
+     for (Houriter = Hashhours.begin(); Houriter != Hashhours.end(); Houriter++)
+         Totals = Houriter->first + ' ' + Houriter->second + '\n' + Totals;
+ 
+     // Write some quick header text to the outgoing string in reverse order
+     Totals = QString("------ ----------------------------------------\n") + Totals;
+     Totals = trUtf8("Total  Account summary\n") + Totals;
+ 
+     return Totals; // The outgoing string... its finally gone, let's go to bed
+ }
+ 
+ //
+ // Saves the currently displayed local report
+ //
+ void Reportpanel::saveReport(void)
+ {
+     int nResult = 0;        // For checking user's answer
+     QFile Report;           // The resulting report file
+     QString Filestring;     // The user chosen file name to save
+     QString Openas = m_pReprefs->getString(TITRAQ_PREFHOME, TITRAQ_DEFHOME);
+ 
+     // And then get the name of the selected file to save to
+     Filestring = QFileDialog::getSaveFileName(Openas, trUtf8("Text files (*.txt);;All Files (*)"), this, trUtf8("ChooserDialog"), trUtf8("Choose a file to save"), NULL, false);
+     if (!Filestring.isEmpty()) {
+         if (QFile::exists(Filestring)) {
+             nResult = QMessageBox::warning(this, QString(TITRAQ_APPTITLE)
+                     + ' ' + asgui_version.v_short, trUtf8(TITRAQ_OVERWRITE),
+                       trUtf8("&Yes"), trUtf8("&No"), NULL, 1, 1);
+             if (nResult = QMessageBox::Ok) {                // Overwrite a file
+                 Report.setName(Filestring);                 // User wished name
+                 Report.open(IO_WriteOnly | IO_Truncate);    // Open report file
+                 QTextStream Outstream(&Report);             // Convert to stream
+                 Outstream << m_pBrowser->text();            // Write the data
+                 Report.close();                             // Finish by closing
+             }
+         }
+         else { // User gave a file name, and there was no preexisting file there
+             Report.setName(Filestring);                 // User wished name
+             Report.open(IO_WriteOnly | IO_Truncate);    // Open report file
+             QTextStream Outstream(&Report);             // Convert to stream
+             Outstream << m_pBrowser->text();            // Write the data
+             Report.close();                             // Finish by closing
+         }
+     }
+     // Otherwise, user did not select a valid file and push okay button
+ }
+ 
+ //
+ // Prints the currently displayed local report
+ //
+ void Reportpanel::printReport(void)
+ {
+ #ifndef QT_NO_PRINTER
+     if (m_pPrinter->setup(this)) {      // Opens printer dialog
+         m_pPrinter->setFullPage(true);  // Set our own margins
+         QPainter Paint;                 // Our painter (for pages)
+         Paint.begin(m_pPrinter);        // Paint on printer
+         Paint.setFont(m_pBrowser->font());
+         QFontMetrics Fontmetrics = Paint.fontMetrics();
+         QPaintDeviceMetrics Devmetrics(m_pPrinter); // Need width/height of printer surface
+         const int knMargin = Devmetrics.logicalDpiX() / 2;  // Half-inch margin
+         int nYpos   = knMargin;                             // Y position for each line
+         int nPageno = 1;                                    // The starting page number
+ 
+         for (int nIter = 0; nIter < m_pBrowser->lines() && !m_pPrinter->aborted(); nIter++) {
+             // See if there is some space on this page to paint on
+             if (nYpos + Fontmetrics.lineSpacing() > Devmetrics.height() - knMargin) {
+ //                QString Printmsg(trUtf8("Printing page "))
+ //                    + QString::number(++nPageno) + QString("...");
+ //                m_pStatus()->message(Printmsg);             // Not in scope (crap)
+                 if (!m_pPrinter->newPage()) // Start new page
+                     break;                  // Some error
+                 nYpos = knMargin;           // Back to top of page
+             }
+             Paint.drawText(knMargin, nYpos, Devmetrics.width() - 2 * knMargin,
+                 Fontmetrics.lineSpacing(), Qt::ExpandTabs, m_pBrowser->text(nIter));
+             nYpos += Fontmetrics.lineSpacing();
+         }
+         Paint.end(); // Send job to printer
+ //        m_pStatus()->message(trUtf8("Printing completed"), 2000); // Not in scope
+     }
+ //    m_pStatusBar()->message(trUtf8("Printing completed"), 2000);  // Not in scope
+ #endif
+ }
+ 
+ //
+ // Sets the strings of the subwidgets using the current language
+ //
+ void Reportpanel::textChange(void)
+ {
+     this->setCaption(trUtf8("AS local report", "Local report using weekly or monthly data."));
+ 
+     // Top level push buttons associated with accept and save slots
+     m_pSavebutt->setText(trUtf8("Save", "Comment for Savebutton"));
+     QToolTip::add(m_pSavebutt, trUtf8("Saves the report text", "Comment for tooltip Savebutton"));
+     QWhatsThis::add(m_pSavebutt, trUtf8("The save button saves the report text to a file", "Comment for whatsThis Savebutton"));
+     m_pPrintbutt->setText(trUtf8("Print", "Comment for Printbutton"));
+     QToolTip::add(m_pPrintbutt, trUtf8("Print the report text", "Comment for tooltip Printbutton"));
+     QWhatsThis::add(m_pPrintbutt, trUtf8("The print button prints the report text to a file", "Comment for whatsThis Printbutton"));
+     m_pDismissbutt->setText(trUtf8("Dismiss", "Comment for Dismissbutton"));
+     QToolTip::add(m_pDismissbutt, trUtf8("Closes the report panel", "Comment for tooltip Dismissbutton"));
+     QWhatsThis::add(m_pDismissbutt, trUtf8("The dismiss button dismisses the report panel", "Comment for whatsThis Dismissbutton"));
+ 
+     // Inner tool buttons for new local report generation
+     m_pWeeklybutt->setText(trUtf8("Weekly", "Comment for Weeklybutt"));
+     QToolTip::add(m_pWeeklybutt, trUtf8("Hold down for options", "Comment for tooltip Weeklybutt"));
+     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"));
+     m_pMonthlybutt->setText(trUtf8("Monthly", "Comment for Monthlybutt"));
+     QToolTip::add(m_pMonthlybutt, trUtf8("Hold down for options", "Comment for tooltip Monthlybutt"));
+     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"));
+ }
+ } // namespace AS


ossp-pkg/as/as-gui/as_reportpanel.h -> 1.8

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,113 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  as_reportpanel.h: ISO C++ interface
+ //
+ 
+ #ifndef REPORTPANEL_H
+ #define REPORTPANEL_H
+ 
+ #include <qvariant.h>
+ #include <qdialog.h>
+ #include <qdatetime.h>
+ 
+ 
+ class TiTable;
+ class Preferences;
+ class QVBoxLayout;
+ class QHBoxLayout;
+ class QGridLayout;
+ class QPushButton;
+ class QTextEdit;
+ class QToolButton;
+ class QButtonGroup;
+ class QPopupMenu;
+ class QPrinter;
+ 
+ namespace AS {
+ 
+ class Reportpanel : public QDialog
+ {
+     Q_OBJECT
+ 
+ public:
+     Reportpanel(TiTable *, Preferences *, QWidget *pParent = 0,
+                 const char *kszName = 0, bool bModal = true, WFlags Flags = 0);
+ //    ~Reportpanel(void); // No need to destroy widgets, because qt does it for us
+ 
+ public:
+     QButtonGroup *m_pWeekmonthgroup;
+     QToolButton  *m_pWeeklybutt;
+     QToolButton  *m_pMonthlybutt;
+     QTextEdit    *m_pBrowser;
+     QPushButton  *m_pSavebutt;
+     QPushButton  *m_pDismissbutt;
+     QPushButton  *m_pPrintbutt;
+ 
+ protected:
+     QVBoxLayout *m_pFormlay;
+     QVBoxLayout *m_pGrouplay;
+     QHBoxLayout *m_pToolay;
+     QHBoxLayout *m_pPushlay;
+     QHBoxLayout *m_pWeekmonthlay;
+     QPopupMenu  *m_pWeekpop;
+     QPopupMenu  *m_pMonthpop;
+ 
+ private:
+     int          m_nWeeks;
+     int          m_nMonths;
+     TiTable     *m_pReptable;
+     Preferences *m_pReprefs;
+ #ifndef QT_NO_PRINTER
+     QPrinter    *m_pPrinter;
+ #endif
+ 
+ public slots:
+     int exec(void);
+ 
+ protected slots:
+     virtual void saveReport(void);
+     virtual void printReport(void);
+     virtual void textChange(void);
+     virtual void reportWeeks(int nMenuid = -1);
+     virtual void reportMonths(int nMenuid = -1);
+ 
+ private:
+     void writeHeader(int);
+     void writeHeader(int, int);
+     void writeHeader(QString);
+     void writeHeader(QString, QString);
+     void writeFooter(void);
+     QString getWeektotals(QDate Refer = QDate::currentDate(), int nWeeks = 1);
+     QString getWeekdetails(QDate Refer = QDate::currentDate(), int nWeeks = 1);
+     QString getMonthtotals(QDate Refer = QDate::currentDate(), int nMonths = 1);
+     QString getMonthdetails(QDate Refer = QDate::currentDate(), int nMonths = 1);
+ };
+ } // namespace AS
+ 
+ #endif // REPORTPANEL_H


ossp-pkg/as/as-gui/as_sfile.cpp -> 1.4

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,64 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  as_sfile.cpp: ISO C++ implementation
+ //
+ 
+ #include "as_sfile.h"
+ #include "as_except.h"
+ 
+ 
+ //
+ // Serialize a backup of an incoming file object
+ //
+ void Simplefile::makeBackup(void)
+ {
+     QFile Filein;           // Input readonly file
+     QFile Filebak;          // Backup writeonly file
+     QString Fname;          // Filename of input file
+     QTextStream Streamin;   // Stream to read from (Filein)
+     QTextStream Streambak;  // Stream to write to (Filebak)
+ 
+     try {
+         if(!this->exists())                 // Conditionally short circuit if
+             return;                         // file to backup does not exist
+         Fname = this->name();               // Copy filename from original
+         Filein.setName(Fname);              // Set filename of original
+         Filein.open(IO_ReadOnly);           // Open original read-only
+         Filebak.setName(Fname + ".bak");    // Set filename of backup
+         Filebak.open(IO_WriteOnly);         // Open backup write-only
+         Streamin.setDevice(&Filein);        // Set incoming stream
+         Streambak.setDevice(&Filebak);      // Set outgoing stream
+         Streambak << Streamin.read();       // Do actual writing
+         Filein.close();                     // Close original
+         Filebak.close();                    // Close backup
+     }
+     catch (Genexcept& Genex) {
+         Genex.reportErr();
+     }
+ }


ossp-pkg/as/as-gui/as_sfile.h -> 1.2

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,47 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  as_sfile.h: ISO C++ interface
+ //
+ 
+ #ifndef SIMPLEFILE_H
+ #define SIMPLEFILE_H
+ 
+ #include <qfile.h>
+ #include <qtextstream.h>
+ 
+ 
+ class Simplefile : public QFile
+ {
+ public:
+     Simplefile(void) : QFile() {};
+     Simplefile(const QString &Name) : QFile(Name) {};
+     void makeBackup(void);
+ };
+ 
+ #endif // SIMPLEFILE_H


ossp-pkg/as/as-gui/as_slot.cpp -> 1.139

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,1999 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  titslot.cpp: ISO C++ implementation
+ //
+ 
+ // system headers
+ #include <memory>
+ #include <cstring>
+ 
+ // Qt headers
+ #include <qfiledialog.h>
+ #include <qcombobox.h>
+ #include <qclipboard.h>
+ #include <qmenudata.h>
+ #include <qdatastream.h>
+ #include <qstatusbar.h>
+ #include <qaction.h>
+ #include <qpopupmenu.h>
+ 
+ // Qt style headers
+ #include <qcdestyle.h>
+ #include <qsgistyle.h>
+ #include <qmotifstyle.h>
+ #include <qmotifplusstyle.h>
+ #include <qplatinumstyle.h>
+ #include <qwindowsstyle.h>
+ 
+ // User interface
+ #include "as_const.h"           // Application constants
+ #include "as_except.h"          // Exception classes
+ #include "as_tableitem.h"       // For our custom table items
+ #include "as_generic.h"         // Generic classes
+ #include "as_uuid.h"            // UUID classes
+ #include "as_datedit.h"         // Derived from QDateEdit
+ #include "as_amount.h"          // Derived from QTimeEdit
+ #include "as_crc.h"             // Useful Qualistring class
+ #include "as_pref.h"            // For Preferences class
+ #include "as_panel.h"           // For Prefpanel class
+ #include "as_reportpanel.h"     // For Reportpanel class
+ #include "as_helpanel.h"        // For Helpanel class
+ #include "as_sfile.h"           // For Simplefile class
+ #include "as_table.h"           // For TiTable class
+ 
+ // RPC headers
+ #ifdef HAVE_ESOAP
+ #include <easysoap/SOAP.h>
+ #endif // HAVE_ESOAP
+ #ifdef HAVE_MICO
+ #include <coss/CosNaming.h>
+ #include "as_stub.h"            // CORBA stubs and skeletons
+ #endif // HAVE_MICO
+ 
+ // Icon pixel maps
+ #include "as_gfx/cwlogo.xpm"    // static const char *s_kpcCwlogo_xpm[]
+ #include "as_gfx/ossplogo.xpm"  // static const char *s_kpcOssplogo_xpm[]
+ #include "as_gfx/statok.xpm"    // static const char *s_kpcStatokay_xpm[]
+ #include "as_gfx/staterr.xpm"   // static const char *s_kpcStaterror_xpm[]
+ #include "as_gfx/statwrn.xpm"   // static const char *s_kpcStatwarn_xpm[]
+ #include "as_gfx/statvoid.xpm"  // static const char *s_kpcStatvoid_xpm[]
+ 
+ 
+ //
+ // Cut an entry
+ //
+ void Titraqform::cutEntry(void)
+ {
+     this->copyEntry();  // Reuse slot
+     this->delEntry();   // Reuse slot
+ }
+ 
+ //
+ // Copy an entry
+ //
+ void Titraqform::copyEntry(void)
+ {
+     QString Selection;  // Will hold the selected text
+     QClipboard *pClip;  // Will reference the global clipboard
+ 
+     // Initialize data and clipboard handle
+     Selection = getRowdata();   // Use accessor
+     pClip = QApplication::clipboard();
+ 
+     Q_ASSERT(!Selection.isNull());
+     pClip->setText(Selection, QClipboard::Selection); // Doesn't work on Windows
+     pClip->setText(Selection, QClipboard::Clipboard); // Works on both equally
+ }
+ 
+ //
+ // Paste an entry
+ //
+ void Titraqform::pasteEntry(void)
+ {
+     int nRows = 0;              // Paste so many rows as are stored
+     QString Selection;          // Will receive the clipboard text
+     QClipboard *pClip = NULL;   // Will reference the global clipboard
+ 
+     pClip = QApplication::clipboard();                  // Prime the clips
+     Selection = pClip->text(QClipboard::Clipboard);     // Windows and Unix
+     nRows = Selection.contains(QChar('\n'));            // How many rows
+     if (Selection != NULL && nRows > 0) { // Ignore empty clipboards
+         this->addEntry(nRows);                          // Reuse slot
+         setRowdata(Selection);                          // Use accessor
+ 
+         // Update line numbers for this new row and all subsequent rows
+         for (int nIter = m_pMaintable->currentRow(); nIter < m_pMaintable->numRows(); nIter++)
+             m_pMaintable->setText(nIter, TITRAQ_IDXLINE, QString::number(nIter).rightJustify(4, QChar('0')));
+ 
+         // Do basic data validation to warn against missing fields
+         for (int nIter = 0; nIter < nRows; nIter++)
+             this->validateData(m_pMaintable->currentRow() + nIter, 0);
+ 
+         m_pStatbar->message(QString::number(nRows) + trUtf8(" rows pasted"), 4000);
+         updEdit(m_pMaintable->currentRow()); // Reflect in the update controls
+     }
+     else // Well, I guess the user tried to paste an empty clipboard
+         m_pStatbar->message(trUtf8("The clipboard is empty"), 4000);
+ }
+ 
+ //
+ // Append a blank row entry
+ //
+ void Titraqform::addEntry(int nRows)
+ {
+     QTableSelection Select; // Highlighted text
+     int nTotal = 0;         // Total row select
+     int nCurrent = 0;       // Current row
+     std::auto_ptr<AS::Uuid> pGuid(new AS::Uuid); // For GUID production
+ 
+     // Decide how many rows to add
+     Select = m_pMaintable->selection(0);
+     if (nRows > 0)
+         nTotal = nRows;
+     else
+         nTotal = Select.bottomRow() - Select.topRow() + 1;
+ 
+     // Optimize viewing by repainting cells only once after processing
+     m_pMaintable->setUpdatesEnabled(false);
+ 
+     // Add a row after selection and focus to the new row
+     if (Select.bottomRow() + 1 != m_pMaintable->numRows()) { // Add upwards
+         m_pMaintable->insertRows(Select.topRow(), nTotal);
+         m_pMaintable->setDirty();   // Set data to dirty state
+         m_pMaintable->setCurrentCell(Select.topRow(), m_pMaintable->currentColumn());
+ 
+         // Update relevant data fields for all new rows
+         for (int nIter = 0; nIter < nTotal; nIter++) {
+             m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXSTATUS, QString(QChar('W')));
+             m_pMaintable->setPixmap(Select.topRow() + nIter, TITRAQ_IDXSTATUS, QPixmap(s_kpcStatwarn_xpm));
+             m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXUSER, m_pPrefs->getString(TITRAQ_PREFUSER, TITRAQ_DEFUSER));
+             pGuid->genId();
+             m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXGUID, pGuid->getString());
+             m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXCRC, "0"); // 0 = invalid entry
+             m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXREV, "0"); // Entry not revised
+             m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXDATE, QDate::currentDate().toString(Qt::ISODate));
+             m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXSTART, "00:00");
+             m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXFINISH, "00:00");
+             m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXAMOUNT, "00:00");
+ //            m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXTASK, "/");
+ //            m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXREMARK, "Remark");
+             m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXCRC, "1"); // 0 = invalid entry
+             this->calcCrc(Select.topRow() + nIter, -1);
+         }
+     }
+     else { // Special case on last row add downwards
+         m_pMaintable->insertRows(Select.bottomRow() + 1, nTotal);
+         m_pMaintable->setDirty();   // Set data to dirty state
+         m_pMaintable->setCurrentCell(Select.bottomRow() + 1, m_pMaintable->currentColumn());
+ 
+         // Update relevant data fields for all new rows
+         for (int nIter = 1; nIter <= nTotal; nIter++) {
+             m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXSTATUS, QString(QChar('W')));
+             m_pMaintable->setPixmap(Select.bottomRow() + nIter, TITRAQ_IDXSTATUS, QPixmap(s_kpcStatwarn_xpm));
+             m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXUSER, m_pPrefs->getString(TITRAQ_PREFUSER, TITRAQ_DEFUSER));
+             pGuid->genId();
+             m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXGUID, pGuid->getString());
+             m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXCRC, "0");
+             m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXREV, "0");
+             m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXDATE, QDate::currentDate().toString(Qt::ISODate));
+             m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXSTART, "00:00");
+             m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXFINISH, "00:00");
+             m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXAMOUNT, "00:00");
+ //            m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXTASK, "/");
+ //            m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXREMARK, "Remark");
+             this->calcCrc(Select.bottomRow() + nIter, -1);
+         }
+     }
+ 
+     // Update line numbers for this new row and all subsequent rows
+     for (int nIter = m_pMaintable->currentRow(); nIter < m_pMaintable->numRows(); nIter++)
+         m_pMaintable->setText(nIter, TITRAQ_IDXLINE, QString::number(nIter).rightJustify(4, QChar('0')));
+ 
+     updEdit(m_pMaintable->currentRow()); // Reflect in the update controls
+     m_pStatusedit->setPixmap(QPixmap(s_kpcStatwarn_xpm)); // Show pixmap
+ 
+     m_pMaintable->setUpdatesEnabled(true);  // Turn updates back on
+     m_pMaintable->repaintContents(true);    // Do a general repaint of table
+     m_pMaintable->ensureCellVisible(m_pMaintable->currentRow() + nTotal - 1, m_pMaintable->currentColumn());
+     m_pMaintable->ensureCellVisible(m_pMaintable->currentRow(), m_pMaintable->currentColumn());
+ 
+     // In case we added the first and only row entry,
+     // do post state adjustments like icon undimming
+     if (m_pMaintable->numRows() == 1) {
+         m_pDelrowact->setEnabled(true);
+         m_pRefreshact->setEnabled(true);
+         m_pCutact->setEnabled(true);
+         m_pCopyact->setEnabled(true);
+ 
+         // Brighten all the edit controls also
+         m_pLineedit->setEnabled(true);
+         m_pUseredit->setEnabled(true);
+         m_pGuidedit->setEnabled(true);
+         m_pCrcedit->setEnabled(true);
+         m_pRevedit->setEnabled(true);
+         m_pDateedit->setEnabled(true);
+         m_pStarttime->setEnabled(true);
+         m_pEndtime->setEnabled(true);
+         m_pAmount->setEnabled(true);
+         m_pTasks->setEnabled(true);
+         m_pRemark->setEnabled(true);
+ 
+         // And optionally the RPC actions, too
+ #if defined HAVE_MICO || defined HAVE_ESOAP
+         m_pSyncact->setEnabled(m_pPrefs->getBool(TITRAQ_PREFCORBON, TITRAQ_DEFCORBON)
+             | m_pPrefs->getBool(TITRAQ_PREFSOAPON, TITRAQ_DEFSOAPON));
+ #endif // HAVE_MICO || defined HAVE_ESOAP
+     }
+ }
+ 
+ //
+ // Delete a row entry
+ //
+ void Titraqform::delEntry(int nRows)
+ {
+     QTableSelection Select = m_pMaintable->selection(0);    // Highlighted text
+     int nTotal = Select.bottomRow() - Select.topRow() + 1;  // Total row select
+     QMemArray<int> Rowselect(nTotal);                       // Row array
+ 
+     // Calculate rows to delete from selection highlight
+     for (int nIter = 0; nIter < nTotal; ++nIter)
+         Rowselect[nIter] = Select.topRow() + nIter;
+ 
+     // Remove the row at selection and focus to the next row
+     if (m_pMaintable->currentRow() + 1 != m_pMaintable->numRows()) {
+         m_pMaintable->setCurrentCell(Select.bottomRow() + 1, m_pMaintable->currentColumn());
+         m_pMaintable->removeRows(Rowselect);
+         m_pMaintable->setDirty();   // Set data to dirty state
+     }
+     else {  // Special case to handle removing of only row or last row
+         m_pMaintable->removeRows(Rowselect);
+         m_pMaintable->setDirty();   // Set data to dirty state
+     }
+ 
+     // Update line numbers for this new row and all subsequent rows
+     for (int nIter = m_pMaintable->currentRow(); nIter < m_pMaintable->numRows(); nIter++)
+         m_pMaintable->setText(nIter, TITRAQ_IDXLINE, QString::number(nIter));
+ 
+     // In case we removed the last remaining row,
+     // do post state adjustments like icon dimming
+     if (m_pMaintable->numRows() <= 0) {
+         m_pDelrowact->setEnabled(false);
+         m_pRefreshact->setEnabled(false);
+         m_pCutact->setEnabled(false);
+         m_pCopyact->setEnabled(false);
+ 
+         // Dim all the edit controls also
+         m_pStatusedit->setPixmap(s_kpcStatvoid_xpm);
+         m_pLineedit->setEnabled(false);
+         m_pUseredit->setEnabled(false);
+         m_pGuidedit->setEnabled(false);
+         m_pCrcedit->setEnabled(false);
+         m_pRevedit->setEnabled(false);
+         m_pDateedit->setEnabled(false);
+         m_pStarttime->setEnabled(false);
+         m_pEndtime->setEnabled(false);
+         m_pAmount->setEnabled(false);
+         m_pTasks->setEnabled(false);
+         m_pRemark->setEnabled(false);
+ 
+         // And optionally dim the RPC actions
+ #if defined HAVE_MICO || defined HAVE_ESOAP
+         m_pSyncact->setEnabled(false);
+ #endif // HAVE_MICO || defined HAVE_ESOAP
+     }
+ }
+ 
+ //
+ // Refresh the display of all data items
+ //
+ void Titraqform::refreshDisplay(void)
+ {
+     int nIter = 0;                          // Matrix iterator
+     int nRows = m_pMaintable->numRows();    // Total number of rows
+ 
+     // Sweep through matrix validating linewise
+     // data and updating line numbers for all rows
+     while (nIter < nRows) {
+         this->validateData(nIter, 0);
+         m_pMaintable->setText(nIter, TITRAQ_IDXLINE, QString::number(nIter).rightJustify(4, QChar('0')));
+         nIter++;
+     }
+ 
+     m_pMaintable->repaintContents(false);   // Do a general repaint of table
+     m_pStatbar->message(trUtf8("Display was refreshed"), 4000); // Announce result
+ }
+ 
+ //
+ // Make and display a new document window
+ //
+ void Titraqform::newDoc(void)
+ {
+     int nResult = 0; // Holds return value from save first messagebox
+ 
+     // Check modification state of current data
+     if (m_pMaintable->isDirty()) {
+         nResult = QMessageBox::information(this, QString(TITRAQ_APPTITLE)
+                 + ' ' + asgui_version.v_short, trUtf8(TITRAQ_SAVEFIRST),
+                   trUtf8("&Save"), trUtf8("&Discard"), trUtf8("Cancel"), 0, 2);
+ 
+         switch (nResult) {
+         case 0: // First button selected, so save first
+             this->saveFile();   // Save changes first
+             break;
+         case 1: // Second button selected, so don't save
+             break;
+         case 2: // Third button selected, so return sofort
+         default:
+             m_pStatbar->message(trUtf8("New aborted"), 4000);
+             return;
+             break;
+         }
+     }
+ 
+     if (!m_pMaintable->isDirty() || nResult == 1) { // Check modification state
+         // Fall through to implicit new doc code
+         this->setCaption(trUtf8("No file name"));
+         m_pStatbar->message(trUtf8("New document"), 4000);
+         this->enableIface(true);            // Enable the interface
+         m_pMaintable->setNumRows(0);        // Remove all data in table
+         this->setFilename("");               // Signal a closed doc state
+         this->addEntry(1);                  // Default new op adds a row
+         m_pMaintable->setDirty(false);      // Start out clean
+     }
+ }
+ 
+ //
+ // Open and display an existing document
+ //
+ void Titraqform::openDoc(void)
+ {
+     int nResult = 0; // Holds return value from save first messagebox
+ 
+ //
+ // This block will guide the user to saving the contents of the timesheet
+ // before losing them in an open operation. The question and dialog box will
+ // not be raised if no open timesheet exists or if it was just serialized.
+ //
+     if (m_pMaintable->isDirty()) { // Check modification state
+         nResult = QMessageBox::information(this, QString(TITRAQ_APPTITLE)
+                 + ' ' + asgui_version.v_short, trUtf8(TITRAQ_SAVEFIRST),
+                   trUtf8("&Save"), trUtf8("&Discard"), trUtf8("Cancel"), 0, 2);
+ 
+         switch (nResult) {
+         case 0: // Save first
+             this->saveFile(); // Save changes first
+             break;
+         case 1: // Don't save first but do load
+             break;
+         case 2: // Don't do a load timesheet
+         default:
+             m_pStatbar->message(trUtf8("Loading aborted"), 4000);
+             return;
+             break;
+         }
+     }
+ 
+ //
+ // This block ensures that conditions of first block logic were met if
+ // applicable. If so, the user gives a file name to open or cancels the
+ // operation. The corresponding file will be opened, and if this is
+ // unsuccessful then the post state is exactly the same as the pre state.
+ //
+     if (!m_pMaintable->isDirty() || nResult == 1) { // Check modification state
+         // Make sure we correctly get the name of the default file to open
+         QString Openas = m_pPrefs->getString(TITRAQ_PREFASDIR, TITRAQ_DEFASDIR);
+         if (Openas.startsWith(TITRAQ_HOMEDIRTOK))
+             Openas = QDir::homeDirPath() + Openas.remove(0, QString(TITRAQ_HOMEDIRTOK).length() - 1);
+ 
+         // This dialog asks which file the user wants to open
+         QString Filestring = QFileDialog::getOpenFileName(Openas,
+             trUtf8("Accounting Data (*.as);;Text files (*.txt);;All Files (*)"),
+             this, trUtf8("ChooserDialog"), trUtf8("Choose a file to open"), NULL, false);
+ 
+         // We might have a filename to work on, so do something with it
+         if (!Filestring.isEmpty()) {
+             setFilename(Filestring);            // Set the new file name
+             m_pMaintable->setNumRows(0);        // Clear out old data
+             m_pMaintable->setDirty(false);      // Reset dirty flag
+             QFile Filetemp(Filestring);         // File to load
+             try {
+                 loadData(Filetemp);             // Pass to helper method
+                 this->setCaption(Filestring);   // Caption in the titlebar
+                 m_pStatbar->message(trUtf8("Loaded document ") + Filestring, 4000);
+                 this->enableIface(true);        // Turn on the lights
+             }
+             catch (Genexcept& Genex) { // Crap, we failed
+                 m_pStatbar->message(trUtf8("Loading failed"), 4000);
+                 this->setOpen(false);
+                 Genex.reportErr();
+                 return;
+             }
+         }
+         else // An empty filename returning from the file dialog means cancel
+             m_pStatbar->message(trUtf8("Loading aborted"), 4000);
+     }
+ }
+ 
+ //
+ // Serialize current state to the current file
+ //
+ void Titraqform::saveFile(void)
+ {
+     QString Fname;
+     Simplefile Filevents;
+ 
+     try {
+         Fname = *this->getFilename();
+ 
+         // First time saves are really just saveName in disguise
+         if (Fname.isEmpty()) {
+             try {
+                 this->saveName();       // Try to 'save as'
+                 return;                 // and short circuit
+             }
+             catch (Genexcept& Genex) {
+ //                Genex.reportErr();      // Report the error
+                 return;                 // and short circuit
+             }
+         }
+ 
+         Filevents.setName(Fname);   // Construct a file to write
+         if (m_pPrefs->getBool(TITRAQ_PREFBAKON, TITRAQ_DEFBAKON))
+             Filevents.makeBackup(); // Back up to filename.bak
+         this->saveData(Filevents);  // Pass to helper method
+     }
+     catch (Genexcept& Genex) {
+         Genex.reportErr();
+     }
+     // Reset and give output to main window
+     this->setCaption(Fname);
+     m_pStatbar->message(trUtf8("File %1 saved").arg(Fname), 4000);
+     m_pMaintable->setDirty(false);  // Set the clean state to allow close
+ }
+ 
+ //
+ // Serialize current state to a selected file
+ //
+ void Titraqform::saveAs(void)
+ {
+     int nResult = 0; // For checking user's answer
+ 
+     // Make sure we correctly get the name of the default file to open
+     QString Openas = m_pPrefs->getString(TITRAQ_PREFASDIR, TITRAQ_DEFASDIR);
+     if (Openas.startsWith(TITRAQ_HOMEDIRTOK))
+         Openas = QDir::homeDirPath() + Openas.remove(0, QString(TITRAQ_HOMEDIRTOK).length() - 1);
+ 
+     // And then get the name of the selected file to save to
+     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);
+     if (!Filestring.isEmpty()) {
+         if (QFile::exists(Filestring)) {
+             nResult = QMessageBox::warning(this, QString(TITRAQ_APPTITLE)
+                     + ' ' + asgui_version.v_short, trUtf8(TITRAQ_OVERWRITE),
+                       trUtf8("&Yes"), trUtf8("&No"), NULL, 1, 1);
+             switch (nResult) {
+             case 0: // Overwrite contents
+                 this->setFilename(Filestring);
+                 this->saveFile();
+                 break;
+             case 1: // Don't overwrite
+             default:
+                 break;
+             }
+         }
+         else {
+             // Conditionally use a unique extension like '.as' if user prefers
+             if (m_pPrefs->getBool(TITRAQ_PREFEXTENDON, TITRAQ_DEFEXTENDON)) {
+                 QString Extension = TITRAQ_FEXTENSION;  // Logic to handle
+                 if (!Filestring.endsWith(Extension))    // AS file extension
+                     Filestring += Extension;            // insertion
+             }
+             this->setFilename(Filestring);  // Set filename of object first
+             this->saveFile();               // Finish by calling the save action
+         }
+     }
+     else
+         // User did not select a valid file and push okay button
+         m_pStatbar->message(trUtf8("Saving aborted"), 4000);
+ }
+ 
+ //
+ // Implicitly serialize current state to a selected file
+ // The main difference with saveAs is that this uses exceptions
+ //
+ void Titraqform::saveName(void)
+ {
+     int nResult = 0; // For checking user's answer
+ 
+     // Make sure we correctly get the name of the default file to open
+     QString Openas = m_pPrefs->getString(TITRAQ_PREFASDIR, TITRAQ_DEFASDIR);
+     if (Openas.startsWith(TITRAQ_HOMEDIRTOK))
+         Openas = QDir::homeDirPath() + Openas.remove(0, QString(TITRAQ_HOMEDIRTOK).length() - 1);
+ 
+     nResult = 1;            // We loop on this dialog only if an indecisive user
+     while (nResult > 0) {   // is hesitant to overwrite a file over and over again
+         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);
+         if (!Filestring.isEmpty()) {
+             if (QFile::exists(Filestring)) {
+                 nResult = QMessageBox::warning(this, QString(TITRAQ_APPTITLE)
+                         + ' ' + asgui_version.v_short, trUtf8(TITRAQ_OVERWRITE),
+                           trUtf8("&Yes"), trUtf8("&No"), NULL, 1, 1);
+                 switch (nResult) {
+                 case 0: // Overwrite contents
+                     this->setFilename(Filestring);
+                     this->saveFile();
+                     break;
+                 case 1: // Don't overwrite
+                 default:
+                     break;
+                 }
+             }
+             else {
+ 
+                 // Conditionally use a unique extension like '.as' if user prefers
+                 if (m_pPrefs->getBool(TITRAQ_PREFEXTENDON, TITRAQ_DEFEXTENDON)) {
+                     QString Extension = TITRAQ_FEXTENSION;  // Logic to handle
+                     if (!Filestring.endsWith(Extension))    // AS file extension
+                         Filestring += Extension;            // insertion
+                 }
+                 this->setFilename(Filestring);  // Set filename of object first
+                 nResult = 0;                    // Reset our loop control
+                 this->saveFile();               // Finish by calling the save action
+             }
+         }
+         else {
+             // User did not select a valid file and push okay button
+             m_pStatbar->message(trUtf8("Saving aborted"), 4000);
+             throw Genexcept(TITRAQ_SAVECANCELLED);
+         }
+     }
+ }
+ 
+ //
+ // Close current document, and then quit the application
+ //
+ void Titraqform::quitApp(void)
+ {
+     int nResult = 0;
+ 
+     if (m_pMaintable->isDirty()) {
+         nResult = QMessageBox::information(this, QString(TITRAQ_APPTITLE)
+                 + ' ' + asgui_version.v_short, trUtf8(TITRAQ_SAVEFIRST),
+                   trUtf8("&Save"), trUtf8("&Discard"), trUtf8("Cancel"), 0, 2);
+ 
+         switch (nResult) {      // Maybe save before closing
+         case 0: // Save first
+             this->saveFile();   // Save changes first
+             break;
+         case 1: // Don't save first
+             m_pMaintable->setDirty(false);
+             break;
+         case 2: // Do nothing
+         default:
+             return; // Go away without closing
+             break;
+         }
+     }
+ 
+     // We should be clean now, but double check just in case
+     if (!m_pMaintable->isDirty())
+         qApp->quit();
+ }
+ 
+ //
+ // Close current document, displaying in main window
+ //
+ void Titraqform::closeEvent(QCloseEvent *pClosit)
+ {
+     int nResult = 0;
+ 
+     if (!this->isOpen())    // Short circuit if user
+         qApp->quit();       // selects close twice
+ 
+     // Check modification state of current data
+     if (m_pMaintable->isDirty()) {
+         nResult = QMessageBox::information(this, QString(TITRAQ_APPTITLE)
+                 + ' ' + asgui_version.v_short, trUtf8(TITRAQ_SAVEFIRST),
+                   trUtf8("&Save"), trUtf8("&Discard"), trUtf8("Cancel"), 0, 2);
+ 
+         switch (nResult) {      // Maybe save before closing
+         case 0: // Save first
+             this->saveFile();   // Save changes first
+             break;
+         case 1: // Don't save first
+             m_pMaintable->setDirty(false);
+             break;
+         case 2: // Do nothing
+         default:
+             pClosit->ignore();
+             return; // Go away without closing
+             break;
+         }
+     }
+ 
+     if (!m_pMaintable->isDirty()) { // Check again
+         // Fall through to implicit close code
+         this->setCaption(QString(TITRAQ_APPTITLE) + ' ' + asgui_version.v_short);
+         try { // There might be problems, so wrap these last ops with error handling
+             QString Lightsout;          // It's late, go to bed
+             if (this->isOpen())
+                 Lightsout = trUtf8("Closed document ") + *this->getFilename();
+             this->setOpen(false);       // Set doc state to closed
+             this->enableIface(false);   // Turn off the lights
+             m_pStatbar->message(Lightsout, 4000);
+         }
+         catch (Genexcept& Genex) {
+             Genex.reportErr();
+         }
+     }
+     pClosit->ignore();  // Finish off by not closing
+ }
+ 
+ //
+ // Edit menu select all entries
+ //
+ void Titraqform::selAll(void)
+ {
+     Prototype Unimp;
+     Unimp.doMbox();
+ }
+ 
+ //
+ // Edit a table entry in place, without the usual edit controls
+ //
+ void Titraqform::inplaceEdit(int nRow, int nCol, int nButton, const QPoint &Mousepos)
+ {
+     m_pMaintable->setReadOnly(false);
+     m_pMaintable->editCell(nRow, nCol);
+     m_pMaintable->setEdition(nCol);
+     m_pMaintable->setReadOnly(true);
+ }
+ 
+ //
+ // Update the edit controls widget sizes
+ //
+ void Titraqform::updSizes(int nSection, int nOldsize, int nNewsize)
+ {
+     switch (nSection) {
+     case TITRAQ_IDXALLCTRLS:
+         if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXSTATUS) > 0)
+             m_pStatusedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXSTATUS) - TITRAQ_SPACING);
+         if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXLINE) > 0)
+             m_pLineedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXLINE) - TITRAQ_SPACING);
+         if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXUSER) > 0)
+             m_pUseredit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXUSER) - TITRAQ_SPACING);
+         if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXGUID) > 0)
+             m_pGuidedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXGUID) - TITRAQ_SPACING);
+         if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXCRC) > 0)
+             m_pCrcedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXCRC) - TITRAQ_SPACING);
+         if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXREV) > 0)
+             m_pRevedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXREV) - TITRAQ_SPACING);
+         if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXDATE) > 0)
+             m_pDateedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXDATE) - TITRAQ_SPACING);
+         if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXSTART) > 0)
+             m_pStarttime->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXSTART) - TITRAQ_SPACING);
+         if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXFINISH) > 0)
+             m_pEndtime->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXFINISH) - TITRAQ_SPACING);
+         if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXAMOUNT) > 0)
+             m_pAmount->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXAMOUNT) - TITRAQ_SPACING);
+         if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXTASK) > 0)
+             m_pTasks->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXTASK) - TITRAQ_SPACING);
+ //        if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXRCOL)))
+ //            m_pRemark->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXREMARK) - TITRAQ_SPACING);
+         break;
+     case TITRAQ_IDXSTATUS:
+         m_pStatusedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXSTATUS) - TITRAQ_SPACING);
+         break;
+     case TITRAQ_IDXLINE:
+         m_pLineedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXLINE) - TITRAQ_SPACING);
+         break;
+     case TITRAQ_IDXUSER:
+         m_pUseredit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXUSER) - TITRAQ_SPACING);
+         break;
+     case TITRAQ_IDXGUID:
+         m_pGuidedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXGUID) - TITRAQ_SPACING);
+         break;
+     case TITRAQ_IDXCRC:
+         m_pCrcedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXCRC) - TITRAQ_SPACING);
+         break;
+     case TITRAQ_IDXREV:
+         m_pRevedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXREV) - TITRAQ_SPACING);
+         break;
+     case TITRAQ_IDXDATE:
+         m_pDateedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXDATE) - TITRAQ_SPACING);
+         break;
+     case TITRAQ_IDXSTART:
+         m_pStarttime->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXSTART) - TITRAQ_SPACING);
+         break;
+     case TITRAQ_IDXFINISH:
+         m_pEndtime->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXFINISH) - TITRAQ_SPACING);
+         break;
+     case TITRAQ_IDXAMOUNT:
+         m_pAmount->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXAMOUNT) - TITRAQ_SPACING);
+         break;
+     case TITRAQ_IDXTASK:
+         m_pTasks->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXTASK) - TITRAQ_SPACING);
+         break;
+     case TITRAQ_IDXREMARK:
+ //        m_pRemark->setFixedWidth(nNewsize);
+         break;
+     default:
+         throw Genexcept("Unrecognized main window column header.");
+         break;
+     }
+ 
+     // As a last and redundant step, adjust size of first visible control
+     switch(this->getFirstcol()) {
+     case TITRAQ_IDXSTATUS:
+         m_pStatusedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXSTATUS) - TITRAQ_SPACING + TITRAQ_SPACING / 2);
+         break;
+     case TITRAQ_IDXLINE:
+         m_pLineedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXLINE) - TITRAQ_SPACING + TITRAQ_SPACING / 2);
+         break;
+     case TITRAQ_IDXUSER:
+         m_pUseredit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXUSER) - TITRAQ_SPACING + TITRAQ_SPACING / 2);
+         break;
+     case TITRAQ_IDXGUID:
+         m_pGuidedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXGUID) - TITRAQ_SPACING + TITRAQ_SPACING / 2);
+         break;
+     case TITRAQ_IDXCRC:
+         m_pCrcedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXCRC) - TITRAQ_SPACING + TITRAQ_SPACING / 2);
+         break;
+     case TITRAQ_IDXREV:
+         m_pRevedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXREV) - TITRAQ_SPACING + TITRAQ_SPACING / 2);
+         break;
+     case TITRAQ_IDXDATE:
+         m_pDateedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXDATE) - TITRAQ_SPACING + TITRAQ_SPACING / 2);
+         break;
+     case TITRAQ_IDXSTART:
+         m_pStarttime->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXSTART) - TITRAQ_SPACING + TITRAQ_SPACING / 2);
+         break;
+     case TITRAQ_IDXFINISH:
+         m_pEndtime->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXFINISH) - TITRAQ_SPACING + TITRAQ_SPACING / 2);
+         break;
+     case TITRAQ_IDXAMOUNT:
+         m_pAmount->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXAMOUNT) - TITRAQ_SPACING + TITRAQ_SPACING / 2);
+         break;
+     case TITRAQ_IDXTASK:
+         m_pTasks->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXTASK) - TITRAQ_SPACING + TITRAQ_SPACING / 2);
+         break;
+     default:    // Probably no columns are visible?
+         break;
+     }
+ }
+ 
+ //
+ // What to do if a data cell is modified
+ //
+ void Titraqform::dataChanged(int nRow, int nCol)
+ {
+     if (nCol != TITRAQ_IDXSTATUS && nCol != TITRAQ_IDXLINE)
+         m_pMaintable->setDirty();   // Mark this timesheet dirty, changes pending save
+ }
+ 
+ //
+ // Convenience member calculates CRC for current row
+ //
+ void Titraqform::calcCrc(void)
+ {
+     this->calcCrc(-1, -1);
+ }
+ 
+ //
+ // Calculates CRC for the specified row, fires when data is changed
+ //
+ void Titraqform::calcCrc(int nRow, int nCol)
+ {
+     if (nCol != TITRAQ_IDXSTATUS && nCol != TITRAQ_IDXLINE \
+                                  && m_pMaintable->numRows() > 0) {
+         U32 Testcrc, Valcrc;
+         QString Crcstr;
+         std::auto_ptr<Qualistring>pWholerow(new Qualistring);
+         int nRealrow = -1;
+ 
+         // Build the data that will be used in testing CRC calculation
+         nRealrow = (nRow >= 0) ? nRow : m_pMaintable->currentRow();
+         *pWholerow = m_pMaintable->text(nRealrow, TITRAQ_IDXUSER);
+         for (int nIter = TITRAQ_IDXUSER + 1; nIter < TITRAQ_IDXTAIL; nIter++)
+             if (nIter != TITRAQ_IDXCRC) // Don't checksum the checksum!
+                 *pWholerow += m_pMaintable->text(nRealrow, nIter);
+ 
+         // Update the checksum and revision only if necessary
+         Testcrc = pWholerow->getCrc();
+ 
+         // FIXME: This thing is not very unportable, because toUInt != U32
+         if (Testcrc != m_pMaintable->text(nRealrow, TITRAQ_IDXCRC).toUInt()) {
+ 
+ //            // Bump the revision number of our entry to control conflicts
+ //            nNewrev = m_pMaintable->text(nRealrow, TITRAQ_IDXREV).toInt() + 1;
+ //            m_pMaintable->setText(nRealrow, TITRAQ_IDXREV, QString::number(nNewrev));
+ 
+             // Build the data that will be used in setting CRC calculation
+             *pWholerow = m_pMaintable->text(nRealrow, TITRAQ_IDXUSER);
+             for (int nIter = TITRAQ_IDXUSER + 1; nIter < TITRAQ_IDXTAIL; nIter++)
+                 if (nIter != TITRAQ_IDXCRC) // Don't checksum the checksum!
+                     *pWholerow += m_pMaintable->text(nRealrow, nIter);
+ 
+             Valcrc = pWholerow->getCrc(); // Finally set the checksum to its new value
+             Crcstr = QString::number(Valcrc, 16).rightJustify(8, '0');
+             m_pMaintable->setText(nRealrow, TITRAQ_IDXCRC, "0x" + Crcstr);
+             m_pCrcedit->setText("0x" + Crcstr);
+         }
+     }
+ }
+ 
+ //
+ // Gets a hit on every table click
+ //
+ void Titraqform::onClick(int nRow, int nCol, int nButton, const QPoint &Mousepos)
+ {
+     // Give the clueless user some hints when clicking an empty timesheet
+     if (m_pMaintable->numRows() <= 0)
+         m_pStatbar->message(trUtf8("Empty timesheet, add entries first please"), 2000);
+ }
+ 
+ //
+ // Update the edit controls contents
+ //
+ void Titraqform::updEdit(int nRow, int nCol)
+ {
+     // Why is the app sending negative row signal? I don't know yet,
+     // so add in this nasty hack to fend off the debug spew on stderr
+     if (m_pMaintable->numRows() > 0 && nRow >= 0) {
+         // Field strings to check for validity and process
+         QString Textline(m_pMaintable->text(nRow, TITRAQ_IDXLINE));
+         QString Textuser(m_pMaintable->text(nRow, TITRAQ_IDXUSER));
+         QString Textguid(m_pMaintable->text(nRow, TITRAQ_IDXGUID));
+         QString Textcrc(m_pMaintable->text(nRow, TITRAQ_IDXCRC));
+         QString Textrev(m_pMaintable->text(nRow, TITRAQ_IDXREV));
+         QString Textdate(m_pMaintable->text(nRow, TITRAQ_IDXDATE));
+         QString Textstart(m_pMaintable->text(nRow, TITRAQ_IDXSTART));
+         QString Textfinish(m_pMaintable->text(nRow, TITRAQ_IDXFINISH));
+         QString Textamount(m_pMaintable->text(nRow, TITRAQ_IDXAMOUNT));
+         QString Texttask(m_pMaintable->text(nRow, TITRAQ_IDXTASK));
+         QString Textremark(m_pMaintable->text(nRow, TITRAQ_IDXREMARK));
+ 
+         // Reset the edition state member
+         m_pMaintable->setEdition();
+ 
+         // Set text of member edit controls
+         if (m_pMaintable->text(nRow, TITRAQ_IDXSTATUS).isEmpty())   // If row is empty
+             m_pStatusedit->setPixmap(s_kpcStatvoid_xpm);            // add a placeholder
+         else
+             m_pStatusedit->setPixmap(m_pMaintable->pixmap(nRow, TITRAQ_IDXSTATUS));
+         m_pLineedit->setText(Textline);
+         m_pUseredit->setText(Textuser);
+         m_pGuidedit->setText(Textguid);
+         m_pCrcedit->setText(Textcrc);
+         m_pRevedit->setText(Textrev);
+ 
+ //        QRegExp Shorten("/(\\w+)$");    // For stripping prefix off the current task
+ //        Texttask.remove(0, Shorten.search(Texttask) + 1); // Strip leading slash
+ 
+         m_pRemark->setText(Textremark);
+         m_pTasks->setCurrentText(Texttask);
+ 
+         // Date field not suitable for empty string text
+         if (Textdate == ".")
+             m_pDateedit->setDate(QDate::currentDate());
+         else if (Textdate.isEmpty())
+             m_pDateedit->setDate(QDate::fromString("0000-00-00", Qt::ISODate));
+         else
+             m_pDateedit->setDate(QDate::fromString(Textdate, Qt::ISODate));
+ 
+         // Start time not suitable for empty string text
+         if (Textstart == ".")
+             m_pStarttime->setTime(QTime::currentTime());
+         else if (Textstart.isEmpty())
+             m_pStarttime->setTime(QTime::QTime(0, 0));
+         else
+             m_pStarttime->setTime(QTime::fromString(Textstart, Qt::ISODate));
+ 
+         // Finish time not suitable for empty string text
+         if (Textfinish == ".")
+             m_pEndtime->setTime(QTime::currentTime());
+         else if (Textfinish.isEmpty())
+             m_pEndtime->setTime(QTime::QTime(0, 0));
+         else
+             m_pEndtime->setTime(QTime::fromString(Textfinish, Qt::ISODate));
+ 
+         // Amount time not suitable for empty string text
+         if (Textamount == ".") {
+             int nDifference = m_pStarttime->time().secsTo(m_pEndtime->time());
+             m_pAmount->setTime(QTime(0, 0).addSecs(nDifference));
+         }
+         else if (Textamount.isEmpty())
+             m_pAmount->setTime(QTime::QTime(0, 0));
+         else
+             m_pAmount->setTime(QTime::fromString(Textamount, Qt::ISODate));
+     }
+ }
+ 
+ //
+ // Validate current row of matrix data
+ //
+ void Titraqform::validateData(void)
+ {
+     this->validateData(-1, -1);
+ }
+ 
+ //
+ // Validate specified row of matrix data
+ //
+ void Titraqform::validateData(int nRow, int nCol)
+ {
+     int nRealrow = -1;
+ 
+     if (!this->isOpen()) { // If no data is loaded then short circuit
+         m_pStatbar->message(trUtf8("Timesheet contains no data"), 4000);
+         return;
+     }
+ 
+     nRealrow = (nRow >= 0) ? nRow : m_pMaintable->currentRow();
+     QString Statis = m_pMaintable->text(nRealrow, TITRAQ_IDXSTATUS); // Get text
+ 
+     // Review whole data validity, and set pixmap accordingly
+     if (m_pMaintable->text(nRealrow, TITRAQ_IDXUSER).isEmpty() ||
+         m_pMaintable->text(nRealrow, TITRAQ_IDXGUID).isEmpty() ||
+         m_pMaintable->text(nRealrow, TITRAQ_IDXCRC).isEmpty() ||
+         m_pMaintable->text(nRealrow, TITRAQ_IDXREV).isEmpty() ||
+         m_pMaintable->text(nRealrow, TITRAQ_IDXDATE).isEmpty() ||
+         m_pMaintable->text(nRealrow, TITRAQ_IDXSTART).isEmpty() ||
+         m_pMaintable->text(nRealrow, TITRAQ_IDXFINISH).isEmpty() ||
+         m_pMaintable->text(nRealrow, TITRAQ_IDXAMOUNT).isEmpty() ||
+         m_pMaintable->text(nRealrow, TITRAQ_IDXTASK).isEmpty())
+     { // No K&R style to show where actual code begins
+         if (Statis.startsWith(QString("W"))) { // Conditionally set pixmap to avoid overhead
+ // FIXME: Next line commented out, and I see that this algorythm needs help
+ //            m_pStatusedit->setPixmap(m_pMaintable->pixmap(nRealrow, TITRAQ_IDXSTATUS));
+         }
+         else if (!Statis.startsWith(QString("E"))) { // Conditionally set pixmap to avoid overhead
+             m_pMaintable->setText(nRealrow, TITRAQ_IDXSTATUS, Statis.replace(TITRAQ_IDXSTATERROR, sizeof(char), 'E'));
+             m_pMaintable->setPixmap(nRealrow, TITRAQ_IDXSTATUS, QPixmap(s_kpcStaterror_xpm));
+             m_pStatusedit->setPixmap(m_pMaintable->pixmap(nRealrow, TITRAQ_IDXSTATUS));
+         }
+     }
+     else {
+         if (!Statis.startsWith(QString("O"))) { // Conditionally set pixmap to avoid overhead
+             m_pMaintable->setText(nRealrow, TITRAQ_IDXSTATUS, Statis.replace(TITRAQ_IDXSTATERROR, sizeof(char), 'O'));
+             m_pMaintable->setPixmap(nRealrow, TITRAQ_IDXSTATUS, QPixmap(s_kpcStatokay_xpm));
+             m_pStatusedit->setPixmap(m_pMaintable->pixmap(nRealrow, TITRAQ_IDXSTATUS));
+         }
+     }
+ 
+     // Test for blank user field, and set to default if so
+     if (m_pMaintable->text(nRealrow, TITRAQ_IDXUSER).isEmpty())
+         m_pMaintable->setText(nRealrow, TITRAQ_IDXUSER, m_pPrefs->getString(TITRAQ_PREFUSER, TITRAQ_DEFUSER));
+ 
+     // Test for blank date field, and set to default if so
+     if (m_pMaintable->text(nRealrow, TITRAQ_IDXDATE) == ".")
+         m_pMaintable->setText(nRealrow, TITRAQ_IDXDATE, QDate::currentDate().toString(Qt::ISODate));
+ 
+     // Test for blank start field, and set to default if so
+     if (m_pMaintable->text(nRealrow, TITRAQ_IDXSTART) == ".")
+         m_pMaintable->setText(nRealrow, TITRAQ_IDXSTART, QTime::currentTime().toString("hh:mm"));
+ 
+     // Test for blank finish field, and set to default if so
+     if (m_pMaintable->text(nRealrow, TITRAQ_IDXFINISH) == ".")
+         m_pMaintable->setText(nRealrow, TITRAQ_IDXFINISH, QTime::currentTime().toString("hh:mm"));
+ 
+     // Test for blank amount field, and set to default if so
+     if (m_pMaintable->text(nRealrow, TITRAQ_IDXAMOUNT) == ".") {
+         QTime Begin  = QTime::fromString(m_pMaintable->text(nRealrow, TITRAQ_IDXSTART), Qt::ISODate);
+         QTime End    = QTime::fromString(m_pMaintable->text(nRealrow, TITRAQ_IDXFINISH), Qt::ISODate);
+         QString Diff = QTime(0, 0).addSecs(Begin.secsTo(End)).toString("hh:mm");
+         m_pMaintable->setText(nRealrow, TITRAQ_IDXAMOUNT, Diff);
+     }
+ }
+ 
+ //
+ // Update the current line number column item
+ //
+ void Titraqform::updateLine(const QString &Instring)
+ {
+     m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXLINE, Instring);
+ }
+ 
+ //
+ // Update the current user column item
+ //
+ void Titraqform::updateUser(const QString &Instring)
+ {
+     m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXUSER, Instring);
+ }
+ 
+ //
+ // Update the current GUID column item
+ //
+ void Titraqform::updateGuid(const QString &Instring)
+ {
+     m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXGUID, Instring);
+ }
+ 
+ //
+ // Update the current CRC column item
+ //
+ void Titraqform::updateCrc(const QString &Instring)
+ {
+     m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXCRC, Instring);
+ }
+ 
+ //
+ // Update the current rev column item
+ //
+ void Titraqform::updateRev(const QString &Instring)
+ {
+     m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXREV, Instring);
+ }
+ 
+ //
+ // Update the current date column item
+ //
+ void Titraqform::updateDate(const QDate &Dateup)
+ {
+         m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXDATE, Dateup.toString(Qt::ISODate));
+ }
+ 
+ //
+ // Update the current start column item
+ //
+ void Titraqform::updateStart(const QTime &Startup)
+ {
+     m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXSTART, Startup.toString("hh:mm"));
+ }
+ 
+ //
+ // Update the current finish column item
+ //
+ void Titraqform::updateFinish(const QTime &Finishup)
+ {
+     m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXFINISH, Finishup.toString("hh:mm"));
+ }
+ 
+ //
+ // Update the current amount column item
+ //
+ void Titraqform::updateAmount(const QTime &Amountup)
+ {
+     m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXAMOUNT, Amountup.toString("hh:mm"));
+ }
+ 
+ //
+ // Update the current task column item
+ //
+ void Titraqform::updateTask(const QString &Taskup)
+ {
+ //    // FIXME: Broken
+ //    RtTableItem *pTask = NULL;
+ //    pTask = static_cast<RtTableItem *>(m_pMaintable->item(m_pMaintable->currentRow(), TITRAQ_IDXTASK));
+ //    pTask->setText(Taskup);
+ 
+     // Don't try to use the Taskup string, because it ignores autocompletion
+     m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXTASK, m_pTasks->currentText());
+ }
+ 
+ //
+ // Update the current remark column item
+ //
+ void Titraqform::updateRemark(const QString &Remarkup)
+ {
+     m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXREMARK, Remarkup);
+ }
+ 
+ //
+ // Confirm any recent editions on a whole row
+ //
+ void Titraqform::confirmEdit(void)
+ {
+     RtTableItem *pTask = NULL;  // Task item is a derived class
+ 
+     // Conversions from edit control data formats to native tabular format
+     m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXDATE, m_pDateedit->date().toString(Qt::ISODate));
+     m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXSTART, m_pStarttime->time().toString(Qt::ISODate));
+     m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXFINISH, m_pEndtime->time().toString(Qt::ISODate));
+     m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXAMOUNT, m_pAmount->time().toString(Qt::ISODate));
+ 
+     // Specially handle task fields
+     pTask = static_cast<RtTableItem *>(m_pMaintable->item(m_pMaintable->currentRow(), TITRAQ_IDXTASK));
+     pTask->setText(m_pTasks->currentText());
+ 
+     m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXREMARK, m_pRemark->text());
+ }
+ 
+ //
+ // Edit menu configure preferences
+ //
+ void Titraqform::configPrefs(void)
+ {
+     QString Templine;               // Used for preferences resetting
+     Prefpanel *pUserpanel = NULL;   // The user preferences panel itself
+ 
+     // Create a new preferences panel window
+     pUserpanel = new Prefpanel(this, "Userprefpanel");
+     connect(pUserpanel, SIGNAL(applied(void)), SLOT(applyPrefs(void)));
+ 
+     // Set default values to appear in initialized panel widgets
+     pUserpanel->setAccounts(m_pPrefs->getString(TITRAQ_PREFACCOUNTS, TITRAQ_DEFACCOUNTS));
+     pUserpanel->setEvents(m_pPrefs->getString(TITRAQ_PREFASDIR, TITRAQ_DEFASDIR));
+     pUserpanel->setUser(m_pPrefs->getString(TITRAQ_PREFUSER, TITRAQ_DEFUSER));
+     pUserpanel->setHome(m_pPrefs->getString(TITRAQ_PREFHOME, TITRAQ_DEFHOME));
+     pUserpanel->setCorbahost(m_pPrefs->getString(TITRAQ_PREFCORBHOST, TITRAQ_DEFCORBHOST));
+     pUserpanel->setSoaphost(m_pPrefs->getString(TITRAQ_PREFSOAPHOST, TITRAQ_DEFSOAPHOST));
+ #ifdef HAVE_MICO
+     pUserpanel->setCorbaon(m_pPrefs->getBool(TITRAQ_PREFCORBON, TITRAQ_DEFCORBON));
+ #else
+     pUserpanel->setCorbaon(false);
+     pUserpanel->lockCorba();
+ #endif
+ #ifdef HAVE_ESOAP
+     pUserpanel->setSoapon(m_pPrefs->getBool(TITRAQ_PREFSOAPON, TITRAQ_DEFSOAPON));
+ #else
+     pUserpanel->setSoapon(false);
+     pUserpanel->lockSoap();
+ #endif
+     pUserpanel->setBackon(m_pPrefs->getBool(TITRAQ_PREFBAKON, TITRAQ_DEFBAKON));
+     pUserpanel->setExtendon(m_pPrefs->getBool(TITRAQ_PREFEXTENDON, TITRAQ_DEFEXTENDON));
+     pUserpanel->setDetailon(m_pPrefs->getBool(TITRAQ_PREFDETAILON, TITRAQ_DEFDETAILON));
+     pUserpanel->setSignaton(m_pPrefs->getBool(TITRAQ_PREFSIGNATON, TITRAQ_DEFSIGNATON));
+ 
+     // Set default style which can be more complicated due to mapping...
+     switch (m_pPrefs->getNumber(TITRAQ_PREFSTYLE, TITRAQ_STYLECDE)) {
+     case TITRAQ_STYLECDE:
+         pUserpanel->setStyle(TITRAQ_STRCDE);
+         break;
+     case TITRAQ_STYLESGI:
+         pUserpanel->setStyle(TITRAQ_STRSGI);
+         break;
+     case TITRAQ_STYLEMOTIF:
+         pUserpanel->setStyle(TITRAQ_STRMOTIF);
+         break;
+     case TITRAQ_STYLEMPLUS:
+         pUserpanel->setStyle(TITRAQ_STRMPLUS);
+         break;
+     case TITRAQ_STYLEPLAT:
+         pUserpanel->setStyle(TITRAQ_STRPLAT);
+         break;
+     case TITRAQ_STYLEMSOFT:
+         pUserpanel->setStyle(TITRAQ_STRMSOFT);
+         break;
+     default:
+         pUserpanel->setStyle(TITRAQ_STRCDE);    // My personal favourite ;-)
+         break;
+     }
+ 
+     // Colour preferences
+     int nRed, nGreen, nBlue;
+     QColorGroup Origcolour, Altcolour;
+     const QColor Origlight = QColor(TITRAQ_DEFLIGHTRED, TITRAQ_DEFLIGHTGREEN, TITRAQ_DEFLIGHTBLUE);
+     const QColor Origdark  = QColor(TITRAQ_DEFDARKRED, TITRAQ_DEFDARKGREEN, TITRAQ_DEFDARKBLUE);
+     const QColor Altlight = QColor(TITRAQ_DEFLTALTRED, TITRAQ_DEFLTALTGREEN, TITRAQ_DEFLTALTBLUE);
+     const QColor Altdark  = QColor(TITRAQ_DEFDKALTRED, TITRAQ_DEFDKALTGREEN, TITRAQ_DEFDKALTBLUE);
+ 
+     // Set colours to revert to if user screws up and wants out
+     Origcolour.setColor(QColorGroup::Foreground, Origlight);
+     Origcolour.setColor(QColorGroup::Background, Origdark);
+     pUserpanel->setOrigcolour(&Origcolour);
+     Altcolour.setColor(QColorGroup::Foreground, Altlight);
+     Altcolour.setColor(QColorGroup::Background, Altdark);
+     pUserpanel->setAltcolour(&Altcolour);
+ 
+     // Set colour preferences saved from last session
+     nRed   = m_pPrefs->getNumber(TITRAQ_PREFLIGHTRED, TITRAQ_DEFLIGHTRED);
+     nGreen = m_pPrefs->getNumber(TITRAQ_PREFLIGHTGREEN, TITRAQ_DEFLIGHTGREEN);
+     nBlue  = m_pPrefs->getNumber(TITRAQ_PREFLIGHTBLUE, TITRAQ_DEFLIGHTBLUE);
+     const QColor Lightshade = QColor(nRed, nGreen, nBlue);
+     pUserpanel->setLight(&Lightshade);
+     nRed   = m_pPrefs->getNumber(TITRAQ_PREFDARKRED, TITRAQ_DEFDARKRED);
+     nGreen = m_pPrefs->getNumber(TITRAQ_PREFDARKGREEN, TITRAQ_DEFDARKGREEN);
+     nBlue  = m_pPrefs->getNumber(TITRAQ_PREFDARKBLUE, TITRAQ_DEFDARKBLUE);
+     const QColor Darkshade = QColor(nRed, nGreen, nBlue);
+     pUserpanel->setDark(&Darkshade);
+ 
+     // Modal panel handler
+     if (pUserpanel->exec() == QDialog::Accepted)
+         this->applyPrefs(pUserpanel);
+ 
+     // Dispose Panel object
+     delete pUserpanel;
+ }
+ 
+ //
+ // View menu normal
+ //
+ void Titraqform::normalView(void)
+ {
+     // All view types except normal are disabled until implemention, so
+     // this body can remain empty, causing nothing to happen on selection.
+ }
+ 
+ //
+ // View menu editing
+ //
+ void Titraqform::editingView(void)
+ {
+     // All view types except normal are disabled until implemention, so
+     // this body can remain empty, causing nothing to happen on selection.
+ }
+ 
+ //
+ // View menu timing
+ //
+ void Titraqform::timingView(void)
+ {
+     // All view types except normal are disabled until implemention, so
+     // this body can remain empty, causing nothing to happen on selection.
+ }
+ 
+ //
+ // View menu show file toolbar
+ //
+ void Titraqform::showFilebar(void)
+ {
+     if (m_pFiletools->isVisible()) {
+         m_pFiletools->hide();
+         m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXFILEBAR), false);
+     }
+     else {
+         m_pFiletools->show();
+         m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXFILEBAR), true);
+     }
+ }
+ 
+ //
+ // View menu show edit toolbar
+ //
+ void Titraqform::showEditbar(void)
+ {
+     if (m_pEdittools->isVisible()) {
+         m_pEdittools->hide();
+         m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXEDITBAR), false);
+     }
+     else {
+         m_pEdittools->show();
+         m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXEDITBAR), true);
+     }
+ }
+ 
+ //
+ // View menu show view toolbar
+ //
+ void Titraqform::showViewbar(void)
+ {
+     if (m_pViewtools->isVisible()) {
+         m_pViewtools->hide();
+         m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXVIEWBAR), false);
+     }
+     else {
+         m_pViewtools->show();
+         m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXVIEWBAR), true);
+     }
+ }
+ 
+ //
+ // View menu show prefs toolbar
+ //
+ void Titraqform::showPrefsbar(void)
+ {
+     if (m_pPrefstools->isVisible()) {
+         m_pPrefstools->hide();
+         m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXPREFBAR), false);
+     }
+     else {
+         m_pPrefstools->show();
+         m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXPREFBAR), true);
+     }
+ }
+ 
+ //
+ // View menu show whats this toolbar
+ //
+ void Titraqform::showWhatsbar(void)
+ {
+     if (m_pWhatstools->isVisible()) {
+         m_pWhatstools->hide();
+         m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXWHATBAR), false);
+     }
+     else {
+         m_pWhatstools->show();
+         m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXWHATBAR), true);
+     }
+ }
+ 
+ //
+ // View menu show status column
+ //
+ void Titraqform::showStatcol(void)
+ {
+     // Test if column is currently shown, conditionally show or hide it
+     if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXSTATCOL))) {
+         m_pMaintable->hideColumn(TITRAQ_IDXSTATUS);
+         m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXSTATCOL), false);
+         m_pStatusedit->hide();
+     }
+     else {
+         m_pMaintable->showColumn(TITRAQ_IDXSTATUS);
+         m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXSTATCOL), true);
+         m_pStatusedit->show();
+     }
+ 
+     // Make sure switch take place right away and sizes are handled
+     m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXSTATCOL));
+     this->updSizes(TITRAQ_IDXALLCTRLS, 0, 0); // Update size of this and next
+ }
+ 
+ //
+ // View menu show line numbers column
+ //
+ void Titraqform::showLinecol(void)
+ {
+     // Test if column is currently shown, conditionally show or hide it
+     if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXLCOL))) {
+         m_pMaintable->hideColumn(TITRAQ_IDXLINE);
+         m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXLCOL), false);
+         m_pLineedit->hide();
+     }
+     else {
+         m_pMaintable->showColumn(TITRAQ_IDXLINE);
+         m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXLCOL), true);
+         m_pLineedit->show();
+     }
+ 
+     // Make sure switch take place right away and sizes are handled
+     m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXLCOL));
+     this->updSizes(TITRAQ_IDXALLCTRLS, 0, 0); // Update size of this and next
+ }
+ 
+ //
+ // View menu show users column
+ //
+ void Titraqform::showUsercol(void)
+ {
+     // Test if column is currently shown, conditionally show or hide it
+     if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXUCOL))) {
+         m_pMaintable->hideColumn(TITRAQ_IDXUSER);
+         m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXUCOL), false);
+         m_pUseredit->hide();
+     }
+     else {
+         m_pMaintable->showColumn(TITRAQ_IDXUSER);
+         m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXUCOL), true);
+         m_pUseredit->show();
+     }
+ 
+     // Make sure switch take place right away and sizes are handled
+     this->updSizes(TITRAQ_IDXALLCTRLS, 0, 0); // Update size of this and next
+     m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXUCOL));
+ }
+ 
+ //
+ // View menu show GUIDs column
+ //
+ void Titraqform::showGuidcol(void)
+ {
+     // Test if column is currently shown, conditionally show or hide it
+     if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXGCOL))) {
+         m_pMaintable->hideColumn(TITRAQ_IDXGUID);
+         m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXGCOL), false);
+         m_pGuidedit->hide();
+     }
+     else {
+         m_pMaintable->showColumn(TITRAQ_IDXGUID);
+         m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXGCOL), true);
+         m_pGuidedit->show();
+     }
+ 
+     // Make sure switch take place right away and sizes are handled
+     m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXGCOL));
+     this->updSizes(TITRAQ_IDXALLCTRLS, 0, 0); // Update size of this and next
+ }
+ 
+ //
+ // View menu show CRC column
+ //
+ void Titraqform::showCrccol(void)
+ {
+     // Test if column is currently shown, conditionally show or hide it
+     if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXCCOL))) {
+         m_pMaintable->hideColumn(TITRAQ_IDXCRC);
+         m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXCCOL), false);
+         m_pCrcedit->hide();
+     }
+     else {
+         m_pMaintable->showColumn(TITRAQ_IDXCRC);
+         m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXCCOL), true);
+         m_pCrcedit->show();
+     }
+ 
+     // Make sure switch take place right away and sizes are handled
+     m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXCCOL));
+     this->updSizes(TITRAQ_IDXALLCTRLS, 0, 0); // Update size of this and next
+ }
+ 
+ //
+ // View menu show Rev column
+ //
+ void Titraqform::showRevcol(void)
+ {
+     // Test if column is currently shown, conditionally show or hide it
+     if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXREVCOL))) {
+         m_pMaintable->hideColumn(TITRAQ_IDXREV);
+         m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXREVCOL), false);
+         m_pRevedit->hide();
+     }
+     else {
+         m_pMaintable->showColumn(TITRAQ_IDXREV);
+         m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXREVCOL), true);
+         m_pRevedit->show();
+     }
+ 
+     // Make sure switch take place right away and sizes are handled
+     m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXREVCOL));
+     this->updSizes(TITRAQ_IDXALLCTRLS, 0, 0); // Update size of this and next
+ }
+ 
+ //
+ // View menu show dates column
+ //
+ void Titraqform::showDatecol(void)
+ {
+     // Test if column is currently shown, conditionally show or hide it
+     if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXDCOL))) {
+         m_pMaintable->hideColumn(TITRAQ_IDXDATE);
+         m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXDCOL), false);
+         m_pDateedit->hide();
+     }
+     else {
+         m_pMaintable->showColumn(TITRAQ_IDXDATE);
+         m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXDCOL), true);
+         m_pDateedit->show();
+     }
+ 
+     // Make sure switch take place right away and sizes are handled
+     m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXDCOL));
+     this->updSizes(TITRAQ_IDXALLCTRLS, 0, 0); // Update size of this and next
+ }
+ 
+ //
+ // View menu show start time column
+ //
+ void Titraqform::showStartcol(void)
+ {
+     // Test if column is currently shown, conditionally show or hide it
+     if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXSTARTCOL))) {
+         m_pMaintable->hideColumn(TITRAQ_IDXSTART);
+         m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXSTARTCOL), false);
+         m_pStarttime->hide();
+     }
+     else {
+         m_pMaintable->showColumn(TITRAQ_IDXSTART);
+         m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXSTARTCOL), true);
+         m_pStarttime->show();
+     }
+ 
+     // Make sure switch take place right away and sizes are handled
+     m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXSTARTCOL));
+     this->updSizes(TITRAQ_IDXALLCTRLS, 0, 0); // Update size of this and next
+ }
+ 
+ //
+ // View menu show finish time column
+ //
+ void Titraqform::showFinishcol(void)
+ {
+     // Test if column is currently shown, conditionally show or hide it
+     if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXFCOL))) {
+         m_pMaintable->hideColumn(TITRAQ_IDXFINISH);
+         m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXFCOL), false);
+         m_pEndtime->hide();
+     }
+     else {
+         m_pMaintable->showColumn(TITRAQ_IDXFINISH);
+         m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXFCOL), true);
+         m_pEndtime->show();
+     }
+ 
+     // Make sure switch take place right away and sizes are handled
+     m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXFCOL));
+     this->updSizes(TITRAQ_IDXALLCTRLS, 0, 0); // Update size of this and next
+ }
+ 
+ //
+ // View menu show Amounts column
+ //
+ void Titraqform::showAmountcol(void)
+ {
+     // Test if column is currently shown, conditionally show or hide it
+     if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXACOL))) {
+         m_pMaintable->hideColumn(TITRAQ_IDXAMOUNT);
+         m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXACOL), false);
+         m_pAmount->hide();
+     }
+     else {
+         m_pMaintable->showColumn(TITRAQ_IDXAMOUNT);
+         m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXACOL), true);
+         m_pAmount->show();
+     }
+ 
+     // Make sure switch take place right away and sizes are handled
+     m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXACOL));
+     this->updSizes(TITRAQ_IDXALLCTRLS, 0, 0); // Update size of this and next
+ }
+ 
+ //
+ // View menu show tasks column
+ //
+ void Titraqform::showTaskcol(void)
+ {
+     // Test if column is currently shown, conditionally show or hide it
+     if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXTCOL))) {
+         m_pMaintable->hideColumn(TITRAQ_IDXTASK);
+         m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXTCOL), false);
+         m_pTasks->hide();
+     }
+     else {
+         m_pMaintable->showColumn(TITRAQ_IDXTASK);
+         m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXTCOL), true);
+         m_pTasks->show();
+     }
+ 
+     // Make sure switch take place right away and sizes are handled
+     m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXTCOL));
+     this->updSizes(TITRAQ_IDXALLCTRLS, 0, 0); // Update size of this and next
+ }
+ 
+ //
+ // View menu show Remarks column
+ //
+ void Titraqform::showRemarkcol(void)
+ {
+     // Test if column is currently shown, conditionally show or hide it
+     if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXREMCOL))) {
+         m_pMaintable->hideColumn(TITRAQ_IDXREMARK);
+         m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXREMCOL), false);
+         m_pRemark->hide();
+     }
+     else {
+         m_pMaintable->showColumn(TITRAQ_IDXREMARK);
+         m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXREMCOL), true);
+         m_pRemark->show();
+     }
+ 
+     // Make sure switch take place right away and sizes are handled
+     m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXREMCOL));
+     this->updSizes(TITRAQ_IDXALLCTRLS, 0, 0); // Update size of this and next
+ }
+ 
+ //
+ // Generate a local formatted report
+ //
+ void Titraqform::genReport(void)
+ {
+     try { // Create and execute a new local report window
+         std::auto_ptr<AS::Reportpanel> pReport(new AS::Reportpanel
+             (m_pMaintable, m_pPrefs, this, "Locreportpanel"));
+         pReport->exec();
+         delete pReport.release(); // Technically unnecessary, smart pointer
+     }
+     catch (Genexcept& Genex) {
+         Genex.reportErr();
+         return;
+     }
+ }
+ 
+ //
+ // Syncronize data with server using IIOP
+ //
+ void Titraqform::syncIiop(void)
+ {
+ #ifdef HAVE_MICO
+     // Short circuit if user has disabled CORBA transmission in prefs
+     if (!m_pPrefs->getBool(TITRAQ_PREFCORBON, TITRAQ_DEFCORBON))
+         return;
+ 
+     char **ppcInargv = NULL;    // Parameters to the ORB
+     CORBA::ORB_var Orb;         // The ORB iself
+ 
+     CORBA::Object_var Nameobj;      // Name service reference
+     CosNaming::NamingContext_var Namectx; // COSS ns context
+     CosNaming::Name Cosname;        // Our requested obj name
+ 
+     CORBA::Object_var Objcaster;    // Generic CORBA object
+     Asdatabase_var Asdbase;         // Casted object to ASDB
+     Astuple Singlerow;              // A single row of AS data
+ 
+     QString *pOrbargv = new QString(TITRAQ_ORBINIT);
+     int nCount = pOrbargv->contains(' ');
+     int nNamesize = 0;
+ 
+     // Build a false incoming argv with which we initialize the ORB
+     ppcInargv = new char *[nCount + 3]; // 3 = arg0 + last section + COSS host
+     *ppcInargv = new char[strlen(*qApp->argv() + 2)]; // For cmd name
+     strcpy(ppcInargv[0], *qApp->argv());              // Copy cmd name
+     for (int nIter = 0; nIter <= nCount; nIter++) {
+         QString Section = pOrbargv->section(' ', nIter, nIter);
+         ppcInargv[nIter + 1] = new char[strlen(Section.ascii() + 2)];
+         strcpy(ppcInargv[nIter + 1], Section.ascii());
+     }
+ 
+     // Build the single string COSS naming host name with associated port number
+     *pOrbargv = TITRAQ_COSSPART1
+               + m_pPrefs->getString(TITRAQ_PREFCORBHOST, TITRAQ_DEFCORBHOST)
+               + TITRAQ_COSSPART2;
+     nNamesize = strlen(pOrbargv->ascii());
+     ppcInargv[nCount + 2] = new char[nNamesize];
+     strcpy(ppcInargv[nCount + 2], pOrbargv->ascii());
+ 
+     try {
+         // Initialization of the ORB and COSS naming service
+         nCount = nCount + 3; // Raise the count to include app, last sec, COSS
+         Orb = CORBA::ORB_init(nCount, ppcInargv, "mico-local-orb");
+         Nameobj = Orb->resolve_initial_references("NameService");
+         Namectx = CosNaming::NamingContext::_narrow(Nameobj);
+         if (CORBA::is_nil(Namectx)) { // Verify sanity
+             m_pStatbar->message(trUtf8("Could not find the COSS naming service"));
+             qWarning("Could not find the COSS naming service\n");
+         }
+ 
+         // Clean up our dynamically allocated array
+         for (int nIter = 0; nIter < nCount; nIter++)
+             delete ppcInargv[nIter];
+         delete ppcInargv; // Free the array itself
+         delete pOrbargv;  // Free the intermediate string
+ 
+         // Prepare the COSS name request
+         Cosname.length(1);
+         Cosname[0].id = CORBA::string_dup("Asdatabase");
+         Cosname[0].kind = CORBA::string_dup("");
+ 
+         try { // Resolve to a CORBA object
+             Objcaster = Namectx->resolve(Cosname);
+         }
+         catch (CosNaming::NamingContext::NotFound &Cossex) {
+             m_pStatbar->message(trUtf8("NotFound exception thrown"));
+             qWarning("NotFound exception thrown\n");
+             return;
+         }
+         catch (CosNaming::NamingContext::CannotProceed &Cossex) {
+             m_pStatbar->message(trUtf8("CannotProceed exception thrown"));
+             qWarning("CannotProceed exception thrown\n");
+             return;
+         }
+         catch (CosNaming::NamingContext::InvalidName &Cossex) {
+             m_pStatbar->message(trUtf8("InvalidName exception thrown"));
+             qWarning("InvalidName exception thrown\n");
+             return;
+         }
+ 
+         // Cast the generic CORBA object to a AS database type
+         Asdbase = Asdatabase::_narrow(Objcaster);
+         if (CORBA::is_nil(Asdbase)) { // Verify sanity
+             m_pStatbar->message(trUtf8("Could not find the AS database"));
+             qWarning("Could not find the AS database\n");
+             return;
+         }
+ 
+         // Open an account object on the remote server
+         Account_var Account = Asdbase->Open("/tmp/events.as");
+         if (CORBA::is_nil(Account)) { // Verify sanity
+             m_pStatbar->message(trUtf8("Could not create an account object on the server"));
+             qWarning("Could not create an account object on the server\n");
+             return;
+         }
+ 
+         // Fill account log object(s) to marshall and transmit
+         int nRow = m_pMaintable->currentRow();
+         QTableSelection Select = m_pMaintable->selection(0);    // Capture selected rows
+         int nTotal = Select.bottomRow() - Select.topRow() + 1;  // Total rows selected
+ 
+         // Remember, CORBA::stri_dup creates smart pointers
+         for (int nIter = 0; nIter < nTotal; nIter++) {
+             Singlerow.szUser   = CORBA::string_dup(m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXUSER));
+             Singlerow.szGuid   = CORBA::string_dup(m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXGUID));
+             Singlerow.szCrc    = CORBA::string_dup(m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXCRC).remove("0x"));
+             Singlerow.szRev    = CORBA::string_dup(m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXREV));
+             Singlerow.szDate   = CORBA::string_dup(m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXDATE));
+             Singlerow.szStart  = CORBA::string_dup(m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXSTART));
+             Singlerow.szFinish = CORBA::string_dup(m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXFINISH));
+             Singlerow.szAmount = CORBA::string_dup(m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXAMOUNT));
+ //            Singlerow.nRev     = m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXREV).toUInt();
+ //            Singlerow.nDate    = m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXDATE).toUInt();
+ //            Singlerow.nStart   = m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXSTART).toUInt();
+ //            Singlerow.nFinish  = m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXFINISH).toUInt();
+ //            Singlerow.nAmount  = m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXAMOUNT).toUInt();
+             Singlerow.szTask   = CORBA::string_dup(m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXTASK));
+             Singlerow.szRemark = CORBA::string_dup(m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXREMARK));
+             Account->Log(Singlerow); // Finally transmit to server
+         }
+ 
+         m_pStatbar->message(trUtf8("Successful transmission of accounting data"));
+     }
+     catch (const CORBA::Exception &Corbex) {
+         m_pStatbar->message(trUtf8("Caught CORBA exception: %1").arg(Corbex._repoid()));
+         qWarning("Caught CORBA exception: %s", Corbex._repoid());
+     }
+     catch (...) {
+         qWarning("Caught unknown exception\n");
+     }
+ #endif // HAVE_MICO
+ }
+ 
+ //
+ // Syncronize data with server using SOAP
+ //
+ void Titraqform::syncSoap(void)
+ {
+ #ifdef HAVE_ESOAP
+     // Short circuit if user has disabled SOAP transmission in prefs
+     if (!m_pPrefs->getBool(TITRAQ_PREFSOAPON, TITRAQ_DEFSOAPON))
+         return;
+ 
+     USING_EASYSOAP_NAMESPACE
+ 
+     try {
+         SOAPMethod Logmeth("Log", TITRAQ_SOAPSPACE); // SOAP namespace
+         SOAPString Clistr;                  // Outgoing parameter to marshall
+         int nCrc;                           // SOAP unmarshalled return value
+ 
+         // Build the single string SOAP end point which look like this:
+         //   "http://www.europalab.com/cgi-bin/asdbserv"
+         QString Endpoint;
+         Endpoint = TITRAQ_PREFIXHTTP + m_pPrefs->getString(TITRAQ_PREFSOAPHOST, TITRAQ_DEFSOAPHOST);
+         SOAPProxy Proxy(Endpoint.ascii());
+ 
+         // Fill account log object(s) to marshall and transmit
+         QTableSelection Select = m_pMaintable->selection(0);    // Capture selected rows
+         int nTotal = Select.bottomRow() - Select.topRow() + 1;  // Total rows selected
+ 
+         // Iterate through the selection of row entries to transmit
+         for (int nRowiter = 0; nRowiter < nTotal; nRowiter++) {
+             QString Syncthis = m_pMaintable->text(Select.topRow() + nRowiter, TITRAQ_IDXUSER);
+             Syncthis += ' ' + m_pMaintable->text(Select.topRow() + nRowiter, TITRAQ_IDXGUID);
+             Syncthis += ' ' + m_pMaintable->text(Select.topRow() + nRowiter, TITRAQ_IDXCRC).remove("0x");
+             Syncthis += ' ' + m_pMaintable->text(Select.topRow() + nRowiter, TITRAQ_IDXREV);
+             Syncthis += ' ' + m_pMaintable->text(Select.topRow() + nRowiter, TITRAQ_IDXDATE);
+             Syncthis += ' ' + m_pMaintable->text(Select.topRow() + nRowiter, TITRAQ_IDXSTART);
+             Syncthis += ' ' + m_pMaintable->text(Select.topRow() + nRowiter, TITRAQ_IDXFINISH);
+             Syncthis += ' ' + m_pMaintable->text(Select.topRow() + nRowiter, TITRAQ_IDXAMOUNT);
+             Syncthis += ' ' + m_pMaintable->text(Select.topRow() + nRowiter, TITRAQ_IDXTASK);
+             Syncthis += ' ' + ('"' + m_pMaintable->text(Select.topRow() + nRowiter, TITRAQ_IDXREMARK)) + '"';
+             Clistr = Syncthis;                          // Build RPC parameter
+             Logmeth.AddParameter("Tuple") << Clistr;    // Prepare for marshalling
+             const SOAPResponse &Logresp = Proxy.Execute(Logmeth);
+             Logresp.GetReturnValue() >> nCrc;
+         }
+         m_pStatbar->message(trUtf8("Successful transmission, CRC returned %1").arg(nCrc));
+     }
+     catch (SOAPException& Soapex) { // Announce the exception we received
+         m_pStatbar->message(trUtf8("Caught SOAP exception: %1").arg(Soapex.What().Str()));
+         qDebug("Caught SOAP exception: %s", Soapex.What().Str());
+     }
+     catch (...) {
+         qDebug("Caught unknown exception\n");
+     }
+ #endif // HAVE_ESOAP
+ }
+ 
+ //
+ // Save user preferences
+ //
+ void Titraqform::savePrefs(void)
+ {
+     // Get check status from column menu and pass it to prefs handler
+     m_pPrefs->setBool(TITRAQ_PREFSTATCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXSTATCOL)));
+     m_pPrefs->setBool(TITRAQ_PREFLCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXLCOL)));
+     m_pPrefs->setBool(TITRAQ_PREFUCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXUCOL)));
+     m_pPrefs->setBool(TITRAQ_PREFGCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXGCOL)));
+     m_pPrefs->setBool(TITRAQ_PREFCCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXCCOL)));
+     m_pPrefs->setBool(TITRAQ_PREFREVCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXREVCOL)));
+     m_pPrefs->setBool(TITRAQ_PREFDCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXDCOL)));
+     m_pPrefs->setBool(TITRAQ_PREFSTARTCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXSTARTCOL)));
+     m_pPrefs->setBool(TITRAQ_PREFFCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXFCOL)));
+     m_pPrefs->setBool(TITRAQ_PREFACOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXACOL)));
+     m_pPrefs->setBool(TITRAQ_PREFFCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXFCOL)));
+     m_pPrefs->setBool(TITRAQ_PREFREMCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXREMCOL)));
+ 
+     // Get check status from toolbar menu and pass it to prefs handler
+     m_pPrefs->setBool(TITRAQ_PREFFILEBAR, m_pTbarspopup->isItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXFILEBAR)));
+     m_pPrefs->setBool(TITRAQ_PREFEDITBAR, m_pTbarspopup->isItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXEDITBAR)));
+     m_pPrefs->setBool(TITRAQ_PREFVIEWBAR, m_pTbarspopup->isItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXVIEWBAR)));
+     m_pPrefs->setBool(TITRAQ_PREFPREFBAR, m_pTbarspopup->isItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXPREFBAR)));
+     m_pPrefs->setBool(TITRAQ_PREFWHATBAR, m_pTbarspopup->isItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXWHATBAR)));
+ 
+     // Get column widths from main table and pass it to prefs handler
+     if (m_pMaintable->columnWidth(TITRAQ_IDXSTATUS) > 0)
+         m_pPrefs->setNumber(TITRAQ_PREFSTATCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXSTATUS));
+     if (m_pMaintable->columnWidth(TITRAQ_IDXLINE) > 0)
+         m_pPrefs->setNumber(TITRAQ_PREFLCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXLINE));
+     if (m_pMaintable->columnWidth(TITRAQ_IDXUSER) > 0)
+         m_pPrefs->setNumber(TITRAQ_PREFUCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXUSER));
+     if (m_pMaintable->columnWidth(TITRAQ_IDXGUID) > 0)
+         m_pPrefs->setNumber(TITRAQ_PREFGCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXGUID));
+     if (m_pMaintable->columnWidth(TITRAQ_IDXCRC) > 0)
+         m_pPrefs->setNumber(TITRAQ_PREFCCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXCRC));
+     if (m_pMaintable->columnWidth(TITRAQ_IDXREV) > 0)
+         m_pPrefs->setNumber(TITRAQ_PREFREVCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXREV));
+     if (m_pMaintable->columnWidth(TITRAQ_IDXDATE) > 0)
+         m_pPrefs->setNumber(TITRAQ_PREFDCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXDATE));
+     if (m_pMaintable->columnWidth(TITRAQ_IDXSTART) > 0)
+         m_pPrefs->setNumber(TITRAQ_PREFSTARTCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXSTART));
+     if (m_pMaintable->columnWidth(TITRAQ_IDXFINISH) > 0)
+         m_pPrefs->setNumber(TITRAQ_PREFFCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXFINISH));
+     if (m_pMaintable->columnWidth(TITRAQ_IDXAMOUNT) > 0)
+         m_pPrefs->setNumber(TITRAQ_PREFACOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXAMOUNT));
+     if (m_pMaintable->columnWidth(TITRAQ_IDXTASK) > 0)
+         m_pPrefs->setNumber(TITRAQ_PREFTCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXTASK));
+     if (m_pMaintable->columnWidth(TITRAQ_IDXREMARK) > 0)
+         m_pPrefs->setNumber(TITRAQ_PREFREMCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXREMARK));
+ 
+     // Get sorting order and direction from table and pass it to prefs handler
+     m_pPrefs->setNumber(TITRAQ_PREFSORTCOL, (long)m_pMaintable->getSortcol());
+     m_pPrefs->setBool(TITRAQ_PREFSORTDIR, (long)m_pMaintable->getSortdir());
+ 
+     // Set frame geometry preferences
+     m_pPrefs->setNumber(TITRAQ_PREFFRAMEWIDTH, (long)this->width());
+     m_pPrefs->setNumber(TITRAQ_PREFFRAMEHEIGHT, (long)this->height());
+ 
+     // Remember main window layout and doc positions
+     QString Laystring;
+     QTextStream Laystream(&Laystring, IO_WriteOnly);
+     Laystream << *this; // Persist the main window
+     m_pPrefs->setString(TITRAQ_PREFFRAMELAY, Laystring);
+ }
+ 
+ //
+ // Get help on Titraq functionality
+ //
+ void Titraqform::helpContents(void)
+ {
+     try { // Create and execute a new help contents window
+         std::auto_ptr<AS::Helpanel> pHelpcont(new AS::Helpanel(TITRAQ_REFHELP, this, "Helpanel"));
+         pHelpcont->exec();
+         delete pHelpcont.release(); // Technically unnecessary, smart pointer
+     }
+     catch (Genexcept& Genex) {
+         Genex.reportErr();
+         return;
+     }
+ }
+ 
+ //
+ // Learn more about this program itself
+ //
+ void Titraqform::aboutTitraq(void)
+ {
+     QString Namever = QString(TITRAQ_APPTITLE) + ' ' + asgui_version.v_short;
+     QMessageBox *pCwmsg = new QMessageBox(Namever,
+         QObject::trUtf8("The as-gui is a time and task-based accounting\n"
+                "system that acts as both a work-like punch card and\n"
+                "time tracker. Development of as-gui is sponsored by\n"
+                "Cable & Wireless Telecommunications Services GmbH."),
+         QMessageBox::NoIcon, QMessageBox::Ok | QMessageBox::Default,
+         QMessageBox::NoButton, QMessageBox::NoButton,
+         NULL, "Titraqmessage", true, Qt::WStyle_NormalBorder);
+ 
+     pCwmsg->setIconPixmap(QPixmap(s_kpcCwlogo_xpm));
+     pCwmsg->exec();
+ }
+ 
+ //
+ // Learn more about the OSSP
+ //
+ void Titraqform::aboutOSSP(void)
+ {
+     QString Namever = QString(TITRAQ_APPTITLE) + ' ' + asgui_version.v_short;
+     QMessageBox *pOsspmsg = new QMessageBox(Namever,
+         QObject::trUtf8("The open source software project (OSSP) is\n"
+                "a collective effort aimed at implementing\n"
+                "high-quality Unix software components,\n"
+                "ranging from networking, multi-threading\n"
+                "and algorithmic libraries to networking\n"
+                "servers and development tools."),
+         QMessageBox::NoIcon, QMessageBox::Ok | QMessageBox::Default,
+         QMessageBox::NoButton, QMessageBox::NoButton,
+         NULL, "Osspmessage", true, Qt::WStyle_NormalBorder);
+ 
+     pOsspmsg->setIconPixmap(QPixmap(s_kpcOssplogo_xpm));
+     pOsspmsg->exec();
+ }
+ 
+ //
+ // Learn more about this program and Qt
+ //
+ void Titraqform::aboutQt(void)
+ {
+     QMessageBox::aboutQt(this, QString(TITRAQ_APPTITLE) + ' ' + asgui_version.v_short);
+ }
+ 
+ //
+ // Apply preference values from a signal emitting object
+ //
+ void Titraqform::applyPrefs(void)
+ {
+     Prefpanel *pPan = (Prefpanel *)QObject::sender();
+     this->applyPrefs(pPan);
+ }
+ 
+ //
+ // Accept preference values from a inbound Panel object
+ //
+ void Titraqform::applyPrefs(Prefpanel *pPrefpanel)
+ {
+     m_pPrefs->setString(TITRAQ_PREFACCOUNTS, pPrefpanel->getAccounts());
+     m_pPrefs->setString(TITRAQ_PREFASDIR, pPrefpanel->getEvents());
+     m_pPrefs->setString(TITRAQ_PREFUSER, pPrefpanel->getUser());
+     m_pPrefs->setString(TITRAQ_PREFHOME, pPrefpanel->getHome());
+     m_pPrefs->setString(TITRAQ_PREFCORBHOST, pPrefpanel->getCorbahost());
+     m_pPrefs->setString(TITRAQ_PREFSOAPHOST, pPrefpanel->getSoaphost());
+     m_pPrefs->setBool(TITRAQ_PREFCORBON, pPrefpanel->getCorbaon());
+     m_pPrefs->setBool(TITRAQ_PREFSOAPON, pPrefpanel->getSoapon());
+     m_pPrefs->setBool(TITRAQ_PREFBAKON, pPrefpanel->getBackon());
+     m_pPrefs->setBool(TITRAQ_PREFEXTENDON, pPrefpanel->getExtendon());
+     m_pPrefs->setBool(TITRAQ_PREFDETAILON, pPrefpanel->getDetailon());
+     m_pPrefs->setBool(TITRAQ_PREFSIGNATON, pPrefpanel->getSignaton());
+     m_pPrefs->setNumber(TITRAQ_PREFLIGHTRED, pPrefpanel->getLight()->red());
+     m_pPrefs->setNumber(TITRAQ_PREFLIGHTGREEN, pPrefpanel->getLight()->green());
+     m_pPrefs->setNumber(TITRAQ_PREFLIGHTBLUE, pPrefpanel->getLight()->blue());
+     m_pPrefs->setNumber(TITRAQ_PREFDARKRED, pPrefpanel->getDark()->red());
+     m_pPrefs->setNumber(TITRAQ_PREFDARKGREEN, pPrefpanel->getDark()->green());
+     m_pPrefs->setNumber(TITRAQ_PREFDARKBLUE, pPrefpanel->getDark()->blue());
+ 
+     // Dim the lights if no RPC transports are available
+     if (this->isOpen())
+         m_pSyncact->setEnabled(m_pPrefs->getBool(TITRAQ_PREFCORBON, TITRAQ_DEFCORBON)
+             | m_pPrefs->getBool(TITRAQ_PREFSOAPON, TITRAQ_DEFSOAPON));
+     else
+         m_pSyncact->setEnabled(false);
+ 
+     // Get the selected style which can be more complicated due to mapping...
+     if (pPrefpanel->getStyle() == TITRAQ_STRCDE) {
+         m_pPrefs->setNumber(TITRAQ_PREFSTYLE, TITRAQ_STYLECDE);
+         qApp->setStyle(new QCDEStyle);
+     }
+     else if (pPrefpanel->getStyle() == TITRAQ_STRSGI) {
+         m_pPrefs->setNumber(TITRAQ_PREFSTYLE, TITRAQ_STYLESGI);
+         qApp->setStyle(new QSGIStyle);
+     }
+     else if (pPrefpanel->getStyle() == TITRAQ_STRMOTIF) {
+         m_pPrefs->setNumber(TITRAQ_PREFSTYLE, TITRAQ_STYLEMOTIF);
+         qApp->setStyle(new QMotifStyle);
+     }
+     else if (pPrefpanel->getStyle() == TITRAQ_STRMPLUS) {
+         m_pPrefs->setNumber(TITRAQ_PREFSTYLE, TITRAQ_STYLEMPLUS);
+         qApp->setStyle(new QMotifPlusStyle);
+     }
+     else if (pPrefpanel->getStyle() == TITRAQ_STRPLAT) {
+         m_pPrefs->setNumber(TITRAQ_PREFSTYLE, TITRAQ_STYLEPLAT);
+         qApp->setStyle(new QPlatinumStyle);
+     }
+     else if (pPrefpanel->getStyle() == TITRAQ_STRMSOFT) {
+         m_pPrefs->setNumber(TITRAQ_PREFSTYLE, TITRAQ_STYLEMSOFT);
+         qApp->setStyle(new QWindowsStyle);
+     }
+     else // My personal favourite ;-)
+         m_pPrefs->setNumber(TITRAQ_PREFSTYLE, TITRAQ_STYLECDE);
+ }


ossp-pkg/as/as-gui/as_stub.idl -> 1.6

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,57 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  as_stub.idl: OMG IDL
+ //
+ 
+ struct Astuple {
+     string szUser;
+     string szGuid;
+     string szCrc;
+     string szRev;
+     string szDate;
+     string szStart;
+     string szFinish;
+     string szAmount;
+ //    unsigned long nRev;
+ //    unsigned long nDate;
+ //    unsigned long nStart;
+ //    unsigned long nFinish;
+ //    unsigned long nAmount;
+     string szTask;
+     string szRemark;
+ };
+ 
+ interface Account {
+     void Log(in Astuple Msgline);
+     string Dump();
+ };
+ 
+ interface Asdatabase {
+     Account Open(in string Filename);
+ };


ossp-pkg/as/as-gui/as_table.cpp -> 1.24

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,215 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  titable.cpp: ISO C++ implementation
+ //
+ 
+ #include <qheader.h>
+ 
+ #include "as_const.h"
+ #include "as_table.h"
+ 
+ 
+ // Implements an event filter for catching header double click events
+ bool TiTable::eventFilter(QObject *pObject, QEvent *pEvent)
+ {
+     if (pObject == horizontalHeader() && pEvent->type() == QEvent::MouseButtonDblClick)
+         return true;
+     if (pEvent->type() == QEvent::MouseButtonPress &&   // Ignore mid, right clicks
+         ((QMouseEvent *)pEvent)->button() == QMouseEvent::RightButton ||
+         ((QMouseEvent *)pEvent)->button() == QMouseEvent::MidButton)
+         return true;
+     else if (pEvent->type() == QEvent::KeyPress) {
+         if (((QKeyEvent *)pEvent)->key() == Qt::Key_Tab) { // Handle tab key
+             if (this->getEdition() >= 0) {
+                 int nIter = 1; // Logic to skip invisible or read only columns
+                 while (columnWidth((currentColumn() + nIter) % TITRAQ_IDXTAIL) <= 0
+                     || isColumnReadOnly((currentColumn() + nIter) % TITRAQ_IDXTAIL))
+                     nIter++;
+ 
+                 // Advance the column or both row and column possibly
+                 int nColadvance = ((currentColumn() + nIter) % TITRAQ_IDXTAIL);
+                 if ((currentColumn() + nIter) >= TITRAQ_IDXTAIL)
+                     this->setCurrentCell(currentRow() + 1, nColadvance);
+                 else
+                     this->setCurrentCell(currentRow(), nColadvance);
+                 this->setReadOnly(false);
+                 this->editCell(currentRow(), currentColumn());
+                 this->setEdition(currentColumn());
+                 this->setReadOnly(true);
+             }
+             return true; // Handle the tab key event and cancel its progress
+         }
+         else if (((QKeyEvent *)pEvent)->key() == Qt::Key_Backtab) { // Handle shift tab key
+             if (this->getEdition() >= 0) {
+                 int nIter = 1; // Logic to skip invisible or read only columns
+                 while (columnWidth((currentColumn() - nIter + TITRAQ_IDXTAIL) % TITRAQ_IDXTAIL) <= 0
+                     || isColumnReadOnly((currentColumn() - nIter + TITRAQ_IDXTAIL) % TITRAQ_IDXTAIL))
+                     nIter++;
+ 
+                 // Advance the column or both row and column possibly
+                 int nColadvance = (currentColumn() - nIter + TITRAQ_IDXTAIL) % TITRAQ_IDXTAIL;
+                 if ((currentColumn() - nIter) < 0)
+                     this->setCurrentCell(currentRow() - 1, nColadvance);
+                 else
+                     this->setCurrentCell(currentRow(), nColadvance);
+                 this->setReadOnly(false);
+                 this->editCell(currentRow(), currentColumn());
+                 this->setEdition(currentColumn());
+                 this->setReadOnly(true);
+             }
+             return true; // Handle the shift tab key event and cancel its progress
+         }
+         else if (((QKeyEvent *)pEvent)->key() == Qt::Key_Up && this->getEdition() >= 0) // Handle up key
+             return true;                                            // Capture
+         else if (((QKeyEvent *)pEvent)->key() == Qt::Key_Down && this->getEdition() >= 0) // Handle down key
+             return true;                                            // Capture
+         else if (((QKeyEvent *)pEvent)->key() == Qt::Key_Escape)    // Handle escape key
+             this->setEdition();
+ 
+         // Forward incompletely handled key events
+         return QTable::eventFilter(pObject, pEvent);
+     }
+     else // Default behaviour is to pass the event onwards
+         return QTable::eventFilter(pObject, pEvent);
+ }
+ 
+ // Overridden member hack to allow externally connected control
+ // widgets to influence dirty or clean state of table data
+ void TiTable::setText(int nRow, int nCol, const QString &nText)
+ {
+     if (this->numRows() > 0) {
+         // If a cell was edited, emit a signal indicating so
+         // We can't rely on valueChanged for unknown reasons
+         if (nText != this->text(nRow, nCol) && nCol != TITRAQ_IDXLINE)
+             emit textEdited(nRow, nCol);
+ 
+         QTable::setText(nRow, nCol, nText);
+     }
+ }
+ 
+ // Overridden member hack to allow externally connected control
+ // widgets to influence dirty or clean state of table data
+ void TiTable::sortColumn(int nCol, bool bAscend, bool bWhole)
+ {
+     // Guard against a repeat sort behaviour
+     if (nCol == this->getSortcol() && bAscend == this->getSortdir())
+         this->setSortdir(!bAscend);
+     else
+         this->setSortdir(bAscend);
+ 
+     this->setSortcol(nCol);
+     QTable::sortColumn(nCol, this->getSortdir(), true);
+ 
+ //    // Announce sorting policy with multiple selections
+ //    QTableSelection Testsel = this->selection(this->currentSelection());
+ //    if (Testsel.topRow() != Testsel.bottomRow())
+ //        m_pStatbar->message(trUtf8("Multiple selections dropped when sorting"), 4000);
+ 
+     // Move and display the selection highlight
+     this->removeSelection(this->currentSelection());
+     this->selectRow(this->currentRow());
+     this->ensureCellVisible(this->currentRow(), 0);
+ 
+     // Write nonsaving line numbers for all rows
+     for (int nIter = this->numRows() - 1; nIter >= 0; nIter--)
+         this->setText(nIter, TITRAQ_IDXLINE, QString::number(nIter).rightJustify(4, QChar('0')));
+ }
+ 
+ // Overriden member to render edge rows differently according to a sort key
+ void TiTable::paintCell(QPainter *pPainter, int nRow, int nCol, const QRect &Recto, bool bSelect, const QColorGroup &Colgroup)
+ {
+     QColorGroup Cgroup(Colgroup);
+     int nRed, nGreen, nBlue;
+ 
+     nRed = m_pTiprefs->getNumber(TITRAQ_PREFLIGHTRED, TITRAQ_DEFLIGHTRED);
+     nGreen = m_pTiprefs->getNumber(TITRAQ_PREFLIGHTGREEN, TITRAQ_DEFLIGHTGREEN);
+     nBlue = m_pTiprefs->getNumber(TITRAQ_PREFLIGHTBLUE, TITRAQ_DEFLIGHTBLUE);
+     QColor Bright = QColor(nRed, nGreen, nBlue);
+     nRed = m_pTiprefs->getNumber(TITRAQ_PREFDARKRED, TITRAQ_DEFDARKRED);
+     nGreen = m_pTiprefs->getNumber(TITRAQ_PREFDARKGREEN, TITRAQ_DEFDARKGREEN);
+     nBlue = m_pTiprefs->getNumber(TITRAQ_PREFDARKBLUE, TITRAQ_DEFDARKBLUE);
+     QColor Dark = QColor(nRed, nGreen, nBlue);
+ 
+     // Alternate color for nonmatching sort keys
+     QString Cur = this->text(nRow, this->getSortcol());
+     QString Las = this->text(nRow - 1, this->getSortcol());
+ 
+     // A nice cascade of conditions providing a linewise base color test and set
+     // The algorythm:
+     //   1  Determine if the current row's index key differs from the former one
+     //   2a If they are the same, then current row should have the same color
+     //   2b If they are different, then current row should have an alt color
+     //   3  Store information about which color we chose for the current row
+     if (!Cur.isNull() && !Las.isNull() && Cur == Las) { // Set the base color conditionally
+         if (this->text(nRow - 1, TITRAQ_IDXSTATUS).at(TITRAQ_IDXSTATCOLOR) == QChar(TITRAQ_BRIGHT)) {
+             Cgroup.setColor(QColorGroup::Base, Bright); // Bright
+             if (this->text(nRow, TITRAQ_IDXSTATUS).at(TITRAQ_IDXSTATCOLOR) != QChar(TITRAQ_BRIGHT))
+                 this->setText(nRow, TITRAQ_IDXSTATUS, this->text(nRow, TITRAQ_IDXSTATUS).replace(TITRAQ_IDXSTATCOLOR, sizeof(char), QChar(TITRAQ_BRIGHT)));
+         }
+         else {
+             Cgroup.setColor(QColorGroup::Base, Dark);   // Dark
+             if (this->text(nRow, TITRAQ_IDXSTATUS).at(TITRAQ_IDXSTATCOLOR) != QChar(TITRAQ_DARK))
+                 this->setText(nRow, TITRAQ_IDXSTATUS, this->text(nRow, TITRAQ_IDXSTATUS).replace(TITRAQ_IDXSTATCOLOR, sizeof(char), QChar(TITRAQ_DARK)));
+         }
+     }
+     else {
+         if (this->text(nRow - 1, TITRAQ_IDXSTATUS).at(TITRAQ_IDXSTATCOLOR) == QChar(TITRAQ_BRIGHT)) {
+             Cgroup.setColor(QColorGroup::Base, Dark);   // Dark
+             if (this->text(nRow, TITRAQ_IDXSTATUS).at(TITRAQ_IDXSTATCOLOR) != QChar(TITRAQ_DARK))
+                 this->setText(nRow, TITRAQ_IDXSTATUS, this->text(nRow, TITRAQ_IDXSTATUS).replace(TITRAQ_IDXSTATCOLOR, sizeof(char), QChar(TITRAQ_DARK)));
+         }
+         else {
+             Cgroup.setColor(QColorGroup::Base, Bright); // Bright
+             if (this->text(nRow, TITRAQ_IDXSTATUS).at(TITRAQ_IDXSTATCOLOR) != QChar(TITRAQ_BRIGHT))
+                 this->setText(nRow, TITRAQ_IDXSTATUS, this->text(nRow, TITRAQ_IDXSTATUS).replace(TITRAQ_IDXSTATCOLOR, sizeof(char), QChar(TITRAQ_BRIGHT)));
+         }
+     }
+ 
+     QTable::paintCell(pPainter, nRow, nCol, Recto, bSelect, Cgroup);
+ };
+ 
+ // Blah
+ void TiTable::activateNextCell(void)
+ {
+     int nIter = 1; // Logic to skip invisible or read only columns
+     while (columnWidth((currentColumn() + nIter) % TITRAQ_IDXTAIL) <= 0
+         || isColumnReadOnly((currentColumn() + nIter) % TITRAQ_IDXTAIL))
+         nIter++;
+ 
+     // Advance the column or both row and column possibly
+     int nColadvance = ((currentColumn() + nIter) % TITRAQ_IDXTAIL);
+     if ((currentColumn() + nIter) >= TITRAQ_IDXTAIL)
+         this->setCurrentCell(currentRow() + 1, nColadvance);
+     else
+         this->setCurrentCell(currentRow(), nColadvance);
+     this->setReadOnly(false);
+     this->editCell(currentRow(), currentColumn());
+     this->setEdition(currentColumn());
+     this->setReadOnly(true);
+ }


ossp-pkg/as/as-gui/as_table.h -> 1.16

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,96 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  titable.h: ISO C++ interface
+ //
+ 
+ #ifndef TITABLE_H
+ #define TITABLE_H
+ 
+ #include <qtable.h>
+ 
+ #include "as_pref.h"
+ 
+ 
+ class TiTable : public QTable
+ {
+     Q_OBJECT
+ 
+ private:
+     int  m_nSortcol;    // To track current sort column
+     int  m_bSortdir;    // To track current sort direction
+     bool m_bDirt;       // To track dirty and clean states
+     Preferences *m_pTiprefs; // To read current color values
+ 
+ public:
+     // Try to match QTable's default constructor with an initializer list
+     TiTable(Preferences *pPrefs, QWidget *pParent = 0, const char *szName = 0) : QTable(pParent, szName)
+     {
+         this->setSortcol(0);
+         this->setSortdir(true);
+         this->setDirty(false);
+         this->setEdition(); // Reset edition state
+         m_pTiprefs = pPrefs;
+         horizontalHeader()->installEventFilter(this);
+     };
+ 
+     bool eventFilter(QObject *, QEvent *);
+ 
+     // Standard members
+     int m_nEdit;    // To track edition state
+ 
+     // Accessor methods
+     const bool isDirty(void) {return m_bDirt;};             // Check for changed state danger
+     void setDirty(bool bDirty = true) {m_bDirt = bDirty;};  // Clean or dirty
+     const int getEdition(void) {return m_nEdit;};           // Which edited column was confirmed
+     void setEdition(const int nEdit = -1) {m_nEdit = nEdit;};   // Set edition status
+     const int getSortcol(void) {return m_nSortcol;};
+     void setSortcol(const int nColin) {m_nSortcol = nColin;};
+     const bool getSortdir(void) {return m_bSortdir;};
+     void setSortdir(const bool bDirection) {m_bSortdir = bDirection;};
+ 
+     // Overridden accessors
+     void setText(int, int, const QString &);
+     void sortColumn(int nCol, bool bAscend = true, bool bWhole = true);
+ //    virtual QTableItem *item(int nRow, int nCol) const {QTable::item(nRow, nCol);};
+ 
+     // Deny a cell special handling of the focus rectangle
+     // by overriding class QTable's paintFocus method
+     virtual void paintFocus(QPainter *, const QRect &) {};
+ 
+     // Override for special linewise shading according to sort key
+     virtual void paintCell(QPainter *, int, int, const QRect &, bool, const QColorGroup &);
+ 
+     // For special focus handling on return key in edit mode
+     virtual void activateNextCell(void);
+ 
+ signals:
+     void textEdited(int, int);  // A cell was edited and data was modified
+ };
+ 
+ #endif // TITABLE_H


ossp-pkg/as/as-gui/as_tableitem.h -> 1.6

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,49 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  titabitem.h: ISO C++ interface
+ //
+ 
+ #ifndef RTTABLEITEM_H
+ #define RTTABLEITEM_H
+ 
+ #include <qtable.h>
+ 
+ 
+ class RtTableItem : public QTableItem
+ {
+ public:
+     RtTableItem(QTable *pTable, EditType eType, const QString &Text) : QTableItem(pTable, eType, Text) {m_nOwnalign = AlignRight | AlignVCenter;};
+     void setAlignment(int nAlign = AlignRight | AlignVCenter) {m_nOwnalign = nAlign;};
+     int alignment() const {return m_nOwnalign;};
+ 
+ private:
+     int m_nOwnalign;
+ };
+ 
+ #endif // RTTABLEITEM_H


ossp-pkg/as/as-gui/as_user.cpp -> 1.2

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,85 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  as_user.cpp: ISO C++ implementation
+ //
+ 
+ // For username research
+ #if defined(Q_OS_WIN32)
+ #include <lmcons.h>
+ #else
+ #include <pwd.h>
+ #include <unistd.h>
+ #endif // #if defined(Q_OS_WIN32)
+ 
+ // Local class definitions
+ #include "as_user.h"
+ #include "as_const.h"
+ 
+ 
+ // Constructor
+ User::User(void)
+ {
+ // Start the show by getting the username
+ #if defined(Q_OS_WIN32)
+     {
+         DWORD dwWinusernamesize = sizeof(dwWinusernamesize);
+ #if defined(UNICODE)
+         TCHAR szWinusername[UNLEN + 1];   // UNLEN is defined in lmcons.h
+         GetUserName(szWinusername, &dwWinusernamesize);
+         m_Name = qt_winQString(szWinusername);
+ #else   // Not unicode
+         char szWinusername[UNLEN + 1];    // UNLEN is defined in lmcons.h
+         GetUserNameA(szWinusername, &dwWinusernamesize);
+         this->setName(szWinusername);
+     }
+ #endif  // #if defined(UNICODE)
+ #else   // Not windows
+     {
+ //#include <stdio.h>
+ //        char *szUser = NULL;
+ //        szUser = cuserid();
+ //        m_Name = QString::fromLocal8Bit(szUser);
+ 
+         // Get the user name from the environment
+         char *szLogin = getenv(TITRAQ_ENVUSERNAME);
+         if (szLogin == NULL)        // Is the user name in the environment?
+             szLogin = getlogin();   // No, so fetch it from the system
+ 
+         // Get the home directory from the environment
+         char *szHomedir = getenv(TITRAQ_ENVHOMEDIR);
+         if (szHomedir == NULL) {    // Is the home directory in the environment?
+             passwd *pUserpwd = getpwnam(szLogin); // No, so fetch it from the system
+             szHomedir = pUserpwd->pw_dir;         // Drill into the password struct
+         }
+ 
+         this->setName(szLogin);
+         this->setHomedir(szHomedir);
+     }
+ #endif  // #if defined(Q_OS_WIN32)
+ }


ossp-pkg/as/as-gui/as_user.h -> 1.2

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,60 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  as_user.h: ISO C++ interface
+ //
+ 
+ #ifndef USER_H
+ #define USER_H
+ 
+ // System headers
+ #include <string>
+ 
+ using std::string;
+ 
+ 
+ class User
+ {
+ private:
+     string m_Name;      // Holds the user name
+     string m_Homedir;   // Holds the user homedir
+ 
+ public:
+     User(void);
+ 
+     // Accessors
+     string getName(void) const {return m_Name;};
+     string getHomedir(void) const {return m_Homedir;};
+ 
+ protected:
+     // Accessors
+     void setName(const string Namein) {m_Name = Namein;};
+     void setHomedir(const string Dirin) {m_Homedir = Dirin;};
+ };
+ 
+ #endif // USER_H


ossp-pkg/as/as-gui/as_uuid.cpp -> 1.11

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,145 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  as_uuid.cpp: ISO C++ implementation
+ //
+ 
+ // System headers
+ #include <string>
+ #include <sys/socket.h>
+ 
+ // Local headers
+ #include "as_uuid.h"
+ #include "as_rand.h"
+ 
+ // All of these are for detecting
+ // the MAC address in setMac()
+ #ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif // HAVE_UNISTD_H
+ #ifdef HAVE_SYS_SOCKIO_H
+ #include <sys/sockio.h>
+ #endif // HAVE_SYS_SOCKIO_H
+ #ifdef HAVE_NET_IF_H
+ #include <net/if.h>
+ #endif // HAVE_NET_IF_H
+ #ifdef HAVE_NETINET_IN_H
+ #include <netinet/in.h>
+ #endif // HAVE_NETINET_IN_H
+ 
+ 
+ namespace AS {
+ 
+ //
+ // Generate a DCE standard UUID
+ //
+ void Uuid::genId(void)
+ {
+     Rand Temprand;                  // For random numbers
+     unsigned char szChardata[16];   // Intermediate data
+ 
+     // Generate random data and fill in our UUID member fields with it
+     Temprand.genData(szChardata, sizeof(szChardata));
+     setId(szChardata);
+ 
+     // Since we don't just want random data, lets take some clock sequences also
+     this->clock_seq = (this->clock_seq & 0x3FFF) | 0x8000;
+     this->time_hi_and_version = (this->time_hi_and_version & 0x0FFF) | 0x4000;
+ 
+     // In every case that we can, set the node ID to the real MAC address
+     setMac(this->node);
+ 
+     setString(); // Set the human readable string
+ }
+ 
+ //
+ // Helper method to set the UUID private member data
+ //
+ void Uuid::setId(const unsigned char *pkucData)
+ {
+     const U8 *pOctet = pkucData;
+     U32       Tmpdat;
+ 
+     Tmpdat = *pOctet++; // Tmpdat is our iterator
+ 
+     // Copy data chunks one octet at a time
+     Tmpdat = (Tmpdat << 8) | *pOctet++;
+     Tmpdat = (Tmpdat << 8) | *pOctet++;
+     Tmpdat = (Tmpdat << 8) | *pOctet++;
+     this->time_low = Tmpdat;
+ 
+     Tmpdat = *pOctet++;
+     Tmpdat = (Tmpdat << 8) | *pOctet++;
+     this->time_mid = Tmpdat;
+ 
+     Tmpdat = *pOctet++;
+     Tmpdat = (Tmpdat << 8) | *pOctet++;
+     this->time_hi_and_version = Tmpdat;
+ 
+     Tmpdat = *pOctet++;
+     Tmpdat = (Tmpdat << 8) | *pOctet++;
+     this->clock_seq = Tmpdat;
+ 
+     // Put in the MAC address
+     memcpy(this->node, pOctet, 6);
+ }
+ 
+ //
+ // Helper method to set up the MAC address node ID member data
+ //
+ int Uuid::setMac(unsigned char *pucNode)
+ {
+     return 0;
+ }
+ 
+ //
+ // Returns a formatted representation of a DCE standard UUID
+ //
+ std::string Uuid::getString(void)
+ {
+     return m_Fmtstr;
+ }
+ 
+ //
+ // Helper method to set the private formatted
+ // representation of a DCE standard UUID
+ //
+ void Uuid::setString(void)
+ {
+     char szTemp[48];    // To perform intermediate manipulation
+ 
+     sprintf(szTemp, // The DCE standard UUID format
+         "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
+         this->time_low, this->time_mid, this->time_hi_and_version,
+         this->clock_seq >> 8, this->clock_seq & 0xFF,
+         node[0], node[1], node[2],
+         node[3], node[4], node[5]);
+ 
+     m_Fmtstr = szTemp;  // Finally copy the temporary to our object
+ }
+ } // namespace AS


ossp-pkg/as/as-gui/as_uuid.h -> 1.9

*** /dev/null    Sat Nov 23 05:08:00 2024
--- -    Sat Nov 23 05:09:21 2024
***************
*** 0 ****
--- 1,67 ----
+ //
+ //  OSSP asgui - Accounting system graphical user interface
+ //  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
+ //  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
+ //
+ //  This file is part of OSSP asgui, an accounting system graphical user
+ //  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.
+ //
+ //  Permission to use, copy, modify, and distribute this software for
+ //  any purpose with or without fee is hereby granted, provided that
+ //  the above copyright notice and this permission notice appear in all
+ //  copies.
+ //
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ //  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ //  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ //  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ //  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ //  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ //  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ //  SUCH DAMAGE.
+ //
+ //  as_uuid.h: ISO C++ interface
+ //
+ 
+ #ifndef UUIDGEN_H
+ #define UUIDGEN_H
+ 
+ #include <string>
+ 
+ #include "as_gui.h"
+ 
+ 
+ namespace AS {
+ 
+ //
+ // A DCE standard UUID, can generate (multiple)
+ // IDs and format them for a printed output
+ //
+ class Uuid
+ {
+ private:
+     std::string m_Fmtstr;               // Human readable format
+     U32 time_low;                       //
+     U16 time_mid;                       // Fields according to
+     U16 time_hi_and_version;            // the IETF specification
+     U16 clock_seq;                      // draft-mealling-uuid-urn-00
+     U8  node[6];                        //
+ 
+ public:
+     void genId(void);                   // Generate an UUID
+     void setString(void);               // Sets the formatted representation
+     std::string getString(void);        // Return a formatted representation
+ 
+ private:
+     void setId(const unsigned char *);  // Helper method to set data members
+     int setMac(unsigned char *);        // Helper method to set MAC node ID
+ };
+ } // namespace AS
+ 
+ #endif // UUIDGEN_H


ossp-pkg/as/as-gui/configure.in 1.23 -> 1.24

--- configure.in 2003/11/17 19:03:50     1.23
+++ configure.in 2003/11/20 11:31:20     1.24
@@ -1,9 +1,9 @@
 ##
 ##  OSSP asgui - Accounting system graphical user interface
 ##  Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/)
-##  Copyright (c) 2002-2003 Cable & Wireless Deutschland (http://www.cw.com/de/)
 ##  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
 ##  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+##  Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH
 ##
 ##  This file is part of OSSP asgui, an accounting system graphical user
 ##  interface which can be found at http://www.ossp.org/pkg/tool/asgui/.

CVSTrac 2.0.1