Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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
10QT_BEGIN_NAMESPACE
11
12class QAction;
13class QTextDocument;
14class QTextEdit;
15
16class MainWindow : public QMainWindow
17{
19
20public:
22
23public slots:
24 void cutSelection();
25 void copySelection();
26 void openFile();
27 void pasteSelection();
28 void selectWord();
29 void selectLine();
30 void selectBlock();
31 void selectFrame();
33
34private:
35 QAction *cutAction = nullptr;
36 QAction *copyAction = nullptr;
37 QAction *pasteAction = nullptr;
38 QString currentFile;
39 QTextEdit *editor = nullptr;
40 QTextDocument *document = nullptr;
41 QTextDocumentFragment selection;
42};
43
44QT_END_NAMESPACE
45
46#endif
void selectBlock()
void copySelection()
void openFile()
void selectLine()
void selectFrame()
void pasteSelection()
void selectWord()
void updateMenus()
int main(int argc, char *argv[])
[ctor_close]