BALL 1.5.0
genericControl.h
Go to the documentation of this file.
1// -*- Mode: C++; tab-width: 2; -*-
2// vi: set ts=2:
3//
4// $Id: genericControl.h,v 1.14.16.1 2007/03/25 21:26:20 oliver Exp $
5
6#ifndef BALL_VIEW_WIDGETS_GENERICCONTROL_H
7#define BALL_VIEW_WIDGETS_GENERICCONTROL_H
8
9#ifndef BALL_VIEW_WIDGETS_DOCKWIDGET_H
11#endif
12
13#include <QtGui/QKeyEvent>
14#include <QtWidgets/QTreeWidget>
15#include <QtWidgets/QTreeWidgetItem>
16#include <QtCore/QList>
17
18namespace BALL
19{
20 namespace VIEW
21 {
26 : public QTreeWidget
27 {
28 public:
29
31 TreeWidget(QWidget* parent = 0);
32
34 void selectItems(const list<QTreeWidgetItem*>& items);
35 };
36
51 : public DockWidget
52 {
53 Q_OBJECT
54
55 public:
56
58 typedef QList<QTreeWidgetItem*> ItemList;
59
63
67
68 //@}
72
81 GenericControl(QWidget* parent = 0, const char* name = 0);
82
85 virtual ~GenericControl();
86
87 ItemList getSelectedItems();
88
90 QTreeWidgetItem* addRow(const QStringList& entries);
91
98 virtual void onNotify(Message *message);
99
107 virtual void initializeWidget(MainControl& main_control);
108
110
111 public Q_SLOTS:
112
114 virtual void deleteCurrentItems(){};
115
116 protected Q_SLOTS:
117
119
120 /*_ Call deselectOtherControls_ if a selection exists.
121 Call this Method in the derived Classes in their updateSelection()
122 */
123 virtual void updateSelection();
124
125 virtual void onItemClicked(QTreeWidgetItem*, int) {};
126
127 protected:
128
129 virtual void removeItem_(QTreeWidgetItem* item);
130
134 };
135
136} } // namespaces
137#endif // BALL_VIEW_WIDGETS_GENERICCONTROL_H
#define BALL_EMBEDDABLE(TYPE, BASE)
Definition: embeddable.h:31
Definition: constants.h:13
TreeWidget(QWidget *parent=0)
void selectItems(const list< QTreeWidgetItem * > &items)
virtual void removeItem_(QTreeWidgetItem *item)
virtual void deselectOtherControls_()
virtual void updateSelection()
QTreeWidgetItem * context_item_
virtual void onItemClicked(QTreeWidgetItem *, int)
QList< QTreeWidgetItem * > ItemList
typedef
#define BALL_VIEW_EXPORT
Definition: COMMON/global.h:52