File: toggle_window.h

package info (click to toggle)
cen64 0.3%2Bgit20200723-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 4,504 kB
  • sloc: ansic: 24,277; cpp: 793; asm: 772; makefile: 14
file content (38 lines) | stat: -rw-r--r-- 772 bytes parent folder | download | duplicates (3)
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
//
// toggle_window.h: Toggle-able window.
//
// CEN64D: Cycle-Accurate Nintendo 64 Debugger
// Copyright (C) 2015, Tyler J. Stachecki.
//
// This file is subject to the terms and conditions defined in
// 'LICENSE', which is part of this source code package.
//

#ifndef TOGGLE_WINDOW_H
#define TOGGLE_WINDOW_H

#include <QAction>
#include <QCloseEvent>
#include <QState>
#include <QStateMachine>
#include <QWidget>

class ToggleWindow : public QWidget {
  Q_OBJECT

  QAction *toggleAction;

  QStateMachine windowMachine;
  QState windowHiddenState;
  QState windowExposedState;

  virtual void closeEvent(QCloseEvent *event);

public:
  explicit ToggleWindow(const QString &windowTitle,
    QAction *toggleAction, bool initiallyVisible);

  ~ToggleWindow();
};

#endif