• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

Plasma

  • plasma
  • widgets
scrollbar.h
Go to the documentation of this file.
1/*
2 * Copyright © 2008 Fredrik Höglund <fredrik@kde.org>
3 * Copyright © 2008 Marco Martin <notmart@gmail.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU Library General Public License as
7 * published by the Free Software Foundation; either version 2, or
8 * (at your option) any later version.
9 *
10 * This program 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 General Public License for more details
14 *
15 * You should have received a copy of the GNU Library General Public
16 * License along with this program; if not, write to the
17 * Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 */
20
21#ifndef PLASMA_SCROLLBAR_H
22#define PLASMA_SCROLLBAR_H
23
24#include <QtGui/QScrollBar>
25#include <QtGui/QGraphicsProxyWidget>
26
27#include <plasma/plasma_export.h>
28
29namespace Plasma
30{
31
32class ScrollBarPrivate;
33
39class PLASMA_EXPORT ScrollBar : public QGraphicsProxyWidget
40{
41 Q_OBJECT
42
43 Q_PROPERTY(int singleStep READ singleStep WRITE setSingleStep)
44 Q_PROPERTY(int pageStep READ pageStep WRITE setPageStep)
45 Q_PROPERTY(int value READ value WRITE setValue NOTIFY valueChanged)
46 Q_PROPERTY(int minimum READ minimum WRITE setMinimum)
47 Q_PROPERTY(int maximum READ maximum WRITE setMaximum)
48 Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet)
49 Q_PROPERTY(QScrollBar *nativeWidget READ nativeWidget)
50 Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation)
51
52public:
56 explicit ScrollBar(QGraphicsWidget *parent=0);
57
58 ~ScrollBar();
59
65 void setRange(int min, int max);
66
72 void setSingleStep(int val);
73
77 int singleStep();
78
83 void setPageStep(int val);
84
88 int pageStep();
89
93 int value() const;
94
98 int minimum() const;
99
103 int maximum() const;
104
109 void setMinimum(const int min) const;
110
115 void setMaximum(const int max) const;
116
122 void setStyleSheet(const QString &stylesheet);
123
127 QString styleSheet();
128
132 QScrollBar *nativeWidget() const;
133
138 Qt::Orientation orientation() const;
139
140protected:
141 void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
142
143public Q_SLOTS:
148 void setValue(int val);
149
153 void setOrientation(Qt::Orientation orientation);
154
155Q_SIGNALS:
159 void valueChanged(int value);
160
165 void sliderMoved(int value);
166
167private:
168 ScrollBarPrivate * const d;
169};
170
171}
172
173#endif
Plasma::ScrollBar::setSingleStep
void setSingleStep(int val)
Sets the amount of the single step i.e how much the slider will move when the user press an arrow but...
Definition scrollbar.cpp:66
Plasma::ScrollBar::valueChanged
void valueChanged(int value)
Emitted when the value of the slider changes.
Plasma::ScrollBar::maximum
int maximum
Definition scrollbar.h:47
Plasma::ScrollBar::minimum
int minimum
Definition scrollbar.h:46
Plasma::ScrollBar::setMinimum
void setMinimum(const int min) const
Definition scrollbar.cpp:106
Plasma::ScrollBar::setValue
void setValue(int val)
Sets the current value for the ScrollBar.
Definition scrollbar.cpp:86
Plasma::ScrollBar::singleStep
int singleStep
Definition scrollbar.h:43
Plasma::ScrollBar::orientation
Qt::Orientation orientation
Definition scrollbar.h:50
Plasma::ScrollBar::contextMenuEvent
void contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
Definition scrollbar.cpp:143
Plasma::ScrollBar::setStyleSheet
void setStyleSheet(const QString &stylesheet)
Sets the stylesheet used to control the visual display of this ScrollBar.
Definition scrollbar.cpp:116
Plasma::ScrollBar::setOrientation
void setOrientation(Qt::Orientation orientation)
Sets the orientation of the ScrollBar.
Definition scrollbar.cpp:136
Plasma::ScrollBar::styleSheet
QString styleSheet
Definition scrollbar.h:48
Plasma::ScrollBar::setPageStep
void setPageStep(int val)
Sets the amount the slider will scroll when the user press page up or page down.
Definition scrollbar.cpp:76
Plasma::ScrollBar::sliderMoved
void sliderMoved(int value)
Emitted when the slider has been moved by the user.
Plasma::ScrollBar::ScrollBar
ScrollBar(QGraphicsWidget *parent=0)
Creates a scrollbar; the default orientation is vertical.
Definition scrollbar.cpp:38
Plasma::ScrollBar::nativeWidget
QScrollBar * nativeWidget
Definition scrollbar.h:49
Plasma::ScrollBar::pageStep
int pageStep
Definition scrollbar.h:44
Plasma::ScrollBar::setRange
void setRange(int min, int max)
Sets the scrollbar minimum and maximum values.
Definition scrollbar.cpp:61
Plasma::ScrollBar::value
int value
Definition scrollbar.h:45
Plasma::ScrollBar::setMaximum
void setMaximum(const int max) const
Definition scrollbar.cpp:111
QGraphicsProxyWidget
QGraphicsWidget
Plasma
Namespace for everything in libplasma.
Definition abstractdialogmanager.cpp:25
plasma_export.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Tue Mar 25 2025 00:00:00 by doxygen 1.14.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Plasma

Skip menu "Plasma"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal