summaryrefslogtreecommitdiffstats
path: root/kfax/kfax.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit47d455dd55be855e4cc691c32f687f723d9247ee (patch)
tree52e236aaa2576bdb3840ebede26619692fed6d7d /kfax/kfax.h
downloadtdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.tar.gz
tdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kfax/kfax.h')
-rw-r--r--kfax/kfax.h159
1 files changed, 159 insertions, 0 deletions
diff --git a/kfax/kfax.h b/kfax/kfax.h
new file mode 100644
index 00000000..506a1452
--- /dev/null
+++ b/kfax/kfax.h
@@ -0,0 +1,159 @@
+ /*
+
+ $Id$
+
+ Requires the Qt widget libraries, available at no cost at
+ http://www.troll.no
+
+ Copyright (C) 1997 Bernd Johannes Wuebben
+ wuebben@math.cornell.edu
+
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+ */
+
+#ifndef _KFAX_H_
+#define _KFAX_H_
+
+#include <kapplication.h>
+#include <kmainwindow.h>
+#include <qptrlist.h>
+#include <kurl.h>
+
+#define Pimage(p) ((XImage *)(p)->extra)
+
+class QPopupMenu;
+class KConfig;
+class KStatusBar;
+class KAction;
+class KRecentFilesAction;
+class KPrinter;
+class QPainter;
+class QScrollBar;
+
+typedef KToolBar::BarPosition BarPosition;
+
+class MyApp:public KApplication {
+public:
+ virtual bool x11EventFilter( XEvent * );
+};
+
+class TopLevel : public KMainWindow
+{
+ Q_OBJECT
+
+
+public:
+
+ TopLevel( QWidget *parent=0, const char *name=0 );
+ ~TopLevel();
+
+ void openNetFile( const KURL& _url);
+ void saveNetFile( const KURL& _url );
+
+ static QPtrList<TopLevel> windowList;
+ QPopupMenu *right_mouse_button, *colors;
+
+ void handle_X_event(XEvent Event);
+ void putImage();
+
+protected:
+
+ void resizeEvent( QResizeEvent * );
+ void wheelEvent( QWheelEvent * );
+ void dragEnterEvent( QDragEnterEvent * event );
+ void dropEvent( QDropEvent * event );
+
+ void updateActions();
+ void updateGoActions();
+ void updateZoomActions();
+
+ void zoom( int );
+
+ void readSettings();
+ void writeSettings();
+ void setupActions();
+ void setupMenuBar();
+ void setupToolBar();
+ void setupEditWidget();
+ void setupStatusBar();
+
+ bool queryClose();
+
+private:
+
+ QFrame *faxqtwin;
+
+ int indentID;
+ QColor forecolor;
+ QColor backcolor;
+
+ KURL fileURL;
+ KStatusBar *statusbar;
+
+ KRecentFilesAction *actRecent;
+ KAction *actAdd, *actSave, *actSaveAs, *actPrint;
+ KAction *actSize, *actZoomIn, *actZoomOut, *actRotate, *actMirror;
+ KAction *actFlip, *actNext, *actPrev, *actFirst, *actLast;
+
+ int open_mode;
+
+ KConfig *config;
+
+ QScrollBar *hsb;
+ QScrollBar *vsb;
+ QFrame* mainpane;
+
+ void printIt( KPrinter &printer, QPainter &painter );
+ bool loadAllPages( int &numpages, int &currentpage );
+
+public slots:
+
+ void faxOpen( const KURL & );
+ void faxOpen();
+ void faxAdd();
+ void faxAdd( const KURL & );
+ void faxClose();
+ void print();
+ void zoomin();
+ void zoomout();
+ void actualSize();
+ void resizeView();
+ void faxSave();
+ void faxSaveAs();
+
+ void faxoptions();
+ void rotatePage();
+ void mirrorPage();
+ void flipPage();
+ void nextPage();
+ void prevPage();
+ void newPage();
+ void firstPage();
+ void lastPage();
+ void uiUpdate();
+
+ void openadd(QString filename);
+ void FreeFax();
+ void scrollHorz(int);
+ void scrollVert(int);
+};
+
+void kfaxerror(const QString&, const QString&);
+void loadfile(QString filename);
+
+#endif // _KFAX_H_
+