summaryrefslogtreecommitdiffabout
path: root/kaddressbook/incsearchwidget.cpp
Side-by-side diff
Diffstat (limited to 'kaddressbook/incsearchwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/incsearchwidget.cpp14
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