VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/include/QIAdvancedSlider.h@ 21120

Last change on this file since 21120 was 21120, checked in by vboxsync, 15 years ago

FE/Qt4: spelling

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.2 KB
Line 
1/** @file
2 *
3 * VBox frontends: Qt GUI ("VirtualBox"):
4 * VirtualBox Qt extensions: QIAdvancedSlider class implementation
5 */
6
7/*
8 * Copyright (C) 2009 Sun Microsystems, Inc.
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License (GPL) as published by the Free Software
14 * Foundation, in version 2 as it comes in the "COPYING" file of the
15 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17 *
18 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
19 * Clara, CA 95054 USA or visit http://www.sun.com if you need
20 * additional information or have any questions.
21 */
22
23#ifndef __QIAdvancedSlider_h__
24#define __QIAdvancedSlider_h__
25
26/* Qt includes */
27#include <QSlider>
28
29class QIAdvancedSlider: public QWidget
30{
31 Q_OBJECT;
32
33public:
34 QIAdvancedSlider (QWidget *aParent = 0);
35 QIAdvancedSlider (Qt::Orientation aOrientation, QWidget *aParent = 0);
36
37 int value() const;
38
39 void setRange (int aMinV, int aMaxV);
40
41 void setMaximum (int aVal);
42 int maximum() const;
43
44 void setMinimum (int aVal);
45 int minimum() const;
46
47 void setPageStep (int aVal);
48 int pageStep() const;
49
50 void setSingleStep (int aVal);
51 int singelStep() const;
52
53 void setTickInterval (int aVal);
54 int tickInterval() const;
55
56 void setTickPosition (QSlider::TickPosition aPos);
57 QSlider::TickPosition tickPosition() const;
58
59 Qt::Orientation orientation() const;
60
61 void setSnappingEnabled (bool aOn);
62 bool isSnappingEnabled() const;
63
64public slots:
65
66 void setOrientation (Qt::Orientation aOrientation);
67 void setValue (int aVal);
68
69signals:
70 void valueChanged (int);
71 void sliderMoved (int);
72 void sliderPressed();
73 void sliderReleased();
74
75private slots:
76
77 void prvSliderMoved (int val);
78
79private:
80
81 void init (Qt::Orientation aOrientation = Qt::Horizontal);
82 int snapValue(int val);
83
84 /* Private member vars */
85 QSlider *mSlider;
86 bool mSnappingEnabled;
87};
88
89#endif /* __QIAdvancedSlider__ */
90
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette