summaryrefslogtreecommitdiffstats
path: root/buildtools/qmake/projectconfigurationdlg.h
blob: 246fb388f597b953d53c9efc62235dd393b1361a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
/***************************************************************************
*   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                                                        *
*   Copyright (C) 2006 by Andreas Pakulat                                 *
*   apaku@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

#include "projectconfigurationdlgbase.h"
//#include "trollprojectwidget.h"
#include <kdeversion.h>
#include <qlistview.h>
#include <klistview.h>
#include <qmap.h>

class QMakeScopeItem;
class KListViewItem;
class qProjectItem;
class ProjectConfigurationDlg;
class TrollProjectWidget;

class InsideCheckListItem : public QCheckListItem
{
public:
    InsideCheckListItem( QListView *parent, QMakeScopeItem *item, ProjectConfigurationDlg *config );

    InsideCheckListItem( QListView *parent, QListViewItem *after, QMakeScopeItem *item, ProjectConfigurationDlg *config );
    QMakeScopeItem *prjItem;
    ProjectConfigurationDlg *m_config;

protected:
    virtual void stateChange ( bool state );
};

class CustomVarListItem : public KListViewItem
{
    public:
        CustomVarListItem( QListView*, unsigned int, QMap<QString, QString> );
        QString key(int column, bool ascending) const;
    private:
        unsigned int m_key;
};

class ProjectConfigurationDlg : public ProjectConfigurationDlgBase
{
public:
    ProjectConfigurationDlg( QListView *_prjList, TrollProjectWidget* _prjWidget, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
    ~ProjectConfigurationDlg();
    void updateControls();
    void updateSubproject( QMakeScopeItem* _item );
    QMakeScopeItem* currentProjectItem() { return myProjectItem; }

public slots:
    //  virtual void           radioLibrarytoggled(bool);
    virtual void updateProjectConfiguration();

    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 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();

    virtual void addCustomValueClicked();
    virtual void removeCustomValueClicked();
    virtual void upCustomValueClicked();
    virtual void downCustomValueClicked();

    virtual void newCustomVariableActive();

    virtual void groupLibrariesChanged( int );
    virtual void groupRequirementsChanged( int );
    virtual void groupTemplateChanged( int );
    virtual void targetInstallChanged( bool );
    virtual void accept();
    virtual void reject();
    virtual void apply();
    virtual void activateApply( int );
    virtual void activateApply( const QString& );


    void updateIncludeControl();
    void updateLibControls();
    void updateBuildOrderControl();
    void updateDependenciesControl();
    virtual void activateApply(QListViewItem*);
    virtual void customVarChanged();

protected:
    QListView *prjList;
    QMakeScopeItem *myProjectItem;
    QPtrList <QMakeScopeItem> getAllProjects();
    TrollProjectWidget* prjWidget;
    void getAllSubProjects( QMakeScopeItem *item, QPtrList<QMakeScopeItem> *itemList );

private:
    void removeSharedLibDeps();
    void removeStaticLibDeps();
    void addSharedLibDeps();
    void addStaticLibDeps();
    void removeAppDeps();
    void addAppDeps();
};

#endif

// kate: space-indent on; indent-width 4; tab-width 4; replace-tabs on