filters
dialog.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef DIALOG_H
00021 #define DIALOG_H
00022
00023 #include <qvaluevector.h>
00024 #include <qpair.h>
00025
00026 #include <kdialogbase.h>
00027
00028 class QButtonGroup;
00029 class QRadioButton;
00030 class QCheckBox;
00031 class KLineEdit;
00032
00033
00034
00035 class SelectionRange
00036 {
00037 public:
00038 SelectionRange() {}
00039 SelectionRange(const QString &);
00040
00041 uint nbPages() const;
00042
00043 private:
00044 QValueVector<QPair<uint, uint> > _ranges;
00045
00046 friend class SelectionRangeIterator;
00047 };
00048
00049 class SelectionRangeIterator
00050 {
00051 public:
00052 SelectionRangeIterator(const SelectionRange &);
00053
00054 int toFirst();
00055 int current() const { return _current; }
00056 int next();
00057 static int end() { return -1; }
00058
00059 private:
00060 uint _index;
00061 int _current;
00062 const QValueVector<QPair<uint, uint> > &_ranges;
00063 };
00064
00065
00066 namespace PDFImport
00067 {
00068
00069 class Options
00070 {
00071 public:
00072 Options() {}
00073
00074 public:
00075 SelectionRange range;
00076 QString ownerPassword, userPassword;
00077 bool importImages, smart;
00078 };
00079
00080 class Dialog : public KDialogBase
00081 {
00082 Q_OBJECT
00083 public:
00084 Dialog(uint nbPages, bool isEncrypted, QWidget *parent);
00085 ~Dialog();
00086
00087 Options options() const;
00088
00089 private slots:
00090 void rangeChanged(const QString &);
00091
00092 private:
00093 uint _nbPages;
00094 QRadioButton *_allButton, *_rangeButton;
00095 QButtonGroup *_group;
00096 KLineEdit *_range, *_owner, *_user;
00097 QCheckBox *_images, *_smart;
00098 };
00099
00100 }
00101
00102 #endif
|