mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-16 00:03:12 -04:00
Merge pull request #5732 from DelazJ/colorDialogTitle
Some general tweaks to dialogs
This commit is contained in:
commit
6c9a75fb27
@ -1039,9 +1039,10 @@ void QgsDiagramProperties::showSizeLegendDialog()
|
||||
dlg.setLayout( new QVBoxLayout() );
|
||||
dlg.setWindowTitle( panel->panelTitle() );
|
||||
dlg.layout()->addWidget( panel );
|
||||
QDialogButtonBox *buttonBox = new QDialogButtonBox( QDialogButtonBox::Help | QDialogButtonBox::Ok );
|
||||
QDialogButtonBox *buttonBox = new QDialogButtonBox( QDialogButtonBox::Cancel | QDialogButtonBox::Help | QDialogButtonBox::Ok );
|
||||
connect( buttonBox, &QDialogButtonBox::accepted, &dlg, &QDialog::accept );
|
||||
connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsDiagramProperties::showHelp );
|
||||
connect( buttonBox, &QDialogButtonBox::rejected, &dlg, &QDialog::reject );
|
||||
dlg.layout()->addWidget( buttonBox );
|
||||
if ( dlg.exec() )
|
||||
mSizeLegend.reset( panel->dataDefinedSizeLegend() );
|
||||
|
@ -17,6 +17,8 @@
|
||||
|
||||
#include "qgscolorramp.h"
|
||||
#include "qgssymbollayerutils.h"
|
||||
#include "qgshelp.h"
|
||||
|
||||
#include <QAbstractButton>
|
||||
#include <QDialogButtonBox>
|
||||
|
||||
@ -124,10 +126,17 @@ QgsColorBrewerColorRampDialog::QgsColorBrewerColorRampDialog( const QgsColorBrew
|
||||
QVBoxLayout *vLayout = new QVBoxLayout();
|
||||
mWidget = new QgsColorBrewerColorRampWidget( ramp );
|
||||
vLayout->addWidget( mWidget );
|
||||
QDialogButtonBox *bbox = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal );
|
||||
QDialogButtonBox *bbox = new QDialogButtonBox( QDialogButtonBox::Cancel | QDialogButtonBox::Help | QDialogButtonBox::Ok, Qt::Horizontal );
|
||||
connect( bbox, &QDialogButtonBox::accepted, this, &QDialog::accept );
|
||||
connect( bbox, &QDialogButtonBox::rejected, this, &QDialog::reject );
|
||||
connect( bbox, &QDialogButtonBox::helpRequested, this, &QgsColorBrewerColorRampDialog::showHelp );
|
||||
vLayout->addWidget( bbox );
|
||||
setLayout( vLayout );
|
||||
setWindowTitle( tr( "ColorBrewer Ramp" ) );
|
||||
connect( mWidget, &QgsColorBrewerColorRampWidget::changed, this, &QgsColorBrewerColorRampDialog::changed );
|
||||
}
|
||||
|
||||
void QgsColorBrewerColorRampDialog::showHelp()
|
||||
{
|
||||
QgsHelp::openHelp( QStringLiteral( "working_with_vector/style_library.html#color-ramp" ) );
|
||||
}
|
||||
|
@ -118,6 +118,10 @@ class GUI_EXPORT QgsColorBrewerColorRampDialog : public QDialog
|
||||
|
||||
QgsColorBrewerColorRampWidget *mWidget = nullptr;
|
||||
|
||||
private slots:
|
||||
|
||||
void showHelp();
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
#include "qgssymbollayerutils.h"
|
||||
#include "qgscolorramp.h"
|
||||
#include "qgshelp.h"
|
||||
|
||||
#include <QColorDialog>
|
||||
#include <QDialogButtonBox>
|
||||
@ -121,10 +122,17 @@ QgsLimitedRandomColorRampDialog::QgsLimitedRandomColorRampDialog( const QgsLimit
|
||||
QVBoxLayout *vLayout = new QVBoxLayout();
|
||||
mWidget = new QgsLimitedRandomColorRampWidget( ramp );
|
||||
vLayout->addWidget( mWidget );
|
||||
QDialogButtonBox *bbox = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal );
|
||||
QDialogButtonBox *bbox = new QDialogButtonBox( QDialogButtonBox::Cancel | QDialogButtonBox::Help | QDialogButtonBox::Ok, Qt::Horizontal );
|
||||
connect( bbox, &QDialogButtonBox::accepted, this, &QDialog::accept );
|
||||
connect( bbox, &QDialogButtonBox::rejected, this, &QDialog::reject );
|
||||
connect( bbox, &QDialogButtonBox::helpRequested, this, &QgsLimitedRandomColorRampDialog::showHelp );
|
||||
vLayout->addWidget( bbox );
|
||||
setLayout( vLayout );
|
||||
setWindowTitle( tr( "Random Color Ramp" ) );
|
||||
connect( mWidget, &QgsLimitedRandomColorRampWidget::changed, this, &QgsLimitedRandomColorRampDialog::changed );
|
||||
}
|
||||
|
||||
void QgsLimitedRandomColorRampDialog::showHelp()
|
||||
{
|
||||
QgsHelp::openHelp( QStringLiteral( "working_with_vector/style_library.html#color-ramp" ) );
|
||||
}
|
||||
|
@ -129,6 +129,10 @@ class GUI_EXPORT QgsLimitedRandomColorRampDialog : public QDialog
|
||||
|
||||
QgsLimitedRandomColorRampWidget *mWidget = nullptr;
|
||||
|
||||
private slots:
|
||||
|
||||
void showHelp();
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -112,10 +112,17 @@ QgsPresetColorRampDialog::QgsPresetColorRampDialog( const QgsPresetSchemeColorRa
|
||||
QVBoxLayout *vLayout = new QVBoxLayout();
|
||||
mWidget = new QgsPresetColorRampWidget( ramp );
|
||||
vLayout->addWidget( mWidget );
|
||||
QDialogButtonBox *bbox = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal );
|
||||
QDialogButtonBox *bbox = new QDialogButtonBox( QDialogButtonBox::Cancel | QDialogButtonBox::Help | QDialogButtonBox::Ok, Qt::Horizontal );
|
||||
connect( bbox, &QDialogButtonBox::accepted, this, &QDialog::accept );
|
||||
connect( bbox, &QDialogButtonBox::rejected, this, &QDialog::reject );
|
||||
connect( bbox, &QDialogButtonBox::helpRequested, this, &QgsPresetColorRampDialog::showHelp );
|
||||
vLayout->addWidget( bbox );
|
||||
setLayout( vLayout );
|
||||
setWindowTitle( tr( "Color Presets Ramp" ) );
|
||||
connect( mWidget, &QgsPresetColorRampWidget::changed, this, &QgsPresetColorRampDialog::changed );
|
||||
}
|
||||
|
||||
void QgsPresetColorRampDialog::showHelp()
|
||||
{
|
||||
QgsHelp::openHelp( QStringLiteral( "working_with_vector/style_library.html#color-ramp" ) );
|
||||
}
|
||||
|
@ -117,6 +117,10 @@ class GUI_EXPORT QgsPresetColorRampDialog : public QDialog
|
||||
|
||||
QgsPresetColorRampWidget *mWidget = nullptr;
|
||||
|
||||
private slots:
|
||||
|
||||
void showHelp();
|
||||
|
||||
};
|
||||
|
||||
#endif //QGSPRESETCOLORRAMPDIALOG_H
|
||||
|
@ -464,6 +464,7 @@ void QgsCptCityColorRampDialog::showHelp()
|
||||
"(you must enable Experimental plugins in the plugin manager).\n\n"
|
||||
);
|
||||
QMessageBox *msg = new QMessageBox( this );
|
||||
msg->setWindowTitle( tr( "Download more cpt-city Gradients" ) );
|
||||
msg->setText( helpText );
|
||||
msg->exec();
|
||||
}
|
||||
|
@ -184,12 +184,14 @@ QgsSymbolLevelsDialog::QgsSymbolLevelsDialog( QgsFeatureRenderer *renderer, bool
|
||||
QVBoxLayout *vLayout = new QVBoxLayout();
|
||||
mWidget = new QgsSymbolLevelsWidget( renderer, usingSymbolLevels );
|
||||
vLayout->addWidget( mWidget );
|
||||
QDialogButtonBox *bbox = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal );
|
||||
QDialogButtonBox *bbox = new QDialogButtonBox( QDialogButtonBox::Cancel | QDialogButtonBox::Help | QDialogButtonBox::Ok, Qt::Horizontal );
|
||||
connect( bbox, &QDialogButtonBox::accepted, mWidget, &QgsSymbolLevelsWidget::apply );
|
||||
connect( bbox, &QDialogButtonBox::accepted, this, &QgsSymbolLevelsDialog::accept );
|
||||
connect( bbox, &QDialogButtonBox::rejected, this, &QgsSymbolLevelsDialog::reject );
|
||||
connect( bbox, &QDialogButtonBox::helpRequested, this, &QgsSymbolLevelsDialog::showHelp );
|
||||
vLayout->addWidget( bbox );
|
||||
setLayout( vLayout );
|
||||
setWindowTitle( tr( "Symbol Levels" ) );
|
||||
}
|
||||
|
||||
void QgsSymbolLevelsDialog::setForceOrderingEnabled( bool enabled )
|
||||
@ -197,6 +199,11 @@ void QgsSymbolLevelsDialog::setForceOrderingEnabled( bool enabled )
|
||||
mWidget->setForceOrderingEnabled( enabled );
|
||||
}
|
||||
|
||||
void QgsSymbolLevelsDialog::showHelp()
|
||||
{
|
||||
QgsHelp::openHelp( QStringLiteral( "working_with_vector/vector_properties.html#symbols-levels" ) );
|
||||
}
|
||||
|
||||
/// @cond PRIVATE
|
||||
|
||||
QWidget *SpinBoxDelegate::createEditor( QWidget *parent, const QStyleOptionViewItem &, const QModelIndex & ) const
|
||||
|
@ -102,6 +102,9 @@ class GUI_EXPORT QgsSymbolLevelsDialog : public QDialog
|
||||
|
||||
QgsSymbolLevelsWidget *mWidget = nullptr;
|
||||
|
||||
private slots:
|
||||
|
||||
void showHelp();
|
||||
};
|
||||
|
||||
#ifndef SIP_RUN
|
||||
|
@ -11,7 +11,7 @@
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>ColorBrewer Ramp</string>
|
||||
<string>Color Presets Ramp</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="1,0,0">
|
||||
<item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user