Developer Documentation

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
viewModeWidget.hh
1 /*===========================================================================*\
2 * *
3 * OpenFlipper *
4 * Copyright (c) 2001-2015, RWTH-Aachen University *
5 * Department of Computer Graphics and Multimedia *
6 * All rights reserved. *
7 * www.openflipper.org *
8 * *
9 *---------------------------------------------------------------------------*
10 * This file is part of OpenFlipper. *
11 *---------------------------------------------------------------------------*
12 * *
13 * Redistribution and use in source and binary forms, with or without *
14 * modification, are permitted provided that the following conditions *
15 * are met: *
16 * *
17 * 1. Redistributions of source code must retain the above copyright notice, *
18 * this list of conditions and the following disclaimer. *
19 * *
20 * 2. Redistributions in binary form must reproduce the above copyright *
21 * notice, this list of conditions and the following disclaimer in the *
22 * documentation and/or other materials provided with the distribution. *
23 * *
24 * 3. Neither the name of the copyright holder nor the names of its *
25 * contributors may be used to endorse or promote products derived from *
26 * this software without specific prior written permission. *
27 * *
28 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
29 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED *
30 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
31 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER *
32 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, *
33 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, *
34 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR *
35 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
36 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING *
37 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
38 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
39 * *
40 \*===========================================================================*/
41
42 /*===========================================================================*\
43 * *
44 * $Revision$ *
45 * $LastChangedBy$ *
46 * $Date$ *
47 * *
48 \*===========================================================================*/
49
50
51
52
53 #ifndef VIEWMODEWIDGET_HH
54 #define VIEWMODEWIDGET_HH
55
56 #include "ui_viewMode.hh"
57 #include <QStringList>
58 #include <QVector>
59
60 struct ViewMode;
61
62 class viewModeWidget : public QDialog, public Ui::viewMode
63 {
64 Q_OBJECT
65 private:
66 // Vector holding list of all available modes
67 const QVector< ViewMode* >& modes_;
68 public:
69 viewModeWidget(const QVector< ViewMode* >& _modes, QWidget *parent = 0 );
70 void show(QString _lastMode);
71 //void toolbarList(Qt::ContextMenuPolicy arg1);
72 private slots:
73
74 void slotModeChanged(QString _mode);
75 void slotModeClicked(QModelIndex _id);
76
77
78 // ============================================
79 // ViewMode Buttons
80 // ============================================
85 void slotRemoveMode();
86
91 void slotCopyMode();
92
97 void slotAddMode();
98
99
100
101
102 // ============================================
103 // ViewMode Context Menu
104 // ============================================
109 void slotModeContextMenu ( const QPoint & _pos );
110
115 void slotSetIcon();
116
117 // ============================================
118 // ToolBox and ToolBar Lists update functions
119 // ============================================
124 void slotSetAllWidgets();
125
126 // ============================================
127 // ToolBar Views Context Menu
128 // ============================================
133 void slotUsedToolbarContextMenu ( const QPoint & _pos );
134
139 void slotAvailableToolbarContextMenu ( const QPoint & _pos );
140
141 // ============================================
142 // ToolBox Views Context Menu
143 // ============================================
148 void slotUsedToolboxContextMenu ( const QPoint & _pos );
149
154 void slotAvailableToolboxContextMenu ( const QPoint & _pos );
155
156 // ============================================
157 // ContextMenu Views Context Menu
158 // ============================================
163 void slotUsedContextMenuContextMenu ( const QPoint & _pos );
164
169 void slotAvailableContextMenuContextMenu ( const QPoint & _pos );
170
171
172 // ============================================
173 // ToolBar Buttons
174 // ============================================
179 void slotRightArrowToolbar();
180
185 void slotLeftArrowToolbar();
186
187 // ============================================
188 //ToolBox Buttons
189 // ============================================
194 void slotRightArrowToolbox();
195
200 void slotLeftArrowToolbox();
201
206 void slotMoveToolboxUp();
207
212 void slotMoveToolboxDown();
213
214 // ============================================
215 //ContextMenu Buttons
216 // ============================================
221 void slotRightArrowContextMenu();
222
227 void slotLeftArrowContextMenu();
228
233 void slotMoveContextMenuUp();
234
239 void slotMoveContextMenuDown();
240
241
242 // ============================================
243 // External Communication
244 // ============================================
245
246 private slots:
248 void slotChangeView();
249
254 void slotSaveMode();
255
256 signals:
258 void changeView(QString _mode, QStringList _toolboxWidgets, QStringList _toolbars, QStringList _contextmenus);
259
261 void saveMode(QString _name, bool _custom, QStringList _toolboxWidgets, QStringList _toolbars, QStringList _contextmenus);
262
264 void removeMode(QString _name);
265
266
267 };
268
269 #endif //VIEWMODEWIDGET_HH
viewModeWidget::slotModeContextMenu
void slotModeContextMenu(const QPoint &_pos)
Context Menu View Modes.
Definition: viewModeWidget.cc:247
viewModeWidget::slotMoveToolboxDown
void slotMoveToolboxDown()
Move Toolbox down.
Definition: viewModeWidget.cc:546
viewModeWidget::viewModeWidget
viewModeWidget(const QVector< ViewMode * > &_modes, QWidget *parent=0)
Constructor.
Definition: viewModeWidget.cc:57
viewModeWidget::changeView
void changeView(QString _mode, QStringList _toolboxWidgets, QStringList _toolbars, QStringList _contextmenus)
Changes the view mode to the currently configured one.
viewModeWidget::slotRemoveMode
void slotRemoveMode()
Button slot to remove the selected view mode.
Definition: viewModeWidget.cc:156
viewModeWidget::show
void show(QString _lastMode)
overloaded show function
Definition: viewModeWidget.cc:841
viewModeWidget::slotMoveToolboxUp
void slotMoveToolboxUp()
Move Toolbox up.
Definition: viewModeWidget.cc:518
viewModeWidget::slotLeftArrowToolbox
void slotLeftArrowToolbox()
add Toolboxes to Mode
Definition: viewModeWidget.cc:508
viewModeWidget::slotAvailableToolboxContextMenu
void slotAvailableToolboxContextMenu(const QPoint &_pos)
Context Menu Available Toolboxes.
Definition: viewModeWidget.cc:425
viewModeWidget::slotMoveContextMenuDown
void slotMoveContextMenuDown()
Move Toolbox down.
Definition: viewModeWidget.cc:623
viewModeWidget::slotRightArrowToolbar
void slotRightArrowToolbar()
remove Toolbars from Mode
Definition: viewModeWidget.cc:480
viewModeWidget::slotUsedToolbarContextMenu
void slotUsedToolbarContextMenu(const QPoint &_pos)
Context Menu Used Toolbars.
Definition: viewModeWidget.cc:373
viewModeWidget::slotLeftArrowContextMenu
void slotLeftArrowContextMenu()
add ContextMenu to Mode
Definition: viewModeWidget.cc:585
viewModeWidget::slotUsedContextMenuContextMenu
void slotUsedContextMenuContextMenu(const QPoint &_pos)
Context Menu Used ContextMenus.
Definition: viewModeWidget.cc:443
viewModeWidget::slotMoveContextMenuUp
void slotMoveContextMenuUp()
Move ContextMenu up.
Definition: viewModeWidget.cc:595
viewModeWidget::slotRightArrowContextMenu
void slotRightArrowContextMenu()
remove ContextMenu from Mode
Definition: viewModeWidget.cc:577
viewModeWidget::slotSetAllWidgets
void slotSetAllWidgets()
Update list views.
Definition: viewModeWidget.cc:303
viewModeWidget::slotSaveMode
void slotSaveMode()
Save the current view mode configuration.
Definition: viewModeWidget.cc:739
viewModeWidget::slotAvailableContextMenuContextMenu
void slotAvailableContextMenuContextMenu(const QPoint &_pos)
Context Menu Available ContextMenus.
Definition: viewModeWidget.cc:463
viewModeWidget::slotChangeView
void slotChangeView()
Slot for changing the current view to currently configured one.
Definition: viewModeWidget.cc:657
viewModeWidget
Definition: viewModeWidget.hh:62
ViewMode
ViewMode struct This struct contains a ViewMode and its status information such as used widgets...
Definition: CoreWidget.hh:129
viewModeWidget::slotRightArrowToolbox
void slotRightArrowToolbox()
remove Toolboxes from Mode
Definition: viewModeWidget.cc:500
viewModeWidget::saveMode
void saveMode(QString _name, bool _custom, QStringList _toolboxWidgets, QStringList _toolbars, QStringList _contextmenus)
saves the given mode
viewModeWidget::slotAvailableToolbarContextMenu
void slotAvailableToolbarContextMenu(const QPoint &_pos)
Context Menu Available Toolbars.
Definition: viewModeWidget.cc:387
viewModeWidget::slotSetIcon
void slotSetIcon()
Context menu slot to change the icon for a view mode.
Definition: viewModeWidget.cc:269
viewModeWidget::slotCopyMode
void slotCopyMode()
Button slot to copy the selected view mode.
Definition: viewModeWidget.cc:162
viewModeWidget::removeMode
void removeMode(QString _name)
This signal is emitted to remove a mode.
viewModeWidget::slotUsedToolboxContextMenu
void slotUsedToolboxContextMenu(const QPoint &_pos)
Context Menu Used Toolboxes.
Definition: viewModeWidget.cc:405
viewModeWidget::slotAddMode
void slotAddMode()
Button slot to add a new empty mode.
Definition: viewModeWidget.cc:210
viewModeWidget::slotLeftArrowToolbar
void slotLeftArrowToolbar()
add Toolbars to Mode
Definition: viewModeWidget.cc:488
viewModeWidget::slotModeClicked
void slotModeClicked(QModelIndex _id)
Slot for updating removeButton when new mode is selected.
Definition: viewModeWidget.cc:885
viewModeWidget::slotModeChanged
void slotModeChanged(QString _mode)
Slot for updating removeButton when new mode is selected.
Definition: viewModeWidget.cc:890