Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
mainwindow.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4#ifndef MAINWINDOW_H
5#define MAINWINDOW_H
6
7#include <QHash>
8#include <QMainWindow>
9#include <QTextDocumentFragment>
10
11class QAction;
12class QTextDocument;
13class QTextEdit;
14
15class MainWindow : public QMainWindow
16{
18
19public:
21
22public slots:
23 void openFile();
24 void printFile();
25 void printPdf();
26 void updateMenus();
27
28private:
29 QAction *printAction = nullptr;
30 QAction *pdfPrintAction = nullptr;
31 QString currentFile;
32 QTextEdit *editor = nullptr;
33 QTextDocument *document = nullptr;
34};
35
36#endif
void openFile()
void printFile()
void printPdf()
void updateMenus()
The QAction class provides an abstraction for user commands that can be added to different user inter...
Definition qaction.h:30
The QMainWindow class provides a main application window.
Definition qmainwindow.h:25
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\reentrant \inmodule QtGui
The QTextEdit class provides a widget that is used to edit and display both plain and rich text.
Definition qtextedit.h:27
#define Q_OBJECT
#define slots