umbrello: umbrello/toolbarstatefactory.h Source File

umbrello 25.04.1 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

toolbarstatefactory.h
Go to the documentation of this file.
1/*
2
3 SPDX-License-Identifier: GPL-2.0-or-later
4 SPDX-FileCopyrightText: 2004-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
5*/
6
7#ifndef TOOLBARSTATEFACTORY_H
8#define TOOLBARSTATEFACTORY_H
9
10#include "toolbarstate.h"
11
12#include "worktoolbar.h"
13
14#include <QPointer>
15#define NR_OF_TOOLBAR_STATES 5
16
17
18
28 class ToolBarStateFactory
29{
30public:
31 // constructor.
32 ToolBarStateFactory();
33
34 // Destructor
35 virtual ~ToolBarStateFactory();
36
37 ToolBarState* getState(const WorkToolBar::ToolBar_Buttons &toolbarButton, UMLScene* umlScene);
38
39protected:
40 int getKey(const WorkToolBar::ToolBar_Buttons &toolbarButton) const;
41
42protected:
43 QPointer<ToolBarState> m_states[NR_OF_TOOLBAR_STATES];
44};
45
46#endif //TOOLBARSTATEFACTORY_H
ToolBarStateFactory::getState
ToolBarState * getState(const WorkToolBar::ToolBar_Buttons &toolbarButton, UMLScene *umlScene)
Definition toolbarstatefactory.cpp:35
ToolBarStateFactory::m_states
QPointer< ToolBarState > m_states[NR_OF_TOOLBAR_STATES]
Definition toolbarstatefactory.h:43
ToolBarStateFactory::~ToolBarStateFactory
virtual ~ToolBarStateFactory()
Definition toolbarstatefactory.cpp:25
ToolBarStateFactory::ToolBarStateFactory
ToolBarStateFactory()
Definition toolbarstatefactory.cpp:17
ToolBarStateFactory::getKey
int getKey(const WorkToolBar::ToolBar_Buttons &toolbarButton) const
Definition toolbarstatefactory.cpp:62
ToolBarState
Definition toolbarstate.h:65
UMLScene
Definition umlscene.h:65
WorkToolBar::ToolBar_Buttons
ToolBar_Buttons
Definition worktoolbar.h:52
toolbarstate.h
NR_OF_TOOLBAR_STATES
#define NR_OF_TOOLBAR_STATES
Definition toolbarstatefactory.h:15
worktoolbar.h