summaryrefslogtreecommitdiffstats
path: root/katomic/toplevel.h
blob: e7eb6c9e24fb5e7d1c1dfba56720149293624c40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/* 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