00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _SCHEMATUX_H_
00023 #define _SCHEMATUX_H_
00024
00025 #ifdef HAVE_CONFIG_H
00026 #include <config.h>
00027 #endif
00028
00029 #include <kapplication.h>
00030 #include <kmainwindow.h>
00031
00032 #include "schematuxview.h"
00033 #include "zoomwin.h"
00034 #include <qcanvas.h>
00035
00036 class KPrinter;
00037 class KURL;
00038 class SchematuxPreferences;
00039 class KRecentFilesAction;
00040
00049 class Schematux : public KMainWindow
00050 {
00051 Q_OBJECT
00052 public:
00056 Schematux();
00057
00061 virtual ~Schematux();
00062
00066 void load(const KURL& url);
00067
00068 protected:
00072 virtual void dragEnterEvent(QDragEnterEvent *event);
00073 virtual void dropEvent(QDropEvent *event);
00074
00075 protected:
00080 void saveProperties(KConfig *);
00081
00087 void readProperties(KConfig *);
00088
00089
00090 private slots:
00091 void fileNew ();
00092 void fileOpen ();
00093 void fileSave ();
00094 void fileSaveAs ();
00095 void filePrint ();
00096 void viewZoom ();
00097 void optionsPreferences ();
00098 void slotFileOpenRecent(const KURL& url);
00099
00100 void changeStatusbar(const QString& text);
00101 void changeCaption(const QString& text);
00105 QString currentURL();
00106
00110 virtual void openURL(QString url);
00111
00115 virtual void openURL(const KURL& url);
00116
00117 private:
00118 KRecentFilesAction*fileOpenRecent;
00119
00120 ScheditFile * sf;
00121 QString qsLastFile;
00122
00123 int iZoomPercent;
00124
00125 ZoomWin::ZoomPref zp;
00126
00127 QString qsStartDir;
00128
00129 void setupAccel();
00130 void setupActions();
00131
00132 void applyZoom ( ZoomWin& dlg );
00133 void updateZoomDlg ( ZoomWin& dlg );
00134 void fileOpen (const KURL& url);
00135
00136 private:
00137 QCanvas canvas;
00138
00139 SchematuxView * m_view;
00140
00141 KPrinter *m_printer;
00142
00143 SchematuxPreferences * dlgPrefs;
00144 };
00145
00146 #endif // _SCHEMATUX_H_
00147