-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainwindow.h
More file actions
66 lines (50 loc) · 1.76 KB
/
Copy pathmainwindow.h
File metadata and controls
66 lines (50 loc) · 1.76 KB
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
// ===========================================================================
/// <summary>
/// mainwindow.h
/// QtIntroduction
/// created by Mehrdad Soleimanimajd on 10.09.2019
/// </summary>
/// <created>ʆϒʅ, 10.09.2019</created>
/// <changed>ʆϒʅ, 27.06.2023</changed>
// ===========================================================================
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <qapplication.h>
#include <qwidget.h>
#include <qmainwindow.h>
#include <qmenu.h>
#include <qboxlayout.h>
#include "style.h"
#include "screenshot.h"
class MainWindow : public QMainWindow
{
friend class AppStyle;
Q_OBJECT
private:
// custom context menu implementation need:
// reimplementation is needed to receive the context menu events for the created main window.
//#ifndef QT_NO_CONTEXTMENU
// void contextMenuEvent ( QContextMenuEvent* ) override;
//#endif // QT_NO_CONTEXTMENU
AppStyle* appStyle; // application theme
// private slots: to respond to the user actions on the menu entries,
// most of which display the action's path in the central main window widget.
private slots:
void themeOne ( void ); // first theme
void screenShot ( void );
private:
QMenu* menuFile; // menu widget
QAction* actionScreenShot; // abstract user interface action, insertable into widgets
QMenu* menuView;
QAction* actionTheme;
//QActionGroup* alignmentGroup; // to group the actions
ScreenShot* windowScreenShot; // screen shot window wrapper
void createActions ( void ); // main window menu actions creator
void createMenus ( void ); // main window menu creator
public:
MainWindow ();
~MainWindow ( void );
void setStyle ( unsigned char ); // set the style
};
#endif // MAINWINDOW_H