~smartboyhw/ubuntu/raring/calligra/2.6.0-0ubuntu1

« back to all changes in this revision

Viewing changes to kexi/plugins/forms/widgets/kexidbslider.cpp

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2012-10-23 21:09:16 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20121023210916-m82w6zxnxhaxz7va
Tags: 1:2.5.90-0ubuntu1
* New upstream alpha release (LP: #1070436)
  - Add libkactivities-dev and libopenimageio-dev to build-depends
  - Add kubuntu_build_calligraactive.diff to build calligraactive by default
  - Add package for calligraauthor and move files that are shared between
    calligrawords and calligraauthor to calligrawords-common
* Document the patches
* Remove numbers from patches so they follow the same naming scheme as
  the rest of our patches.
* calligra-data breaks replaces krita-data (<< 1:2.5.3) (LP: #1071686)

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19
19
 * Boston, MA 02110-1301, USA.
20
20
*/
21
 
 
22
21
#include "kexidbslider.h"
23
 
 
24
22
#include <knumvalidator.h>
25
23
 
26
24
KexiDBSlider::KexiDBSlider(QWidget *parent)
27
 
        :QSlider(parent) , KexiFormDataItemInterface()
 
25
    : KexiSlider(parent) , KexiFormDataItemInterface()
28
26
{
 
27
    setOrientation(Qt::Horizontal);
29
28
    connect(this, SIGNAL(valueChanged(int)), this, SLOT(slotValueChanged()));
30
29
}
31
30
 
35
34
 
36
35
void KexiDBSlider::setInvalidState(const QString& displayText)
37
36
{
 
37
    Q_UNUSED(displayText);
38
38
    m_invalidState = true;
39
39
    setEnabled(false);
40
40
    setReadOnly(true);
41
41
//! @todo move this to KexiDataItemInterface::setInvalidStateInternal() ?
42
42
    if (focusPolicy() & Qt::TabFocus)
43
43
        setFocusPolicy(Qt::ClickFocus);
44
 
    QSlider::setValue(minimum());
 
44
    KexiSlider::setValue(minimum());
45
45
}
46
46
 
47
47
void
50
50
    // prevent the user from reenabling the widget when it is in invalid state
51
51
    if (enabled && m_invalidState)
52
52
        return;
53
 
    QSlider::setEnabled(enabled);
 
53
    KexiSlider::setEnabled(enabled);
54
54
}
55
55
 
56
56
void KexiDBSlider::setValueInternal(const QVariant&, bool)
57
57
{
58
 
    QSlider::setValue(m_origValue.toInt());
 
58
    KexiSlider::setValue(m_origValue.toInt());
59
59
}
60
60
 
61
61
QVariant
62
62
KexiDBSlider::value()
63
63
{
64
 
    return QSlider::value();
 
64
    return KexiSlider::value();
65
65
}
66
66
 
67
67
void KexiDBSlider::slotValueChanged()
107
107
 
108
108
void KexiDBSlider::clear()
109
109
{
110
 
    QSlider::setValue(minimum());
 
110
    KexiSlider::setValue(minimum());
111
111
}
112
112
 
113
113
#include "kexidbslider.moc"