3 #ifndef __db_tree_wid_hpp
4 #define __db_tree_wid_hpp
6 #include <QTreeWidgetItem>
41 DbTreeWid(QWidget *parent = 0, Qt::WindowFlags f = 0);
66 const QString &project,
107 QTreeWidget*
ptw() {
return mp_tw;}
110 const QTreeWidget*
ptw()
const {
return mp_tw;}
120 virtual QTreeWidgetItem* newTreeWidgetItem(
const ItemType type,
122 QTreeWidgetItem *parent = NULL)
const;
129 QTreeWidgetItem*
projectItem(QTreeWidgetItem *item)
const;
135 QTreeWidgetItem*
projectItem(
const QString &project_str)
const;
144 int itemOptions(
const QTreeWidgetItem *item)
const;
147 void setItemOptions(QTreeWidgetItem *item,
const int &mask)
const;
150 virtual bool event(QEvent *ev);
155 QAction *mp_open_object_action;
156 QAction *mp_refresh_tree_action;
157 QAction *mp_expand_tree_action;
158 QAction *mp_collapse_tree_action;
159 QAction *mp_remove_object_action;
162 QMenu *mp_context_menu;
171 QString m_selected_project_str;
174 bool m_open_objects_flag;
177 bool m_remove_objects_flag;
180 void prepare_context_menu();
185 void openObjectFromContextMenu();
188 void openObjectFromDoubleClick(QTreeWidgetItem *item,
int column);
191 void removeObjectFromContextMenu();
Definition: db_tree_wid.hpp:25
const QPoint & contextMenuPos() const
Definition: db_tree_wid.hpp:113
virtual void refreshTree()
void setItemOptions(QTreeWidgetItem *item, const int &mask) const
Definition: db_tree_wid.hpp:16
virtual bool event(QEvent *ev)
virtual void expandTree()
void setRemoveObjectsMode(const bool mode)
virtual void collapseTree()
void itemChanged(const int type, const QString &project, const QString &name)
QString projectNameStr(QTreeWidgetItem *item) const
virtual void removeObject(QTreeWidgetItem *)
Definition: db_tree_wid.hpp:94
QTreeWidgetItem * projectItem(QTreeWidgetItem *item) const
Definition: db_tree_wid.hpp:26
virtual void changeCurrentItem(QTreeWidgetItem *, QTreeWidgetItem *)
Definition: db_tree_wid.hpp:100
Definition: db_tree_wid.hpp:29
Definition: db_tree_wid.hpp:37
ItemType
Definition: db_tree_wid.hpp:23
Definition: db_tree_wid.hpp:35
const QTreeWidget * ptw() const
Definition: db_tree_wid.hpp:110
QTreeWidget * ptw()
Definition: db_tree_wid.hpp:107
void setOpenObjectsMode(const bool mode)
DbTreeWid(QWidget *parent=0, Qt::WindowFlags f=0)
Definition: db_tree_wid.hpp:36
Definition: db_tree_wid.hpp:28
int itemOptions(const QTreeWidgetItem *item) const
void errorOccurred(const int &ec)
Definition: db_tree_wid.hpp:27
ItemOptions
Definition: db_tree_wid.hpp:33
virtual void showContextMenu(QPoint pos)
virtual void openObject(QTreeWidgetItem *)
Definition: db_tree_wid.hpp:90
void selectProject(const QString &project_str)