📄 ksiemens.h
字号:
/*************************************************************************** ksiemens.h - description ------------------- begin : Wed Jan 17 10:34:49 CET 2001 copyright : (C) 2001 by Matthias Welwarsky email : matze@stud.fbi.fh-darmstadt.de ***************************************************************************//*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/#ifndef KSIEMENS_H#define KSIEMENS_H #ifdef HAVE_CONFIG_H#include <config.h>#endif// include files for Qt// include files for KDE #include <kapp.h>#include <kparts/mainwindow.h>#include <kaccel.h>#include <kaction.h>// forward declaration of the KSiemens classesclass KSiemensView;class Modem;/** * The base class for KSiemens application windows. It sets up the main * window and reads the config file as well as providing a menubar, toolbar * and statusbar. An instance of KSiemensView creates your center view, which is connected * to the window's Doc object. * KSiemensApp reimplements the methods that KMainWindow provides for main window handling and supports * full session management as well as using KActions. * @see KMainWindow * @see KApplication * @see KConfig * * @author Source Framework Automatically Generated by KDevelop, (c) The KDevelop Team. * @version KDevelop version 1.2 code generation */class KSiemensApp : public KParts::MainWindow{ Q_OBJECT friend class KSiemensView; public: /** construtor of KSiemensApp, calls all init functions to create the application. */ KSiemensApp(QWidget* parent=0, const char* name=0); virtual ~KSiemensApp(); /** calls KParts::MainWindow::createGUI(), reimplemented because I needed a public version. */ virtual void createGUI(KParts::Part*); protected: /** save general Options like all bar positions and status as well as the geometry and the recent file list to the configuration * file */ void saveOptions(); /** read general Options again and initialize all variables like the recent file list */ void readOptions(); /** initializes the KActions of the application */ void initActions(); /** sets up the statusbar for the main window by initialzing a statuslabel. */ void initStatusBar(); /** creates the centerwidget of the KTMainWindow instance and sets it as the view */ void initView(); /** queryClose is called by KTMainWindow on each closeEvent of a window. Against the * default implementation (only returns true), this calles saveModified() on the document object to ask if the document shall * be saved if Modified; on cancel the closeEvent is rejected. * @see KTMainWindow#queryClose * @see KTMainWindow#closeEvent */ virtual bool queryClose(); /** queryExit is called by KTMainWindow when the last window of the application is going to be closed during the closeEvent(). * Against the default implementation that just returns true, this calls saveOptions() to save the settings of the last window's * properties. * @see KTMainWindow#queryExit * @see KTMainWindow#closeEvent */ virtual bool queryExit(); /** saves the window properties for each open window during session end to the session config file, including saving the currently * opened file by a temporary filename provided by KApplication. * @see KTMainWindow#saveProperties */ virtual void saveProperties(KConfig *_cfg); /** reads the session config file and restores the application's state including the last opened files and documents by reading the * temporary files saved by saveProperties() * @see KTMainWindow#readProperties */ virtual void readProperties(KConfig *_cfg); public slots: /** toggles the toolbar */ void slotViewToolBar(); /** toggles the statusbar */ void slotViewStatusBar(); /** changes the statusbar contents for the standard label permanently, used to indicate current actions. * @param text the text that is displayed in the statusbar */ void slotStatusMsg(const QString &text); /** closes the application when called */ void slotFileExit(); /** opens the configuration settings dialog when called */ void slotPrefs(); private: /** the configuration object of the application */ KConfig *config; /** view is the main widget which represents your working area. The View * class should handle all events of the view widget. It is kept empty so * you can create your view according to your application's needs by * changing the view class. */ KSiemensView *view; /** action plugged into the file menu, connects to slotFileExit */ KAction* fileExitAction; /** action plugged into the settings menu, conntects to slotSettings */ KAction* prefsAction; // KAction pointers to enable/disable actions KToggleAction* viewToolBar; KToggleAction* viewStatusBar;public: // Public attributes /** pointer to the application */ static KSiemensApp* self;}; #endif // KSIEMENS_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -