VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
bdiQPropTree.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2019 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
6 
10 
11 #pragma once
12 
13 
14 #include "bdiQPropTreeItem.h"
15 #include "bdiQPropTreeItemEdit.h"
16 #include "bdiQPropTreeItemCombo.h"
17 #include "bdiQPropTreeItemColor.h"
18 #include "bdiQPropTreeItemButton.h"
19 
20 #include <QTreeWidget>
21 #include <QWidget>
22 #include <QLabel>
23 
24 namespace makVrv
25 {
26  class bdiQPropTree;
27 
28 
32  class bdiQPropTreeContainer : public QWidget
33  {
34  public:
35  bdiQPropTreeContainer(QWidget* widget);
38 
39  virtual void onRefresh() {}
40  virtual void onRaiseChangedFlag() {}
41  virtual void initialize();
42  virtual bdiQPropTree* createProptree();
43  };
44 
45 
46 
47 
49  // bdiQPropTree window
51  class bdiQPropTree : public QTreeWidget
52  {
53  Q_OBJECT
54  // Construction
55  public:
56  bdiQPropTree(QWidget* parent);
57  virtual ~bdiQPropTree();
58 
59 
60  // Attributes/Operations
61  public:
62 
63  // Returns the root item of the tree
65 
66  // Insert a created bdiQPropTreeItem into the control next to the sibling
68 
69  // Delete an item and ALL its children
70  void DeleteItem(bdiQPropTreeItem* pItem);
71  void DeleteChildren(bdiQPropTreeItem* pItem);
72 
73  // Delete all items from the tree
74  void DeleteAllItems();
75 
76 
77  void RaiseChangedFlag();
79  int q = m_bChanged;
80  m_bChanged = 0;
81  return q;
82  }
83  void onRefresh();
84  void set_ready_for_refresh_logic(bool val);
86 
87  // overloaded from base class
88  virtual void setCurrentIndex(QTreeWidgetItem* i);
89  void replace_root_item(bdiQPropTreeItem* new_root);
90 
91  void drawRow(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const;
92 
93  public slots:
94  void itemClicked(QTreeWidgetItem* item, int c);
96 
97  protected:
98 
99  // TRUE to show info control
101 
102  // Height of the info control
104 
105  // Root level tree item
107 
109 
111 
112  public:
113  //
114  // functions used by bdiQPropTreeItem (you normally don't need to call these directly)
115  //
116 
117  protected:
118 
119  // Implementation
120  private:
121 
122  };
123 
124 }
virtual void onRefresh()
Definition: bdiQPropTree.h:39
int get_ready_for_refresh_logic()
Definition: bdiQPropTree.h:85
bdiQPropTreeItem * InsertSibling(bdiQPropTreeItem *pItem, bdiQPropTreeItem *pParent, bdiQPropTreeItem *pSib)
bdiQPropTreeContainer(QWidget *widget)
bdiQPropTreeItem * GetRootItem()
bool m_bChanged
Definition: bdiQPropTree.h:110
long m_nInfoHeight
Definition: bdiQPropTree.h:103
virtual void onRaiseChangedFlag()
Definition: bdiQPropTree.h:40
Contains bdiQPropTreeItemEdit class, general value editors.
bool m_bShowInfo
Definition: bdiQPropTree.h:100
void replace_root_item(bdiQPropTreeItem *new_root)
Definition: bdiQPropTreeItem.h:28
bdiQPropTreeItem * m_pRoot
Definition: bdiQPropTree.h:106
bdiQPropTree * m_proptree
Definition: bdiQPropTree.h:36
int GetAndClearChangedFlag()
Definition: bdiQPropTree.h:78
virtual bdiQPropTree * createProptree()
void drawRow(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
Contains bdiQPropTreeItemColor class.
Contains bdiQPropTreeItemCombo combo drop down class.
int m_ready_for_refresh_logic
Definition: bdiQPropTree.h:108
bdiQPropTree(QWidget *parent)
bdiQPropTree container window, adds the info box.
Definition: bdiQPropTree.h:32
virtual void setCurrentIndex(QTreeWidgetItem *i)
void DeleteItem(bdiQPropTreeItem *pItem)
void set_ready_for_refresh_logic(bool val)
Contains bdiQPropTreeItem class.
void DeleteChildren(bdiQPropTreeItem *pItem)
QLabel * m_infobox
Definition: bdiQPropTree.h:37
void currentItemChanged(QTreeWidgetItem *prev, QTreeWidgetItem *new_itm)
Definition: bdiQPropTree.h:51
void itemClicked(QTreeWidgetItem *item, int c)

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)