Changeset View
Changeset View
Standalone View
Standalone View
src/ksanewidget_p.h
Show All 37 Lines | |||||
38 | 38 | | |||
39 | #include <QWidget> | 39 | #include <QWidget> | ||
40 | #include <QCheckBox> | 40 | #include <QCheckBox> | ||
41 | #include <QTimer> | 41 | #include <QTimer> | ||
42 | #include <QTime> | 42 | #include <QTime> | ||
43 | #include <QProgressBar> | 43 | #include <QProgressBar> | ||
44 | #include <QTabWidget> | 44 | #include <QTabWidget> | ||
45 | #include <QPushButton> | 45 | #include <QPushButton> | ||
46 | #include <QVector> | ||||
46 | 47 | | |||
47 | #include "ksanewidget.h" | 48 | #include "ksanewidget.h" | ||
48 | #include "ksaneoption.h" | 49 | #include "ksaneoption.h" | ||
49 | #include "ksaneviewer.h" | 50 | #include "ksaneviewer.h" | ||
51 | #include "labeledcombo.h" | ||||
52 | #include "labeledfslider.h" | ||||
50 | #include "labeledgamma.h" | 53 | #include "labeledgamma.h" | ||
51 | #include "labeledcheckbox.h" | 54 | #include "labeledcheckbox.h" | ||
52 | #include "splittercollapser.h" | 55 | #include "splittercollapser.h" | ||
53 | #include "ksanescanthread.h" | 56 | #include "ksanescanthread.h" | ||
54 | #include "ksanepreviewthread.h" | 57 | #include "ksanepreviewthread.h" | ||
55 | #include "ksanefinddevicesthread.h" | 58 | #include "ksanefinddevicesthread.h" | ||
56 | #include "ksaneauth.h" | 59 | #include "ksaneauth.h" | ||
57 | 60 | | |||
Show All 12 Lines | 70 | public: | |||
70 | void createOptInterface(); | 73 | void createOptInterface(); | ||
71 | void updatePreviewSize(); | 74 | void updatePreviewSize(); | ||
72 | void setDefaultValues(); | 75 | void setDefaultValues(); | ||
73 | void setBusy(bool busy); | 76 | void setBusy(bool busy); | ||
74 | KSaneOption *getOption(const QString &name); | 77 | KSaneOption *getOption(const QString &name); | ||
75 | KSaneWidget::ImageFormat getImgFormat(SANE_Parameters ¶ms); | 78 | KSaneWidget::ImageFormat getImgFormat(SANE_Parameters ¶ms); | ||
76 | int getBytesPerLines(SANE_Parameters ¶ms); | 79 | int getBytesPerLines(SANE_Parameters ¶ms); | ||
77 | 80 | | |||
81 | float ratioToScanAreaX(float ratio); | ||||
82 | float ratioToScanAreaY(float ratio); | ||||
83 | float scanAreaToRatioX(float scanArea); | ||||
84 | float scanAreaToRatioY(float scanArea); | ||||
85 | | ||||
86 | float ratioToDispUnitX(float ratio); | ||||
87 | float ratioToDispUnitY(float ratio); | ||||
88 | float dispUnitToRatioX(float mm); | ||||
89 | float dispUnitToRatioY(float mm); | ||||
90 | | ||||
78 | public Q_SLOTS: | 91 | public Q_SLOTS: | ||
79 | void devListUpdated(); | 92 | void devListUpdated(); | ||
80 | void signalDevListUpdate(); | 93 | void signalDevListUpdate(); | ||
81 | void startFinalScan(); | 94 | void startFinalScan(); | ||
82 | void startPreviewScan(); | 95 | void startPreviewScan(); | ||
83 | void previewScanDone(); | 96 | void previewScanDone(); | ||
84 | void oneFinalScanDone(); | 97 | void oneFinalScanDone(); | ||
85 | void updateProgress(); | 98 | void updateProgress(); | ||
86 | 99 | | |||
87 | private Q_SLOTS: | 100 | private Q_SLOTS: | ||
88 | void scheduleValReload(); | 101 | void scheduleValReload(); | ||
89 | void optReload(); | 102 | void optReload(); | ||
90 | void valReload(); | 103 | void valReload(); | ||
91 | void handleSelection(float tl_x, float tl_y, float br_x, float br_y); | 104 | void handleSelection(float tl_x, float tl_y, float br_x, float br_y); | ||
92 | void setTLX(float x); | 105 | void setTLX(float x); | ||
93 | void setTLY(float y); | 106 | void setTLY(float y); | ||
94 | void setBRX(float x); | 107 | void setBRX(float x); | ||
95 | void setBRY(float y); | 108 | void setBRY(float y); | ||
96 | 109 | | |||
97 | void checkInvert(); | 110 | void checkInvert(); | ||
98 | void invertPreview(); | 111 | void invertPreview(); | ||
99 | void pollPollOptions(); | 112 | void pollPollOptions(); | ||
100 | 113 | | |||
114 | void updateScanSelection(); | ||||
115 | void setPossibleScanSizes(); | ||||
116 | void setPageSize(int index); | ||||
117 | | ||||
101 | public: | 118 | public: | ||
102 | void alertUser(int type, const QString &strStatus); | 119 | void alertUser(int type, const QString &strStatus); | ||
103 | 120 | | |||
104 | public: | 121 | public: | ||
105 | // backend independent | 122 | // backend independent | ||
106 | QTabWidget *m_optsTabWidget; | 123 | QTabWidget *m_optsTabWidget; | ||
107 | QScrollArea *m_basicScrollA; | 124 | QScrollArea *m_basicScrollA; | ||
108 | QWidget *m_basicOptsTab; | 125 | QWidget *m_basicOptsTab; | ||
109 | QWidget *m_colorOpts; | 126 | QWidget *m_colorOpts; | ||
110 | QScrollArea *m_otherScrollA; | 127 | QScrollArea *m_otherScrollA; | ||
111 | QWidget *m_otherOptsTab; | 128 | QWidget *m_otherOptsTab; | ||
112 | LabeledCheckbox *m_invertColors; | 129 | LabeledCheckbox *m_invertColors; | ||
113 | 130 | | |||
131 | QVector<int> m_sizeCodes; | ||||
132 | LabeledCombo *m_scanareaPapersize; | ||||
133 | bool m_settingPageSize = false; | ||||
134 | LabeledFSlider *m_scanareaWidth; | ||||
135 | LabeledFSlider *m_scanareaHeight; | ||||
136 | LabeledFSlider *m_scanareaX; | ||||
137 | LabeledFSlider *m_scanareaY; | ||||
138 | | ||||
114 | QSplitter *m_splitter; | 139 | QSplitter *m_splitter; | ||
115 | SplitterCollapser *m_optionsCollapser; | 140 | SplitterCollapser *m_optionsCollapser; | ||
116 | 141 | | |||
117 | QWidget *m_previewFrame; | 142 | QWidget *m_previewFrame; | ||
118 | KSaneViewer *m_previewViewer; | 143 | KSaneViewer *m_previewViewer; | ||
119 | QWidget *m_btnFrame; | 144 | QWidget *m_btnFrame; | ||
120 | QToolButton *m_zInBtn; | 145 | QToolButton *m_zInBtn; | ||
121 | QToolButton *m_zOutBtn; | 146 | QToolButton *m_zOutBtn; | ||
▲ Show 20 Lines • Show All 74 Lines • Show Last 20 Lines |