597 changes: 597 additions & 0 deletions src/app/qgsdiagramproperties.cpp

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions src/app/qgsdiagramproperties.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/***************************************************************************
qgsdiagramproperties.h
Properties for diagram layers
-------------------
begin : August 2012
copyright : (C) Matthias Kuhn
email : matthias dot kuhn at gmx dot ch
***************************************************************************
* *
* 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 QGSDIAGRAMPROPERTIES_H
#define QGSDIAGRAMPROPERTIES_H

#include <QDialog>
#include <ui_qgsdiagrampropertiesbase.h>

class QgsVectorLayer;

class QgsDiagramProperties : public QWidget, private Ui::QgsDiagramPropertiesBase
{
Q_OBJECT

public:
QgsDiagramProperties( QgsVectorLayer* layer, QWidget* parent );

//void handleAttributeDoubleClicked( QTreeWidgetItem * item, int column );

public slots:
void apply();
void on_mDiagramTypeComboBox_currentIndexChanged( const QString& itemtext );
void on_mIncreaseSmallDiagramsCheckBox_stateChanged( int state );
void on_mAddCategoryPushButton_clicked();
void on_mBackgroundColorButton_clicked();
void on_mFindMaximumValueButton_clicked();
void on_mDiagramPenColorButton_clicked();
void on_mDisplayDiagramsGroupBox_toggled( bool checked );
void on_mRemoveCategoryPushButton_clicked();
void on_mDiagramFontButton_clicked();
void on_mDiagramAttributesTreeWidget_itemDoubleClicked( QTreeWidgetItem * item, int column );

protected:
QFont mDiagramFont;

QgsVectorLayer* mLayer;

private:
};

#endif // QGSDIAGRAMPROPERTIES_H
590 changes: 15 additions & 575 deletions src/app/qgsvectorlayerproperties.cpp

Large diffs are not rendered by default.

26 changes: 4 additions & 22 deletions src/app/qgsvectorlayerproperties.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class QgsLabelDialog;
class QgsVectorLayer;
class QgsVectorOverlayPlugin;
class QgsLabelingGui;
class QgsDiagramProperties;

class QgsVectorLayerProperties : public QDialog, private Ui::QgsVectorLayerPropertiesBase
{
Expand Down Expand Up @@ -119,17 +120,7 @@ class QgsVectorLayerProperties : public QDialog, private Ui::QgsVectorLayerPrope
void on_pbnSelectEditForm_clicked();
void on_tabWidget_currentChanged( int idx );
void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
void on_mAddCategoryPushButton_clicked();
void on_mRemoveCategoryPushButton_clicked();
void on_mDiagramFontButton_clicked();
void on_mFixedSizeCheckBox_stateChanged( int state );
void on_mScaleDependentDiagramVisibilityCheckBox_stateChanged( int state );
void on_mFindMaximumValueButton_clicked();
void on_mBackgroundColorButton_clicked();
void on_mDiagramPenColorButton_clicked();
void on_mDisplayDiagramsCheckBox_stateChanged( int state );
void on_pbnUpdateExtents_clicked();
void on_mIncreaseSmallDiagramsCheckBox_stateChanged( int state );

void enableLabelOptions( bool theFlag );
void addAttribute();
Expand All @@ -144,12 +135,6 @@ class QgsVectorLayerProperties : public QDialog, private Ui::QgsVectorLayerPrope
void on_mButtonAddJoin_clicked();
void on_mButtonRemoveJoin_clicked();

/**Set color for diagram category*/
void handleDiagramItemDoubleClick( QTreeWidgetItem * item, int column );
void handleDiagramTypeChanged( const QString& itemtext );
/** The checkbox for small diagram scaling has been changed*/
// void handleIncreaseSmallDiagramsChanged( int state );

signals:

/** emitted when changes to layer were saved to update legend */
Expand Down Expand Up @@ -192,14 +177,13 @@ class QgsVectorLayerProperties : public QDialog, private Ui::QgsVectorLayerPrope
/**Buffer renderer, which is assigned to the vector layer when apply is pressed*/
//QgsRenderer* bufferRenderer;
/**Labeling dialog. If apply is pressed, options are applied to vector's QgsLabel */
QgsLabelingGui *labelingDialog;
QgsLabelingGui* labelingDialog;
/**Label dialog. If apply is pressed, options are applied to vector's QgsLabel */
QgsLabelDialog* labelDialog;
/**Actions dialog. If apply is pressed, the actions are stored for later use */
QgsAttributeActionDialog* actionDialog;

/**A list of all widgets to enable/disable when diagrams are enabled / disabled */
QList<QWidget *> mDiagramDetailWidgets;
/**Diagram dialog. If apply is pressed, options are applied to vector's diagrams*/
QgsDiagramProperties* diagramPropertiesDialog;

QList<QgsApplyDialog*> mOverlayDialogs;
QMap<int, QPushButton*> mButtonMap;
Expand All @@ -209,8 +193,6 @@ class QgsVectorLayerProperties : public QDialog, private Ui::QgsVectorLayerPrope
QMap<int, QgsVectorLayer::ValueRelationData> mValueRelationData;
QMap<int, QPair<QString, QString> > mCheckedStates;

QFont mDiagramFont;

void updateButtons();
void loadRows();
void setRow( int row, int idx, const QgsField &field );
Expand Down
945 changes: 945 additions & 0 deletions src/ui/qgsdiagrampropertiesbase.ui

Large diffs are not rendered by default.

689 changes: 3 additions & 686 deletions src/ui/qgsvectorlayerpropertiesbase.ui

Large diffs are not rendered by default.