21 , mIsMixedValues( false )
30 setStyleSheet(
QString(
"QToolButton{ background: none; border: 1px solid rgba(0, 0, 0, 0%);} QToolButton:focus { border: 1px solid palette(highlight); }" ) );
34 mMenu =
new QMenu(
this );
35 connect( mMenu, SIGNAL( aboutToShow() ),
this, SLOT( aboutToShowMenu() ) );
42 void QgsMultiEditToolButton::aboutToShowMenu()
57 :
tr(
"Set field for all selected features" );
59 connect( setFieldAction, SIGNAL(
triggered(
bool ) ),
this, SLOT( setFieldTriggered() ) );
65 connect( resetFieldAction, SIGNAL(
triggered(
bool ) ),
this, SLOT( resetFieldTriggered() ) );
71 void QgsMultiEditToolButton::setFieldTriggered()
78 void QgsMultiEditToolButton::resetFieldTriggered()
85 void QgsMultiEditToolButton::updateState()
90 else if ( mIsMixedValues )
101 tooltip =
tr(
"All features in selection have equal value for '%1'" ).
arg( mField.
name() );
105 tooltip =
tr(
"Some features in selection have different values for '%1'" ).
arg( mField.
name() );
109 tooltip =
tr(
"Values for '%1' have unsaved changes" ).
arg( mField.
name() );
static QIcon getThemeIcon(const QString &theName)
Helper to get a theme icon.
QString tr(const char *sourceText, const char *disambiguation, int n)
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const