diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2023-03-01 14:56:34 +0100 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2023-03-02 12:08:11 +0100 |
commit | 3c104c279911419f3d0a9e6f3ac050e6f3968e7e (patch) | |
tree | ecd48d188ee4cce2baf641407e41642ccfe22ce2 /examples/widgets/mainwindows/sdi/mainwindow.h | |
parent | 277d809ba4f8c60812286f15a116d2520e2eb0fc (diff) |
Remove the 'sdi' example
It is essentially the same as the other mainwindow examples, showing
how to create a text editor. The only special code here is the tiling of
the different main windows, which - without any documentation or
explanation - is neither very helpful, nor relevant in 2023.
Pick-to: 6.5
Change-Id: I48b92b1cf057f586e0d2842d1c0a3312154e9a13
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Diffstat (limited to 'examples/widgets/mainwindows/sdi/mainwindow.h')
-rw-r--r-- | examples/widgets/mainwindows/sdi/mainwindow.h | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/examples/widgets/mainwindows/sdi/mainwindow.h b/examples/widgets/mainwindows/sdi/mainwindow.h deleted file mode 100644 index 44062cb4a2..0000000000 --- a/examples/widgets/mainwindows/sdi/mainwindow.h +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -#ifndef MAINWINDOW_H -#define MAINWINDOW_H - -#include <QMainWindow> -#include <QList> - -QT_BEGIN_NAMESPACE -class QAction; -class QMenu; -class QTextEdit; -QT_END_NAMESPACE - -//! [class definition with macro] -class MainWindow : public QMainWindow -{ - Q_OBJECT - -public: - MainWindow(); -//! [class definition with macro] - explicit MainWindow(const QString &fileName); - - void tile(const QMainWindow *previous); - -protected: - void closeEvent(QCloseEvent *event) override; - -private slots: - void newFile(); - void open(); - bool save(); - bool saveAs(); - void updateRecentFileActions(); - void openRecentFile(); - void about(); - void documentWasModified(); - -private: - enum { MaxRecentFiles = 5 }; - - void init(); - void createActions(); - void createStatusBar(); - void readSettings(); - void writeSettings(); - bool maybeSave(); - void openFile(const QString &fileName); - void loadFile(const QString &fileName); - static bool hasRecentFiles(); - void prependToRecentFiles(const QString &fileName); - void setRecentFilesVisible(bool visible); - bool saveFile(const QString &fileName); - void setCurrentFile(const QString &fileName); - static QString strippedName(const QString &fullFileName); - MainWindow *findMainWindow(const QString &fileName) const; - - QTextEdit *textEdit; - - QAction *recentFileActs[MaxRecentFiles]; - QAction *recentFileSeparator; - QAction *recentFileSubMenuAct; - - QString curFile; - bool isUntitled; -}; - -#endif |