00001
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef _SCSUTILS_H_
00031 #define _SCSUTILS_H_
00032
00033
00034
00035
00036
00037
00038 #include <osbid.h>
00039 #include <qlistview.h>
00040
00041
00042 #include "tautils.h"
00043 #include "ui/scsvsgui.h"
00044
00045
00046
00047 namespace OSB_LIB {
00048 class RatedService;
00049 class ServiceClass;
00050 class ScsVersion;
00051 }
00052
00053
00054
00055 namespace OSB_GUI {
00056
00057
00058
00059
00060
00061
00062
00063
00064
00069 class ScsVsStatusProxy : public ToCfgTsStatusProxy {
00070 public:
00076 explicit ScsVsStatusProxy(
00077 OSB_LIB::ScsVersion& scsVs
00078 );
00079 private:
00081 ScsVsStatusProxy& operator=(const ScsVsStatusProxy&);
00082 public:
00084 OSB_LIB::ToCfgTsBase& toCfgTs();
00089 void setStatus(
00090 OSB_LIB::CfgStatus newStatus,
00091 OSB_LIB::OsbErrors& errors
00092 );
00093
00094 bool setReleaseTs(
00095 const OSB_LIB::DateTime& ts,
00096 OSB_LIB::OsbErrors& errors
00097 );
00098 private:
00100 OSB_LIB::ScsVersion& scsVs_;
00101 };
00102
00106 class ScsConfig : public ScsConfigGui {
00107 Q_OBJECT
00108 public:
00110 class ScItem;
00112 class RsItem;
00113 public:
00115 explicit ScsConfig(
00116 QWidget* parent,
00117 const char* name = "scsConfig_",
00118 WFlags flags = 0
00119 );
00121 void languageChange();
00128 void display(
00129 const OSB_LIB::ScsVersion& scsVs,
00130 bool showOnly
00131 );
00137 void populate(
00138 OSB_LIB::ScsVersion* scsVs
00139 ) const;
00140 private:
00142 void arrangeWidgets(bool showOnly);
00143 private slots:
00145 void setPbs();
00147 void removeCfg();
00149 void addSc();
00151 void addRs();
00152 };
00153
00157 class ScsConfig::ScItem : public QListViewItem {
00158 private:
00160 typedef OSB_LIB::Id<OSB_LIB::ServiceClass> ScId;
00161 public:
00163 ScItem(
00164 QListView* parent,
00165 const OSB_LIB::ServiceClass& sc
00166 );
00168 const OSB_LIB::Id<OSB_LIB::ServiceClass> scId() const;
00169 private:
00171 int compare(
00172 QListViewItem* item,
00173 int col,
00174 bool asc
00175 ) const;
00176 private:
00178 ScId scId_;
00179 };
00180
00184 class ScsConfig::RsItem : public QListViewItem {
00185 private:
00187 typedef OSB_LIB::Id<OSB_LIB::RatedService> RsId;
00188 public:
00190 RsItem(
00191 QListView* parent,
00192 const OSB_LIB::RatedService& rs
00193 );
00195 RsItem(
00196 QListViewItem* parent,
00197 const OSB_LIB::RatedService& rs
00198 );
00200 const OSB_LIB::Id<OSB_LIB::RatedService> rsId() const;
00201 private:
00203 int compare(
00204 QListViewItem* item,
00205 int col,
00206 bool asc
00207 ) const;
00208 private:
00210 RsId rsId_;
00211 };
00212 }
00213
00214
00215
00216 namespace OSB_GUI {
00217 }
00218 #endif // #ifndef _SCSUTILS_H_