Qt
6.x
The Qt SDK
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
10
class
QAction
;
11
class
QTextDocument
;
12
class
QTextEdit
;
13
14
class
MainWindow
:
public
QMainWindow
15
{
16
Q_OBJECT
17
18
public
:
19
MainWindow
();
20
21
public
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
();
30
void
updateMenus
();
31
32
private
:
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
MainWindow
[5]
Definition
src_corelib_kernel_qobject.cpp:52
MainWindow::selectBlock
void selectBlock()
Definition
mainwindow.cpp:131
MainWindow::copySelection
void copySelection()
Definition
mainwindow.cpp:88
MainWindow::openFile
void openFile()
MainWindow::cutSelection
void cutSelection()
Definition
mainwindow.cpp:79
MainWindow::MainWindow
MainWindow()
MainWindow::selectLine
void selectLine()
Definition
mainwindow.cpp:119
MainWindow::selectFrame
void selectFrame()
Definition
mainwindow.cpp:143
MainWindow::pasteSelection
void pasteSelection()
Definition
mainwindow.cpp:97
MainWindow::selectWord
void selectWord()
Definition
mainwindow.cpp:103
MainWindow::updateMenus
void updateMenus()
QAction
The QAction class provides an abstraction for user commands that can be added to different user inter...
Definition
qaction.h:30
QMainWindow
The QMainWindow class provides a main application window.
Definition
qmainwindow.h:25
QString
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition
qstring.h:127
QTextDocumentFragment
\reentrant
Definition
qtextdocumentfragment.h:19
QTextDocument
\reentrant \inmodule QtGui
Definition
qtextdocument.h:57
QTextEdit
The QTextEdit class provides a widget that is used to edit and display both plain and rich text.
Definition
qtextedit.h:27
Q_OBJECT
#define Q_OBJECT
Definition
qtmetamacros.h:117
slots
#define slots
Definition
qtmetamacros.h:40
qtbase
src
gui
doc
snippets
textdocument-selections
mainwindow.h
Generated by
1.9.7