From ce599e4f9f94b4eb00c1b5edb85bce5431ab3df2 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- keduca/keducabuilder/kcontroladdedit.h | 93 ++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 keduca/keducabuilder/kcontroladdedit.h (limited to 'keduca/keducabuilder/kcontroladdedit.h') diff --git a/keduca/keducabuilder/kcontroladdedit.h b/keduca/keducabuilder/kcontroladdedit.h new file mode 100644 index 00000000..d700ec43 --- /dev/null +++ b/keduca/keducabuilder/kcontroladdedit.h @@ -0,0 +1,93 @@ +/*************************************************************************** + kcontroladdedit.h - description + ------------------- + begin : Sun May 27 2001 + copyright : (C) 2001 by Javier Campos + email : javi@asyris.org +***************************************************************************/ + +/*************************************************************************** + * * + * 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 KCONTROLADDEDIT_H +#define KCONTROLADDEDIT_H + +#include "../libkeduca/fileread.h" +#include "kcontroladdeditbase.h" + +// Qt forward declarations +class QListViewItem; + +/**Add or edit questions + * This is the Wizard that allows adding and editing of + * Questions (and corresponding possible answers) to the + * KEduca Document. + * This will be called from the Editor (class KEducaBuilder) + *@author Javier Campos + * @author Klas Kalass (2003) + */ + +class KControlAddEdit : public KControlAddEditBase { + Q_OBJECT + +public: + KControlAddEdit(QWidget *parent = 0, const char *name = 0, bool modal = true, WFlags f = 0); + ~KControlAddEdit(); + /** Init keducaFile pointer and EditMode */ + void init(FileRead *keducaFile, bool editMode); + /** show current Page */ + void showPage(QWidget *page); + +private: + + // Private methods + + /** Init graphical interface */ +// void initGUI(); + /** Fill page of current record */ + void fillPage(); + /** Add question with form data */ + void addQuestion(); + /** Write config settings */ + void configWrite(); + /** Read config settings */ + void configRead(); + void setCurrentAnswerItem(QListViewItem *item); + void resetAnswerValues(); + + // Private attributes + /** Pointer to keduca of kcontrol page */ + FileRead *_keducaFile; + /** The currently selected answer item, important for editing of the answer*/ + QListViewItem *_currentAnswerItem; + /** Is a edit modify? */ + bool _editMode; + +private slots: + /** Accept changes */ + void accept(); + /** An Answer has been selected */ + void slotAnswerSelected(QListViewItem *item); + /** Remove answer */ + void slotRemoveAnswer(); + /** Button insert */ + void slotAddAnswer(); + /** Button Down */ + void slotMoveDownAnswer(); + /** Button Up */ + void slotMoveUpAnswer(); + /** Question or Answer data changed */ + void slotDataChanged(); + /** Preview image */ + void slotPreviewImage( const QString & ); + /** Change question type */ + void slotQuestionTypeChanged( int index ); +}; + +#endif -- cgit v1.2.1