summaryrefslogtreecommitdiffstats
path: root/kexi/main/kexinamewidget.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kexi/main/kexinamewidget.cpp
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/main/kexinamewidget.cpp')
-rw-r--r--kexi/main/kexinamewidget.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/kexi/main/kexinamewidget.cpp b/kexi/main/kexinamewidget.cpp
index 39cb084a..db061d93 100644
--- a/kexi/main/kexinamewidget.cpp
+++ b/kexi/main/kexinamewidget.cpp
@@ -19,8 +19,8 @@
#include "kexinamewidget.h"
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klineedit.h>
#include <kmessagebox.h>
@@ -32,19 +32,19 @@
using namespace KexiUtils;
-KexiNameWidget::KexiNameWidget( const QString& message,
- QWidget* parent, const char* name, WFlags fl )
- : QWidget(parent, name, fl)
+KexiNameWidget::KexiNameWidget( const TQString& message,
+ TQWidget* tqparent, const char* name, WFlags fl )
+ : TQWidget(tqparent, name, fl)
{
- init(message, QString::null, QString::null, QString::null, QString::null);
+ init(message, TQString(), TQString(), TQString(), TQString());
}
-KexiNameWidget::KexiNameWidget(const QString& message,
- const QString& nameLabel, const QString& nameText,
- const QString& captionLabel, const QString& captionText,
- QWidget * parent, const char * name, WFlags fl)
+KexiNameWidget::KexiNameWidget(const TQString& message,
+ const TQString& nameLabel, const TQString& nameText,
+ const TQString& captionLabel, const TQString& captionText,
+ TQWidget * tqparent, const char * name, WFlags fl)
{
- Q_UNUSED( parent );
+ Q_UNUSED( tqparent );
Q_UNUSED( name );
Q_UNUSED( fl );
@@ -52,9 +52,9 @@ KexiNameWidget::KexiNameWidget(const QString& message,
}
void KexiNameWidget::init(
- const QString& message,
- const QString& nameLabel, const QString& nameText,
- const QString& captionLabel, const QString& captionText)
+ const TQString& message,
+ const TQString& nameLabel, const TQString& nameText,
+ const TQString& captionLabel, const TQString& captionText)
{
Q_UNUSED( captionText );
@@ -62,53 +62,53 @@ void KexiNameWidget::init(
m_le_name_autofill = true;
m_caption_required = false;
- lyr = new QGridLayout( this, 1, 1, 0, 6, "lyr");
+ lyr = new TQGridLayout( this, 1, 1, 0, 6, "lyr");
- lbl_message = new QLabel( this, "message" );
+ lbl_message = new TQLabel( this, "message" );
setMessageText( message );
- lbl_message->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
- lbl_message->setAlignment( QLabel::AlignTop | QLabel::WordBreak );
+ lbl_message->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed);
+ lbl_message->tqsetAlignment( TQLabel::AlignTop | TQLabel::WordBreak );
lyr->addMultiCellWidget( lbl_message, 0, 0, 0, 1 );
- lbl_caption = new QLabel( captionLabel.isEmpty() ? i18n( "Caption:" ) : captionLabel,
+ lbl_caption = new TQLabel( captionLabel.isEmpty() ? i18n( "Caption:" ) : captionLabel,
this, "lbl_caption" );
lyr->addWidget( lbl_caption, 1, 0 );
- lbl_name = new QLabel( nameLabel.isEmpty() ? tr( "Name:" ) : nameLabel,
+ lbl_name = new TQLabel( nameLabel.isEmpty() ? tqtr( "Name:" ) : nameLabel,
this, "lbl_name" );
lyr->addWidget( lbl_name, 2, 0 );
le_caption = new KLineEdit( nameText, this, "le_caption" );
- le_caption->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed, 1, 0));
+ le_caption->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed, 1, 0));
lyr->addWidget( le_caption, 1, 1 );
le_name = new KLineEdit( nameText, this, "le_name" );
- le_name->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed,1,0));
+ le_name->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed,1,0));
Validator *idValidator = new IdentifierValidator(0, "id_val");
- le_name->setValidator( m_validator = new MultiValidator(idValidator, this, "val") );
+ le_name->setValidator( m_validator = new MultiValidator(idValidator, TQT_TQOBJECT(this), "val") );
lyr->addWidget( le_name, 2, 1 );
setFocusProxy(le_caption);
- resize( QSize(342, 123).expandedTo(minimumSizeHint()) );
+ resize( TQSize(342, 123).expandedTo(tqminimumSizeHint()) );
m_nameWarning = i18n("Please enter the name.");
m_captionWarning = i18n("Please enter the caption.");
- connect(le_caption, SIGNAL(textChanged(const QString&)),
- this,SLOT(slotCaptionTxtChanged(const QString&)));
- connect(le_name, SIGNAL(textChanged(const QString&)),
- this,SLOT(slotNameTxtChanged(const QString&)));
- connect(le_caption, SIGNAL(returnPressed()),
- this,SIGNAL(returnPressed()));
- connect(le_name, SIGNAL(returnPressed()),
- this,SIGNAL(returnPressed()));
+ connect(le_caption, TQT_SIGNAL(textChanged(const TQString&)),
+ this,TQT_SLOT(slotCaptionTxtChanged(const TQString&)));
+ connect(le_name, TQT_SIGNAL(textChanged(const TQString&)),
+ this,TQT_SLOT(slotNameTxtChanged(const TQString&)));
+ connect(le_caption, TQT_SIGNAL(returnPressed()),
+ this,TQT_SIGNAL(returnPressed()));
+ connect(le_name, TQT_SIGNAL(returnPressed()),
+ this,TQT_SIGNAL(returnPressed()));
}
KexiNameWidget::~KexiNameWidget()
{
}
-void KexiNameWidget::slotCaptionTxtChanged(const QString &capt)
+void KexiNameWidget::slotCaptionTxtChanged(const TQString &capt)
{
emit textChanged();
if (le_name->text().isEmpty())
@@ -120,7 +120,7 @@ void KexiNameWidget::slotCaptionTxtChanged(const QString &capt)
}
}
-void KexiNameWidget::slotNameTxtChanged(const QString &)
+void KexiNameWidget::slotNameTxtChanged(const TQString &)
{
emit textChanged();
if (m_le_name_txtchanged_disable)
@@ -145,19 +145,19 @@ void KexiNameWidget::setNameRequired( bool set )
bool KexiNameWidget::isNameRequired() const
{ return !m_validator->acceptsEmptyValue(); }
-void KexiNameWidget::setCaptionText(const QString& capt)
+void KexiNameWidget::setCaptionText(const TQString& capt)
{
le_caption->setText(capt);
m_le_name_autofill = true;
}
-void KexiNameWidget::setNameText(const QString& name)
+void KexiNameWidget::setNameText(const TQString& name)
{
le_name->setText(name);
m_le_name_autofill = true;
}
-void KexiNameWidget::setMessageText(const QString& msg)
+void KexiNameWidget::setMessageText(const TQString& msg)
{
if (msg.stripWhiteSpace().isEmpty()) {
lbl_message->setText("");
@@ -169,12 +169,12 @@ void KexiNameWidget::setMessageText(const QString& msg)
messageChanged();
}
-QString KexiNameWidget::captionText() const
+TQString KexiNameWidget::captionText() const
{
return le_caption->text();
}
-QString KexiNameWidget::nameText() const
+TQString KexiNameWidget::nameText() const
{
return le_name->text().lower();
}
@@ -191,7 +191,7 @@ bool KexiNameWidget::checkValidity()
le_caption->setFocus();
return false;
}
- QString dummy, message, details;
+ TQString dummy, message, details;
if (m_validator->check(dummy, le_name->text(), message, details)
==Validator::Error) {
KMessageBox::detailedSorry(0, message, details);
@@ -211,9 +211,9 @@ void KexiNameWidget::addNameSubvalidator( Validator* validator, bool owned )
m_validator->addSubvalidator( validator, owned );
}
-/*bool KexiNameWidget::eventFilter( QObject *obj, QEvent *ev )
+/*bool KexiNameWidget::eventFilter( TQObject *obj, TQEvent *ev )
{
- if (ev->type()==QEvent::FocusOut && !acceptsEmptyValue()) {
+ if (ev->type()==TQEvent::FocusOut && !acceptsEmptyValue()) {
if (obj==le_name) {
if (le_name->text().isEmpty()) {
KMessageBox::information(0, m_nameWarning);