tputils.h

Go to the documentation of this file.
00001 // OSB library ************************************************ -*- C++ -*-
00006 /*
00007   AUTHOR(S): Stephan Broennimann (vb)
00008 
00009   RCS information
00010    $Name: OSB_060808 $
00011    $Revision: 1.19 $
00012 
00013   License
00014    OSB rating and billing library for communication networks
00015    Copyright (C) 2004, 2005, 2006  OSB systems
00016 
00017    This file may be distributed and/or modify under the terms of the
00018    GNU General Public License (GPL) as published by the Free Software
00019    Foundation which is provided in the file LICENSE.GPL included in the
00020    packaging of this file.
00021 
00022    The file is distributed in the hope that it will be useful, but WITHOUT
00023    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00024    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00025    for more details.
00026 
00027    Holders of a OSB Commercial License may use this file under the terms
00028    and conditions of this commercial license.
00029  */
00030 #ifndef _TPUTILS_H_
00031 #define _TPUTILS_H_
00032 
00033 // ************************************************************************
00034 // included header files
00035 // + standard includes
00036 
00037 // + libraries
00038 #include <qwidget.h>
00039 #include <qcolor.h>
00040 
00041 // + local headers
00042 #include "tautils.h"
00043 
00044 // ************************************************************************
00045 // class declarations
00046 namespace OSB_LIB {
00047     class DayClass;
00048     class TpsVersion;
00049 }
00050 
00051 // ************************************************************************
00052 // namespace extensions
00053 namespace OSB_GUI {
00054 
00055 // ************************************************************************
00056 // class definitions
00061     class DcStatusProxy : public ToCfgStatusProxy {
00062     public:
00064         DcStatusProxy(
00065             OSB_LIB::DayClass& dc
00066         );
00067     private:
00069         DcStatusProxy& operator=(const DcStatusProxy&);
00070     public:
00072         OSB_LIB::CfgStatus status() const;
00074         void setStatus(
00075             OSB_LIB::CfgStatus  newStatus,
00076             OSB_LIB::OsbErrors& errors
00077         );
00078     private:
00080         OSB_LIB::DayClass& dc_;
00081     };                                  // class DcStatusProxy
00082 
00087     class TpsVsStatusProxy : public ToCfgTsStatusProxy {
00088     public:
00094         explicit TpsVsStatusProxy(
00095             OSB_LIB::TpsVersion& tpsVs
00096         );
00098         TpsVsStatusProxy& operator=(const TpsVsStatusProxy&);
00099     public:
00101         OSB_LIB::ToCfgTsBase& toCfgTs();
00106         void setStatus(
00107             OSB_LIB::CfgStatus  newStatus,
00108             OSB_LIB::OsbErrors& errors
00109         );
00110         // documentation from base
00111         bool setReleaseTs(
00112             const OSB_LIB::DateTime&  ts,
00113                   OSB_LIB::OsbErrors& errors
00114         );
00115     private:
00117         OSB_LIB::TpsVersion& tpsVs_;
00118     };                                  // class TpsVsStatusProxy
00119 
00125     class TpColor : public QWidget {
00126         Q_OBJECT                        // for vi ->;
00127     public:
00129         explicit TpColor(
00130                   QWidget* parent,
00131             const char*    name   = "tpColor_",
00132                   WFlags   fl     = 0
00133         );
00135         TpColor(
00136             const QColor&  color,
00137                   QWidget* parent,
00138             const char*    name   = "tpColor_",
00139                   WFlags   fl     = 0
00140         );
00142         const QColor& color() const;
00144         void setColor(const QColor& color);
00145     public slots:
00147         void selectColor();
00148     private:                            // override virtuals from base
00150         void paintEvent(QPaintEvent*);
00152         void mouseReleaseEvent(QMouseEvent* e);
00157         void keyPressEvent(QKeyEvent* e);
00158     signals:
00160         void sigSelect();
00161     };                                  // class TpColor
00162 }                                       // namespace OSB_GUI
00163 #endif                                  // #ifndef _TPUTILS_H_

Generated on Sat Sep 2 14:17:37 2006 for OSB Library by  doxygen 1.4.7