~ubuntu-branches/ubuntu/vivid/qpdfview/vivid

« back to all changes in this revision

Viewing changes to sources/miscellaneous.h

  • Committer: Package Import Robot
  • Author(s): Benjamin Eltzner
  • Date: 2014-10-22 21:49:15 UTC
  • mfrom: (1.2.15)
  • Revision ID: package-import@ubuntu.com-20141022214915-agqeoe318lzs2s4d
Tags: 0.4.12-1
* New upstream release.
* Fixed option to zoom to selection and implemented tiled rendering
  (Closes: #739554)
* Enable support for qt5 and poppler-qt5.
* Explicit dependence on hicolor-icon-theme.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 
 
3
Copyright 2014 S. Razi Alavizadeh
3
4
Copyright 2012-2014 Adam Reichold
4
5
Copyright 2014 Dorian Scholz
5
6
 
26
27
#include <QComboBox>
27
28
#include <QGraphicsEffect>
28
29
#include <QLineEdit>
 
30
#include <QMetaMethod>
29
31
#include <QPainter>
30
32
#include <QSpinBox>
31
33
#include <QTreeView>
191
193
 
192
194
};
193
195
 
 
196
// mapping spin box
 
197
 
 
198
class MappingSpinBox : public SpinBox
 
199
{
 
200
    Q_OBJECT
 
201
 
 
202
public:
 
203
    MappingSpinBox(QObject* mapper, const char* textFromValue, const char* valueFromText, QWidget* parent = 0);
 
204
 
 
205
protected:
 
206
    QString textFromValue(int val) const;
 
207
    int valueFromText(const QString& text) const;
 
208
 
 
209
    QValidator::State validate(QString& input, int& pos) const;
 
210
 
 
211
private:
 
212
    Q_DISABLE_COPY(MappingSpinBox)
 
213
 
 
214
    QObject* m_mapper;
 
215
    QMetaMethod m_textFromValue;
 
216
    QMetaMethod m_valueFromText;
 
217
 
 
218
};
 
219
 
 
220
int getMappedNumber(QObject* mapper, const char* textFromValue, const char* valueFromText,
 
221
                    QWidget* parent, const QString& title, const QString& caption,
 
222
                    int value = 0, int min = -2147483647, int max = 2147483647,
 
223
                    bool* ok = 0, Qt::WindowFlags flags = 0);
 
224
 
194
225
// progress line edit
195
226
 
196
227
class ProgressLineEdit : public QLineEdit