Changeset View
Changeset View
Standalone View
Standalone View
kmplot/maindlg.h
Show All 12 Lines | |||||
26 | * @brief Contains the main window class MainDlg. */ | 26 | * @brief Contains the main window class MainDlg. */ | ||
27 | 27 | | |||
28 | #ifndef MainDlg_included | 28 | #ifndef MainDlg_included | ||
29 | #define MainDlg_included | 29 | #define MainDlg_included | ||
30 | 30 | | |||
31 | // Qt includes | 31 | // Qt includes | ||
32 | #include <QDomDocument> | 32 | #include <QDomDocument> | ||
33 | #include <QMenu> | 33 | #include <QMenu> | ||
34 | #include <QPrinter> | ||||
34 | #include <QStack> | 35 | #include <QStack> | ||
35 | #include <QStandardPaths> | 36 | #include <QStandardPaths> | ||
36 | 37 | | |||
37 | // KDE includes | 38 | // KDE includes | ||
38 | #include <KSharedConfig> | 39 | #include <KSharedConfig> | ||
39 | #include <KParts/BrowserExtension> | 40 | #include <KParts/BrowserExtension> | ||
40 | #include <KParts/Part> | 41 | #include <KParts/Part> | ||
41 | #include <KParts/ReadWritePart> | 42 | #include <KParts/ReadWritePart> | ||
Show All 24 Lines | 54 | class FunctionEditor; | |||
102 | QAction * m_firstFunctionAction; | 103 | QAction * m_firstFunctionAction; | ||
103 | 104 | | |||
104 | /// Show the constants editor modal to a parent dialog | 105 | /// Show the constants editor modal to a parent dialog | ||
105 | void editConstantsModal(QWidget *parent); | 106 | void editConstantsModal(QWidget *parent); | ||
106 | 107 | | |||
107 | /// Check whether the url links to an existing file | 108 | /// Check whether the url links to an existing file | ||
108 | static bool fileExists(const QUrl &url); | 109 | static bool fileExists(const QUrl &url); | ||
109 | 110 | | |||
110 | | ||||
111 | public Q_SLOTS: | 111 | public Q_SLOTS: | ||
112 | // DBus interface | 112 | // DBus interface | ||
113 | /// Asks the user and returns true if modified data shall be discarded. | 113 | /// Asks the user and returns true if modified data shall be discarded. | ||
114 | Q_SCRIPTABLE bool checkModified(); | 114 | Q_SCRIPTABLE bool checkModified(); | ||
115 | 115 | | |||
116 | 116 | | |||
117 | public slots: | 117 | public slots: | ||
118 | /// Implement the coordinate system edit dialog | 118 | /// Implement the coordinate system edit dialog | ||
Show All 10 Lines | |||||
129 | void requestSaveCurrentState(); | 129 | void requestSaveCurrentState(); | ||
130 | 130 | | |||
131 | ///Save a plot i.e. save the function name and all the settings for the plot | 131 | ///Save a plot i.e. save the function name and all the settings for the plot | ||
132 | void slotSave(); | 132 | void slotSave(); | ||
133 | ///Save a plot and choose a name for it | 133 | ///Save a plot and choose a name for it | ||
134 | void slotSaveas(); | 134 | void slotSaveas(); | ||
135 | ///Print the current plot | 135 | ///Print the current plot | ||
136 | void slotPrint(); | 136 | void slotPrint(); | ||
137 | /// For calling print preview functionality | ||||
138 | void slotPrintPreview(); | ||||
137 | ///Export the current plot as a png, svg or bmp picture | 139 | ///Export the current plot as a png, svg or bmp picture | ||
138 | void slotExport(); | 140 | void slotExport(); | ||
139 | ///Implement the Configure KmPlot dialog | 141 | ///Implement the Configure KmPlot dialog | ||
140 | void slotSettings(); | 142 | void slotSettings(); | ||
141 | /// Calls the common function names dialog. | 143 | /// Calls the common function names dialog. | ||
142 | void slotNames(); | 144 | void slotNames(); | ||
143 | /// Resets the view | 145 | /// Resets the view | ||
144 | void slotResetView(); | 146 | void slotResetView(); | ||
Show All 24 Lines | 153 | private: | |||
206 | */ | 208 | */ | ||
207 | QDomDocument m_currentState; | 209 | QDomDocument m_currentState; | ||
208 | /// Timer to ensure saveCurrentState() is called only once for a set of simultaneous changes | 210 | /// Timer to ensure saveCurrentState() is called only once for a set of simultaneous changes | ||
209 | QTimer * m_saveCurrentStateTimer; | 211 | QTimer * m_saveCurrentStateTimer; | ||
210 | /// The undo action | 212 | /// The undo action | ||
211 | QAction * m_undoAction; | 213 | QAction * m_undoAction; | ||
212 | /// The redo action | 214 | /// The redo action | ||
213 | QAction * m_redoAction; | 215 | QAction * m_redoAction; | ||
216 | /// The print preview action | ||||
217 | QAction* m_filePrintPreview; | ||||
214 | 218 | | |||
215 | /// A pointer to ourselves | 219 | /// A pointer to ourselves | ||
216 | static MainDlg * m_self; | 220 | static MainDlg * m_self; | ||
217 | 221 | | |||
218 | protected slots: | 222 | protected slots: | ||
219 | /** | 223 | /** | ||
220 | * When you click on a File->Open Recent file, it'll open | 224 | * When you click on a File->Open Recent file, it'll open | ||
221 | * @param url name of the url to open | 225 | * @param url name of the url to open | ||
Show All 12 Lines |