ProjectWindow update

* Indent widgets using contentsmargins. That way the individual
   widgets can override this.
 * Remove spme spacers in favour of yet more contents margins.
 * Remove unused headers and forward declarations.
 * Define some constants for spacings we might want to tweak later on.

Reviewed-by: dt
This commit is contained in:
Tobias Hunger
2009-11-30 16:23:28 +01:00
parent 7d50367ba4
commit 7ebf60dce2
2 changed files with 82 additions and 82 deletions

View File

@@ -30,32 +30,25 @@
#ifndef PROJECTWINDOW_H
#define PROJECTWINDOW_H
#include <QtGui/QWidget>
#include <QtGui/QScrollArea>
#include <QtGui/QComboBox>
#include <QtCore/QPair>
#include <QtGui/QStackedWidget>
#include <QtGui/QPushButton>
#include <QtGui/QToolButton>
#include <QtCore/QMap>
#include <QtGui/QComboBox>
#include <QtGui/QLabel>
#include <QtGui/QPushButton>
#include <QtGui/QScrollArea>
#include <QtGui/QStackedWidget>
#include <QtGui/QWidget>
QT_BEGIN_NAMESPACE
class QLabel;
class QGridLayout;
class QModelIndex;
class QTabWidget;
class QHBoxLayout;
class QComboBox;
class QMenu;
class QSpacerItem;
QT_END_NAMESPACE
namespace ProjectExplorer {
class IPropertiesPanel;
class Project;
class ProjectExplorerPlugin;
class SessionManager;
class BuildConfiguration;
namespace Internal {
@@ -79,17 +72,18 @@ private:
struct Panel
{
// This does not take ownership of widget!
explicit Panel(QWidget * widget);
explicit Panel(QWidget *widget);
~Panel();
QLabel *iconLabel;
QWidget *lineWidget;
QLabel *nameLabel;
QWidget *panelWidget;
QSpacerItem *spacer;
};
QList<Panel *> m_panels;
void addPanelWidget(Panel *panel, int row);
QGridLayout *m_layout;
QWidget *m_root;
};
@@ -101,13 +95,15 @@ public:
BuildConfigurationComboBox(ProjectExplorer::Project *p, QWidget *parent = 0);
~BuildConfigurationComboBox();
private slots:
void nameChanged(ProjectExplorer::BuildConfiguration *bc);
void nameChanged(BuildConfiguration *bc);
void activeConfigurationChanged();
void addedBuildConfiguration(ProjectExplorer::Project *, ProjectExplorer::BuildConfiguration *bc);
void removedBuildConfiguration(ProjectExplorer::Project *, ProjectExplorer::BuildConfiguration *bc);
void addedBuildConfiguration(ProjectExplorer::Project *project,
BuildConfiguration *bc);
void removedBuildConfiguration(ProjectExplorer::Project *project,
BuildConfiguration *bc);
void changedIndex(int newIndex);
private:
int nameToIndex(ProjectExplorer::BuildConfiguration *bc);
int buildConfigurationToIndex(BuildConfiguration *bc);
bool ignoreIndexChange;
ProjectExplorer::Project *m_project;
QComboBox *m_comboBox;