/*
Copyright (c) 2007 Matt Williams matt@milliams.com

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) version 3 or, at the discretion of KDE e.V. (which shall
act as a proxy as in section 14 of the GPLv3), any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef KEDUCAASSESSMENTSECTIONEDITOR_H
#define KEDUCAASSESSMENTSECTIONEDITOR_H

#include "ui_keducaassessmentsectioneditor.h"

class KQtiAssessmentSection;
class QStandardItem;

/**
 * \class KEducaAssessmentSectionEditor
 */

class KEducaAssessmentSectionEditor : public QWidget, public Ui::KEducaAssessmentSectionEditor
{
    Q_OBJECT
    
    public:
        KEducaAssessmentSectionEditor(QWidget* parent = 0);
        ~KEducaAssessmentSectionEditor();
        
        void setSection(KQtiAssessmentSection* section);
        KQtiAssessmentSection* section() {return mSection;}
        
        void setTreeItem(QStandardItem* item) {mTreeItem = item;}
        QStandardItem* treeItem() {return mTreeItem;}
        
    protected:
        KQtiAssessmentSection* mSection;
        QStandardItem* mTreeItem; //The item in the tree corresponding to mSection
        bool mModified;
        
    signals:
        void addQuestion(bool);
};

#endif
