SVN commit 802871 by kossebau: move Update button to the top, do differ from action buttons that act on the document view, not the tool view M +15 -15 info/infoview.cpp M +21 -20 stringsextract/stringsextractview.cpp --- trunk/KDE/kdeutils/okteta/program/oktetakakao/controllers/view/info/infoview.cpp #802870:802871 @@ -46,6 +46,21 @@ baseLayout->setMargin( 0 ); baseLayout->setSpacing( KDialog::spacingHint() ); + QHBoxLayout *updateLayout = new QHBoxLayout(); + + mDirtyLabel = new QLabel( this ); + updateLayout->addWidget( mDirtyLabel ); + connect( mTool, SIGNAL(statisticDirty( bool )), SLOT(setDirty( bool )) ); + updateLayout->addStretch(); + + mUpdateButton = new KPushButton( i18nc("@action:button update the statistic of the byte frequency","Update"), this ); + mUpdateButton->setEnabled( mTool->hasByteArrayView() ); + connect( mTool, SIGNAL(byteArrayViewChanged(bool)), mUpdateButton, SLOT( setEnabled(bool )) ); + connect( mUpdateButton, SIGNAL(clicked(bool)), mTool, SLOT(updateStatistic()) ); + updateLayout->addWidget( mUpdateButton ); + + baseLayout->addLayout( updateLayout ); + QHBoxLayout *sizeLayout = new QHBoxLayout(); QLabel *label = new QLabel( i18nc("@label","Size [bytes]: "), this ); @@ -76,21 +91,6 @@ connect( mTool->statisticTableModel(), SIGNAL(headerChanged()), SLOT(updateHeader()) ); baseLayout->addWidget( mStatisticTableView, 10 ); - - QHBoxLayout *updateLayout = new QHBoxLayout(); - - mDirtyLabel = new QLabel( this ); - updateLayout->addWidget( mDirtyLabel ); - connect( mTool, SIGNAL(statisticDirty( bool )), SLOT(setDirty( bool )) ); - updateLayout->addStretch(); - - mUpdateButton = new KPushButton( i18nc("@action:button update the statistic of the byte frequency","Update"), this ); - mUpdateButton->setEnabled( mTool->hasByteArrayView() ); - connect( mTool, SIGNAL(byteArrayViewChanged(bool)), mUpdateButton, SLOT( setEnabled(bool )) ); - connect( mUpdateButton, SIGNAL(clicked(bool)), mTool, SLOT(updateStatistic()) ); - updateLayout->addWidget( mUpdateButton ); - - baseLayout->addLayout( updateLayout ); } void InfoView::updateHeader() --- trunk/KDE/kdeutils/okteta/program/oktetakakao/controllers/view/stringsextract/stringsextractview.cpp #802870:802871 @@ -48,6 +48,27 @@ baseLayout->setMargin( 0 ); baseLayout->setSpacing( KDialog::spacingHint() ); + QHBoxLayout *updateLayout = new QHBoxLayout(); + + updateLayout->addStretch(); + QLabel *label = new QLabel( i18nc("@label:spinbox minimum length consecutive chars make a string","Minimum length:"), this ); + label->setFixedWidth( label->sizeHint().width() ); + updateLayout->addWidget( label ); + + mMinLengthSpinBox = new QSpinBox( this ); + mMinLengthSpinBox->setValue( mTool->minLength() ); + mMinLengthSpinBox->setMinimum( MinimumStringLength ); + connect( mMinLengthSpinBox, SIGNAL(valueChanged( int )), mTool, SLOT(setMinLength( int )) ); + updateLayout->addWidget( mMinLengthSpinBox ); + + mUpdateButton = new KPushButton( i18nc("@action:button update the list of strings extracted","Update"), this ); + mUpdateButton->setEnabled( mTool->isApplyable() ); + connect( mTool, SIGNAL(isApplyableChanged( bool )), mUpdateButton, SLOT( setEnabled(bool )) ); + connect( mUpdateButton, SIGNAL(clicked(bool)), SLOT(onExtractButtonClicked()) ); + updateLayout->addWidget( mUpdateButton ); + + baseLayout->addLayout( updateLayout ); + mContainedStringTableModel = new ContainedStringTableModel( mTool->containedStringList(), this ); connect( mTool, SIGNAL(stringsUpdated()), mContainedStringTableModel, SLOT(update()) ); @@ -70,26 +91,6 @@ SLOT(onStringClicked( const QModelIndex& )) ); baseLayout->addWidget( containedStringTableView, 10 ); - - QHBoxLayout *updateLayout = new QHBoxLayout(); - - QLabel *label = new QLabel( i18nc("@label:spinbox minimum length consecutive chars make a string","Minimum length:"), this ); - label->setFixedWidth( label->sizeHint().width() ); - updateLayout->addWidget( label ); - - mMinLengthSpinBox = new QSpinBox( this ); - mMinLengthSpinBox->setValue( mTool->minLength() ); - mMinLengthSpinBox->setMinimum( MinimumStringLength ); - connect( mMinLengthSpinBox, SIGNAL(valueChanged( int )), mTool, SLOT(setMinLength( int )) ); - updateLayout->addWidget( mMinLengthSpinBox ); - - mUpdateButton = new KPushButton( i18nc("@action:button update the list of strings extracted","Update"), this ); - mUpdateButton->setEnabled( mTool->isApplyable() ); - connect( mTool, SIGNAL(isApplyableChanged( bool )), mUpdateButton, SLOT( setEnabled(bool )) ); - connect( mUpdateButton, SIGNAL(clicked(bool)), SLOT(onExtractButtonClicked()) ); - updateLayout->addWidget( mUpdateButton ); - - baseLayout->addLayout( updateLayout ); } #if 0