Icons on Buttons

svn path=/trunk/kdebase/kfind/; revision=174149
This commit is contained in:
Stephan Binner 2002-08-27 20:18:46 +00:00
parent f8047628a0
commit d7c78be045
2 changed files with 14 additions and 11 deletions

View file

@ -25,7 +25,7 @@
**********************************************************************/
#include <qpushbutton.h>
#include <kpushbutton.h>
#include <qlayout.h>
#include <qvbox.h>
@ -35,7 +35,7 @@
#include <kseparator.h>
#include <qlineedit.h>
#include <qcheckbox.h>
//#include <kstatusbar.h>
#include <kstdguiitem.h>
#include "kftabdlg.h"
#include "kquery.h"
@ -60,17 +60,20 @@ Kfind::Kfind(QWidget *parent, const char *name)
mTopLayout->addWidget(mActionSep);
// create button box
QWidget * mButtonBox = new QVBox( this );
QVBox * mButtonBox = new QVBox( this );
QVBoxLayout *lay = (QVBoxLayout*)mButtonBox->layout();
lay->addStretch(1);
mTopLayout->addWidget(mButtonBox);
mSearch = new QPushButton( i18n("&Find"), mButtonBox );
mSearch = new KPushButton( KGuiItem(i18n("&Find"), "find"), mButtonBox );
mButtonBox->setSpacing( (tabWidget->sizeHint().height()-4*mSearch->sizeHint().height()) / 4);
connect( mSearch, SIGNAL(clicked()), this, SLOT( startSearch() ) );
mStop = new QPushButton( i18n("Stop"), mButtonBox );
mStop = new KPushButton( KGuiItem(i18n("Stop"), "stop"), mButtonBox );
connect( mStop, SIGNAL(clicked()), this, SLOT( stopSearch() ) );
mSave = new QPushButton( i18n("Save As..."), mButtonBox );
mSave = new KPushButton( KStdGuiItem::saveAs(), mButtonBox );
connect( mSave, SIGNAL(clicked()), this, SLOT( saveResults() ) );
QPushButton * mClose = new QPushButton( i18n("&Close"), mButtonBox );
KPushButton * mClose = new KPushButton( KGuiItem(i18n("&Close"),"fileclose"), mButtonBox );
connect( mClose, SIGNAL(clicked()), this, SIGNAL( destroyMe() ) );
// react to search requests from widget

View file

@ -11,7 +11,7 @@
#include <kfileitem.h>
class QString;
class QPushButton;
class KPushButton;
class KQuery;
class KURL;
@ -49,9 +49,9 @@ signals:
private:
void setFocus();
KfindTabWidget *tabWidget;
QPushButton *mSearch;
QPushButton *mStop;
QPushButton *mSave;
KPushButton *mSearch;
KPushButton *mStop;
KPushButton *mSave;
KQuery *query;
};