Changeset View
Changeset View
Standalone View
Standalone View
krusader/KViewer/lister.h
Show First 20 Lines • Show All 112 Lines • ▼ Show 20 Line(s) | 102 | protected: | |||
---|---|---|---|---|---|
113 | void setCursorPosition(int x, int y, int anchorX = -1, int anchorY = -1); | 113 | void setCursorPosition(int x, int y, int anchorX = -1, int anchorY = -1); | ||
114 | void handleAnchorChange(int oldAnchor); | 114 | void handleAnchorChange(int oldAnchor); | ||
115 | void performAnchorChange(int anchor); | 115 | void performAnchorChange(int anchor); | ||
116 | void getScreenPosition(int position, int &x, int &y); | 116 | void getScreenPosition(int position, int &x, int &y); | ||
117 | 117 | | |||
118 | protected slots: | 118 | protected slots: | ||
119 | void slotActionTriggered(int action); | 119 | void slotActionTriggered(int action); | ||
120 | void slotCursorPositionChanged(); | 120 | void slotCursorPositionChanged(); | ||
121 | void blinkCursor(); | ||||
121 | void zoomIn(int range = 1); | 122 | void zoomIn(int range = 1); | ||
122 | void zoomOut(int range = 1); | 123 | void zoomOut(int range = 1); | ||
123 | 124 | | |||
124 | protected: | 125 | protected: | ||
125 | Lister *_lister; | 126 | Lister *_lister; | ||
126 | 127 | | |||
127 | qint64 _screenStartPos; | 128 | qint64 _screenStartPos; | ||
128 | qint64 _screenEndPos; | 129 | qint64 _screenEndPos; | ||
Show All 17 Lines | |||||
146 | 147 | | |||
147 | qint64 _cursorAnchorPos; | 148 | qint64 _cursorAnchorPos; | ||
148 | 149 | | |||
149 | int _skippedLines; | 150 | int _skippedLines; | ||
150 | 151 | | |||
151 | bool _inSliderOp; | 152 | bool _inSliderOp; | ||
152 | bool _inCursorUpdate; | 153 | bool _inCursorUpdate; | ||
153 | bool _hexMode; | 154 | bool _hexMode; | ||
155 | | ||||
156 | bool _cursorState = false; | ||||
154 | }; | 157 | }; | ||
155 | 158 | | |||
156 | class ListerBrowserExtension : public KParts::BrowserExtension | 159 | class ListerBrowserExtension : public KParts::BrowserExtension | ||
157 | { | 160 | { | ||
158 | Q_OBJECT | 161 | Q_OBJECT | ||
159 | 162 | | |||
160 | public: | 163 | public: | ||
161 | ListerBrowserExtension(Lister * lister); | 164 | ListerBrowserExtension(Lister * lister); | ||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Line(s) | 195 | public: | |||
203 | inline qint64 fileSize() { | 206 | inline qint64 fileSize() { | ||
204 | return _fileSize; | 207 | return _fileSize; | ||
205 | } | 208 | } | ||
206 | char * cacheRef(qint64 filePos, int &size); | 209 | char * cacheRef(qint64 filePos, int &size); | ||
207 | 210 | | |||
208 | bool isSearchEnabled(); | 211 | bool isSearchEnabled(); | ||
209 | void enableSearch(bool); | 212 | void enableSearch(bool); | ||
210 | void enableActions(bool); | 213 | void enableActions(bool); | ||
211 | void searchDelete(); | | |||
212 | 214 | | |||
213 | QString characterSet() { | 215 | QString characterSet() { | ||
214 | return _characterSet; | 216 | return _characterSet; | ||
215 | } | 217 | } | ||
216 | void setCharacterSet(QString set); | 218 | void setCharacterSet(QString set); | ||
217 | void setHexMode(bool); | 219 | void setHexMode(bool); | ||
218 | 220 | | |||
219 | QStringList readHexLines(qint64 &filePos, qint64 endPos, int columns, int lines); | 221 | QStringList readHexLines(qint64 &filePos, qint64 endPos, int columns, int lines); | ||
220 | int hexBytesPerLine(int columns); | 222 | int hexBytesPerLine(int columns); | ||
221 | int hexPositionDigits(); | 223 | int hexPositionDigits(); | ||
222 | int hexIndexToPosition(int columns, int index); | 224 | int hexIndexToPosition(int columns, int index); | ||
223 | int hexPositionToIndex(int columns, int position); | 225 | int hexPositionToIndex(int columns, int position); | ||
224 | 226 | | |||
225 | 227 | | |||
226 | public slots: | 228 | public slots: | ||
227 | void searchAction() { | 229 | void searchAction() { | ||
228 | enableSearch(true); | 230 | enableSearch(true); | ||
229 | } | 231 | } | ||
230 | void searchNext(); | 232 | void searchNext(); | ||
231 | void searchPrev(); | 233 | void searchPrev(); | ||
234 | void searchDelete(); | ||||
232 | void jumpToPosition(); | 235 | void jumpToPosition(); | ||
233 | void saveAs(); | 236 | void saveAs(); | ||
234 | void saveSelected(); | 237 | void saveSelected(); | ||
235 | void print(); | 238 | void print(); | ||
236 | void toggleHexMode(); | 239 | void toggleHexMode(); | ||
237 | 240 | | |||
238 | protected slots: | 241 | protected slots: | ||
239 | void slotUpdate(); | 242 | void slotUpdate(); | ||
▲ Show 20 Lines • Show All 91 Lines • Show Last 20 Lines |