OpenWalnut
1.5.0dev
src
qtgui
WQtCombinerToolbar.h
1
//---------------------------------------------------------------------------
2
//
3
// Project: OpenWalnut ( http://www.openwalnut.org )
4
//
5
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
6
// For more information see http://www.openwalnut.org/copying
7
//
8
// This file is part of OpenWalnut.
9
//
10
// OpenWalnut is free software: you can redistribute it and/or modify
11
// it under the terms of the GNU Lesser General Public License as published by
12
// the Free Software Foundation, either version 3 of the License, or
13
// (at your option) any later version.
14
//
15
// OpenWalnut is distributed in the hope that it will be useful,
16
// but WITHOUT ANY WARRANTY; without even the implied warranty of
17
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
// GNU Lesser General Public License for more details.
19
//
20
// You should have received a copy of the GNU Lesser General Public License
21
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
22
//
23
//---------------------------------------------------------------------------
24
25
#ifndef WQTCOMBINERTOOLBAR_H
26
#define WQTCOMBINERTOOLBAR_H
27
28
#include <QToolBar>
29
30
#ifndef Q_MOC_RUN
31
// There is an issue with the moc compiler and some boost headers where
32
// moc for qt versions < 5.0 is not able to do a macro substitution.
33
// The issue occurs in the boost library versions 1.48 and higher,
34
// and is tested in boost version 1.52 using moc version 4.8.4
35
// Excluding the relevant headers removes the problem.
36
#include "core/kernel/WModuleCombinerTypes.h"
37
#endif
38
39
#ifndef Q_MOC_RUN
40
#include "WQtCombinerActionList.h"
41
#endif
42
#include "WQtToolBarBase.h"
43
44
class
WMainWindow
;
45
46
/**
47
* This is a toolbar. Its main usage for now is the "compatible modules" toolbar.
48
*/
49
class
WQtCombinerToolbar
:
public
WQtToolBarBase
50
{
51
Q_OBJECT
52
53
public
:
54
/**
55
* Constructs the toolbar.
56
* \param parent the parent widget of this widget, i.e. the widget that manages it.
57
* \param compatibles the list of combiners
58
*/
59
WQtCombinerToolbar
(
WMainWindow
* parent,
const
WQtCombinerActionList
& compatibles );
60
61
/**
62
* This creates an empty toolbar only containing the dummy button to reserve the size.
63
*
64
* \param parent the parent widget.
65
*/
66
explicit
WQtCombinerToolbar
(
WMainWindow
* parent );
67
68
/**
69
* destructor
70
*/
71
virtual
~WQtCombinerToolbar
();
72
73
/**
74
* Update the toolbar to represent the compatibles given as parameter.
75
*
76
* \param compatibles The compatibles to produce the buttons for.
77
*/
78
void
updateButtons
(
const
WQtCombinerActionList
& compatibles );
79
80
/**
81
* Make the toolbar appear empty but not disappear.
82
*/
83
void
makeEmpty
();
84
85
protected
:
86
private
:
87
WMainWindow
*
m_parent
;
//!< The widget managing this widget.
88
};
89
90
#endif
// WQTCOMBINERTOOLBAR_H
91
WMainWindow
This class contains the main window and the layout of the widgets within the window.
Definition:
WMainWindow.h:66
WQtCombinerActionList
This class represents a list of actions to apply a bunch of modules to others.
Definition:
WQtCombinerActionList.h:52
WQtCombinerToolbar
This is a toolbar.
Definition:
WQtCombinerToolbar.h:50
WQtCombinerToolbar::WQtCombinerToolbar
WQtCombinerToolbar(WMainWindow *parent, const WQtCombinerActionList &compatibles)
Constructs the toolbar.
Definition:
WQtCombinerToolbar.cpp:41
WQtCombinerToolbar::~WQtCombinerToolbar
virtual ~WQtCombinerToolbar()
destructor
Definition:
WQtCombinerToolbar.cpp:58
WQtCombinerToolbar::m_parent
WMainWindow * m_parent
The widget managing this widget.
Definition:
WQtCombinerToolbar.h:87
WQtCombinerToolbar::updateButtons
void updateButtons(const WQtCombinerActionList &compatibles)
Update the toolbar to represent the compatibles given as parameter.
Definition:
WQtCombinerToolbar.cpp:67
WQtCombinerToolbar::makeEmpty
void makeEmpty()
Make the toolbar appear empty but not disappear.
Definition:
WQtCombinerToolbar.cpp:62
WQtToolBarBase
Base class for toolbars.
Definition:
WQtToolBarBase.h:38
Generated by
1.9.1