OpenStructure
Loading...
Searching...
No Matches
build-dev
stage
include
ost
gui
panels
event_button.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_BOTTOM_BAR_EVENT_BUTTON
20
#define OST_GUI_BOTTOM_BAR_EVENT_BUTTON
21
22
23
#include <
ost/gui/module_config.hh
>
24
#include <
ost/gui/widget.hh
>
25
26
#include <QToolButton>
27
#include <QMouseEvent>
28
#include <QDragEnterEvent>
29
#include <QDropEvent>
30
#include <QWidget>
31
#include <QString>
32
namespace
ost
{
namespace
gui {
33
35
class
DLLEXPORT_OST_GUI
EventButton
:
public
QToolButton {
36
Q_OBJECT
37
public
:
38
EventButton
(
const
QString& name,
Widget
* widget,
bool
pressed, QWidget* parent=NULL);
39
40
virtual
Widget
*
GetWidget
();
41
virtual
void
mouseMoveEvent
(QMouseEvent* event);
42
virtual
void
dropEvent
(QDropEvent* event);
43
virtual
void
dragEnterEvent
(QDragEnterEvent* event );
44
signals:
45
void
ButtonPressed
(
Widget
* button);
46
void
ButtonDragged
(
EventButton
* button);
47
void
ButtonDropped
(
EventButton
* button);
48
49
private
slots:
50
virtual
void
clicked();
51
52
private
:
53
Widget
* widget_;
54
};
55
56
}}
57
58
#endif
ost::gui::EventButton
button box
Definition
event_button.hh:35
ost::gui::EventButton::mouseMoveEvent
virtual void mouseMoveEvent(QMouseEvent *event)
ost::gui::EventButton::dropEvent
virtual void dropEvent(QDropEvent *event)
ost::gui::EventButton::ButtonDragged
void ButtonDragged(EventButton *button)
ost::gui::EventButton::ButtonDropped
void ButtonDropped(EventButton *button)
ost::gui::EventButton::ButtonPressed
void ButtonPressed(Widget *button)
ost::gui::EventButton::EventButton
EventButton(const QString &name, Widget *widget, bool pressed, QWidget *parent=NULL)
ost::gui::EventButton::dragEnterEvent
virtual void dragEnterEvent(QDragEnterEvent *event)
ost::gui::EventButton::GetWidget
virtual Widget * GetWidget()
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
widget.hh
Generated by
1.9.8