UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
dbt_sel_dlg.hpp
1 /* dbt_sel_dlg.hpp */
2 /* $Id$ */
3 #ifndef __dbt_sel_dlg_hpp
4 #define __dbt_sel_dlg_hpp
5 
6 #include <ldb/dbtools.h>
7 
8 #include <hds_widgets/selection_dialog.hpp>
9 #include <hds_widgets/tree_selector_wid.hpp>
10 
12 namespace hds
13 {
16  {
17  Q_OBJECT
18 
19  public:
20 
21  using hds::SelectionDialog::operator();
22 
24  DbtSelDlg(QWidget *parent = 0, Qt::WindowFlags f = 0);
25 
27  DbtSelDlg(const QString &project,
28  dbNameStruct &dbfrom,
29  bool new_db_item = false,
30  QWidget *parent = 0,
31  Qt::WindowFlags f = 0);
32 
34  virtual ~DbtSelDlg();
35 
36 
39  int operator()(const QString &prj);
40 
43  int operator()(const dbNameStruct &dbns);
44 
47  int operator()(const QString &prj, const dbNameStruct &dbns);
48 
49 
53  virtual void update();
54 
55 
57  bool current(dbItem &dbi) const;
58 
61  void setCurrent(const dbItem &dbi);
62 
64  QString project() const {return m_project;}
65 
67  void setProject(const QString &project);
68 
70  const dbNameStruct& getNameStruct() const {return m_dbns;}
71 
73  void setNameStruct(const dbNameStruct &dbns);
74 
76  bool newDbItem() const {return m_new_db_item;}
77 
79  void newDbItem(bool new_db_item) {m_new_db_item = new_db_item;}
80 
81  protected:
82 
85 
87  QString m_project;
88 
91 
93  dbNameStruct m_dbns;
94 
96  void setup_gui(Qt::WindowFlags f);
97 
100 
102  const TreeSelectorWid& selWid() const {return *mp_sel_wid;}
103 
104  protected slots:
105 
107  void itemDoubleClickedSlot(QTreeWidgetItem *item, int column);
108  };
109 };
110 
111 #endif /* dbt_sel_dlg.hpp */
void setCurrent(const dbItem &dbi)
TreeSelectorWid * mp_sel_wid
Definition: dbt_sel_dlg.hpp:84
Definition: dbt_sel_dlg.hpp:15
Definition: tree_selector_wid.hpp:14
DbtSelDlg(QWidget *parent=0, Qt::WindowFlags f=0)
Definition: dbnamedefs.h:67
bool m_new_db_item
Definition: dbt_sel_dlg.hpp:90
void setNameStruct(const dbNameStruct &dbns)
QString project() const
Definition: dbt_sel_dlg.hpp:64
void newDbItem(bool new_db_item)
Definition: dbt_sel_dlg.hpp:79
void itemDoubleClickedSlot(QTreeWidgetItem *item, int column)
QString m_project
Definition: dbt_sel_dlg.hpp:87
Definition: selection_dialog.hpp:14
void setup_gui(Qt::WindowFlags f)
virtual void update()
bool newDbItem() const
Definition: dbt_sel_dlg.hpp:76
bool current(dbItem &dbi) const
const dbNameStruct & getNameStruct() const
Definition: dbt_sel_dlg.hpp:70
const TreeSelectorWid & selWid() const
Definition: dbt_sel_dlg.hpp:102
Definition: dbnamedefs.h:85
TreeSelectorWid & selWid()
Definition: dbt_sel_dlg.hpp:99
virtual ~DbtSelDlg()
void setProject(const QString &project)