Libksieve

sieveeditormenubar.h
1/*
2 SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-only
5*/
6
7#pragma once
8
9#include <QMenuBar>
10
11class QAction;
12class QMenu;
13namespace KSieveUi
14{
15class SieveEditorTextModeWidget;
16class SieveEditorMenuBar : public QMenuBar
17{
19public:
20 explicit SieveEditorMenuBar(QWidget *parent = nullptr);
21 ~SieveEditorMenuBar() override;
22
23 [[nodiscard]] QAction *goToLineAction() const;
24 [[nodiscard]] QAction *findAction() const;
25 [[nodiscard]] QAction *replaceAction() const;
26 [[nodiscard]] QAction *undoAction() const;
27 [[nodiscard]] QAction *redoAction() const;
28 [[nodiscard]] QAction *copyAction() const;
29 [[nodiscard]] QAction *pasteAction() const;
30 [[nodiscard]] QAction *cutAction() const;
31 [[nodiscard]] QAction *selectAllAction() const;
32
33 [[nodiscard]] QMenu *editorMenu() const;
34 [[nodiscard]] QMenu *toolsMenu() const;
35 [[nodiscard]] QMenu *fileMenu() const;
36 [[nodiscard]] QMenu *viewMenu() const;
37
38 [[nodiscard]] QAction *commentCodeAction() const;
39
40 [[nodiscard]] QAction *uncommentCodeAction() const;
41
42 [[nodiscard]] QAction *zoomInAction() const;
43 [[nodiscard]] QAction *zoomOutAction() const;
44 [[nodiscard]] QAction *debugSieveScriptAction() const;
45
46 [[nodiscard]] QAction *zoomResetAction() const;
47 [[nodiscard]] QAction *wordWrapAction() const;
48 [[nodiscard]] QAction *printPreviewAction() const;
49
50 [[nodiscard]] QAction *printAction() const;
51
52 void setTextModeWidget(KSieveUi::SieveEditorTextModeWidget *textModeWidget);
53
54public Q_SLOTS:
55 void setEditorMode(bool editorMode);
56 void slotUndoAvailable(bool b);
57 void slotRedoAvailable(bool b);
58 void slotCopyAvailable(bool b);
60 void gotoLine();
61 void find();
62 void replace();
63 void undo();
64 void redo();
65 void copy();
66 void paste();
67 void cut();
68 void selectAll();
69 void comment();
70 void uncomment();
71 void zoomIn();
72 void zoomOut();
73 void debugSieveScript();
74 void zoomReset();
75 void wordWrap(bool state);
76 void print();
77 void printPreview();
78
79private:
80 void initActions();
81 void initMenus();
82 void slotUpdateActions();
83 QAction *mGoToLine = nullptr;
84 QAction *mFindAction = nullptr;
85 QAction *mReplaceAction = nullptr;
86 QAction *mUndoAction = nullptr;
87 QAction *mRedoAction = nullptr;
88 QAction *mCopyAction = nullptr;
89 QAction *mPasteAction = nullptr;
90 QAction *mCutAction = nullptr;
91 QAction *mSelectAllAction = nullptr;
92 QAction *mCommentCodeAction = nullptr;
93 QAction *mUncommentCodeAction = nullptr;
94 QAction *mZoomInAction = nullptr;
95 QAction *mZoomOutAction = nullptr;
96 QAction *mZoomResetAction = nullptr;
97 QAction *mDebugSieveAction = nullptr;
98 QAction *mWordWrapAction = nullptr;
99 QAction *mPrintAction = nullptr;
100 QAction *mPrintPreviewAction = nullptr;
101
102 QMenu *mEditorMenu = nullptr;
103 QMenu *mToolsMenu = nullptr;
104 QMenu *mFileMenu = nullptr;
105 QMenu *mViewMenu = nullptr;
106 KSieveUi::SieveEditorTextModeWidget *mTextModeWidget = nullptr;
107};
108}
The SieveEditorTextModeWidget class.
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:14:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.