[FEATURE] Update QgsColorButton to offer live color chooser updates and show transparent checkerboard background

- Add option to Options for live color chooser support (QgsColorDialog)
- Add ability to define whether QgsColorButton accepts live updates (default: true)
- Move QgsColorButton to single subclass of QPushButton
- Show different button types relative to whether button has text
- Add transparent checkerboard background for chosen colors with alpha < 255
- Fix triple-modal window issue for Mac (with regards to using native color dialog)

- Composer item frame now supports transparency
- Composer item background transparency support moved to color dialog
- Composer composition grid now supports transparency
This commit is contained in:
Larry Shaffer 2013-01-08 14:22:27 -07:00
parent 661df0e446
commit c966dbf69b
74 changed files with 1391 additions and 1299 deletions

View File

@ -279,6 +279,7 @@
<file>themes/default/symbologyUp.png</file>
<file>themes/default/tracking.png</file>
<file>themes/default/transformed.png</file>
<file>themes/default/transp-background_8x8.png</file>
<file>themes/default/user.png</file>
<file>themes/default/mActionAddHtml.png</file>
<file>themes/gis/mActionAddArrow.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

View File

@ -12,6 +12,7 @@
%Include qgsattributeeditor.sip
%Include qgscollapsiblegroupbox.sip
%Include qgscolorbutton.sip
%Include qgscolordialog.sip
%Include qgscomposerview.sip
%Include qgscredentialdialog.sip
%Include qgsdetaileditemdata.sip

View File

@ -1,6 +1,12 @@
/** \ingroup gui
* \class QgsColorButton
* A cross platform button subclass for selecting colors. Will open a color chooser dialog when clicked.
* Offers live updates to button from color chooser dialog
* @note inherited base class moved from QToolButton to QPushButton in QGIS 1.9
*/
class QgsColorButton : QToolButton
class QgsColorButton: QPushButton
{
%TypeHeaderCode
#include <qgscolorbutton.h>
@ -15,7 +21,7 @@ class QgsColorButton : QToolButton
* @param cdo Options for the color chooser dialog
* @note changed in 1.9
*/
QgsColorButton( QWidget *parent = 0, QString cdt = "Select Color", QColorDialog::ColorDialogOptions cdo = 0 );
QgsColorButton( QWidget *parent = 0, QString cdt = "", QColorDialog::ColorDialogOptions cdo = 0 );
~QgsColorButton();
/**
@ -65,11 +71,20 @@ class QgsColorButton : QToolButton
*/
QString colorDialogTitle();
protected:
void paintEvent( QPaintEvent *e );
/**
* Whether the button accepts live updates from QColorDialog.
*
* @note added in 1.9
*/
bool acceptLiveUpdates();
public slots:
void onButtonClicked();
/**
* Sets whether the button accepts live updates from QColorDialog.
* Live updates may cause changes that are not undoable on QColorDialog cancel.
*
* @note added in 1.9
*/
void setAcceptLiveUpdates( bool accept );
signals:
/**
@ -80,19 +95,9 @@ class QgsColorButton : QToolButton
* @note added in 1.9
*/
void colorChanged( const QColor &color );
};
class QgsColorButtonV2 : QPushButton
{
%TypeHeaderCode
#include <qgscolorbutton.h>
%End
public:
QgsColorButtonV2( QWidget* parent = 0 );
QgsColorButtonV2( QString text, QWidget* parent = 0 );
void setColor( const QColor &color );
QColor color() const;
protected:
void changeEvent( QEvent* e );
void paintEvent( QPaintEvent* e );
static const QPixmap& transpBkgrd();
};

View File

@ -0,0 +1,29 @@
/** \ingroup gui
* \class QgsColorDialog
* A dialog for selecting a color
*/
class QgsColorDialog : QObject
{
%TypeHeaderCode
#include <qgscolordialog.h>
%End
public:
QgsColorDialog();
~QgsColorDialog();
/** Return a color selection from a QColorDialog, with live updating of interim selections.
* @param initialColor The initial color of the selection dialog.
* @param updateObject The receiver object of the live updating.
* @param updateSlot The receiver object's slot for live updating (e.g. "setColor( const QColor& )" ).
* @param parent Parent widget. Usually 0 is best for native system color dialogs.
* @param title The title of the QColorDialog.
* @param options ColorDialogOptions passed to QColorDialog.
* @return Selected color on accepted() or initialColor on rejected().
*/
static QColor getLiveColor( const QColor& initialColor, QObject* updateObject, const char* updateSlot,
QWidget* parent = 0,
const QString& title = "",
QColorDialog::ColorDialogOptions options = 0 );
};

View File

@ -96,7 +96,7 @@ class QgsRendererRulePropsDialog : QDialog
%End
public:
QgsRendererRulePropsDialog( QgsRuleBasedRendererV2::Rule* rule, QgsVectorLayer* layer, QgsStyleV2* style );
QgsRendererRulePropsDialog( QgsRuleBasedRendererV2::Rule* rule, QgsVectorLayer* layer, QgsStyleV2* style, QWidget* parent = 0 );
~QgsRendererRulePropsDialog();
QgsRuleBasedRendererV2::Rule* rule();

View File

@ -34,7 +34,7 @@ class QgsSimpleLineSymbolLayerV2Widget : QgsSymbolLayerV2Widget
public slots:
void penWidthChanged();
void colorChanged();
void colorChanged( const QColor& color );
void penStyleChanged();
void offsetChanged();
void on_mCustomCheckBox_stateChanged( int state );
@ -65,8 +65,8 @@ class QgsSimpleMarkerSymbolLayerV2Widget : QgsSymbolLayerV2Widget
public slots:
void setName();
void setColorBorder();
void setColorFill();
void setColorBorder( const QColor& color );
void setColorFill( const QColor& color );
void setSize();
void setAngle();
void setOffset();
@ -90,8 +90,8 @@ class QgsSimpleFillSymbolLayerV2Widget : QgsSymbolLayerV2Widget
virtual QgsSymbolLayerV2* symbolLayer();
public slots:
void setColor();
void setBorderColor();
void setColor( const QColor& color );
void setBorderColor( const QColor& color );
void setBrushStyle();
void borderWidthChanged();
void borderStyleChanged();
@ -150,8 +150,8 @@ class QgsSvgMarkerSymbolLayerV2Widget : QgsSymbolLayerV2Widget
void setOffset();
void on_mFileToolButton_clicked();
void on_mFileLineEdit_textEdited( const QString& text );
void on_mChangeColorButton_clicked();
void on_mChangeBorderColorButton_clicked();
void on_mChangeColorButton_colorChanged( const QColor& color );
void on_mChangeBorderColorButton_colorChanged( const QColor& color );
void on_mBorderWidthSpinBox_valueChanged( double d );
protected:
@ -180,7 +180,7 @@ class QgsLineDecorationSymbolLayerV2Widget : QgsSymbolLayerV2Widget
virtual QgsSymbolLayerV2* symbolLayer();
public slots:
void colorChanged();
void colorChanged( const QColor& color );
void penWidthChanged();
};
@ -252,7 +252,7 @@ class QgsFontMarkerSymbolLayerV2Widget : QgsSymbolLayerV2Widget
public slots:
void setFontFamily( const QFont& font );
void setColor();
void setColor( const QColor& color );
void setSize( double size );
void setAngle( double angle );
void setCharacter( const QChar& chr );

View File

@ -8,7 +8,7 @@ class QgsSymbolsListWidget : QWidget
public slots:
void setSymbolFromStyle( const QModelIndex & index );
void setSymbolColor();
void setSymbolColor( const QColor& color );
void setMarkerAngle( double angle );
void setMarkerSize( double size );
void setLineWidth( double width );

View File

@ -8,8 +8,8 @@ class QgsVectorGradientColorRampV2Dialog : QDialog
QgsVectorGradientColorRampV2Dialog( QgsVectorGradientColorRampV2* ramp, QWidget* parent = NULL );
public slots:
void setColor1();
void setColor2();
void setColor1( const QColor& color );
void setColor2( const QColor& color );
void toggledStops( bool on );
void addStop();

View File

@ -77,25 +77,17 @@ void QgsComposerArrowWidget::on_mArrowHeadWidthSpinBox_valueChanged( double d )
mArrow->endCommand();
}
void QgsComposerArrowWidget::on_mArrowColorButton_clicked()
void QgsComposerArrowWidget::on_mArrowColorButton_colorChanged( const QColor& newColor )
{
if ( !mArrow )
{
return;
}
#if QT_VERSION >= 0x040500
QColor newColor = QColorDialog::getColor( mArrow->arrowColor(), 0, tr( "Arrow color" ), QColorDialog::ShowAlphaChannel );
#else
QColor newColor = QColorDialog::getColor( mArrow->arrowColor() );
#endif
if ( newColor.isValid() )
{
mArrow->beginCommand( tr( "Arrow color changed" ) );
mArrow->setArrowColor( newColor );
mArrow->update();
mArrow->endCommand();
}
mArrow->beginCommand( tr( "Arrow color changed" ) );
mArrow->setArrowColor( newColor );
mArrow->update();
mArrow->endCommand();
}
void QgsComposerArrowWidget::blockAllSignals( bool block )
@ -120,6 +112,9 @@ void QgsComposerArrowWidget::setGuiElementValues()
}
blockAllSignals( true );
mArrowColorButton->setColor( mArrow->arrowColor() );
mArrowColorButton->setColorDialogTitle( tr( "Select arrow color" ) );
mArrowColorButton->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
mOutlineWidthSpinBox->setValue( mArrow->outlineWidth() );
mArrowHeadWidthSpinBox->setValue( mArrow->arrowHeadWidth() );

View File

@ -42,7 +42,7 @@ class QgsComposerArrowWidget: public QWidget, private Ui::QgsComposerArrowWidget
private slots:
void on_mOutlineWidthSpinBox_valueChanged( double d );
void on_mArrowHeadWidthSpinBox_valueChanged( double d );
void on_mArrowColorButton_clicked();
void on_mArrowColorButton_colorChanged( const QColor& newColor );
void on_mDefaultMarkerRadioButton_toggled( bool toggled );
void on_mNoMarkerRadioButton_toggled( bool toggled );
void on_mSvgMarkerRadioButton_toggled( bool toggled );

View File

@ -66,13 +66,14 @@ void QgsComposerItemWidget::on_mFrameColorButton_clicked()
{
return;
}
}
QColor newFrameColor = QColorDialog::getColor( mItem->pen().color(), 0 );
if ( !newFrameColor.isValid() )
void QgsComposerItemWidget::on_mFrameColorButton_colorChanged( const QColor& newFrameColor )
{
if ( !mItem )
{
return; //dialog canceled
return;
}
mItem->beginCommand( tr( "Frame color changed" ) );
QPen thePen;
thePen.setColor( newFrameColor );
@ -89,15 +90,17 @@ void QgsComposerItemWidget::on_mBackgroundColorButton_clicked()
{
return;
}
}
QColor newBackgroundColor = QColorDialog::getColor( mItem->brush().color(), 0 );
if ( !newBackgroundColor.isValid() )
void QgsComposerItemWidget::on_mBackgroundColorButton_colorChanged( const QColor& newBackgroundColor )
{
if ( !mItem )
{
return; //dialog canceled
return;
}
// QColor newColor( newBackgroundColor );
mItem->beginCommand( tr( "Background color changed" ) );
newBackgroundColor.setAlpha( 255 - ( mTransparencySpinBox->value() * 2.55 ) );
// newColor.setAlpha( 255 - ( mTransparencySpinBox->value() * 2.55 ) );
mItem->setBrush( QBrush( QColor( newBackgroundColor ), Qt::SolidPattern ) );
//if the item is a composer map, we need to regenerate the map image
//because it usually is cached
@ -110,39 +113,39 @@ void QgsComposerItemWidget::on_mBackgroundColorButton_clicked()
mItem->endCommand();
}
void QgsComposerItemWidget::on_mTransparencySpinBox_valueChanged( int value )
{
if ( !mItem )
{
return;
}
//void QgsComposerItemWidget::on_mTransparencySpinBox_valueChanged( int value )
//{
// if ( !mItem )
// {
// return;
// }
mTransparencySlider->blockSignals( true );
mTransparencySlider->setValue( value );
mTransparencySlider->blockSignals( false );
changeItemTransparency( value );
}
// mTransparencySlider->blockSignals( true );
// mTransparencySlider->setValue( value );
// mTransparencySlider->blockSignals( false );
// changeItemTransparency( value );
//}
void QgsComposerItemWidget::on_mTransparencySlider_valueChanged( int value )
{
if ( !mItem )
{
return;
}
// do item updates only off of mTransparencySpinBox valueChanged
mTransparencySpinBox->setValue( value );
}
//void QgsComposerItemWidget::on_mTransparencySlider_valueChanged( int value )
//{
// if ( !mItem )
// {
// return;
// }
// // do item updates only off of mTransparencySpinBox valueChanged
// mTransparencySpinBox->setValue( value );
//}
void QgsComposerItemWidget::changeItemTransparency( int value )
{
mItem->beginCommand( tr( "Item transparency changed" ) );
QBrush itemBrush = mItem->brush();
QColor brushColor = itemBrush.color();
brushColor.setAlpha( 255 - ( value * 2.55 ) );
mItem->setBrush( QBrush( brushColor ) );
mItem->update();
mItem->endCommand();
}
//void QgsComposerItemWidget::changeItemTransparency( int value )
//{
// mItem->beginCommand( tr( "Item transparency changed" ) );
// QBrush itemBrush = mItem->brush();
// QColor brushColor = itemBrush.color();
// brushColor.setAlpha( 255 - ( value * 2.55 ) );
// mItem->setBrush( QBrush( brushColor ) );
// mItem->update();
// mItem->endCommand();
//}
void QgsComposerItemWidget::changeItemPosition()
{
@ -344,30 +347,37 @@ void QgsComposerItemWidget::setValuesForGuiElements()
setValuesForGuiPositionElements();
mTransparencySlider->blockSignals( true );
// mTransparencySlider->blockSignals( true );
mOutlineWidthSpinBox->blockSignals( true );
mFrameGroupBox->blockSignals( true );
mBackgroundGroupBox->blockSignals( true );
mItemIdLineEdit->blockSignals( true );
mItemUuidLineEdit->blockSignals( true );
mTransparencySpinBox->blockSignals( true );
// mTransparencySpinBox->blockSignals( true );
int alphaPercent = ( 255 - mItem->brush().color().alpha() ) / 2.55;
mTransparencySpinBox->setValue( alphaPercent );
mTransparencySlider->setValue( alphaPercent );
mBackgroundColorButton->setColor( mItem->brush().color() );
mBackgroundColorButton->setColorDialogTitle( tr( "Select background color" ) );
mBackgroundColorButton->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
// int alphaPercent = ( 255 - mItem->brush().color().alpha() ) / 2.55;
// mTransparencySpinBox->setValue( alphaPercent );
// mTransparencySlider->setValue( alphaPercent );
mFrameColorButton->setColor( mItem->pen().color() );
mFrameColorButton->setColorDialogTitle( tr( "Select frame color" ) );
mFrameColorButton->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
mOutlineWidthSpinBox->setValue( mItem->pen().widthF() );
mItemIdLineEdit->setText( mItem->id() );
mItemUuidLineEdit->setText( mItem->uuid() );
mFrameGroupBox->setChecked( mItem->hasFrame() );
mBackgroundGroupBox->setChecked( mItem->hasBackground() );
mTransparencySlider->blockSignals( false );
// mTransparencySlider->blockSignals( false );
mOutlineWidthSpinBox->blockSignals( false );
mFrameGroupBox->blockSignals( false );
mBackgroundGroupBox->blockSignals( false );
mItemIdLineEdit->blockSignals( false );
mItemUuidLineEdit->blockSignals( false );
mTransparencySpinBox->blockSignals( false );
// mTransparencySpinBox->blockSignals( false );
}

View File

@ -38,9 +38,17 @@ class QgsComposerItemWidget: public QWidget, private Ui::QgsComposerItemWidgetBa
public slots:
void on_mFrameColorButton_clicked();
/** Set the frame color
* @note added in 1.9
*/
void on_mFrameColorButton_colorChanged( const QColor& newFrameColor );
void on_mBackgroundColorButton_clicked();
void on_mTransparencySlider_valueChanged( int value );
void on_mTransparencySpinBox_valueChanged( int value );
/** Set the background color
* @note added in 1.9
*/
void on_mBackgroundColorButton_colorChanged( const QColor& newBackgroundColor );
// void on_mTransparencySlider_valueChanged( int value );
// void on_mTransparencySpinBox_valueChanged( int value );
void on_mOutlineWidthSpinBox_valueChanged( double d );
void on_mFrameGroupBox_toggled( bool state );
void on_mBackgroundGroupBox_toggled( bool state );
@ -67,7 +75,7 @@ class QgsComposerItemWidget: public QWidget, private Ui::QgsComposerItemWidgetBa
private:
QgsComposerItemWidget();
void changeItemTransparency( int value );
// void changeItemTransparency( int value );
void changeItemPosition();
QgsComposerItem* mItem;

View File

@ -265,24 +265,14 @@ void QgsComposerTableWidget::on_mGridStrokeWidthSpinBox_valueChanged( double d )
mComposerTable->endCommand();
}
void QgsComposerTableWidget::on_mGridColorButton_clicked()
void QgsComposerTableWidget::on_mGridColorButton_colorChanged( const QColor& newColor )
{
if ( !mComposerTable )
{
return;
}
#if QT_VERSION >= 0x040500
QColor newColor = QColorDialog::getColor( mComposerTable->gridColor(), 0, tr( "Select grid color" ) );
#else
QColor newColor = QColorDialog::getColor( mComposerTable->gridColor(), 0 );
#endif
if ( !newColor.isValid() )
{
return;
}
mComposerTable->beginCommand( tr( "Table grid color" ) );
mGridColorButton->setColor( newColor );
mComposerTable->setGridColor( newColor );
mComposerTable->update();
mComposerTable->endCommand();
@ -336,6 +326,8 @@ void QgsComposerTableWidget::updateGuiElements()
mMarginSpinBox->setValue( mComposerTable->lineTextDistance() );
mGridStrokeWidthSpinBox->setValue( mComposerTable->gridStrokeWidth() );
mGridColorButton->setColor( mComposerTable->gridColor() );
mGridColorButton->setColorDialogTitle( tr( "Select grid color" ) );
mGridColorButton->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
if ( mComposerTable->showGrid() )
{
mShowGridGroupCheckBox->setChecked( true );

View File

@ -46,7 +46,7 @@ class QgsComposerTableWidget: public QWidget, private Ui::QgsComposerTableWidget
void on_mMaximumColumnsSpinBox_valueChanged( int i );
void on_mMarginSpinBox_valueChanged( double d );
void on_mGridStrokeWidthSpinBox_valueChanged( double d );
void on_mGridColorButton_clicked();
void on_mGridColorButton_colorChanged( const QColor& newColor );
void on_mHeaderFontPushButton_clicked();
void on_mContentFontPushButton_clicked();
void on_mShowGridGroupCheckBox_toggled( bool state );

View File

@ -64,6 +64,8 @@ QgsCompositionWidget::QgsCompositionWidget( QWidget* parent, QgsComposition* c )
//grid pen color
mGridColorButton->setColor( mComposition->gridPen().color() );
mGridColorButton->setColorDialogTitle( tr( "Select grid color" ) );
mGridColorButton->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
mGridStyleComboBox->insertItem( 0, tr( "Solid" ) );
mGridStyleComboBox->insertItem( 1, tr( "Dots" ) );

View File

@ -178,13 +178,11 @@ void QgsContinuousColorDialog::apply()
void QgsContinuousColorDialog::selectMinimumColor( const QColor& color )
{
Q_UNUSED( color )
activateWindow();
}
void QgsContinuousColorDialog::selectMaximumColor( const QColor& color )
{
Q_UNUSED( color )
activateWindow();
}
void QgsContinuousColorDialog::on_cb_polygonOutline_clicked()

View File

@ -70,17 +70,12 @@ void QgsDecorationCopyrightDialog::on_buttonBox_rejected()
reject();
}
void QgsDecorationCopyrightDialog::on_pbnColorChooser_clicked()
void QgsDecorationCopyrightDialog::on_pbnColorChooser_colorChanged( const QColor& c )
{
QColor c = QColorDialog::getColor();
if ( c.isValid() )
{
pbnColorChooser->setColor( c );
QTextCursor cursor = txtCopyrightText->textCursor();
txtCopyrightText->selectAll();
txtCopyrightText->setTextColor( c );
txtCopyrightText->setTextCursor( cursor );
}
QTextCursor cursor = txtCopyrightText->textCursor();
txtCopyrightText->selectAll();
txtCopyrightText->setTextColor( c );
txtCopyrightText->setTextCursor( cursor );
}
void QgsDecorationCopyrightDialog::on_buttonBox_helpRequested()

View File

@ -31,7 +31,7 @@ class QgsDecorationCopyrightDialog : public QDialog, private Ui::QgsDecorationCo
void on_buttonBox_accepted();
void on_buttonBox_rejected();
void on_buttonBox_helpRequested();
void on_pbnColorChooser_clicked();
void on_pbnColorChooser_colorChanged( const QColor& c );
protected:
QgsDecorationCopyright& mDeco;

View File

@ -251,6 +251,12 @@ QgsLabelingGui::QgsLabelingGui( QgsPalLabeling* lbl, QgsVectorLayer* layer, QgsM
mBufferJoinStyleComboBox->setPenJoinStyle( lyr.bufferJoinStyle );
mBufferTranspFillChbx->setChecked( !lyr.bufferNoFill );
}
else
{
// default color
// TODO: remove after moving to persistent PAL settings?
btnBufferColor->setColor( Qt::white );
}
bool formattedNumbers = lyr.formatNumbers;
bool plusSign = lyr.plusSign;
@ -360,6 +366,7 @@ void QgsLabelingGui::collapseSample( bool collapse )
void QgsLabelingGui::apply()
{
writeSettingsToLayer();
QgisApp::instance()->markDirty();
// trigger refresh
if ( mMapCanvas )
{

View File

@ -110,9 +110,7 @@ void QgsLabelPropertyDialog::init( const QString& layerId, int featureId, const
mHaliComboBox->setCurrentIndex( mHaliComboBox->findText( "Left" ) );
mValiComboBox->setCurrentIndex( mValiComboBox->findText( "Bottom" ) );
mFontColorButton->setColorDialogTitle( tr( "Font color" ) );
mFontColorButton->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
mBufferColorButton->setColorDialogTitle( tr( "Buffer color" ) );
mBufferColorButton->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
disableGuiElements();
@ -121,14 +119,14 @@ void QgsLabelPropertyDialog::init( const QString& layerId, int featureId, const
for ( ; propIt != mDataDefinedProperties.constEnd(); ++propIt )
{
bool ok = false;
switch ( propIt.key() )
{
case QgsPalLayerSettings::Show:
{ // new scope to assign variables
mShowLabelChkbx->setEnabled( true );
bool showSuccess;
int showLabel = mCurLabelFeat.attribute( propIt.value() ).toInt( &showSuccess );
mShowLabelChkbx->setChecked( !showSuccess || showLabel != 0 );
int showLabel = mCurLabelFeat.attribute( propIt.value() ).toInt( &ok );
mShowLabelChkbx->setChecked( !ok || showLabel != 0 );
break;
}
case QgsPalLayerSettings::AlwaysShow:
@ -136,34 +134,76 @@ void QgsLabelPropertyDialog::init( const QString& layerId, int featureId, const
mAlwaysShowChkbx->setChecked( mCurLabelFeat.attribute( propIt.value() ).toBool() );
break;
case QgsPalLayerSettings::MinScale:
mMinScaleSpinBox->setEnabled( true );
mMinScaleSpinBox->setValue( mCurLabelFeat.attribute( propIt.value() ).toInt() );
{
int minScale = mCurLabelFeat.attribute( propIt.value() ).toInt( &ok );
if ( ok )
{
mMinScaleSpinBox->setEnabled( true );
mMinScaleSpinBox->setValue( minScale );
}
break;
}
case QgsPalLayerSettings::MaxScale:
mMaxScaleSpinBox->setEnabled( true );
mMaxScaleSpinBox->setValue( mCurLabelFeat.attribute( propIt.value() ).toInt() );
{
int maxScale = mCurLabelFeat.attribute( propIt.value() ).toInt( &ok );
if ( ok )
{
mMaxScaleSpinBox->setEnabled( true );
mMaxScaleSpinBox->setValue( maxScale );
}
break;
}
case QgsPalLayerSettings::Size:
mFontSizeSpinBox->setEnabled( true );
mLabelFont.setPointSizeF( mCurLabelFeat.attribute( propIt.value() ).toDouble() );
mFontSizeSpinBox->setValue( mCurLabelFeat.attribute( propIt.value() ).toDouble() );
{
double fontSize = mCurLabelFeat.attribute( propIt.value() ).toDouble( &ok );
if ( ok )
{
mFontSizeSpinBox->setEnabled( true );
mLabelFont.setPointSizeF( fontSize );
mFontSizeSpinBox->setValue( fontSize );
}
break;
}
case QgsPalLayerSettings::BufferSize:
mBufferSizeSpinBox->setEnabled( true );
mBufferSizeSpinBox->setValue( mCurLabelFeat.attribute( propIt.value() ).toDouble() );
{
double bufferSize = mCurLabelFeat.attribute( propIt.value() ).toDouble( &ok );
if ( ok )
{
mBufferSizeSpinBox->setEnabled( true );
mBufferSizeSpinBox->setValue( bufferSize );
}
break;
}
case QgsPalLayerSettings::PositionX:
mXCoordSpinBox->setEnabled( true );
mXCoordSpinBox->setValue( mCurLabelFeat.attribute( propIt.value() ).toDouble() );
{
double posX = mCurLabelFeat.attribute( propIt.value() ).toDouble( &ok );
if ( ok )
{
mXCoordSpinBox->setEnabled( true );
mXCoordSpinBox->setValue( posX );
}
break;
}
case QgsPalLayerSettings::PositionY:
mYCoordSpinBox->setEnabled( true );
mYCoordSpinBox->setValue( mCurLabelFeat.attribute( propIt.value() ).toDouble() );
{
double posY = mCurLabelFeat.attribute( propIt.value() ).toDouble( &ok );
if ( ok )
{
mYCoordSpinBox->setEnabled( true );
mYCoordSpinBox->setValue( posY );
}
break;
}
case QgsPalLayerSettings::LabelDistance:
mLabelDistanceSpinBox->setEnabled( true );
mLabelDistanceSpinBox->setValue( mCurLabelFeat.attribute( propIt.value() ).toDouble() );
{
double labelDist = mCurLabelFeat.attribute( propIt.value() ).toDouble( &ok );
if ( ok )
{
mLabelDistanceSpinBox->setEnabled( true );
mLabelDistanceSpinBox->setValue( labelDist );
}
break;
}
case QgsPalLayerSettings::Hali:
mHaliComboBox->setEnabled( true );
mHaliComboBox->setCurrentIndex( mHaliComboBox->findText( mCurLabelFeat.attribute( propIt.value() ).toString() ) );
@ -181,11 +221,17 @@ void QgsLabelPropertyDialog::init( const QString& layerId, int featureId, const
mFontColorButton->setColor( QColor( mCurLabelFeat.attribute( propIt.value() ).toString() ) );
break;
case QgsPalLayerSettings::Rotation:
mRotationSpinBox->setEnabled( true );
mRotationSpinBox->setValue( mCurLabelFeat.attribute( propIt.value() ).toDouble() );
{
double rot = mCurLabelFeat.attribute( propIt.value() ).toDouble( &ok );
if ( ok )
{
mRotationSpinBox->setEnabled( true );
mRotationSpinBox->setValue( rot );
}
break;
}
//font related properties
//font related properties
case QgsPalLayerSettings::Bold:
mLabelFont.setBold( mCurLabelFeat.attribute( propIt.value() ).toBool() );
break;
@ -237,6 +283,7 @@ void QgsLabelPropertyDialog::blockElementSignals( bool block )
mFontSizeSpinBox->blockSignals( block );
mBufferSizeSpinBox->blockSignals( block );
mFontPushButton->blockSignals( block );
mFontColorButton->blockSignals( block );
mBufferColorButton->blockSignals( block );
mLabelDistanceSpinBox->blockSignals( block );
mXCoordSpinBox->blockSignals( block );

View File

@ -490,6 +490,9 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
QString name = QApplication::style()->objectName();
cmbStyle->setCurrentIndex( cmbStyle->findText( name, Qt::MatchFixedString ) );
mLiveColorDialogsChkBx->setChecked( settings.value( "/qgis/live_color_dialogs", false ).toBool() );
//set the state of the checkboxes
//Changed to default to true as of QGIS 1.7
chkAntiAliasing->setChecked( settings.value( "/qgis/enable_anti_aliasing", true ).toBool() );
@ -1085,6 +1088,8 @@ void QgsOptions::saveOptions()
settings.setValue( "/qgis/messageTimeout", mMessageTimeoutSpnBx->value() );
settings.setValue( "/qgis/live_color_dialogs", mLiveColorDialogsChkBx->isChecked() );
// rasters settings
settings.setValue( "/Raster/defaultRedBand", spnRed->value() );
settings.setValue( "/Raster/defaultGreenBand", spnGreen->value() );

View File

@ -252,14 +252,12 @@ void QgsSingleSymbolDialog::selectOutlineColor( const QColor& color )
{
Q_UNUSED( color )
emit settingsChanged();
activateWindow();
}
void QgsSingleSymbolDialog::selectFillColor( const QColor& color )
{
Q_UNUSED( color )
emit settingsChanged();
activateWindow();
}
//should this method have a different name?

View File

@ -50,6 +50,7 @@ qgsattributeeditor.cpp
qgslegendinterface.cpp
qgscharacterselectdialog.cpp
qgscolorbutton.cpp
qgscolordialog.cpp
qgscomposerview.cpp
qgscursors.cpp
qgsdetaileditemdelegate.cpp
@ -156,6 +157,7 @@ attributetable/qgsattributetabledelegate.h
qgsattributeeditor.h
qgscharacterselectdialog.h
qgscolordialog.h
qgscomposerview.h
qgsdetaileditemdelegate.h
qgsdetaileditemwidget.h
@ -205,6 +207,7 @@ SET(QGIS_GUI_HDRS
qgisgui.h
qgisinterface.h
qgscharacterselectdialog.h
qgscolordialog.h
qgscursors.h
qgsencodingfiledialog.h
qgsfiledropedit.h

View File

@ -14,78 +14,250 @@
***************************************************************************/
#include "qgscolorbutton.h"
#include "qgscolordialog.h"
#include "qgsapplication.h"
#include "qgslogger.h"
#include <QPainter>
#include <QSettings>
#include <QTemporaryFile>
/*!
\class QgsColorButton
\brief The QgsColorButton class provides a tool button widget displaying
a color which can be altered by calling QColorDialog::getColor.
\brief A cross platform button subclass for selecting colors. Will open a color chooser dialog when clicked.
Offers live updates to button from color chooser dialog
A subclass of QToolButton is needed to draw the button content because
A subclass of QPushButton is needed to draw the button content because
some platforms such as Mac OS X and Windows XP enforce a consistent
GUI look by always using the button color of the current style and
not allowing button backgrounds to be changed on a button by button basis.
Therefore, a wholely stylesheet-based button is used for the no-text variant.
This class is a simplified version of QtColorButton, an internal class used
by Qt Designer to do the same thing.
*/
QgsColorButton::QgsColorButton( QWidget *parent, QString cdt, QColorDialog::ColorDialogOptions cdo )
: QToolButton( parent )
, mColorDialogTitle( cdt )
: QPushButton( parent )
, mColorDialogTitle( cdt.isEmpty() ? tr( "Select Color" ) : cdt )
, mColor( Qt::black )
, mColorDialogOptions( cdo )
, mAcceptLiveUpdates( true )
, mTempPNG( NULL )
{
setToolButtonStyle( Qt::ToolButtonTextOnly ); // decrease default button height
connect( this, SIGNAL( clicked() ), this, SLOT( onButtonClicked() ) );
}
QgsColorButton::~QgsColorButton()
{}
{
mTempPNG.remove();
}
const QPixmap& QgsColorButton::transpBkgrd()
{
static QPixmap transpBkgrd;
if ( transpBkgrd.isNull() )
transpBkgrd = QgsApplication::getThemePixmap( "/transp-background_8x8.png" );
return transpBkgrd;
}
void QgsColorButton::onButtonClicked()
{
//QgsDebugMsg( "entered" );
QColor newColor;
#if QT_VERSION >= 0x040500
QColor newColor = QColorDialog::getColor( color(), 0, mColorDialogTitle, mColorDialogOptions );
QSettings settings;
if ( mAcceptLiveUpdates && settings.value( "/qgis/live_color_dialogs", false ).toBool() )
{
newColor = QgsColorDialog::getLiveColor(
color(), this, "setValidColor( const QColor& )",
this->parentWidget(), mColorDialogTitle, mColorDialogOptions );
}
else
{
newColor = QColorDialog::getColor( color(), this->parentWidget(), mColorDialogTitle, mColorDialogOptions );
}
#else
QColor newColor = QColorDialog::getColor( color() );
newColor = QColorDialog::getColor( color(), this->parentWidget() );
#endif
setValidColor( newColor );
// reactivate button's window
activateWindow();
}
void QgsColorButton::setValidColor( const QColor& newColor )
{
if ( newColor.isValid() )
{
setColor( newColor );
}
}
/*!
Paints button in response to a paint event.
*/
void QgsColorButton::paintEvent( QPaintEvent *e )
void QgsColorButton::changeEvent( QEvent* e )
{
QToolButton::paintEvent( e );
if (
#ifdef Q_WS_MAC
// Mac shows color only a when a window is active
isActiveWindow() &&
#endif
isEnabled() )
if ( e->type() == QEvent::EnabledChange )
{
QPainter p( this );
int margin = 2; // Leave some space for highlighting
QRect r = rect().adjusted( margin, margin, -margin, -margin );
p.fillRect( r, mColor );
setButtonBackground();
}
QPushButton::changeEvent( e );
}
void QgsColorButton::paintEvent( QPaintEvent* e )
{
setButtonBackground();
QPushButton::paintEvent( e );
}
void QgsColorButton::setColor( const QColor &color )
{
if ( !color.isValid() )
{
return;
}
QColor oldColor = mColor;
mColor = color;
update();
if ( oldColor != mColor )
{
emit( colorChanged( mColor ) );
setButtonBackground();
if ( isEnabled() )
{
// TODO: May be beneficial to have the option to set color without emitting this signal.
// Now done by blockSignals( bool ) where button is used
emit( colorChanged( mColor ) );
}
}
}
void QgsColorButton::setButtonBackground()
{
if ( !text().isEmpty() )
{
// generate icon pixmap for regular pushbutton
setFlat( false );
QPixmap pixmap;
pixmap = QPixmap( iconSize() );
pixmap.fill( QColor( 0, 0, 0, 0 ) );
int iconW = iconSize().width();
int iconH = iconSize().height();
QRect rect( 0, 0, iconW, iconH );
// QPainterPath::addRoundRect has flaws, draw chamfered corners instead
QPainterPath roundRect;
int chamfer = 3;
int inset = 1;
roundRect.moveTo( chamfer, inset );
roundRect.lineTo( iconW - chamfer, inset );
roundRect.lineTo( iconW - inset, chamfer );
roundRect.lineTo( iconW - inset, iconH - chamfer );
roundRect.lineTo( iconW - chamfer, iconH - inset );
roundRect.lineTo( chamfer, iconH - inset );
roundRect.lineTo( inset, iconH - chamfer );
roundRect.lineTo( inset, chamfer );
roundRect.closeSubpath();
QPainter p;
p.begin( &pixmap );
p.setRenderHint( QPainter::Antialiasing );
p.setClipPath( roundRect );
p.setPen( Qt::NoPen );
if ( mColor.alpha() < 255 )
{
p.drawTiledPixmap( rect, transpBkgrd() );
}
p.setBrush( mColor );
p.drawRect( rect );
p.end();
// set this pixmap as icon
setIcon( QIcon( pixmap ) );
}
else
{
// generate temp background image file with checkerboard canvas to be used via stylesheet
// set flat, or inline spacing (widget margins) needs to be manually calcualted and set
setFlat( true );
bool useAlpha = ( mColorDialogOptions & QColorDialog::ShowAlphaChannel );
QColor tmpColor( mColor );
QString border( "110" );
if ( !isEnabled() ) // fake disabled look (use just Qt::lightGray instead?)
{
int tmpValue = ( 255 - tmpColor.value() ) / 3 + tmpColor.value();
tmpColor.setHsv( tmpColor.hue(), tmpColor.saturation() / 2, tmpValue, useAlpha ? tmpColor.alpha() : 255 );
border = "128";
}
// in case margins need to be adjusted
QString margin = QString( "%1px %2px %3px %4px" ).arg( 0 ).arg( 0 ).arg( 0 ).arg( 0 );
//QgsDebugMsg( QString( "%1 margin: %2" ).arg( objectName() ).arg( margin ) );
QString bkgrd = QString( " background-color: rgba(%1,%2,%3,%4);" )
.arg( tmpColor.red() )
.arg( tmpColor.green() )
.arg( tmpColor.blue() )
.arg( useAlpha ? tmpColor.alpha() : 255 );
if ( useAlpha && tmpColor.alpha() < 255 )
{
QPixmap pixmap = transpBkgrd();
QRect rect( 0, 0, pixmap.width(), pixmap.height() );
QPainter p;
p.begin( &pixmap );
p.setRenderHint( QPainter::Antialiasing );
p.setPen( Qt::NoPen );
p.setBrush( tmpColor );
p.drawRect( rect );
p.end();
if ( mTempPNG.open() )
{
mTempPNG.setAutoRemove( false );
pixmap.save( mTempPNG.fileName(), "PNG" );
mTempPNG.close();
}
bkgrd = QString( " background-image: url(%1);" ).arg( mTempPNG.fileName() );
}
//QgsDebugMsg( QString( "%1" ).arg( bkgrd ) );
setStyleSheet( QString( "QgsColorButton{"
" %1"
" background-position: top left;"
" background-origin: content;"
" background-clip: content;"
" padding: 2px;"
" margin: %2;"
" border-style: outset;"
" border-width: 1px;"
" border-color: rgb(%3,%3,%3);"
" border-radius: 3px;} "
"QgsColorButton:pressed{"
" %1"
" background-position: top left;"
" background-origin: content;"
" background-clip: content;"
" padding: 1px;"
" margin: %2;"
" border-style: inset;"
" border-width: 2px;"
" border-color: rgb(128,128,128);"
" border-radius: 4px;} " )
.arg( bkgrd )
.arg( margin )
.arg( border ) );
}
}
@ -113,37 +285,3 @@ QString QgsColorButton::colorDialogTitle()
{
return mColorDialogTitle;
}
//////////////////
QgsColorButtonV2::QgsColorButtonV2( QWidget* parent )
: QPushButton( parent )
{
}
QgsColorButtonV2::QgsColorButtonV2( QString text, QWidget* parent )
: QPushButton( text, parent )
{
}
void QgsColorButtonV2::setColor( const QColor &color )
{
mColor = color;
QPixmap pixmap( iconSize() );
pixmap.fill( QColor( 0, 0, 0, 0 ) );
QRect rect( 1, 1, iconSize().width() - 2, iconSize().height() - 2 );
// draw a slightly rounded rectangle
QPainter p;
p.begin( &pixmap );
p.setPen( Qt::NoPen );
p.setRenderHint( QPainter::Antialiasing );
p.setBrush( color );
p.drawRoundedRect( rect, 4, 4 );
p.end();
// set this pixmap as icon
setIcon( QIcon( pixmap ) );
}

View File

@ -16,15 +16,20 @@
#define QGSCOLORBUTTON_H
#include <QColorDialog>
#include <QToolButton>
#include <QPushButton>
#include <QTemporaryFile>
/** \ingroup gui
* \class QgsColorButton
* A cross platform button subclass for selecting colors. Will open a color chooser dialog when clicked.
* Offers live updates to button from color chooser dialog
* @note inherited base class moved from QToolButton to QPushButton in QGIS 1.9
*/
class GUI_EXPORT QgsColorButton: public QToolButton
class GUI_EXPORT QgsColorButton: public QPushButton
{
Q_OBJECT
Q_OBJECT
public:
/**
@ -35,7 +40,7 @@ class GUI_EXPORT QgsColorButton: public QToolButton
* @param cdo Options for the color chooser dialog
* @note changed in 1.9
*/
QgsColorButton( QWidget *parent = 0, QString cdt = tr( "Select Color" ), QColorDialog::ColorDialogOptions cdo = 0 );
QgsColorButton( QWidget *parent = 0, QString cdt = "", QColorDialog::ColorDialogOptions cdo = 0 );
~QgsColorButton();
/**
@ -85,11 +90,20 @@ class GUI_EXPORT QgsColorButton: public QToolButton
*/
QString colorDialogTitle();
protected:
void paintEvent( QPaintEvent *e );
/**
* Whether the button accepts live updates from QColorDialog.
*
* @note added in 1.9
*/
bool acceptLiveUpdates() { return mAcceptLiveUpdates; }
public slots:
void onButtonClicked();
/**
* Sets whether the button accepts live updates from QColorDialog.
* Live updates may cause changes that are not undoable on QColorDialog cancel.
*
* @note added in 1.9
*/
void setAcceptLiveUpdates( bool accept ) { mAcceptLiveUpdates = accept; }
signals:
/**
@ -101,24 +115,34 @@ class GUI_EXPORT QgsColorButton: public QToolButton
*/
void colorChanged( const QColor &color );
protected:
void changeEvent( QEvent* e );
void paintEvent( QPaintEvent* e );
static const QPixmap& transpBkgrd();
private:
QString mColorDialogTitle;
QColor mColor;
QColorDialog::ColorDialogOptions mColorDialogOptions;
};
bool mAcceptLiveUpdates;
QTemporaryFile mTempPNG;
private slots:
void onButtonClicked();
class GUI_EXPORT QgsColorButtonV2 : public QPushButton
{
public:
QgsColorButtonV2( QWidget* parent = 0 );
QgsColorButtonV2( QString text, QWidget* parent = 0 );
/**
* Sets the background pixmap for the button based upon set color and transparency.
*
* @note added in 1.9
*/
void setButtonBackground();
void setColor( const QColor &color );
QColor color() const { return mColor; }
private:
QColor mColor;
/**
* Sets color for button, if valid.
*
* @note added in 1.9
*/
void setValidColor( const QColor& newColor );
};
#endif

View File

@ -0,0 +1,53 @@
/***************************************************************************
qgscolordialog.cpp - color selection dialog
---------------------
begin : March 19, 2013
copyright : (C) 2013 by Larry Shaffer
email : larrys at dakcarto dot com
***************************************************************************
* *
* 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. *
* *
***************************************************************************/
#include "qgscolordialog.h"
#include <QMetaObject>
QgsColorDialog::QgsColorDialog()
{
}
QgsColorDialog::~QgsColorDialog()
{
}
QColor QgsColorDialog::getLiveColor( const QColor& initialColor, QObject* updateObject, const char* updateSlot,
QWidget* parent,
const QString& title,
QColorDialog::ColorDialogOptions options )
{
QColor returnColor( initialColor );
QColorDialog* liveDialog = new QColorDialog( initialColor, parent );
liveDialog->setWindowTitle( title.isEmpty() ? tr( "Select Color" ) : title );
liveDialog->setOptions( options );
#ifdef Q_WS_MAC
// always use native color dialog on Mac
liveDialog->setOption( QColorDialog::DontUseNativeDialog, false );
#endif
connect( liveDialog, SIGNAL( currentColorChanged( const QColor& ) ),
updateObject, QString( "1%1" ).arg( QString( QMetaObject::normalizedSignature( updateSlot ) ) ).toAscii() );
if ( liveDialog->exec() )
{
returnColor = liveDialog->currentColor();
}
delete liveDialog;
liveDialog = 0;
return returnColor;
}

53
src/gui/qgscolordialog.h Normal file
View File

@ -0,0 +1,53 @@
/***************************************************************************
qgscolordialog.h - color selection dialog
---------------------
begin : March 19, 2013
copyright : (C) 2013 by Larry Shaffer
email : larrys at dakcarto dot com
***************************************************************************
* *
* 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 QGSCOLORDIALOG_H
#define QGSCOLORDIALOG_H
#include <QColorDialog>
#include "qgisgui.h"
class QColor;
/** \ingroup gui
* \class QgsColorDialog
* A dialog for selecting a color
*/
class GUI_EXPORT QgsColorDialog : public QObject
{
Q_OBJECT
public:
QgsColorDialog();
~QgsColorDialog();
/** Return a color selection from a QColorDialog, with live updating of interim selections.
* @param initialColor The initial color of the selection dialog.
* @param updateObject The receiver object of the live updating.
* @param updateSlot The receiver object's slot for live updating (e.g. "setColor( const QColor& )" ).
* @param parent Parent widget. Usually 0 is best for native system color dialogs.
* @param title The title of the QColorDialog.
* @param options ColorDialogOptions passed to QColorDialog.
* @return Selected color on accepted() or initialColor on rejected().
*/
static QColor getLiveColor( const QColor& initialColor, QObject* updateObject, const char* updateSlot,
QWidget* parent = 0,
const QString& title = "",
QColorDialog::ColorDialogOptions options = 0 );
};
#endif // #ifndef QGSCOLORDIALOG_H

View File

@ -60,7 +60,9 @@ void QgsEllipseSymbolLayerV2Widget::setSymbolLayer( QgsSymbolLayerV2* layer )
mOutlineWidthSpinBox->setValue( mLayer->outlineWidth() );
btnChangeColorBorder->setColor( mLayer->outlineColor() );
btnChangeColorBorder->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
btnChangeColorFill->setColor( mLayer->fillColor() );
btnChangeColorFill->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
QList<QListWidgetItem *> symbolItemList = mShapeListWidget->findItems( mLayer->symbolName(), Qt::MatchExactly );
if ( symbolItemList.size() > 0 )
@ -190,32 +192,26 @@ void QgsEllipseSymbolLayerV2Widget::on_mOutlineWidthSpinBox_valueChanged( double
}
}
void QgsEllipseSymbolLayerV2Widget::on_btnChangeColorBorder_clicked()
void QgsEllipseSymbolLayerV2Widget::on_btnChangeColorBorder_colorChanged( const QColor& newColor )
{
if ( mLayer )
if ( !mLayer )
{
QColor newColor = QColorDialog::getColor( mLayer->outlineColor(), this, "", QColorDialog::ShowAlphaChannel );
if ( newColor.isValid() )
{
mLayer->setOutlineColor( newColor );
btnChangeColorBorder->setColor( newColor );
emit changed();
}
return;
}
mLayer->setOutlineColor( newColor );
emit changed();
}
void QgsEllipseSymbolLayerV2Widget::on_btnChangeColorFill_clicked()
void QgsEllipseSymbolLayerV2Widget::on_btnChangeColorFill_colorChanged( const QColor& newColor )
{
if ( mLayer )
if ( !mLayer )
{
QColor newColor = QColorDialog::getColor( mLayer->fillColor(), this, "", QColorDialog::ShowAlphaChannel );
if ( newColor.isValid() )
{
mLayer->setFillColor( newColor );
btnChangeColorFill->setColor( newColor );
emit changed();
}
return;
}
mLayer->setFillColor( newColor );
emit changed();
}
void QgsEllipseSymbolLayerV2Widget::fillDataDefinedComboBoxes()

View File

@ -47,8 +47,8 @@ class GUI_EXPORT QgsEllipseSymbolLayerV2Widget: public QgsSymbolLayerV2Widget, p
void on_mHeightSpinBox_valueChanged( double d );
void on_mRotationSpinBox_valueChanged( double d );
void on_mOutlineWidthSpinBox_valueChanged( double d );
void on_btnChangeColorBorder_clicked();
void on_btnChangeColorFill_clicked();
void on_btnChangeColorBorder_colorChanged( const QColor& newColor );
void on_btnChangeColorFill_colorChanged( const QColor& newColor );
void on_mDDSymbolWidthComboBox_currentIndexChanged( int idx );
void on_mDDSymbolHeightComboBox_currentIndexChanged( int idx );

View File

@ -222,42 +222,24 @@ void QgsPointDisplacementRendererWidget::on_mCircleWidthSpinBox_valueChanged( do
}
}
void QgsPointDisplacementRendererWidget::on_mCircleColorButton_clicked()
void QgsPointDisplacementRendererWidget::on_mCircleColorButton_colorChanged( const QColor& newColor )
{
if ( !mRenderer )
{
return;
}
#if QT_VERSION >= 0x040500
QColor newColor = QColorDialog::getColor( mRenderer->circleColor(), 0, tr( "Circle color" ), QColorDialog::ShowAlphaChannel );
#else
QColor newColor = QColorDialog::getColor( mRenderer->circleColor() );
#endif
if ( newColor.isValid() )
{
mRenderer->setCircleColor( newColor );
mCircleColorButton->setColor( newColor );
}
mRenderer->setCircleColor( newColor );
}
void QgsPointDisplacementRendererWidget::on_mLabelColorButton_clicked()
void QgsPointDisplacementRendererWidget::on_mLabelColorButton_colorChanged( const QColor& newColor )
{
if ( !mRenderer )
{
return;
}
#if QT_VERSION >= 0x040500
QColor newColor = QColorDialog::getColor( mRenderer->labelColor(), 0, tr( "Label color" ), QColorDialog::ShowAlphaChannel );
#else
QColor newColor = QColorDialog::getColor( mRenderer->labelColor() );
#endif
if ( newColor.isValid() )
{
mRenderer->setLabelColor( newColor );
mLabelColorButton->setColor( newColor );
}
mRenderer->setLabelColor( newColor );
}
void QgsPointDisplacementRendererWidget::on_mCircleModificationSpinBox_valueChanged( double d )

View File

@ -46,9 +46,9 @@ class GUI_EXPORT QgsPointDisplacementRendererWidget: public QgsRendererV2Widget,
void on_mRendererComboBox_currentIndexChanged( int index );
void on_mLabelFontButton_clicked();
void on_mCircleWidthSpinBox_valueChanged( double d );
void on_mCircleColorButton_clicked();
void on_mCircleColorButton_colorChanged( const QColor& newColor );
void on_mDistanceSpinBox_valueChanged( double d );
void on_mLabelColorButton_clicked();
void on_mLabelColorButton_colorChanged( const QColor& newColor );
void on_mCircleModificationSpinBox_valueChanged( double d );
void on_mScaleDependentLabelsCheckBox_stateChanged( int state );
void on_mMaxScaleDenominatorEdit_textChanged( const QString & text );

View File

@ -115,7 +115,7 @@ void QgsRuleBasedRendererV2Widget::addRule()
QgsSymbolV2* s = QgsSymbolV2::defaultSymbol( mLayer->geometryType() );
QgsRuleBasedRendererV2::Rule* newrule = new QgsRuleBasedRendererV2::Rule( s );
QgsRendererRulePropsDialog dlg( newrule, mLayer, mStyle );
QgsRendererRulePropsDialog dlg( newrule, mLayer, mStyle, this );
if ( dlg.exec() )
{
QgsRuleBasedRendererV2::Rule* current = currentRule();
@ -159,7 +159,7 @@ void QgsRuleBasedRendererV2Widget::editRule( const QModelIndex& index )
return;
QgsRuleBasedRendererV2::Rule* rule = mModel->ruleForIndex( index );
QgsRendererRulePropsDialog dlg( rule, mLayer, mStyle );
QgsRendererRulePropsDialog dlg( rule, mLayer, mStyle, this );
if ( dlg.exec() )
{
// model should know about the change and emit dataChanged signal for the view
@ -478,10 +478,13 @@ void QgsRuleBasedRendererV2Widget::countFeatures()
///////////
QgsRendererRulePropsDialog::QgsRendererRulePropsDialog( QgsRuleBasedRendererV2::Rule* rule, QgsVectorLayer* layer, QgsStyleV2* style )
: mRule( rule ), mLayer( layer ), mSymbolSelector( NULL ), mSymbol( NULL )
QgsRendererRulePropsDialog::QgsRendererRulePropsDialog( QgsRuleBasedRendererV2::Rule* rule, QgsVectorLayer* layer, QgsStyleV2* style, QWidget* parent )
: QDialog( parent ), mRule( rule ), mLayer( layer ), mSymbolSelector( NULL ), mSymbol( NULL )
{
setupUi( this );
#ifdef Q_WS_MAC
setWindowModality( Qt::WindowModal );
#endif
connect( buttonBox, SIGNAL( accepted() ), this, SLOT( accept() ) );
connect( buttonBox, SIGNAL( rejected() ), this, SLOT( reject() ) );

View File

@ -156,7 +156,7 @@ class GUI_EXPORT QgsRendererRulePropsDialog : public QDialog, private Ui::QgsRen
Q_OBJECT
public:
QgsRendererRulePropsDialog( QgsRuleBasedRendererV2::Rule* rule, QgsVectorLayer* layer, QgsStyleV2* style );
QgsRendererRulePropsDialog( QgsRuleBasedRendererV2::Rule* rule, QgsVectorLayer* layer, QgsStyleV2* style, QWidget* parent = 0 );
~QgsRendererRulePropsDialog();
QgsRuleBasedRendererV2::Rule* rule() { return mRule; }

View File

@ -45,6 +45,9 @@ QgsStyleV2ManagerDialog::QgsStyleV2ManagerDialog( QgsStyleV2* style, QWidget* pa
: QDialog( parent ), mStyle( style ), mModified( false )
{
setupUi( this );
#ifdef Q_WS_MAC
setWindowModality( Qt::WindowModal );
#endif
QSettings settings;
restoreGeometry( settings.value( "/Windows/StyleV2Manager/geometry" ).toByteArray() );

View File

@ -52,7 +52,7 @@ QgsSimpleLineSymbolLayerV2Widget::QgsSimpleLineSymbolLayerV2Widget( const QgsVec
setupUi( this );
connect( spinWidth, SIGNAL( valueChanged( double ) ), this, SLOT( penWidthChanged() ) );
connect( btnChangeColor, SIGNAL( clicked() ), this, SLOT( colorChanged() ) );
connect( btnChangeColor, SIGNAL( colorChanged( const QColor& ) ), this, SLOT( colorChanged( const QColor& ) ) );
connect( cboPenStyle, SIGNAL( currentIndexChanged( int ) ), this, SLOT( penStyleChanged() ) );
connect( spinOffset, SIGNAL( valueChanged( double ) ), this, SLOT( offsetChanged() ) );
connect( cboCapStyle, SIGNAL( currentIndexChanged( int ) ), this, SLOT( penStyleChanged() ) );
@ -83,6 +83,7 @@ void QgsSimpleLineSymbolLayerV2Widget::setSymbolLayer( QgsSymbolLayerV2* layer )
// set values
spinWidth->setValue( mLayer->width() );
btnChangeColor->setColor( mLayer->color() );
btnChangeColor->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
spinOffset->setValue( mLayer->offset() );
cboPenStyle->blockSignals( true );
cboJoinStyle->blockSignals( true );
@ -117,20 +118,9 @@ void QgsSimpleLineSymbolLayerV2Widget::penWidthChanged()
emit changed();
}
void QgsSimpleLineSymbolLayerV2Widget::colorChanged()
void QgsSimpleLineSymbolLayerV2Widget::colorChanged( const QColor& color )
{
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && defined(QT_MAC_USE_COCOA)
// Native Mac dialog works only for Qt Carbon
// Qt bug: http://bugreports.qt.nokia.com/browse/QTBUG-14889
// FIXME need to also check max QT_VERSION when Qt bug fixed
QColor color = QColorDialog::getColor( mLayer->color(), this, "", QColorDialog::DontUseNativeDialog | QColorDialog::ShowAlphaChannel );
#else
QColor color = QColorDialog::getColor( mLayer->color(), this, "", QColorDialog::ShowAlphaChannel );
#endif
if ( !color.isValid() )
return;
mLayer->setColor( color );
btnChangeColor->setColor( mLayer->color() );
updatePatternIcon();
emit changed();
}
@ -241,8 +231,8 @@ QgsSimpleMarkerSymbolLayerV2Widget::QgsSimpleMarkerSymbolLayerV2Widget( const Qg
}
connect( lstNames, SIGNAL( currentRowChanged( int ) ), this, SLOT( setName() ) );
connect( btnChangeColorBorder, SIGNAL( clicked() ), this, SLOT( setColorBorder() ) );
connect( btnChangeColorFill, SIGNAL( clicked() ), this, SLOT( setColorFill() ) );
connect( btnChangeColorBorder, SIGNAL( colorChanged( const QColor& ) ), this, SLOT( setColorBorder( const QColor& ) ) );
connect( btnChangeColorFill, SIGNAL( colorChanged( const QColor& ) ), this, SLOT( setColorFill( const QColor& ) ) );
connect( spinSize, SIGNAL( valueChanged( double ) ), this, SLOT( setSize() ) );
connect( spinAngle, SIGNAL( valueChanged( double ) ), this, SLOT( setAngle() ) );
connect( spinOffsetX, SIGNAL( valueChanged( double ) ), this, SLOT( setOffset() ) );
@ -268,7 +258,9 @@ void QgsSimpleMarkerSymbolLayerV2Widget::setSymbolLayer( QgsSymbolLayerV2* layer
}
}
btnChangeColorBorder->setColor( mLayer->borderColor() );
btnChangeColorBorder->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
btnChangeColorFill->setColor( mLayer->color() );
btnChangeColorFill->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
spinSize->setValue( mLayer->size() );
spinAngle->setValue( mLayer->angle() );
@ -299,37 +291,15 @@ void QgsSimpleMarkerSymbolLayerV2Widget::setName()
emit changed();
}
void QgsSimpleMarkerSymbolLayerV2Widget::setColorBorder()
void QgsSimpleMarkerSymbolLayerV2Widget::setColorBorder( const QColor& color )
{
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && defined(QT_MAC_USE_COCOA)
// Native Mac dialog works only for Qt Carbon
// Qt bug: http://bugreports.qt.nokia.com/browse/QTBUG-14889
// FIXME need to also check max QT_VERSION when Qt bug fixed
QColor borderColor = QColorDialog::getColor( mLayer->borderColor(), this, "", QColorDialog::DontUseNativeDialog | QColorDialog::ShowAlphaChannel );
#else
QColor borderColor = QColorDialog::getColor( mLayer->borderColor(), this, "", QColorDialog::ShowAlphaChannel );
#endif
if ( !borderColor.isValid() )
return;
mLayer->setBorderColor( borderColor );
btnChangeColorBorder->setColor( mLayer->borderColor() );
mLayer->setBorderColor( color );
emit changed();
}
void QgsSimpleMarkerSymbolLayerV2Widget::setColorFill()
void QgsSimpleMarkerSymbolLayerV2Widget::setColorFill( const QColor& color )
{
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && defined(QT_MAC_USE_COCOA)
// Native Mac dialog works only for Qt Carbon
// Qt bug: http://bugreports.qt.nokia.com/browse/QTBUG-14889
// FIXME need to also check max QT_VERSION when Qt bug fixed
QColor color = QColorDialog::getColor( mLayer->color(), this, "", QColorDialog::DontUseNativeDialog | QColorDialog::ShowAlphaChannel );
#else
QColor color = QColorDialog::getColor( mLayer->color(), this, "", QColorDialog::ShowAlphaChannel );
#endif
if ( !color.isValid() )
return;
mLayer->setColor( color );
btnChangeColorFill->setColor( mLayer->color() );
emit changed();
}
@ -379,9 +349,9 @@ QgsSimpleFillSymbolLayerV2Widget::QgsSimpleFillSymbolLayerV2Widget( const QgsVec
setupUi( this );
connect( btnChangeColor, SIGNAL( clicked() ), this, SLOT( setColor() ) );
connect( btnChangeColor, SIGNAL( colorChanged( const QColor& ) ), this, SLOT( setColor( const QColor& ) ) );
connect( cboFillStyle, SIGNAL( currentIndexChanged( int ) ), this, SLOT( setBrushStyle() ) );
connect( btnChangeBorderColor, SIGNAL( clicked() ), this, SLOT( setBorderColor() ) );
connect( btnChangeBorderColor, SIGNAL( colorChanged( const QColor& ) ), this, SLOT( setBorderColor( const QColor& ) ) );
connect( spinBorderWidth, SIGNAL( valueChanged( double ) ), this, SLOT( borderWidthChanged() ) );
connect( cboBorderStyle, SIGNAL( currentIndexChanged( int ) ), this, SLOT( borderStyleChanged() ) );
connect( spinOffsetX, SIGNAL( valueChanged( double ) ), this, SLOT( offsetChanged() ) );
@ -398,8 +368,10 @@ void QgsSimpleFillSymbolLayerV2Widget::setSymbolLayer( QgsSymbolLayerV2* layer )
// set values
btnChangeColor->setColor( mLayer->color() );
btnChangeColor->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
cboFillStyle->setBrushStyle( mLayer->brushStyle() );
btnChangeBorderColor->setColor( mLayer->borderColor() );
btnChangeBorderColor->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
cboBorderStyle->setPenStyle( mLayer->borderStyle() );
spinBorderWidth->setValue( mLayer->borderWidth() );
spinOffsetX->blockSignals( true );
@ -422,37 +394,15 @@ QgsSymbolLayerV2* QgsSimpleFillSymbolLayerV2Widget::symbolLayer()
return mLayer;
}
void QgsSimpleFillSymbolLayerV2Widget::setColor()
void QgsSimpleFillSymbolLayerV2Widget::setColor( const QColor& color )
{
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && defined(QT_MAC_USE_COCOA)
// Native Mac dialog works only for Qt Carbon
// Qt bug: http://bugreports.qt.nokia.com/browse/QTBUG-14889
// FIXME need to also check max QT_VERSION when Qt bug fixed
QColor color = QColorDialog::getColor( mLayer->color(), this, "", QColorDialog::DontUseNativeDialog | QColorDialog::ShowAlphaChannel );
#else
QColor color = QColorDialog::getColor( mLayer->color(), this, "", QColorDialog::ShowAlphaChannel );
#endif
if ( !color.isValid() )
return;
mLayer->setColor( color );
btnChangeColor->setColor( mLayer->color() );
emit changed();
}
void QgsSimpleFillSymbolLayerV2Widget::setBorderColor()
void QgsSimpleFillSymbolLayerV2Widget::setBorderColor( const QColor& color )
{
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && defined(QT_MAC_USE_COCOA)
// Native Mac dialog works only for Qt Carbon
// Qt bug: http://bugreports.qt.nokia.com/browse/QTBUG-14889
// FIXME need to also check max QT_VERSION when Qt bug fixed
QColor color = QColorDialog::getColor( mLayer->borderColor(), this, "", QColorDialog::DontUseNativeDialog | QColorDialog::ShowAlphaChannel );
#else
QColor color = QColorDialog::getColor( mLayer->borderColor(), this, "", QColorDialog::ShowAlphaChannel );
#endif
if ( !color.isValid() )
return;
mLayer->setBorderColor( color );
btnChangeBorderColor->setColor( mLayer->borderColor() );
emit changed();
}
@ -936,34 +886,26 @@ void QgsSvgMarkerSymbolLayerV2Widget::on_mFileLineEdit_editingFinished()
emit changed();
}
void QgsSvgMarkerSymbolLayerV2Widget::on_mChangeColorButton_clicked()
void QgsSvgMarkerSymbolLayerV2Widget::on_mChangeColorButton_colorChanged( const QColor& color )
{
if ( !mLayer )
{
return;
}
QColor c = QColorDialog::getColor( mLayer->fillColor() );
if ( c.isValid() )
{
mLayer->setFillColor( c );
mChangeColorButton->setColor( c );
emit changed();
}
mLayer->setFillColor( color );
emit changed();
}
void QgsSvgMarkerSymbolLayerV2Widget::on_mChangeBorderColorButton_clicked()
void QgsSvgMarkerSymbolLayerV2Widget::on_mChangeBorderColorButton_colorChanged( const QColor& color )
{
if ( !mLayer )
{
return;
}
QColor c = QColorDialog::getColor( mLayer->outlineColor() );
if ( c.isValid() )
{
mLayer->setOutlineColor( c );
mChangeBorderColorButton->setColor( c );
emit changed();
}
mLayer->setOutlineColor( color );
emit changed();
}
void QgsSvgMarkerSymbolLayerV2Widget::on_mBorderWidthSpinBox_valueChanged( double d )
@ -1011,7 +953,7 @@ QgsLineDecorationSymbolLayerV2Widget::QgsLineDecorationSymbolLayerV2Widget( cons
setupUi( this );
connect( btnChangeColor, SIGNAL( clicked() ), this, SLOT( colorChanged() ) );
connect( btnChangeColor, SIGNAL( colorChanged( const QColor& ) ), this, SLOT( colorChanged( const QColor& ) ) );
connect( spinWidth, SIGNAL( valueChanged( double ) ), this, SLOT( penWidthChanged() ) );
}
@ -1037,20 +979,9 @@ QgsSymbolLayerV2* QgsLineDecorationSymbolLayerV2Widget::symbolLayer()
return mLayer;
}
void QgsLineDecorationSymbolLayerV2Widget::colorChanged()
void QgsLineDecorationSymbolLayerV2Widget::colorChanged( const QColor& color )
{
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && defined(QT_MAC_USE_COCOA)
// Native Mac dialog works only for Qt Carbon
// Qt bug: http://bugreports.qt.nokia.com/browse/QTBUG-14889
// FIXME need to also check max QT_VERSION when Qt bug fixed
QColor color = QColorDialog::getColor( mLayer->color(), this, "", QColorDialog::DontUseNativeDialog );
#else
QColor color = QColorDialog::getColor( mLayer->color(), this );
#endif
if ( !color.isValid() )
return;
mLayer->setColor( color );
btnChangeColor->setColor( mLayer->color() );
emit changed();
}
@ -1241,34 +1172,26 @@ void QgsSVGFillSymbolLayerWidget::updateParamGui()
mBorderWidthSpinBox->setEnabled( hasOutlineWidthParam );
}
void QgsSVGFillSymbolLayerWidget::on_mChangeColorButton_clicked()
void QgsSVGFillSymbolLayerWidget::on_mChangeColorButton_colorChanged( const QColor& color )
{
if ( !mLayer )
{
return;
}
QColor c = QColorDialog::getColor( mLayer->svgFillColor() );
if ( c.isValid() )
{
mLayer->setSvgFillColor( c );
mChangeColorButton->setColor( c );
emit changed();
}
mLayer->setSvgFillColor( color );
emit changed();
}
void QgsSVGFillSymbolLayerWidget::on_mChangeBorderColorButton_clicked()
void QgsSVGFillSymbolLayerWidget::on_mChangeBorderColorButton_colorChanged( const QColor& color )
{
if ( !mLayer )
{
return;
}
QColor c = QColorDialog::getColor( mLayer->svgOutlineColor() );
if ( c.isValid() )
{
mLayer->setSvgOutlineColor( c );
mChangeBorderColorButton->setColor( c );
emit changed();
}
mLayer->setSvgOutlineColor( color );
emit changed();
}
void QgsSVGFillSymbolLayerWidget::on_mBorderWidthSpinBox_valueChanged( double d )
@ -1377,18 +1300,15 @@ void QgsLinePatternFillSymbolLayerWidget::on_mOffsetSpinBox_valueChanged( double
}
}
void QgsLinePatternFillSymbolLayerWidget::on_mColorPushButton_clicked()
void QgsLinePatternFillSymbolLayerWidget::on_mColorPushButton_colorChanged( const QColor& color )
{
if ( mLayer )
if ( !mLayer )
{
QColor c = QColorDialog::getColor( mLayer->color() );
if ( c.isValid() )
{
mLayer->setColor( c );
mColorPushButton->setColor( c );
emit changed();
}
return;
}
mLayer->setColor( color );
emit changed();
}
void QgsLinePatternFillSymbolLayerWidget::on_mDistanceUnitComboBox_currentIndexChanged( int index )
@ -1545,7 +1465,7 @@ QgsFontMarkerSymbolLayerV2Widget::QgsFontMarkerSymbolLayerV2Widget( const QgsVec
connect( cboFont, SIGNAL( currentFontChanged( const QFont & ) ), this, SLOT( setFontFamily( const QFont& ) ) );
connect( spinSize, SIGNAL( valueChanged( double ) ), this, SLOT( setSize( double ) ) );
connect( btnColor, SIGNAL( clicked() ), this, SLOT( setColor() ) );
connect( btnColor, SIGNAL( colorChanged( const QColor& ) ), this, SLOT( setColor( const QColor& ) ) );
connect( spinAngle, SIGNAL( valueChanged( double ) ), this, SLOT( setAngle( double ) ) );
connect( spinOffsetX, SIGNAL( valueChanged( double ) ), this, SLOT( setOffset() ) );
connect( spinOffsetY, SIGNAL( valueChanged( double ) ), this, SLOT( setOffset() ) );
@ -1596,20 +1516,9 @@ void QgsFontMarkerSymbolLayerV2Widget::setFontFamily( const QFont& font )
emit changed();
}
void QgsFontMarkerSymbolLayerV2Widget::setColor()
void QgsFontMarkerSymbolLayerV2Widget::setColor( const QColor& color )
{
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && defined(QT_MAC_USE_COCOA)
// Native Mac dialog works only for Qt Carbon
// Qt bug: http://bugreports.qt.nokia.com/browse/QTBUG-14889
// FIXME need to also check max QT_VERSION when Qt bug fixed
QColor color = QColorDialog::getColor( mLayer->color(), this, "", QColorDialog::DontUseNativeDialog );
#else
QColor color = QColorDialog::getColor( mLayer->color(), this );
#endif
if ( !color.isValid() )
return;
mLayer->setColor( color );
btnColor->setColor( mLayer->color() );
emit changed();
}

View File

@ -62,7 +62,7 @@ class GUI_EXPORT QgsSimpleLineSymbolLayerV2Widget : public QgsSymbolLayerV2Widge
public slots:
void penWidthChanged();
void colorChanged();
void colorChanged( const QColor& color );
void penStyleChanged();
void offsetChanged();
void on_mCustomCheckBox_stateChanged( int state );
@ -100,8 +100,8 @@ class GUI_EXPORT QgsSimpleMarkerSymbolLayerV2Widget : public QgsSymbolLayerV2Wid
public slots:
void setName();
void setColorBorder();
void setColorFill();
void setColorBorder( const QColor& color );
void setColorFill( const QColor& color );
void setSize();
void setAngle();
void setOffset();
@ -132,8 +132,8 @@ class GUI_EXPORT QgsSimpleFillSymbolLayerV2Widget : public QgsSymbolLayerV2Widge
virtual QgsSymbolLayerV2* symbolLayer();
public slots:
void setColor();
void setBorderColor();
void setColor( const QColor& color );
void setBorderColor( const QColor& color );
void setBrushStyle();
void borderWidthChanged();
void borderStyleChanged();
@ -208,8 +208,8 @@ class GUI_EXPORT QgsSvgMarkerSymbolLayerV2Widget : public QgsSymbolLayerV2Widget
void on_mFileToolButton_clicked();
void on_mFileLineEdit_textEdited( const QString& text );
void on_mFileLineEdit_editingFinished();
void on_mChangeColorButton_clicked();
void on_mChangeBorderColorButton_clicked();
void on_mChangeColorButton_colorChanged( const QColor& color );
void on_mChangeBorderColorButton_colorChanged( const QColor& color );
void on_mBorderWidthSpinBox_valueChanged( double d );
void on_mSizeUnitComboBox_currentIndexChanged( int index );
void on_mBorderWidthUnitComboBox_currentIndexChanged( int index );
@ -245,7 +245,7 @@ class GUI_EXPORT QgsLineDecorationSymbolLayerV2Widget : public QgsSymbolLayerV2W
virtual QgsSymbolLayerV2* symbolLayer();
public slots:
void colorChanged();
void colorChanged( const QColor& color );
void penWidthChanged();
void on_mWidthUnitComboBox_currentIndexChanged( int index );
@ -285,8 +285,8 @@ class GUI_EXPORT QgsSVGFillSymbolLayerWidget : public QgsSymbolLayerV2Widget, pr
void setFile( const QModelIndex& item );
void populateIcons( const QModelIndex& item );
void on_mRotationSpinBox_valueChanged( double d );
void on_mChangeColorButton_clicked();
void on_mChangeBorderColorButton_clicked();
void on_mChangeColorButton_colorChanged( const QColor& color );
void on_mChangeBorderColorButton_colorChanged( const QColor& color );
void on_mBorderWidthSpinBox_valueChanged( double d );
void on_mTextureWidthUnitComboBox_currentIndexChanged( int index );
void on_mSvgOutlineWidthUnitComboBox_currentIndexChanged( int index );
@ -318,7 +318,7 @@ class GUI_EXPORT QgsLinePatternFillSymbolLayerWidget : public QgsSymbolLayerV2Wi
void on_mDistanceSpinBox_valueChanged( double d );
void on_mLineWidthSpinBox_valueChanged( double d );
void on_mOffsetSpinBox_valueChanged( double d );
void on_mColorPushButton_clicked();
void on_mColorPushButton_colorChanged( const QColor& color );
void on_mDistanceUnitComboBox_currentIndexChanged( int index );
void on_mLineWidthUnitComboBox_currentIndexChanged( int index );
void on_mOffsetUnitComboBox_currentIndexChanged( int index );
@ -377,7 +377,7 @@ class GUI_EXPORT QgsFontMarkerSymbolLayerV2Widget : public QgsSymbolLayerV2Widge
public slots:
void setFontFamily( const QFont& font );
void setColor();
void setColor( const QColor& color );
void setSize( double size );
void setAngle( double angle );
void setCharacter( const QChar& chr );

View File

@ -99,12 +99,14 @@ QgsSymbolsListWidget::QgsSymbolsListWidget( QgsSymbolV2* symbol, QgsStyleV2* sty
// select correct page in stacked widget
// there's a correspondence between symbol type number and page numbering => exploit it!
stackedWidget->setCurrentIndex( symbol->type() );
connect( btnColor, SIGNAL( clicked() ), this, SLOT( setSymbolColor() ) );
connect( btnColor, SIGNAL( colorChanged( const QColor& ) ), this, SLOT( setSymbolColor( const QColor& ) ) );
connect( spinAngle, SIGNAL( valueChanged( double ) ), this, SLOT( setMarkerAngle( double ) ) );
connect( spinSize, SIGNAL( valueChanged( double ) ), this, SLOT( setMarkerSize( double ) ) );
connect( spinWidth, SIGNAL( valueChanged( double ) ), this, SLOT( setLineWidth( double ) ) );
// Live color updates are not undoable to child symbol layers
btnColor->setAcceptLiveUpdates( false );
btnColor->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
// Set symbol color in btnColor
updateSymbolColor();
}
@ -182,21 +184,9 @@ void QgsSymbolsListWidget::openStyleManager()
populateSymbolView();
}
void QgsSymbolsListWidget::setSymbolColor()
void QgsSymbolsListWidget::setSymbolColor( const QColor& color )
{
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && defined(QT_MAC_USE_COCOA)
// Native Mac dialog works only for Qt Carbon
// Qt bug: http://bugreports.qt.nokia.com/browse/QTBUG-14889
// FIXME need to also check max QT_VERSION when Qt bug fixed
QColor color = QColorDialog::getColor( mSymbol->color(), this, "", QColorDialog::DontUseNativeDialog );
#else
QColor color = QColorDialog::getColor( mSymbol->color(), this );
#endif
if ( !color.isValid() )
return;
mSymbol->setColor( color );
updateSymbolColor();
emit changed();
}
@ -287,7 +277,9 @@ void QgsSymbolsListWidget::displayTransparency( double alpha )
void QgsSymbolsListWidget::updateSymbolColor()
{
btnColor->blockSignals( true );
btnColor->setColor( mSymbol->color() );
btnColor->blockSignals( false );
}
void QgsSymbolsListWidget::updateSymbolInfo()

View File

@ -34,7 +34,7 @@ class GUI_EXPORT QgsSymbolsListWidget : public QWidget, private Ui::SymbolsListW
public slots:
void setSymbolFromStyle( const QModelIndex & index );
void setSymbolColor();
void setSymbolColor( const QColor& color );
void setMarkerAngle( double angle );
void setMarkerSize( double size );
void setLineWidth( double width );

View File

@ -142,6 +142,9 @@ class SymbolLayerItem : public QStandardItem
QgsSymbolV2SelectorDialog::QgsSymbolV2SelectorDialog( QgsSymbolV2* symbol, QgsStyleV2* style, const QgsVectorLayer* vl, QWidget* parent, bool embedded )
: QDialog( parent ), mAdvancedMenu( NULL ), mVectorLayer( vl )
{
#ifdef Q_WS_MAC
setWindowModality( Qt::WindowModal );
#endif
mStyle = style;
mSymbol = symbol;
mPresentWidget = NULL;

View File

@ -17,21 +17,26 @@
#include "qgsvectorcolorrampv2.h"
#include "qgsdialog.h"
#include "qgscolordialog.h"
#include "qgscptcityarchive.h"
#include <QColorDialog>
#include <QInputDialog>
#include <QPainter>
#include <QSettings>
#include <QTableWidget>
#include <QTextEdit>
QgsVectorGradientColorRampV2Dialog::QgsVectorGradientColorRampV2Dialog( QgsVectorGradientColorRampV2* ramp, QWidget* parent )
: QDialog( parent ), mRamp( ramp )
: QDialog( parent ), mRamp( ramp ), mCurrentItem( 0 )
{
setupUi( this );
#ifdef Q_WS_MAC
setWindowModality( Qt::WindowModal );
#endif
connect( btnColor1, SIGNAL( clicked() ), this, SLOT( setColor1() ) );
connect( btnColor2, SIGNAL( clicked() ), this, SLOT( setColor2() ) );
connect( btnColor1, SIGNAL( colorChanged( const QColor& ) ), this, SLOT( setColor1( const QColor& ) ) );
connect( btnColor2, SIGNAL( colorChanged( const QColor& ) ), this, SLOT( setColor2( const QColor& ) ) );
// handle stops
updateStops();
@ -207,34 +212,14 @@ void QgsVectorGradientColorRampV2Dialog::updatePreview()
btnColor2->setColor( mRamp->color2() );
}
void QgsVectorGradientColorRampV2Dialog::setColor1()
void QgsVectorGradientColorRampV2Dialog::setColor1( const QColor& color )
{
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && defined(QT_MAC_USE_COCOA)
// Native Mac dialog works only for Qt Carbon
// Qt bug: http://bugreports.qt.nokia.com/browse/QTBUG-14889
// FIXME need to also check max QT_VERSION when Qt bug fixed
QColor color = QColorDialog::getColor( mRamp->color1(), this, "", QColorDialog::DontUseNativeDialog );
#else
QColor color = QColorDialog::getColor( mRamp->color1(), this );
#endif
if ( !color.isValid() )
return;
mRamp->setColor1( color );
updatePreview();
}
void QgsVectorGradientColorRampV2Dialog::setColor2()
void QgsVectorGradientColorRampV2Dialog::setColor2( const QColor& color )
{
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && defined(QT_MAC_USE_COCOA)
// Native Mac dialog works only for Qt Carbon
// Qt bug: http://bugreports.qt.nokia.com/browse/QTBUG-14889
// FIXME need to also check max QT_VERSION when Qt bug fixed
QColor color = QColorDialog::getColor( mRamp->color2(), this, "", QColorDialog::DontUseNativeDialog );
#else
QColor color = QColorDialog::getColor( mRamp->color2(), this );
#endif
if ( !color.isValid() )
return;
mRamp->setColor2( color );
updatePreview();
}
@ -252,7 +237,7 @@ void QgsVectorGradientColorRampV2Dialog::setStopColor( QTreeWidgetItem* item, QC
p.setPen( Qt::NoPen );
p.setRenderHint( QPainter::Antialiasing );
p.setBrush( color );
p.drawRoundedRect( rect, 4, 4 );
p.drawRoundedRect( rect, 2, 2 );
p.end();
item->setIcon( 0, QIcon( pixmap ) );
@ -260,18 +245,32 @@ void QgsVectorGradientColorRampV2Dialog::setStopColor( QTreeWidgetItem* item, QC
item->setText( 0, color.name() );
}
void QgsVectorGradientColorRampV2Dialog::setItemStopColor( const QColor& newColor )
{
if ( mCurrentItem )
{
setStopColor( mCurrentItem, newColor );
updatePreview();
}
}
void QgsVectorGradientColorRampV2Dialog::stopDoubleClicked( QTreeWidgetItem* item, int column )
{
if ( column == 0 )
{
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && defined(QT_MAC_USE_COCOA)
// Native Mac dialog works only for Qt Carbon
// Qt bug: http://bugreports.qt.nokia.com/browse/QTBUG-14889
// FIXME need to also check max QT_VERSION when Qt bug fixed
QColor color = QColorDialog::getColor( item->data( 0, StopColorRole ).value<QColor>(), this, "", QColorDialog::DontUseNativeDialog );
#else
QColor color = QColorDialog::getColor( item->data( 0, StopColorRole ).value<QColor>(), this );
#endif
QColor color;
QSettings settings;
if ( settings.value( "/qgis/live_color_dialogs", false ).toBool() )
{
mCurrentItem = item;
color = QgsColorDialog::getLiveColor( item->data( 0, StopColorRole ).value<QColor>(), this, "setItemStopColor( const QColor& )", this );
mCurrentItem = 0;
}
else
{
color = QColorDialog::getColor( item->data( 0, StopColorRole ).value<QColor>(), this );
}
if ( !color.isValid() )
return;
setStopColor( item, color );
@ -310,19 +309,19 @@ void QgsVectorGradientColorRampV2Dialog::stopDoubleClicked( QTreeWidgetItem* ite
void QgsVectorGradientColorRampV2Dialog::addStop()
{
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && defined(QT_MAC_USE_COCOA)
// Native Mac dialog works only for Qt Carbon
// Qt bug: http://bugreports.qt.nokia.com/browse/QTBUG-14889
// also Qt 4.7 Mac Cocoa bug: calling QInputDialog::getInt after QColorDialog::getColor will freeze app
// workaround: call QColorDialog::getColor below instead of here,
// but not needed at this time because of the other Qt bug
// FIXME need to also check max QT_VERSION when Qt bug(s) fixed
QColor color = QColorDialog::getColor( QColor(), this, "", QColorDialog::DontUseNativeDialog );
#else
// Native Mac dialog works only for Qt Carbon
// Qt bug: http://bugreports.qt.nokia.com/browse/QTBUG-14889
// Qt 4.7 Mac Cocoa bug: calling QInputDialog::getInt after QColorDialog::getColor will freeze app
// workaround: call QColorDialog::getColor below instead of here,
// but not needed at this time because of the other Qt bug
// FIXME need to also check max QT_VERSION when Qt bug(s) fixed
#ifndef Q_WS_MAC
QColor color = QColorDialog::getColor( QColor(), this );
#endif
if ( !color.isValid() )
return;
activateWindow();
#endif
bool ok;
double val = 50.0;
@ -341,11 +340,20 @@ void QgsVectorGradientColorRampV2Dialog::addStop()
#endif
if ( !ok )
return;
activateWindow();
double key = val / 100.0;
QStringList lst;
lst << "." << QString(( val < 10 ) ? '0' + QString::number( val ) : QString::number( val ) );
#ifdef Q_WS_MAC
QColor color = QColorDialog::getColor( QColor(), this );
if ( !color.isValid() )
return;
activateWindow();
#endif
QTreeWidgetItem* item = new QTreeWidgetItem( lst );
setStopColor( item, color );

View File

@ -30,14 +30,15 @@ class GUI_EXPORT QgsVectorGradientColorRampV2Dialog : public QDialog, private Ui
QgsVectorGradientColorRampV2Dialog( QgsVectorGradientColorRampV2* ramp, QWidget* parent = NULL );
public slots:
void setColor1();
void setColor2();
void setColor1( const QColor& color );
void setColor2( const QColor& color );
void toggledStops( bool on );
void addStop();
void removeStop();
void stopDoubleClicked( QTreeWidgetItem* item, int column );
void setItemStopColor( const QColor& newColor );
protected slots:
void on_cboType_currentIndexChanged( int index );
@ -53,6 +54,8 @@ class GUI_EXPORT QgsVectorGradientColorRampV2Dialog : public QDialog, private Ui
static const int StopColorRole = Qt::UserRole + 1;
static const int StopOffsetRole = Qt::UserRole + 2;
QTreeWidgetItem* mCurrentItem;
};
#endif

View File

@ -273,23 +273,17 @@ QgsGrassRegion::QgsGrassRegion( QgsGrassPlugin *plugin, QgisInterface *iface,
// Symbology
QPen pen = mPlugin->regionPen();
mColorButton->setColor( pen.color() );
connect( mColorButton, SIGNAL( clicked() ), this, SLOT( changeColor() ) );
connect( mColorButton, SIGNAL( colorChanged( const QColor& ) ), this, SLOT( changeColor( const QColor& ) ) );
mWidthSpinBox->setValue( pen.width() );
connect( mWidthSpinBox, SIGNAL( valueChanged( int ) ), this, SLOT( changeWidth() ) );
}
void QgsGrassRegion::changeColor( void )
void QgsGrassRegion::changeColor( const QColor& color )
{
QPen pen = mPlugin->regionPen();
QColor color = QColorDialog::getColor( pen.color(), this );
if ( color.isValid() )
{
mColorButton->setColor( color );
pen.setColor( color );
mPlugin->setRegionPen( pen );
}
pen.setColor( color );
mPlugin->setRegionPen( pen );
}
void QgsGrassRegion::changeWidth( void )

View File

@ -81,7 +81,7 @@ class QgsGrassRegion: public QDialog, private Ui::QgsGrassRegionBase
void radioChanged( void ) ;
void changeColor( void ) ;
void changeColor( const QColor& color ) ;
void changeWidth( void ) ;
void restorePosition( void );

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>445</width>
<height>388</height>
<height>397</height>
</rect>
</property>
<property name="windowTitle">
@ -172,19 +172,6 @@ or change the following values</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QgsColorButton" name="mColorButton" native="true">
<property name="minimumSize">
<size>
<width>35</width>
<height>25</height>
</size>
</property>
<property name="text" stdset="0">
<string/>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="textLabel6">
<property name="text">
@ -211,6 +198,25 @@ or change the following values</string>
</property>
</spacer>
</item>
<item row="0" column="1">
<widget class="QgsColorButtonV2" name="mColorButton">
<property name="minimumSize">
<size>
<width>64</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@ -228,8 +234,8 @@ or change the following values</string>
</widget>
<customwidgets>
<customwidget>
<class>QgsColorButton</class>
<extends>QWidget</extends>
<class>QgsColorButtonV2</class>
<extends>QPushButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>
</customwidgets>

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>180</width>
<height>151</height>
<width>221</width>
<height>172</height>
</rect>
</property>
<property name="windowTitle">
@ -23,6 +23,20 @@
</item>
<item row="1" column="0">
<layout class="QGridLayout" name="gridLayout">
<item row="3" column="1">
<widget class="QgsColorButton" name="mFrameColorButton">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="mBackgroundColorLabel">
<property name="text">
<string>Background color</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="mMapMarkerLabel">
<property name="text">
@ -33,6 +47,13 @@
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QgsColorButton" name="mBackgroundColorButton">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="mMapMarkerButton">
<property name="text">
@ -53,50 +74,11 @@
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="mFrameWidthSpinBox"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="mBackgroundColorLabel">
<property name="text">
<string>Background color</string>
</property>
<property name="buddy">
<cstring>mBackgroundColorButton</cstring>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QgsColorButton" name="mBackgroundColorButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="mFrameColorLabel">
<property name="text">
<string>Frame color</string>
</property>
<property name="buddy">
<cstring>mFrameColorButton</cstring>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QgsColorButton" name="mFrameColorButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
@ -106,7 +88,7 @@
<customwidgets>
<customwidget>
<class>QgsColorButton</class>
<extends>QToolButton</extends>
<extends>QPushButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>
</customwidgets>

View File

@ -66,7 +66,7 @@
</sizepolicy>
</property>
<property name="text">
<string>change</string>
<string>Change...</string>
</property>
</widget>
</item>

View File

@ -104,7 +104,7 @@
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QPushButton" name="mArrowColorButton">
<widget class="QgsColorButton" name="mArrowColorButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Maximum">
<horstretch>0</horstretch>
@ -112,7 +112,7 @@
</sizepolicy>
</property>
<property name="text">
<string>Arrow color...</string>
<string>Color...</string>
</property>
</widget>
</item>
@ -214,6 +214,11 @@
</layout>
</widget>
<customwidgets>
<customwidget>
<class>QgsColorButton</class>
<extends>QPushButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>
<customwidget>
<class>QgsCollapsibleGroupBoxBasic</class>
<extends>QGroupBox</extends>

View File

@ -231,36 +231,35 @@
<property name="collapsed" stdset="0">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QPushButton" name="mFrameColorButton">
<layout class="QFormLayout" name="formLayout_4">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<property name="labelAlignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<item row="1" column="0">
<widget class="QLabel" name="mOutlineWidthLabel">
<property name="text">
<string>Frame color...</string>
<string>Thickness</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mOutlineWidthSpinBox</cstring>
</property>
</widget>
</item>
<item>
<layout class="QFormLayout" name="formLayout_3">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="mOutlineWidthSpinBox"/>
</item>
<item row="0" column="0" colspan="2">
<widget class="QgsColorButton" name="mFrameColorButton">
<property name="text">
<string>Color...</string>
</property>
<item row="0" column="0">
<widget class="QLabel" name="mOutlineWidthLabel">
<property name="text">
<string>Thickness</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mOutlineWidthSpinBox</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="mOutlineWidthSpinBox"/>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
@ -270,9 +269,6 @@
<property name="title">
<string>Background</string>
</property>
<property name="flat">
<bool>false</bool>
</property>
<property name="checkable">
<bool>true</bool>
</property>
@ -285,51 +281,14 @@
<property name="collapsed" stdset="0">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="mBackgroundColorButton">
<widget class="QgsColorButton" name="mBackgroundColorButton">
<property name="text">
<string>Background color...</string>
<string>Color...</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="mOpacityLabel">
<property name="text">
<string>Transparency</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mTransparencySlider</cstring>
</property>
</widget>
</item>
<item>
<widget class="QSlider" name="mTransparencySlider">
<property name="maximum">
<number>100</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="mTransparencySpinBox">
<property name="suffix">
<string>%</string>
</property>
<property name="maximum">
<number>100</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
@ -397,6 +356,11 @@
</layout>
</widget>
<customwidgets>
<customwidget>
<class>QgsColorButton</class>
<extends>QPushButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>
<customwidget>
<class>QgsCollapsibleGroupBoxBasic</class>
<extends>QGroupBox</extends>

View File

@ -187,35 +187,10 @@
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="mGridStrokeWidthSpinBox"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="mGridColorLabel">
<property name="text">
<string>Color</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mGridColorButton</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<item row="1" column="0" colspan="2">
<widget class="QgsColorButton" name="mGridColorButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
<string>Color...</string>
</property>
</widget>
</item>
@ -265,17 +240,17 @@
</layout>
</widget>
<customwidgets>
<customwidget>
<class>QgsColorButton</class>
<extends>QPushButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>
<customwidget>
<class>QgsCollapsibleGroupBoxBasic</class>
<extends>QGroupBox</extends>
<header location="global">qgscollapsiblegroupbox.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>QgsColorButton</class>
<extends>QToolButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>

View File

@ -297,6 +297,16 @@
<property name="labelAlignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Spacing</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="mGridResolutionSpinBox">
<property name="prefix">
@ -368,44 +378,6 @@
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="mGridColorLabel">
<property name="text">
<string>Grid color</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mGridColorButton</cstring>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QgsColorButton" name="mGridColorButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="mGridStyleLabel">
<property name="text">
<string>Grid style</string>
@ -418,7 +390,7 @@
</property>
</widget>
</item>
<item row="4" column="1">
<item row="3" column="1">
<widget class="QComboBox" name="mGridStyleComboBox"/>
</item>
<item row="5" column="0">
@ -441,13 +413,10 @@
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_8">
<item row="4" column="1">
<widget class="QgsColorButton" name="mGridColorButton">
<property name="text">
<string>Spacing</string>
</property>
<property name="wordWrap">
<bool>true</bool>
<string>Color...</string>
</property>
</widget>
</item>
@ -516,17 +485,17 @@
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
<class>QgsColorButton</class>
<extends>QPushButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>
<customwidget>
<class>QgsCollapsibleGroupBoxBasic</class>
<extends>QGroupBox</extends>
<header location="global">qgscollapsiblegroupbox.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>QgsColorButton</class>
<extends>QToolButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>scrollArea</tabstop>

View File

@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>256</width>
<width>263</width>
<height>175</height>
</rect>
</property>
@ -64,19 +64,6 @@
<property name="text">
<string>Minimum value</string>
</property>
<property name="buddy">
<cstring>btnMinValue</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QgsColorButton" name="btnMinValue">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item row="2" column="0">
@ -90,19 +77,6 @@
<property name="text">
<string>Maximum value</string>
</property>
<property name="buddy">
<cstring>btnMaxValue</cstring>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QgsColorButton" name="btnMaxValue">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item row="3" column="0">
@ -144,20 +118,32 @@
</property>
</spacer>
</item>
<item row="1" column="1">
<widget class="QgsColorButton" name="btnMinValue">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QgsColorButton" name="btnMaxValue">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
<class>QgsColorButton</class>
<extends>QToolButton</extends>
<extends>QPushButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>classificationComboBox</tabstop>
<tabstop>btnMinValue</tabstop>
<tabstop>btnMaxValue</tabstop>
<tabstop>outlinewidthspinbox</tabstop>
<tabstop>cb_polygonOutline</tabstop>
</tabstops>

View File

@ -45,8 +45,8 @@
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Verdana';&quot;&gt;© QGIS 2009&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Verdana'; font-size:10pt;&quot;&gt;© QGIS 2009&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
@ -111,26 +111,7 @@ p, li { white-space: pre-wrap; }
<item row="5" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>&amp;Color</string>
</property>
<property name="buddy">
<cstring>pbnColorChooser</cstring>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QgsColorButton" name="pbnColorChooser">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
<string>Color</string>
</property>
</widget>
</item>
@ -144,13 +125,20 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QgsColorButton" name="pbnColorChooser">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
<class>QgsColorButton</class>
<extends>QToolButton</extends>
<extends>QPushButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>
</customwidgets>
@ -159,7 +147,6 @@ p, li { white-space: pre-wrap; }
<tabstop>txtCopyrightText</tabstop>
<tabstop>cboPlacement</tabstop>
<tabstop>cboOrientation</tabstop>
<tabstop>pbnColorChooser</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops>
<resources/>

View File

@ -125,28 +125,6 @@
<property name="text">
<string>Color of bar</string>
</property>
<property name="buddy">
<cstring>pbnChangeColor</cstring>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QgsColorButton" name="pbnChangeColor">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Click to select the color</string>
</property>
<property name="whatsThis">
<string>Click to select the color</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="3" column="0">
@ -217,20 +195,26 @@
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QgsColorButton" name="pbnChangeColor">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
<class>QgsColorButton</class>
<extends>QToolButton</extends>
<extends>QPushButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>cboPlacement</tabstop>
<tabstop>cboStyle</tabstop>
<tabstop>pbnChangeColor</tabstop>
<tabstop>spnSize</tabstop>
<tabstop>chkEnable</tabstop>
<tabstop>chkSnapping</tabstop>

View File

@ -39,8 +39,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>756</width>
<height>627</height>
<width>752</width>
<height>613</height>
</rect>
</property>
<layout class="QVBoxLayout" name="scrollAreaLayout">
@ -124,8 +124,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>723</width>
<height>356</height>
<width>713</width>
<height>364</height>
</rect>
</property>
<attribute name="label">
@ -204,25 +204,6 @@
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QgsColorButton" name="mBackgroundColorButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>25</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QDoubleSpinBox" name="mBarWidthSpinBox">
<property name="minimum">
@ -233,25 +214,6 @@
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QgsColorButton" name="mDiagramPenColorButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>25</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="5" column="2">
<widget class="QDoubleSpinBox" name="mPenWidthSpinBox">
<property name="decimals">
@ -262,6 +224,20 @@
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QgsColorButton" name="mBackgroundColorButton">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QgsColorButton" name="mDiagramPenColorButton">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0">
@ -334,8 +310,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>640</width>
<height>289</height>
<width>715</width>
<height>318</height>
</rect>
</property>
<attribute name="label">
@ -523,8 +499,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>216</width>
<height>284</height>
<width>713</width>
<height>271</height>
</rect>
</property>
<attribute name="label">
@ -685,8 +661,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>137</width>
<height>191</height>
<width>728</width>
<height>166</height>
</rect>
</property>
<attribute name="label">
@ -979,7 +955,7 @@
<customwidgets>
<customwidget>
<class>QgsColorButton</class>
<extends>QToolButton</extends>
<extends>QPushButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>
</customwidgets>

View File

@ -45,7 +45,7 @@
</sizepolicy>
</property>
<property name="text">
<string>change</string>
<string>Change...</string>
</property>
</widget>
</item>

View File

@ -134,12 +134,6 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="currentIndex">
<number>0</number>
</property>
@ -288,24 +282,6 @@
</property>
<item>
<widget class="QLineEdit" name="mPreviewTextEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Sample text</string>
</property>
@ -408,24 +384,27 @@
</item>
<item>
<widget class="QgsColorButton" name="mPreviewBackgroundBtn">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>48</width>
<width>64</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>22</height>
<width>64</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Sample background color</string>
</property>
<property name="text">
<string>...</string>
</property>
</widget>
</item>
</layout>
@ -442,12 +421,6 @@
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="lineWidth">
<number>0</number>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
@ -456,31 +429,16 @@
<rect>
<x>0</x>
<y>0</y>
<width>686</width>
<height>834</height>
<width>689</width>
<height>826</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_17">
<property name="leftMargin">
<number>6</number>
</property>
<property name="verticalSpacing">
<number>20</number>
</property>
<item row="9" column="0">
<widget class="QgsCollapsibleGroupBox" name="chkFormattedNumbers">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="title">
<string>Formatted numbers</string>
</property>
@ -702,18 +660,6 @@
</item>
<item row="2" column="0">
<widget class="QgsCollapsibleGroupBox" name="mFontStyleGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="title">
<string>Text style</string>
</property>
@ -909,19 +855,22 @@
<item>
<widget class="QgsColorButton" name="btnTextColor">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>32</width>
<width>64</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>...</string>
<property name="maximumSize">
<size>
<width>64</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
@ -990,7 +939,7 @@
<widget class="QToolButton" name="btnChangeFont">
<property name="minimumSize">
<size>
<width>32</width>
<width>36</width>
<height>0</height>
</size>
</property>
@ -1195,18 +1144,6 @@
</item>
<item row="4" column="0">
<widget class="QgsCollapsibleGroupBox" name="chkBuffer">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="title">
<string>Buffer</string>
</property>
@ -1330,19 +1267,22 @@
<item>
<widget class="QgsColorButton" name="btnBufferColor">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>32</width>
<width>64</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>...</string>
<property name="maximumSize">
<size>
<width>64</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
@ -1602,24 +1542,6 @@
</item>
<item row="5" column="0">
<widget class="QgsCollapsibleGroupBox" name="chkScaleBasedVisibility">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="title">
<string>Scale-based visibility</string>
</property>
@ -1999,12 +1921,6 @@
</property>
<item row="1" column="0">
<widget class="QgsCollapsibleGroupBox" name="mPriorityGroupBox">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="title">
<string>Priority</string>
</property>
@ -2056,18 +1972,6 @@
</item>
<item row="0" column="0">
<widget class="QgsCollapsibleGroupBox" name="mPlacementGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="title">
<string>Placement</string>
</property>
@ -2819,12 +2723,6 @@
</item>
<item row="2" column="0">
<widget class="QgsCollapsibleGroupBox" name="mOptionsGroupBox">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="title">
<string>Options</string>
</property>
@ -3335,12 +3233,6 @@
</item>
<item row="2" column="0">
<widget class="QgsCollapsibleGroupBox" name="mFontAttributePropertiesGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Font properties</string>
</property>
@ -3579,7 +3471,7 @@
</customwidget>
<customwidget>
<class>QgsColorButton</class>
<extends>QToolButton</extends>
<extends>QPushButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>
<customwidget>

View File

@ -34,19 +34,6 @@
<string>Font</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="1">
<widget class="QgsColorButton" name="mFontColorButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="mFontPushButton">
<property name="text">
@ -81,6 +68,19 @@
</item>
</layout>
</item>
<item row="0" column="1">
<widget class="QgsColorButton" name="mFontColorButton">
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@ -197,11 +197,11 @@
</item>
<item row="0" column="1">
<widget class="QgsColorButton" name="mBufferColorButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
@ -370,7 +370,7 @@
<customwidgets>
<customwidget>
<class>QgsColorButton</class>
<extends>QToolButton</extends>
<extends>QPushButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>
</customwidgets>

View File

@ -267,7 +267,7 @@
<x>0</x>
<y>0</y>
<width>654</width>
<height>612</height>
<height>642</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_28">
@ -594,6 +594,17 @@
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_31">
<item>
<widget class="QCheckBox" name="mLiveColorDialogsChkBx">
<property name="text">
<string>Use live-updating color chooser dialogs</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
@ -901,7 +912,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>654</width>
<width>611</width>
<height>808</height>
</rect>
</property>
@ -997,7 +1008,7 @@
</widget>
</item>
<item row="2" column="0" colspan="4">
<widget class="QgsCollapsibleGroupBox" name="mCurrentVariablesGrpBx"><property name="collapsed" stdset="0"><bool>false</bool></property><property name="saveCollapsedState" stdset="0"><bool>true</bool></property>
<widget class="QgsCollapsibleGroupBox" name="mCurrentVariablesGrpBx">
<property name="minimumSize">
<size>
<width>0</width>
@ -1007,6 +1018,12 @@
<property name="title">
<string>Current environment variables (read-only - bold indicates modified at startup)</string>
</property>
<property name="collapsed" stdset="0">
<bool>false</bool>
</property>
<property name="saveCollapsedState" stdset="0">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_8">
<item>
<widget class="QTableWidget" name="mCurrentVariablesTable">
@ -1231,8 +1248,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>669</width>
<height>490</height>
<width>559</width>
<height>417</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_27">
@ -1549,8 +1566,8 @@
<property name="geometry">
<rect>
<x>0</x>
<y>-291</y>
<width>654</width>
<y>0</y>
<width>615</width>
<height>781</height>
</rect>
</property>
@ -2081,8 +2098,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>669</width>
<height>490</height>
<width>474</width>
<height>390</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_25">
@ -2091,7 +2108,58 @@
<property name="title">
<string>Default map appearance (overridden by project properties)</string>
</property>
<layout class="QGridLayout" name="_2">
<layout class="QGridLayout" name="gridLayout_7">
<item row="0" column="4">
<widget class="QgsColorButton" name="pbnCanvasColor">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="6">
<spacer name="horizontalSpacer_28">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="3">
<widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Background color</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="textLabel1_9">
<property name="sizePolicy">
@ -2105,58 +2173,31 @@
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QgsColorButton" name="pbnCanvasColor">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label">
<item row="0" column="1">
<widget class="QgsColorButton" name="pbnSelectionColor">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Background color</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QgsColorButton" name="pbnSelectionColor">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="4">
<spacer name="horizontalSpacer_28">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
@ -2392,8 +2433,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>654</width>
<height>718</height>
<width>556</width>
<height>712</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_30">
@ -2476,19 +2517,6 @@
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QgsColorButton" name="pbnMeasureColor">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="textLabel1_11">
<property name="text">
@ -2575,6 +2603,31 @@
</property>
</spacer>
</item>
<item row="2" column="1">
<widget class="QgsColorButton" name="pbnMeasureColor">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@ -2772,8 +2825,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>654</width>
<height>643</height>
<width>517</width>
<height>642</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_31">
@ -2881,19 +2934,6 @@
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QgsColorButton" name="mLineColorToolButton">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="4">
<spacer name="horizontalSpacer_33">
<property name="orientation">
@ -2907,6 +2947,31 @@
</property>
</spacer>
</item>
<item row="0" column="3">
<widget class="QgsColorButton" name="mLineColorToolButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@ -3261,8 +3326,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>669</width>
<height>490</height>
<width>537</width>
<height>361</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6">
@ -3401,8 +3466,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>669</width>
<height>490</height>
<width>614</width>
<height>393</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_15">
@ -3582,8 +3647,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>669</width>
<height>490</height>
<width>300</width>
<height>248</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_32">
@ -3682,7 +3747,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>654</width>
<width>521</width>
<height>650</height>
</rect>
</property>
@ -3790,7 +3855,7 @@
</widget>
</item>
<item>
<widget class="QgsCollapsibleGroupBox" name="grpProxy"><property name="collapsed" stdset="0"><bool>false</bool></property><property name="saveCollapsedState" stdset="0"><bool>true</bool></property>
<widget class="QgsCollapsibleGroupBox" name="grpProxy">
<property name="title">
<string>Use proxy for web access</string>
</property>
@ -3800,6 +3865,12 @@
<property name="checkable">
<bool>true</bool>
</property>
<property name="collapsed" stdset="0">
<bool>false</bool>
</property>
<property name="saveCollapsedState" stdset="0">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout_1">
<item row="0" column="0">
<widget class="QLabel" name="lblProxyHost">
@ -3995,17 +4066,17 @@
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
<class>QgsColorButton</class>
<extends>QPushButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>
<customwidget>
<class>QgsCollapsibleGroupBox</class>
<extends>QGroupBox</extends>
<header>qgscollapsiblegroupbox.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>QgsColorButton</class>
<extends>QToolButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="../../images/images.qrc"/>

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>327</width>
<height>505</height>
<width>383</width>
<height>532</height>
</rect>
</property>
<property name="windowTitle">
@ -84,12 +84,6 @@
</item>
<item>
<widget class="QgsColorButton" name="mCircleColorButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
@ -194,12 +188,6 @@
</item>
<item>
<widget class="QgsColorButton" name="mLabelColorButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
@ -236,7 +224,7 @@
<customwidgets>
<customwidget>
<class>QgsColorButton</class>
<extends>QToolButton</extends>
<extends>QPushButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>
</customwidgets>

View File

@ -50,8 +50,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>600</width>
<height>497</height>
<width>558</width>
<height>668</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_13">
@ -107,19 +107,6 @@
</property>
</spacer>
</item>
<item row="1" column="3">
<widget class="QgsColorButton" name="pbnSelectionColor">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QLabel" name="label">
<property name="text">
@ -143,19 +130,6 @@
</property>
</spacer>
</item>
<item row="2" column="3">
<widget class="QgsColorButton" name="pbnCanvasColor">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QComboBox" name="cbxAbsolutePath">
<item>
@ -193,6 +167,32 @@
</property>
</spacer>
</item>
<item row="1" column="3">
<widget class="QgsColorButton" name="pbnSelectionColor">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QgsColorButton" name="pbnCanvasColor">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@ -212,7 +212,7 @@
<item row="1" column="1" colspan="4">
<widget class="QComboBox" name="cmbEllipsoid"/>
</item>
<item row="2" column="4">
<item row="2" column="4">
<widget class="QLineEdit" name="leSemiMinor"/>
</item>
<item row="2" column="3">
@ -836,14 +836,14 @@
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>600</width>
<height>1085</height>
<y>-891</y>
<width>617</width>
<height>1260</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_15">
<item row="0" column="0">
<widget class="QgsCollapsibleGroupBox" name="grpOWSServiceCapabilities"><property name="collapsed" stdset="0"><bool>false</bool></property><property name="saveCollapsedState" stdset="0"><bool>true</bool></property>
<widget class="QgsCollapsibleGroupBox" name="grpOWSServiceCapabilities">
<property name="title">
<string>Service Capabilitities</string>
</property>
@ -853,6 +853,12 @@
<property name="checked">
<bool>false</bool>
</property>
<property name="collapsed" stdset="0">
<bool>false</bool>
</property>
<property name="saveCollapsedState" stdset="0">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout_6">
<item row="3" column="0">
<widget class="QLabel" name="label_7">
@ -979,7 +985,7 @@
</property>
<layout class="QGridLayout" name="gridLayout_14">
<item row="0" column="0">
<widget class="QgsCollapsibleGroupBox" name="grpWMSExt"><property name="collapsed" stdset="0"><bool>false</bool></property><property name="saveCollapsedState" stdset="0"><bool>true</bool></property>
<widget class="QgsCollapsibleGroupBox" name="grpWMSExt">
<property name="title">
<string>Advertised Extent</string>
</property>
@ -989,6 +995,12 @@
<property name="checked">
<bool>false</bool>
</property>
<property name="collapsed" stdset="0">
<bool>false</bool>
</property>
<property name="saveCollapsedState" stdset="0">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<widget class="QLabel" name="label_11">
@ -1082,7 +1094,7 @@
</widget>
</item>
<item row="0" column="1" colspan="2">
<widget class="QgsCollapsibleGroupBox" name="grpWMSList"><property name="collapsed" stdset="0"><bool>false</bool></property><property name="saveCollapsedState" stdset="0"><bool>true</bool></property>
<widget class="QgsCollapsibleGroupBox" name="grpWMSList">
<property name="title">
<string>Coordinate Systems Restrictions</string>
</property>
@ -1092,6 +1104,12 @@
<property name="checked">
<bool>false</bool>
</property>
<property name="collapsed" stdset="0">
<bool>false</bool>
</property>
<property name="saveCollapsedState" stdset="0">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0" colspan="3">
<widget class="QListWidget" name="mWMSList"/>
@ -1121,7 +1139,7 @@
</widget>
</item>
<item row="1" column="0">
<widget class="QgsCollapsibleGroupBox" name="mWMSComposerGroupBox"><property name="collapsed" stdset="0"><bool>false</bool></property><property name="saveCollapsedState" stdset="0"><bool>true</bool></property>
<widget class="QgsCollapsibleGroupBox" name="mWMSComposerGroupBox">
<property name="title">
<string>Exclude composers</string>
</property>
@ -1131,6 +1149,12 @@
<property name="checked">
<bool>false</bool>
</property>
<property name="collapsed" stdset="0">
<bool>false</bool>
</property>
<property name="saveCollapsedState" stdset="0">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout_10">
<item row="0" column="0" colspan="3">
<widget class="QListWidget" name="mComposerListWidget"/>
@ -1174,7 +1198,7 @@
</widget>
</item>
<item row="1" column="2">
<widget class="QgsCollapsibleGroupBox" name="mLayerRestrictionsGroupBox"><property name="collapsed" stdset="0"><bool>false</bool></property><property name="saveCollapsedState" stdset="0"><bool>true</bool></property>
<widget class="QgsCollapsibleGroupBox" name="mLayerRestrictionsGroupBox">
<property name="title">
<string>Exclude layers</string>
</property>
@ -1184,6 +1208,12 @@
<property name="checked">
<bool>false</bool>
</property>
<property name="collapsed" stdset="0">
<bool>false</bool>
</property>
<property name="saveCollapsedState" stdset="0">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="3">
<widget class="QListWidget" name="mLayerRestrictionsListWidget"/>
@ -1388,21 +1418,21 @@
<customwidgets>
<customwidget>
<class>QgsColorButton</class>
<extends>QToolButton</extends>
<extends>QPushButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>
<customwidget>
<class>QgsProjectionSelector</class>
<extends>QWidget</extends>
<header>qgsprojectionselector.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>QgsCollapsibleGroupBox</class>
<extends>QGroupBox</extends>
<header>qgscollapsiblegroupbox.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>QgsProjectionSelector</class>
<extends>QWidget</extends>
<header>qgsprojectionselector.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>titleEdit</tabstop>
@ -1437,7 +1467,6 @@
</tabstops>
<resources>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
</resources>
<connections>
<connection>

View File

@ -6,16 +6,10 @@
<rect>
<x>0</x>
<y>0</y>
<width>337</width>
<width>372</width>
<height>620</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>Single Symbol</string>
</property>
@ -32,9 +26,9 @@
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>335</width>
<height>618</height>
<y>-37</y>
<width>358</width>
<height>640</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_5">
@ -200,19 +194,22 @@
</property>
<property name="minimumSize">
<size>
<width>32</width>
<width>80</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>32</width>
<width>80</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
<item>
@ -275,19 +272,22 @@
</property>
<property name="minimumSize">
<size>
<width>32</width>
<width>80</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>32</width>
<width>80</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
<item>
@ -412,7 +412,7 @@
<customwidgets>
<customwidget>
<class>QgsColorButton</class>
<extends>QToolButton</extends>
<extends>QPushButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>
</customwidgets>

View File

@ -37,6 +37,12 @@
</item>
<item>
<widget class="QPushButton" name="mBoldPushButton">
<property name="minimumSize">
<size>
<width>50</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>B</string>
</property>
@ -47,6 +53,12 @@
</item>
<item>
<widget class="QPushButton" name="mItalicsPushButton">
<property name="minimumSize">
<size>
<width>50</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>I</string>
</property>
@ -57,15 +69,12 @@
</item>
<item>
<widget class="QgsColorButton" name="mFontColorButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
@ -97,7 +106,7 @@
<customwidgets>
<customwidget>
<class>QgsColorButton</class>
<extends>QToolButton</extends>
<extends>QPushButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>
</customwidgets>

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>400</width>
<height>364</height>
<height>379</height>
</rect>
</property>
<property name="windowTitle">
@ -26,10 +26,13 @@
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QgsColorButtonV2" name="btnColor1">
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Change</string>
<string>Color 2</string>
</property>
<property name="buddy">
<cstring>btnColor2</cstring>
</property>
</widget>
</item>
@ -49,30 +52,6 @@
</property>
</spacer>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Color 2</string>
</property>
<property name="buddy">
<cstring>btnColor2</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QgsColorButtonV2" name="btnColor2">
<property name="text">
<string>Change</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Type</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="cboType">
<property name="sizePolicy">
@ -89,6 +68,27 @@
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QgsColorButton" name="btnColor2">
<property name="text">
<string>Change...</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Type</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QgsColorButton" name="btnColor1">
<property name="text">
<string>Change...</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
@ -109,21 +109,7 @@
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_1">
<item row="0" column="1">
<widget class="QPushButton" name="btnAddStop">
<property name="text">
<string>Add stop</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="btnRemoveStop">
<property name="text">
<string>Remove stop</string>
</property>
</widget>
</item>
<item row="0" column="0" rowspan="2">
<item row="0" column="0" rowspan="3">
<widget class="QTreeWidget" name="treeStops">
<property name="rootIsDecorated">
<bool>false</bool>
@ -143,6 +129,20 @@
</column>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="btnAddStop">
<property name="text">
<string>Add stop</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="btnRemoveStop">
<property name="text">
<string>Remove stop</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@ -193,7 +193,7 @@
</widget>
<customwidgets>
<customwidget>
<class>QgsColorButtonV2</class>
<class>QgsColorButton</class>
<extends>QPushButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>
@ -204,7 +204,6 @@
<tabstop>groupStops</tabstop>
<tabstop>treeStops</tabstop>
<tabstop>btnAddStop</tabstop>
<tabstop>btnRemoveStop</tabstop>
</tabstops>
<resources/>
<connections>

View File

@ -35,16 +35,16 @@
</widget>
</item>
<item row="1" column="1">
<widget class="QgsColorButtonV2" name="btnChangeColorFill">
<widget class="QgsColorButton" name="btnChangeColorFill">
<property name="text">
<string>Change</string>
<string>Change...</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QgsColorButtonV2" name="btnChangeColorBorder">
<widget class="QgsColorButton" name="btnChangeColorBorder">
<property name="text">
<string>Change</string>
<string>Change...</string>
</property>
</widget>
</item>
@ -317,7 +317,7 @@
</widget>
<customwidgets>
<customwidget>
<class>QgsColorButtonV2</class>
<class>QgsColorButton</class>
<extends>QPushButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>

View File

@ -131,9 +131,9 @@
</widget>
</item>
<item row="1" column="1">
<widget class="QgsColorButtonV2" name="btnColor">
<widget class="QgsColorButton" name="btnColor">
<property name="text">
<string>Change</string>
<string>Change...</string>
</property>
</widget>
</item>
@ -194,7 +194,7 @@
</widget>
<customwidgets>
<customwidget>
<class>QgsColorButtonV2</class>
<class>QgsColorButton</class>
<extends>QPushButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>

View File

@ -27,7 +27,7 @@
</widget>
</item>
<item row="0" column="1">
<widget class="QgsColorButtonV2" name="btnChangeColor">
<widget class="QgsColorButton" name="btnChangeColor">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -35,7 +35,7 @@
</sizepolicy>
</property>
<property name="text">
<string>Change</string>
<string>Change...</string>
</property>
</widget>
</item>
@ -102,7 +102,7 @@
</widget>
<customwidgets>
<customwidget>
<class>QgsColorButtonV2</class>
<class>QgsColorButton</class>
<extends>QPushButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>

View File

@ -41,9 +41,9 @@
</widget>
</item>
<item row="7" column="1">
<widget class="QgsColorButtonV2" name="mColorPushButton">
<widget class="QgsColorButton" name="mColorPushButton">
<property name="text">
<string>Change</string>
<string>Change...</string>
</property>
</widget>
</item>
@ -176,7 +176,7 @@
</widget>
<customwidgets>
<customwidget>
<class>QgsColorButtonV2</class>
<class>QgsColorButton</class>
<extends>QPushButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>

View File

@ -20,9 +20,9 @@
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="1">
<widget class="QgsColorButtonV2" name="btnChangeColor">
<widget class="QgsColorButton" name="btnChangeColor">
<property name="text">
<string>Change</string>
<string>Change...</string>
</property>
</widget>
</item>
@ -41,9 +41,9 @@
</widget>
</item>
<item row="2" column="1">
<widget class="QgsColorButtonV2" name="btnChangeBorderColor">
<widget class="QgsColorButton" name="btnChangeBorderColor">
<property name="text">
<string>Change</string>
<string>Change...</string>
</property>
</widget>
</item>
@ -182,7 +182,7 @@
</widget>
<customwidgets>
<customwidget>
<class>QgsColorButtonV2</class>
<class>QgsColorButton</class>
<extends>QPushButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>

View File

@ -6,23 +6,16 @@
<rect>
<x>0</x>
<y>0</y>
<width>331</width>
<height>235</height>
<width>395</width>
<height>276</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Color</string>
</property>
</widget>
</item>
<item row="0" column="1" colspan="2">
<widget class="QgsColorButtonV2" name="btnChangeColor">
<widget class="QgsColorButton" name="btnChangeColor">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -30,7 +23,14 @@
</sizepolicy>
</property>
<property name="text">
<string>Change</string>
<string>Change...</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Color</string>
</property>
</widget>
</item>
@ -41,6 +41,13 @@
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Join style</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="spinWidth">
<property name="sizePolicy">
@ -106,56 +113,9 @@
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QComboBox" name="mOffsetUnitComboBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>Millimeter</string>
</property>
</item>
<item>
<property name="text">
<string>Map unit</string>
</property>
</item>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Pen style</string>
</property>
</widget>
</item>
<item row="3" column="1" colspan="2">
<widget class="QgsPenStyleComboBox" name="cboPenStyle"/>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Join style</string>
</property>
</widget>
</item>
<item row="4" column="1" colspan="2">
<widget class="QgsPenJoinStyleComboBox" name="cboJoinStyle"/>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Cap style</string>
</property>
</widget>
</item>
<item row="5" column="1" colspan="2">
<widget class="QgsPenCapStyleComboBox" name="cboCapStyle"/>
</item>
<item row="6" column="0" colspan="3">
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="sizeConstraint">
@ -177,6 +137,36 @@
</item>
</layout>
</item>
<item row="3" column="1" colspan="2">
<widget class="QgsPenStyleComboBox" name="cboPenStyle"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Pen style</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QComboBox" name="mOffsetUnitComboBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>Millimeter</string>
</property>
</item>
<item>
<property name="text">
<string>Map unit</string>
</property>
</item>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="mDashPatternUnitLabel">
<property name="text">
@ -198,11 +188,34 @@
</item>
</widget>
</item>
<item row="5" column="1" colspan="2">
<widget class="QgsPenCapStyleComboBox" name="cboCapStyle"/>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Cap style</string>
</property>
</widget>
</item>
<item row="8" column="1">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>QgsColorButtonV2</class>
<class>QgsColorButton</class>
<extends>QPushButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>

View File

@ -40,9 +40,9 @@
</widget>
</item>
<item row="0" column="1">
<widget class="QgsColorButtonV2" name="btnChangeColorBorder">
<widget class="QgsColorButton" name="btnChangeColorBorder">
<property name="text">
<string>Change</string>
<string>Change...</string>
</property>
</widget>
</item>
@ -126,9 +126,9 @@
</widget>
</item>
<item row="1" column="1">
<widget class="QgsColorButtonV2" name="btnChangeColorFill">
<widget class="QgsColorButton" name="btnChangeColorFill">
<property name="text">
<string>Change</string>
<string>Change...</string>
</property>
</widget>
</item>
@ -225,7 +225,7 @@
</widget>
<customwidgets>
<customwidget>
<class>QgsColorButtonV2</class>
<class>QgsColorButton</class>
<extends>QPushButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>

View File

@ -51,9 +51,9 @@
</widget>
</item>
<item row="3" column="1">
<widget class="QgsColorButtonV2" name="mChangeColorButton">
<widget class="QgsColorButton" name="mChangeColorButton">
<property name="text">
<string>Change</string>
<string>Change...</string>
</property>
</widget>
</item>
@ -65,9 +65,9 @@
</widget>
</item>
<item row="4" column="1">
<widget class="QgsColorButtonV2" name="mChangeBorderColorButton">
<widget class="QgsColorButton" name="mChangeBorderColorButton">
<property name="text">
<string>Change</string>
<string>Change...</string>
</property>
</widget>
</item>
@ -191,7 +191,7 @@
</widget>
<customwidgets>
<customwidget>
<class>QgsColorButtonV2</class>
<class>QgsColorButton</class>
<extends>QPushButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>

View File

@ -54,9 +54,9 @@
</widget>
</item>
<item row="4" column="1">
<widget class="QgsColorButtonV2" name="mChangeBorderColorButton">
<widget class="QgsColorButton" name="mChangeBorderColorButton">
<property name="text">
<string>Change</string>
<string>Change...</string>
</property>
</widget>
</item>
@ -82,9 +82,9 @@
</widget>
</item>
<item row="3" column="1">
<widget class="QgsColorButtonV2" name="mChangeColorButton">
<widget class="QgsColorButton" name="mChangeColorButton">
<property name="text">
<string>Change</string>
<string>Change...</string>
</property>
</widget>
</item>
@ -290,7 +290,7 @@
</widget>
<customwidgets>
<customwidget>
<class>QgsColorButtonV2</class>
<class>QgsColorButton</class>
<extends>QPushButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>

View File

@ -85,9 +85,9 @@
</widget>
</item>
<item row="2" column="1">
<widget class="QgsColorButtonV2" name="btnColor">
<widget class="QgsColorButton" name="btnColor">
<property name="text">
<string>Change</string>
<string>Change...</string>
</property>
</widget>
</item>
@ -353,7 +353,7 @@
</widget>
<customwidgets>
<customwidget>
<class>QgsColorButtonV2</class>
<class>QgsColorButton</class>
<extends>QPushButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>