itom
Loading...
Searching...
No Matches
bookmarkDockWidget.h
1/* ********************************************************************
2 itom software
3 URL: http://www.uni-stuttgart.de/ito
4 Copyright (C) 2020, Institut für Technische Optik (ITO),
5 Universität Stuttgart, Germany
6
7 This file is part of itom.
8
9 itom is free software; you can redistribute it and/or modify it
10 under the terms of the GNU Library General Public Licence as published by
11 the Free Software Foundation; either version 2 of the Licence, or (at
12 your option) any later version.
13
14 itom is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
17 General Public Licence for more details.
18
19 You should have received a copy of the GNU Library General Public License
20 along with itom. If not, see <http://www.gnu.org/licenses/>.
21*********************************************************************** */
22
23#ifndef BOOKMARKDOCKWIDGET_H
24#define BOOKMARKDOCKWIDGET_H
25
26#include "abstractDockWidget.h"
27
28#include <qwidget.h>
29#include <qaction.h>
30#include <qtoolbar.h>
31#include <qitemselectionmodel.h>
32#include "../models/bookmarkModel.h"
33
34#include "itomQWidgets.h"
35
36
37namespace ito
38{
44 {
45 Q_OBJECT
46
47 public:
48
50
59 BookmarkDockWidget(const QString &title, const QString &objName, QWidget *parent = NULL,
60 bool docked = true, bool isDockAvailable = true,
61 tFloatingStyle floatingStyle = floatingNone,
62 tMovingStyle movingStyle = movingEnabled);
63
66
68
78
79 protected:
80
82 void createActions();
83
85 void createMenus();
86
88 void createToolBars();
89
92
94 void updateActions();
95
98
99 private:
101 QToolBar *m_pMainToolbar;
106 private Q_SLOTS:
107
109 /*
110 \param index is the QModelIndex of the clicked entry.
111 */
112 void doubleClicked(const QModelIndex &index);
113
115 /*
116 \param pos is the position of the mouse click
117 */
118 void treeViewContextMenuRequested(const QPoint &pos);
119 };
120
121} //end namespace ito
122
123#endif
abstract dock widget class which inherits QDockWidget. The content of QDockWidget consists of an inst...
Definition abstractDockWidget.h:55
tMovingStyle
The configuration if a docked AbstractDockWidget can be moved from one docking area to another one.
Definition abstractDockWidget.h:97
@ movingEnabled
Definition abstractDockWidget.h:99
tFloatingStyle
The floating style of a widget, derived from AbstractDockWidget.
Definition abstractDockWidget.h:89
@ floatingNone
Definition abstractDockWidget.h:90
Provides the bookmark toolbox which is mainly a view of the BookmarkModel.
Definition bookmarkDockWidget.h:44
void createMenus()
this method creates all menus of this toolbox and is overloaded from AbstractDockWidget.
Definition bookmarkDockWidget.cpp:151
void createStatusBar()
this method is overloaded from AbstractDockWidget to initialize any status bars. Here it does nothing...
Definition bookmarkDockWidget.h:91
QAction * m_pSpacerAction
Definition bookmarkDockWidget.h:104
void setBookmarkModel(BookmarkModel *model)
Set the BookmarkModel for this toolbox.
Definition bookmarkDockWidget.cpp:81
~BookmarkDockWidget()
Destructor for the toolbox.
Definition bookmarkDockWidget.cpp:122
QMenu * m_pContextMenu
Definition bookmarkDockWidget.h:102
QTreeViewItom * m_bookmarkView
Definition bookmarkDockWidget.h:100
BookmarkModel * m_pModel
Definition bookmarkDockWidget.h:103
QToolBar * m_pMainToolbar
Definition bookmarkDockWidget.h:101
void updateActions()
this method is overloaded from AbstractDockWidget and is called if any actions should be updated.
Definition bookmarkDockWidget.cpp:164
void createActions()
this method creates all actions of this toolbox and is overloaded from AbstractDockWidget.
Definition bookmarkDockWidget.cpp:146
void updatePythonActions()
this method is overloaded from AbstractDockWidget and is called whenever any Python relevant actions ...
Definition bookmarkDockWidget.h:97
void doubleClicked(const QModelIndex &index)
This slot is executed when a bookmark has been double clicked.
Definition bookmarkDockWidget.cpp:169
void createToolBars()
this method creates all menus of this toolbox and is overloaded from AbstractDockWidget.
Definition bookmarkDockWidget.cpp:128
void treeViewContextMenuRequested(const QPoint &pos)
This slot is executed when a context has been requested on the tree view of this toolbox.
Definition bookmarkDockWidget.cpp:157
BookmarkDockWidget(const QString &title, const QString &objName, QWidget *parent=NULL, bool docked=true, bool isDockAvailable=true, tFloatingStyle floatingStyle=floatingNone, tMovingStyle movingStyle=movingEnabled)
Constructor for the toolbox.
Definition bookmarkDockWidget.cpp:38
model for management of all bookmarks. This model will be displayed by a viewer-widget in the main wi...
Definition bookmarkModel.h:65
Definition itomQWidgets.h:81
Definition apiFunctionsGraph.cpp:40