source: branches/start/Taper/src/taper.h@ 9584

Last change on this file since 9584 was 4307, checked in by merck, 21 years ago
new project
File size: 2.3 KB
Line 
1/***************************************************************************
2 * Copyright (C) 2004 by Martin Merck *
3 * merck@astro.uni-wuerzburg.de *
4 *
5 * This software is part of the MAGIC software. *
6 ***************************************************************************/
7
8#ifndef _TAPER_H_
9#define _TAPER_H_
10
11#ifdef HAVE_CONFIG_H
12#include <config.h>
13#endif
14
15#include <kapplication.h>
16#include <kmainwindow.h>
17
18#include "taperview.h"
19
20class KPrinter;
21class KToggleAction;
22class KURL;
23
24/**
25 * This class serves as the main window for Taper. It handles the
26 * menus, toolbars, and status bars.
27 *
28 * @short Main window class
29 * @author Martin Merck <merck@astro.uni-wuerzburg.de>
30 * @version 0.1
31 */
32class Taper : public KMainWindow
33{
34 Q_OBJECT
35public:
36 /**
37 * Default Constructor
38 */
39 Taper();
40
41 /**
42 * Default Destructor
43 */
44 virtual ~Taper();
45
46 /**
47 * Use this method to load whatever file/URL you have
48 */
49 void load(const KURL& url);
50
51protected:
52 /**
53 * Overridden virtuals for Qt drag 'n drop (XDND)
54 */
55 virtual void dragEnterEvent(QDragEnterEvent *event);
56 virtual void dropEvent(QDropEvent *event);
57
58protected:
59 /**
60 * This function is called when it is time for the app to save its
61 * properties for session management purposes.
62 */
63 void saveProperties(KConfig *);
64
65 /**
66 * This function is called when this app is restored. The KConfig
67 * object points to the session management config file that was saved
68 * with @ref saveProperties
69 */
70 void readProperties(KConfig *);
71
72
73private slots:
74 void fileNew();
75 void fileOpen();
76 void fileSave();
77 void fileSaveAs();
78 void filePrint();
79 void optionsShowToolbar();
80 void optionsShowStatusbar();
81 void optionsConfigureKeys();
82 void optionsConfigureToolbars();
83 void optionsPreferences();
84 void newToolbarConfig();
85
86 void changeStatusbar(const QString& text);
87 void changeCaption(const QString& text);
88
89private:
90 void setupAccel();
91 void setupActions();
92
93private:
94 TaperView *m_view;
95
96 KPrinter *m_printer;
97 KToggleAction *m_toolbarAction;
98 KToggleAction *m_statusbarAction;
99};
100
101#endif // _TAPER_H_
Note: See TracBrowser for help on using the repository browser.