Loading...
Searching...
No Matches
genericControl.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
// $Id: genericControl.h,v 1.14.16.1 2007/03/25 21:26:20 oliver Exp $
#ifndef BALL_VIEW_WIDGETS_GENERICCONTROL_H
#define BALL_VIEW_WIDGETS_GENERICCONTROL_H
#ifndef BALL_VIEW_WIDGETS_DOCKWIDGET_H
# include <BALL/VIEW/WIDGETS/dockWidget.h>
#endif
#include <QtGui/QKeyEvent>
#include <QtWidgets/QTreeWidget>
#include <QtWidgets/QTreeWidgetItem>
#include <QtCore/QList>
namespace BALL
{
namespace VIEW
{
class TreeWidget
: public QTreeWidget
{
public:
TreeWidget(QWidget* parent = 0);
void selectItems(const list<QTreeWidgetItem*>& items);
};
class BALL_VIEW_EXPORT GenericControl
: public DockWidget
{
Q_OBJECT
public:
typedef QList<QTreeWidgetItem*> ItemList;
BALL_EMBEDDABLE(GenericControl,DockWidget)
//@}
//@{
GenericControl(QWidget* parent = 0, const char* name = 0);
virtual ~GenericControl();
ItemList getSelectedItems();
QTreeWidgetItem* addRow(const QStringList& entries);
virtual void onNotify(Message *message);
virtual void initializeWidget(MainControl& main_control);
public Q_SLOTS:
virtual void deleteCurrentItems(){};
protected Q_SLOTS:
virtual void deselectOtherControls_();
/*_ Call deselectOtherControls_ if a selection exists.
Call this Method in the derived Classes in their updateSelection()
*/
virtual void updateSelection();
virtual void onItemClicked(QTreeWidgetItem*, int) {};
protected:
virtual void removeItem_(QTreeWidgetItem* item);
QTreeWidgetItem* context_item_;
TreeWidget* listview;
bool checkable_;
};
} } // namespaces
#endif // BALL_VIEW_WIDGETS_GENERICCONTROL_H
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition COMMON/global.h:52
BALL::VIEW::DockWidget::DockWidget
DockWidget(QWidget *parent, const char *title=0)
Use this constructor!
BALL::VIEW::GenericControl::onNotify
virtual void onNotify(Message *message)
BALL::VIEW::GenericControl::removeItem_
virtual void removeItem_(QTreeWidgetItem *item)
BALL::VIEW::GenericControl::deselectOtherControls_
virtual void deselectOtherControls_()
BALL::VIEW::GenericControl::updateSelection
virtual void updateSelection()
BALL::VIEW::GenericControl::getSelectedItems
ItemList getSelectedItems()
BALL::VIEW::GenericControl::checkable_
bool checkable_
Definition genericControl.h:133
BALL::VIEW::GenericControl::context_item_
QTreeWidgetItem * context_item_
Definition genericControl.h:131
BALL::VIEW::GenericControl::deleteCurrentItems
virtual void deleteCurrentItems()
Called by if del is pressed.
Definition genericControl.h:114
BALL::VIEW::GenericControl::addRow
QTreeWidgetItem * addRow(const QStringList &entries)
BALL::VIEW::GenericControl::onItemClicked
virtual void onItemClicked(QTreeWidgetItem *, int)
Definition genericControl.h:125
BALL::VIEW::GenericControl::initializeWidget
virtual void initializeWidget(MainControl &main_control)
BALL::VIEW::GenericControl::ItemList
QList< QTreeWidgetItem * > ItemList
typedef
Definition genericControl.h:58
BALL::VIEW::GenericControl::GenericControl
GenericControl(QWidget *parent=0, const char *name=0)
BALL::VIEW::GenericControl::listview
TreeWidget * listview
Definition genericControl.h:132
BALL::VIEW::MainControl
Definition mainControl.h:118
BALL::VIEW::Message
Definition message.h:53
BALL::VIEW::TreeWidget
Definition genericControl.h:27
BALL::VIEW::TreeWidget::TreeWidget
TreeWidget(QWidget *parent=0)
BALL::VIEW::TreeWidget::selectItems
void selectItems(const list< QTreeWidgetItem * > &items)
QTreeWidgetItem
QTreeWidget
QWidget
dockWidget.h
BALL_EMBEDDABLE
#define BALL_EMBEDDABLE(TYPE, BASE)
Definition embeddable.h:31
BALL::VIEW
Definition constraints.h:35
BALL
Definition constants.h:13