Scribus
Open source desktop publishing at your fingertips
api_window.h
1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 #ifndef API_WINDOW_H_
8 #define API_WINDOW_H_
9 
10 #include <QObject>
11 #include <QtDebug>
12 #include <QApplication>
13 
14 #include "scripterimpl.h"
15 
16 class WindowAPI : public QObject
17 {
18  Q_OBJECT
19  Q_PROPERTY(double zoom READ zoom WRITE setZoom)
20  Q_PROPERTY(bool redraw READ redraw WRITE setRedraw)
21 
22 public:
23  WindowAPI();
24  virtual ~WindowAPI();
25 
26 public slots:
27  // XXX: relative or absolute scrolling?
28  void scroll(int x, int y);
29  // XXX: better name?
30  void update();
31 
32 private:
33  void setRedraw(bool flag);
34  bool redraw();
35  // TODO: add zoomInto
36  void setZoom(double factor);
37  double zoom();
38 };
39 
40 #endif /*API_WINDOW_H_*/
void scroll(int x, int y)
Definition: api_window.cpp:61
void update()
Definition: api_window.cpp:73
Definition: api_window.h:16