summaryrefslogtreecommitdiffstats
path: root/katomic/toplevel.h
diff options
context:
space:
mode:
Diffstat (limited to 'katomic/toplevel.h')
-rw-r--r--katomic/toplevel.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/katomic/toplevel.h b/katomic/toplevel.h
new file mode 100644
index 00000000..38c613d0
--- /dev/null
+++ b/katomic/toplevel.h
@@ -0,0 +1,66 @@
+/* toplevel.h
+ *
+ * Andreas Wüst
+ *
+ */
+
+#ifndef TOPLEVEL_H
+#define TOPLEVEL_H
+
+class GameWidget;
+class KAction;
+class KConfig;
+
+#include <kmainwindow.h>
+
+/**
+ * This is the class AtomTopLevel. The class is used only for the program
+ * AtomTopLevel.
+ *
+ * @short Basic class for AtomTopLevel
+ * @author Andreas Wüst
+ */
+
+class AtomTopLevel : public KMainWindow
+{
+ Q_OBJECT
+
+ public:
+
+ AtomTopLevel();
+
+ ~AtomTopLevel();
+
+ protected:
+
+ // Creates the menubar and connects the menu-entries to the
+ // appropriate functions
+ void createMenu();
+
+ // Get the configuration from the config-file.
+ void initConfig();
+
+ // Save the current configuration to the config-file.
+ void saveConfig();
+
+ // called before exiting -> save configuration
+ virtual bool queryExit();
+
+ KConfig *config;
+
+ GameWidget *main;
+
+ KAction *redoAction, *undoAction;
+
+ protected slots:
+ void enableRedo(bool enable);
+ void enableUndo(bool enable);
+
+public slots:
+
+ // Shows a dialog for options other than keys
+ void configopts();
+
+};
+
+#endif