dlgstreaminfo.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.10 $
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 _DLGSTREAMINFO_H_
00031 #define _DLGSTREAMINFO_H_
00032 
00033 // ************************************************************************
00034 // included header files
00035 // + standard includes
00036 #include <set>
00037 
00038 // + libraries
00039 #include <osbid.h>
00040 
00041 // + local headers
00042 #include "streaminfogui.h"
00043 
00044 // + class declarations
00045 namespace OSB_LIB {
00046     class RecordStreamInfo;
00047     class CaStreamResult;
00048 }
00049 
00050 class QFrame;
00051 class QGridLayout;
00052 class QLabel;
00053 class QSpacerItem;
00054 
00055 // ************************************************************************
00056 // namespace extensions
00057 namespace OSB_GUI {
00058 
00059 // ************************************************************************
00060 // forward declarations
00061     class StreamCaWidget;
00062 
00063 // ************************************************************************
00064 // type definitions
00065 
00066 // ************************************************************************
00067 // class definitions
00071     class DlgStreamInfo : public StreamInfoGui {
00072         Q_OBJECT                        // for vim ->;
00073     public:
00075         explicit DlgStreamInfo(
00076                   QWidget* parent = 0,
00077             const char*    name   = 0,
00078                   bool     modal  = false,
00079                   WFlags   flags  = 0
00080         );
00081     public:
00083         void languageChange();
00084 
00092         int exec(
00093             const OSB_LIB::RecordStreamInfo& rsInfo,
00094             const OSB_LIB::CaStreamResult&   caRes
00095         );
00096 
00103         void show(
00104             const OSB_LIB::RecordStreamInfo& rsInfo,
00105             const OSB_LIB::CaStreamResult&   caRes
00106         );
00107 
00114         bool showCaPage();
00115 
00121         void done(int r);
00122 
00128         const OSB_LIB::Id<OSB_LIB::RecordStreamInfo> rsId() const
00129         {
00130             return rsId_;
00131         }
00132 
00133     signals:
00139         void sigDone(const DlgStreamInfo* dlg);
00140     private:
00142         void setup(
00143             const OSB_LIB::RecordStreamInfo& rsInfo,
00144             const OSB_LIB::CaStreamResult&   caRes
00145         );
00146     private:
00148         OSB_LIB::Id<OSB_LIB::RecordStreamInfo> rsId_;
00150         StreamCaWidget* caResult_;
00151     };                                  // class DlgStreamInfo
00152 
00156     class StreamCaWidget : public QWidget {
00157     public:
00159         explicit StreamCaWidget(
00160                   QWidget* parent,
00161             const char*    name   = "streamCa_",
00162                   WFlags   flags  = 0
00163         );
00164 
00165     public:
00167         void languageChange();
00169         void populate(
00170             const OSB_LIB::CaStreamResult& caRes
00171         );
00172 
00173     private:
00175         void build(
00176             const OSB_LIB::CaStreamResult& caRes
00177         );
00179         void addLabel(
00180             const std::string& text,
00181                   int          row,
00182                   int          col
00183         );
00184 
00185     private:
00187         QGridLayout* lo_;
00189         QLabel* tlPct_;
00191         QLabel* tlRecs_;
00193         QFrame* lineHead_;
00195         QLabel* tlOriginal_;
00197         QLabel* tlNumRecs_;
00198 
00200         std::set<QLabel*> labels_;
00201 
00203         QSpacerItem* spBottom_;
00204     };                                  // class StreamCaWidget
00205 }                                       // namespace OSB_GUI
00206 
00207 // ************************************************************************
00208 // inline definitions
00209 namespace OSB_GUI {
00210 }                                       // namespace OSB_GUI
00211 #endif                                  // #ifndef _DLGSTREAMINFO_H_

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