/***************************************************************************
 *   Copyright (C) 2005 by Michael Goettsche                               *
 *   michael.goettsche@kdemail.net                                         *
 *                                                                         *
 *   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.                                   *
 *                                                                         *
 *   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, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/

#ifndef _KEDULAUNCH_H_
#define _KEDULAUNCH_H_

#include <kdialogbase.h>
#include <ktrader.h>

#include <qiconview.h>

class KEduLaunchBase;
 
class AppIconViewItem : public QIconViewItem 
{
    public:
        AppIconViewItem(QIconView* parent, QString name, QStringList categories,
                        QString exec, QString icon, QString comment);
                        
        const QString& name();
        const QStringList& categories();
        const QString& exec();

    private:
        QString m_name;
        QStringList m_categories;
        QString m_exec;
        QString m_icon;
        QString m_genericName;
};
        
 
class KEduLaunch : public KDialogBase
{
Q_OBJECT
    public:
        KEduLaunch(QWidget* parent=0, const char* name=0);
    
        virtual ~KEduLaunch();
    
    private slots:
        void retrieveAppList();
        void populateCategoryView();
        void populateIconView();
        void itemClicked(QIconViewItem* item);
        void startAppClicked();
        
    private:
        KEduLaunchBase* m_mainWidget;
        QIconViewItem* m_allItem;
        QIconViewItem* m_mathsItem;
        QIconViewItem* m_languagesItem;
        QIconViewItem* m_scienceItem;
        QIconViewItem* m_miscellaneousItem;
        QIconViewItem* m_teachingItem;
        
        KTrader::OfferList availableApps;
        QValueList<AppIconViewItem*> m_allItemsContainer;
};

#endif // _KEDULAUNCH_H_
