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 WINDOW_H
5#define WINDOW_H
6
7#include <QMainWindow>
8#include <QTextDocumentFragment>
9
10class QAction;
11class QTextDocument;
12class QTextEdit;
13
14class MainWindow : public QMainWindow
15{
17
18public:
20
21public slots:
22 void cutSelection();
23 void copySelection();
24 void openFile();
25 void pasteSelection();
26 void selectWord();
27 void selectLine();
28 void selectBlock();
29 void selectFrame();
31
32private:
33 QAction *cutAction = nullptr;
34 QAction *copyAction = nullptr;
35 QAction *pasteAction = nullptr;
36 QString currentFile;
37 QTextEdit *editor = nullptr;
38 QTextDocument *document = nullptr;
39 QTextDocumentFragment selection;
40};
41
42#endif
void selectBlock()
void copySelection()
void openFile()
void cutSelection()
void selectLine()
void selectFrame()
void pasteSelection()
void selectWord()
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