/***************************************************************************
 *   Copyright (C) 2002 by Jakob Simon-Gaarde                              *
 *   jsgaarde@tdcspace.dk                                                  *
 *   Copyright (C) 2002-2003 by Alexander Dymo                             *
 *   cloudtemple@mksat.net                                                 *
 *   Copyright (C) 2003 by Thomas Hasart                                   *
 *   thasart@gmx.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 PROJECTCONFIGURATIONDLG_H
#define PROJECTCONFIGURATIONDLG_H

enum QMakeBuildMode    {QBM_DEBUG,QBM_RELEASE};
enum QMakeWarnings     {QWARN_ON,QWARN_OFF};
enum QMakeDepends      {QD_QT=1,QD_OPENGL=2,QD_THREAD=4,QD_X11=8,QD_STATIC=16,
                        QD_SHARED=32,QD_PLUGIN=64,QD_EXCEPTIONS=128,QD_STL=256,
                        QD_RTTI=512, QD_ORDERED=1024,QD_QPE=2048,QD_OPIE=4096};
enum QMakeTemplate     {QTMP_APPLICATION,QTMP_LIBRARY,QTMP_SUBDIRS,QTMP_QUICKAPP};
enum QMakeSpec {QM_IPAQ,QM_SL55,QM_CL,QM_SIMPAD,QM_RAMSES,QM_X86,QM_NATIVE,QM_MAC,QM_ARM };

#include "projectconfigurationdlgbase.h"
#include "trollprojectwidget.h"

struct ProjectConfiguration;
class SubqmakeprojectItem;
class qProjectItem;


class ProjectConfigurationDlg : public ProjectConfigurationDlgBase
{
public:
  ProjectConfigurationDlg(SubqmakeprojectItem * _item,QListView *_prjList,QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
  ~ProjectConfigurationDlg();
  void UpdateControls();

public slots:
//  virtual void           radioLibrarytoggled(bool);
  virtual void           updateProjectConfiguration();
  virtual void           browseTargetPath();
  virtual void           clickSubdirsTemplate();
  virtual void           templateLibraryClicked(int);

  
virtual void buildorderMoveUpClicked();
virtual void buildorderMoveDownClicked();

virtual void insideIncMoveUpClicked();
virtual void insideIncMoveDownClicked();
virtual void outsideIncMoveUpClicked();
virtual void outsideIncMoveDownClicked();
virtual void outsideIncAddClicked();
virtual void outsideIncRemoveClicked();
virtual void outsideIncEditClicked();

virtual void insideLibMoveUpClicked();
virtual void insideLibMoveDownClicked();
virtual void outsideLibMoveUpClicked();
virtual void outsideLibMoveDownClicked();
virtual void outsideLibAddClicked();
virtual void outsideLibRemoveClicked();
virtual void outsideLibEditClicked();

virtual void outsideLibDirMoveUpClicked();
virtual void outsideLibDirMoveDownClicked();
virtual void outsideLibDirAddClicked();
virtual void outsideLibDirRemoveClicked();
virtual void outsideLibDirEditClicked();

virtual void slotStaticLibClicked(int);
virtual void slotInstallTargetClicked();

virtual void extAdd_button_clicked();
virtual void extEdit_button_clicked();
virtual void extMoveDown_button_clicked();
virtual void extMoveUp_button_clicked();
virtual void extRemove_button_clicked();
virtual void intMoveDown_button_clicked();
virtual void intMoveUp_button_clicked();

void updateIncludeControl();
void updateLibaddControl();
void updateLibDirAddControl();
void updateBuildOrderControl();
void updateDependenciesControl();



protected:
  QListView *prjList;
  SubqmakeprojectItem *myProjectItem;
  QPtrList <qProjectItem> getAllProjects();
  void getAllSubProjects(qProjectItem *item,QPtrList <qProjectItem> *itemList);
  

};

#endif

