OpenStructure
build-dev-doc
stage
include
ost
gui
panels
panel_bar_widget_holder.hh
Go to the documentation of this file.
1
//------------------------------------------------------------------------------
2
// This file is part of the OpenStructure project <www.openstructure.org>
3
//
4
// Copyright (C) 2008-2020 by the OpenStructure authors
5
//
6
// This library is free software; you can redistribute it and/or modify it under
7
// the terms of the GNU Lesser General Public License as published by the Free
8
// Software Foundation; either version 3.0 of the License, or (at your option)
9
// any later version.
10
// This library is distributed in the hope that it will be useful, but WITHOUT
11
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12
// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13
// details.
14
//
15
// You should have received a copy of the GNU Lesser General Public License
16
// along with this library; if not, write to the Free Software Foundation, Inc.,
17
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
//------------------------------------------------------------------------------
19
#ifndef OST_GUI_PANEL_BAR_WIDGET_HOLDER_HH
20
#define OST_GUI_PANEL_BAR_WIDGET_HOLDER_HH
21
22
23
#include <
ost/gui/module_config.hh
>
24
25
#include "
panel_bar.hh
"
26
27
#include <QWidget>
28
#include <QMouseEvent>
29
class
QToolBar;
30
class
QAction;
31
32
/*
33
Author: Marco Biasini
34
*/
35
36
namespace
ost
{
namespace
gui {
37
38
class
SideBar;
39
class
Widget;
40
41
class
DLLEXPORT_OST_GUI
PanelBarWidgetHolder
:
public
QWidget {
42
Q_OBJECT
43
public
:
44
PanelBarWidgetHolder
(
Widget
* widget, Qt::Orientation orientation, QWidget* parent=NULL);
45
~PanelBarWidgetHolder
();
46
47
void
mousePressEvent
(QMouseEvent *event);
48
void
mouseMoveEvent
(QMouseEvent *event);
49
void
dragEnterEvent
(QDragEnterEvent *event);
50
void
dropEvent
(QDropEvent *event);
51
52
public
slots:
53
void
Remove
();
54
public
:
55
Widget
*
GetWidget
() {
return
widget_; }
56
void
SetWidget
(
Widget
* widget);
57
private
slots:
58
void
LabelClick(
bool
checked);
59
private
:
60
void
SetupToolBar();
61
QToolBar* toolbar_;
62
Widget
* widget_;
63
QAction* label_;
64
QPoint drag_start_pos_;
65
};
66
67
}}
68
69
70
#endif
ost::gui::PanelBarWidgetHolder
Definition:
panel_bar_widget_holder.hh:41
ost::gui::PanelBarWidgetHolder::SetWidget
void SetWidget(Widget *widget)
ost::gui::PanelBarWidgetHolder::Remove
void Remove()
ost::gui::PanelBarWidgetHolder::GetWidget
Widget * GetWidget()
Definition:
panel_bar_widget_holder.hh:55
ost::gui::PanelBarWidgetHolder::dropEvent
void dropEvent(QDropEvent *event)
ost::gui::PanelBarWidgetHolder::dragEnterEvent
void dragEnterEvent(QDragEnterEvent *event)
ost::gui::PanelBarWidgetHolder::PanelBarWidgetHolder
PanelBarWidgetHolder(Widget *widget, Qt::Orientation orientation, QWidget *parent=NULL)
ost::gui::PanelBarWidgetHolder::mousePressEvent
void mousePressEvent(QMouseEvent *event)
ost::gui::PanelBarWidgetHolder::mouseMoveEvent
void mouseMoveEvent(QMouseEvent *event)
ost::gui::PanelBarWidgetHolder::~PanelBarWidgetHolder
~PanelBarWidgetHolder()
ost::gui::Widget
Base class for widgets.
Definition:
widget.hh:40
module_config.hh
DLLEXPORT_OST_GUI
#define DLLEXPORT_OST_GUI
Definition:
module_config.hh:33
ost
Definition:
base.dox:1
panel_bar.hh
Generated by
1.9.1