author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kaddressbook/incsearchwidget.cpp | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-p1.zip kdepimpi-p1.tar.gz kdepimpi-p1.tar.bz2 |
initial public commit of qt4 portp1
Diffstat (limited to 'kaddressbook/incsearchwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/incsearchwidget.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/kaddressbook/incsearchwidget.cpp b/kaddressbook/incsearchwidget.cpp index 5f8b83d..a54d1cd 100644 --- a/kaddressbook/incsearchwidget.cpp +++ b/kaddressbook/incsearchwidget.cpp @@ -12,55 +12,59 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #include <qlabel.h> #include <qlayout.h> #include <qtooltip.h> #include <qapplication.h> +#include <QDesktopWidget> #include <qcombobox.h> +//Added by qt3to4: +#include <Q3HBoxLayout> #include <kdialog.h> #include <klineedit.h> #include <klocale.h> #include <kglobal.h> #include <kglobal.h> #include "kabprefs.h" #include "incsearchwidget.h" IncSearchWidget::IncSearchWidget( QWidget *parent, const char *name ) - : QWidget( parent, name ) { + setObjectName(name); + setParent(parent); #ifndef KAB_EMBEDDED //US setCaption( i18n( "Incremental Search" ) ); #endif //KAB_EMBEDDED - QHBoxLayout *layout = new QHBoxLayout( this, 2, KDialog::spacingHint() ); + Q3HBoxLayout *layout = new Q3HBoxLayout( this, 2, KDialog::spacingHint() ); #ifdef DESKTOP_VERSION QLabel *label = new QLabel( i18n( "Search:" ), this ); - label->setAlignment( QLabel::AlignVCenter | QLabel::AlignRight ); + label->setAlignment( Qt::AlignVCenter | Qt::AlignRight ); layout->addWidget( label ); #endif //KAB_EMBEDDED mSearchText = new KLineEdit( this ); layout->addWidget( mSearchText ); // #ifdef KAB_EMBEDDED // if (KGlobal::getOrientation() == KGlobal::Portrait) // mSearchText->setMaximumWidth(30); // #endif //KAB_EMBEDDED //mSearchText->setMaximumWidth(60); mFieldCombo = new QComboBox( false, this ); layout->addWidget( mFieldCombo ); mFieldCombo->setMaximumHeight( 34 ); QToolTip::add( mFieldCombo, i18n( "Select Incremental Search Field" ) ); @@ -163,19 +167,19 @@ KABC::Field *IncSearchWidget::currentField()const return 0; // for error or 'use all fields' else return mFieldList[ mFieldCombo->currentItem() - 1 ]; } void IncSearchWidget::setCurrentItem( int pos ) { mFieldCombo->setCurrentItem( pos ); announceFieldChanged(); } int IncSearchWidget::currentItem() const { return mFieldCombo->currentItem(); } -#ifndef KAB_EMBEDDED -#include "incsearchwidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_incsearchwidget.cpp" #endif //KAB_EMBEDDED |