HelpToolButton.h
Go to the documentation of this file.
1
/* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2
3
This file is part of the TerraLib - a Framework for building GIS enabled applications.
4
5
TerraLib is free software: you can redistribute it and/or modify
6
it under the terms of the GNU Lesser General Public License as published by
7
the Free Software Foundation, either version 3 of the License,
8
or (at your option) any later version.
9
10
TerraLib is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU Lesser General Public License for more details.
14
15
You should have received a copy of the GNU Lesser General Public License
16
along with TerraLib. See COPYING. If not, write to
17
TerraLib Team at <terralib-team@terralib.org>.
18
*/
19
20
/*!
21
\file terralib/qt/widgets/help/HelpToolButton.h
22
23
\brief A specialized tool button that uses terralib help managers.
24
*/
25
26
#ifndef __TERRALIB_QT_WIDGETS_HELP_INTERNAL_HELPTOOLBUTTON_H
27
#define __TERRALIB_QT_WIDGETS_HELP_INTERNAL_HELPTOOLBUTTON_H
28
29
// TerraLib
30
#include "../Config.h"
31
32
//Qt
33
#include <QToolButton>
34
35
namespace
te
36
{
37
namespace
qt
38
{
39
namespace
widgets
40
{
41
/*!
42
\class HelpToolButton
43
44
\brief Tool button that uses te::qt::widgets::HelpManager on its mouse pressed implementation.
45
46
The client must set the page reference, as described in te::qt::widgets::HelpManagerImpl API documentation, before using it or nothing will happen.
47
48
\ingroup widgets
49
*/
50
class
TEQTWIDGETSEXPORT
HelpToolButton
:
public
QToolButton
51
{
52
Q_OBJECT
53
54
public
:
55
56
/*!
57
\brief Constructor.
58
59
\param parent Parent widget, used by Qt.
60
*/
61
HelpToolButton
(QWidget* parent = 0);
62
63
/*!
64
\brief Sets the documentation page reference.
65
66
\param ref Reference to a page contained in help file project. See te::qt::widgets::HelpManagerImpl for correct syntax of this value.
67
68
This will be used to open the correct help file when left mouse button pressed. Using it we can make a context sensitive helper.
69
*/
70
void
setPageReference
(
const
QString& ref);
71
72
/*!
73
\brief Sets the namespace to be used.
74
75
\param ns New namespace.
76
*/
77
void
setNameSpace
(
const
QString& ns);
78
79
protected
:
80
81
/*!
82
\brief Overloaded function of QPushButton. Only LEFT button pressed will show the help.
83
84
\param e The mouse press event.
85
*/
86
void
mousePressEvent
(QMouseEvent* e);
87
88
protected
:
89
90
QString
m_pgRef
;
//!< Stores the reference for the help file to be presented.
91
QString
m_ns
;
//!< Namespace being used. (Qt help usage)
92
};
93
}
94
}
95
}
96
97
#endif
//__TERRALIB_QT_WIDGETS_HELP_INTERNAL_HELPTOOLBUTTON_H
te::qt::widgets::HelpToolButton
Tool button that uses te::qt::widgets::HelpManager on its mouse pressed implementation.
Definition:
HelpToolButton.h:51
te::qt::widgets::HelpToolButton::m_pgRef
QString m_pgRef
Stores the reference for the help file to be presented.
Definition:
HelpToolButton.h:90
te::qt::widgets::HelpToolButton::HelpToolButton
HelpToolButton(QWidget *parent=0)
Constructor.
te::qt::widgets::HelpToolButton::m_ns
QString m_ns
Namespace being used. (Qt help usage)
Definition:
HelpToolButton.h:91
te::qt::widgets::HelpToolButton::setPageReference
void setPageReference(const QString &ref)
Sets the documentation page reference.
te::qt::widgets::HelpToolButton::mousePressEvent
void mousePressEvent(QMouseEvent *e)
Overloaded function of QPushButton. Only LEFT button pressed will show the help.
te::qt::widgets::HelpToolButton::setNameSpace
void setNameSpace(const QString &ns)
Sets the namespace to be used.
te
TerraLib.
Definition:
AddressGeocodingOp.h:52
TEQTWIDGETSEXPORT
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition:
Config.h:63
git_release
src
terralib
qt
widgets
help
HelpToolButton.h
Generated on Mon Dec 19 2022 08:37:06 for TerraLib by
1.9.1