keduca
keduca_part.h
Go to the documentation of this file.00001 /* 00002 * 00003 * KEduca - Interactive Tests and Exams for KDE 00004 * 00005 * Copyright (c) 00006 * 00007 * 2004: Henrique Pinto <henrique.pinto@kdemail.net> 00008 * 00009 * This program is free software; you can redistribute it and/or 00010 * modify it under the terms of the GNU General Public License 00011 * as published by the Free Software Foundation; either version 2 00012 * of the License, or (at your option) any later version. 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License 00020 * along with this program; if not, write to the Free Software 00021 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00022 */ 00023 00024 #ifndef KEDUCA_PART_H 00025 #define KEDUCA_PART_H 00026 00027 #include <kparts/part.h> 00028 00029 class KEducaView; 00030 class KAboutData; 00031 00036 class KEducaPart : public KParts::ReadOnlyPart 00037 { 00038 Q_OBJECT 00039 public: 00040 /* 00041 * Constructor. 00042 */ 00043 KEducaPart( QWidget *parentWidget, const char *widgetName, QObject *parent, 00044 const char *name, const QStringList &args ); 00045 00046 /* 00047 * Destructor. 00048 */ 00049 virtual ~KEducaPart(); 00050 00051 /* 00052 * Returns information about this part. 00053 */ 00054 static KAboutData* createAboutData(); 00055 00056 protected: 00057 /* 00058 * Opens the file indicated in the m_file member variable. 00059 * Returns true on success, false if errors occured. 00060 */ 00061 virtual bool openFile(); 00062 00063 protected slots: 00064 /* 00065 * Shows the configuration dialog. 00066 */ 00067 void slotConfigure(); 00068 00069 /* 00070 * Updates the configuration in case the user has changed it in 00071 * the Config Dialog. 00072 */ 00073 void updateConfiguration(); 00074 00075 private: 00076 /* 00077 * Sets the KActions for this part. 00078 */ 00079 void setupActions(); 00080 00081 /* 00082 * The widget for this part. 00083 */ 00084 KEducaView *m_view; 00085 }; 00086 00087 #endif // KEDUCA_PART_H