summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/forms/widgets
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:32:11 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:32:11 -0600
commit94844816550ad672ccfcdc25659c625546239998 (patch)
treee35fc60fd736c645d59f6408af032774ad8023d3 /kexi/plugins/forms/widgets
parent2a811c38c74c03648ecf857e566c44483cbad706 (diff)
downloadkoffice-94844816550ad672ccfcdc25659c625546239998.tar.gz
koffice-94844816550ad672ccfcdc25659c625546239998.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kexi/plugins/forms/widgets')
-rw-r--r--kexi/plugins/forms/widgets/kexidbautofield.cpp72
-rw-r--r--kexi/plugins/forms/widgets/kexidbautofield.h2
-rw-r--r--kexi/plugins/forms/widgets/kexidbcombobox.cpp40
-rw-r--r--kexi/plugins/forms/widgets/kexidbcombobox.h4
-rw-r--r--kexi/plugins/forms/widgets/kexidbdateedit.cpp12
-rw-r--r--kexi/plugins/forms/widgets/kexidbdatetimeedit.cpp18
-rw-r--r--kexi/plugins/forms/widgets/kexidbform.cpp36
-rw-r--r--kexi/plugins/forms/widgets/kexidbform.h2
-rw-r--r--kexi/plugins/forms/widgets/kexidbimagebox.cpp62
-rw-r--r--kexi/plugins/forms/widgets/kexidbimagebox.h10
-rw-r--r--kexi/plugins/forms/widgets/kexidblabel.cpp24
-rw-r--r--kexi/plugins/forms/widgets/kexidblineedit.cpp4
-rw-r--r--kexi/plugins/forms/widgets/kexidbsubform.cpp2
-rw-r--r--kexi/plugins/forms/widgets/kexidbtextedit.cpp2
-rw-r--r--kexi/plugins/forms/widgets/kexidbtimeedit.cpp2
-rw-r--r--kexi/plugins/forms/widgets/kexiframe.cpp2
-rw-r--r--kexi/plugins/forms/widgets/kexiframe.h2
-rw-r--r--kexi/plugins/forms/widgets/kexiframeutils_p.cpp20
18 files changed, 158 insertions, 158 deletions
diff --git a/kexi/plugins/forms/widgets/kexidbautofield.cpp b/kexi/plugins/forms/widgets/kexidbautofield.cpp
index 7ebc522f..be17c159 100644
--- a/kexi/plugins/forms/widgets/kexidbautofield.cpp
+++ b/kexi/plugins/forms/widgets/kexidbautofield.cpp
@@ -22,7 +22,7 @@
#include "kexidbautofield.h"
#include <tqlabel.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqpainter.h>
#include <tqmetaobject.h>
#include <tqapplication.h>
@@ -57,7 +57,7 @@ class KexiDBAutoField::Private
//!< of widgetTypeForFieldType() if widgetTypeForFieldType is Auto
WidgetType widgetType_property; //!< provides widget type or Auto
LabelPosition lblPosition;
- TQBoxLayout *tqlayout;
+ TQBoxLayout *layout;
TQLabel *label;
TQString caption;
KexiDB::Field::Type fieldTypeInternal;
@@ -104,7 +104,7 @@ void
KexiDBAutoField::init(const TQString &text, WidgetType type, LabelPosition pos)
{
d->fieldTypeInternal = KexiDB::Field::InvalidType;
- d->tqlayout = 0;
+ d->layout = 0;
m_subwidget = 0;
d->label = new TQLabel(text, this);
d->label->installEventFilter( this );
@@ -116,8 +116,8 @@ KexiDBAutoField::init(const TQString &text, WidgetType type, LabelPosition pos)
d->widgetType_property = (type==Auto ? Text : type); //to force "differ" to be true in setWidgetType()
setLabelPosition(pos);
setWidgetType(type);
- d->baseColor = tqpalette().active().base();
- d->textColor = tqpalette().active().text();
+ d->baseColor = palette().active().base();
+ d->textColor = palette().active().text();
}
void
@@ -222,30 +222,30 @@ void
KexiDBAutoField::setLabelPosition(LabelPosition position)
{
d->lblPosition = position;
- if(d->tqlayout) {
- TQBoxLayout *lyr = d->tqlayout;
- d->tqlayout = 0;
+ if(d->layout) {
+ TQBoxLayout *lyr = d->layout;
+ d->layout = 0;
delete lyr;
}
if(m_subwidget)
m_subwidget->show();
- //! \todo support right-to-left tqlayout where positions are inverted
+ //! \todo support right-to-left layout where positions are inverted
if (position==Top || position==Left) {
- int align = d->label->tqalignment();
+ int align = d->label->alignment();
if(position == Top) {
- d->tqlayout = (TQBoxLayout*) new TQVBoxLayout(this);
+ d->layout = (TQBoxLayout*) new TQVBoxLayout(this);
align |= AlignVertical_Mask;
align ^= AlignVertical_Mask;
align |= AlignTop;
}
else {
- d->tqlayout = (TQBoxLayout*) new TQHBoxLayout(this);
+ d->layout = (TQBoxLayout*) new TQHBoxLayout(this);
align |= AlignVertical_Mask;
align ^= AlignVertical_Mask;
align |= AlignVCenter;
}
- d->label->tqsetAlignment(align);
+ d->label->setAlignment(align);
if(d->widgetType == Boolean
|| (d->widgetType == Auto && fieldTypeInternal() == KexiDB::Field::InvalidType && !d->designMode))
{
@@ -254,36 +254,36 @@ KexiDBAutoField::setLabelPosition(LabelPosition position)
else {
d->label->show();
}
- d->tqlayout->addWidget(d->label, 0, position == Top ? int(TQt::AlignLeft) : 0);
+ d->layout->addWidget(d->label, 0, position == Top ? int(TQt::AlignLeft) : 0);
if(position == Left && d->widgetType != Boolean)
- d->tqlayout->addSpacing(KexiDBAutoField_SPACING);
- d->tqlayout->addWidget(m_subwidget, 1);
+ d->layout->addSpacing(KexiDBAutoField_SPACING);
+ d->layout->addWidget(m_subwidget, 1);
KexiSubwidgetInterface *subwidgetInterface = dynamic_cast<KexiSubwidgetInterface*>((TQWidget*)m_subwidget);
if (subwidgetInterface) {
if (subwidgetInterface->appendStretchRequired(this))
- d->tqlayout->addStretch(0);
+ d->layout->addStretch(0);
if (subwidgetInterface->subwidgetStretchRequired(this)) {
- TQSizePolicy sizePolicy( m_subwidget->tqsizePolicy() );
+ TQSizePolicy sizePolicy( m_subwidget->sizePolicy() );
if(position == Left) {
sizePolicy.setHorData( TQSizePolicy::Minimum );
- d->label->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred);
+ d->label->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred);
}
else {
sizePolicy.setVerData( TQSizePolicy::Minimum );
- d->label->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed);
+ d->label->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed);
}
- m_subwidget->tqsetSizePolicy(sizePolicy);
+ m_subwidget->setSizePolicy(sizePolicy);
}
}
// if(m_subwidget)
- // m_subwidget->tqsetSizePolicy(...);
+ // m_subwidget->setSizePolicy(...);
}
else {
- d->tqlayout = (TQBoxLayout*) new TQHBoxLayout(this);
+ d->layout = (TQBoxLayout*) new TQHBoxLayout(this);
d->label->hide();
- d->tqlayout->addWidget(m_subwidget);
+ d->layout->addWidget(m_subwidget);
}
- //a hack to force tqlayout to be refreshed (any better idea for this?)
+ //a hack to force layout to be refreshed (any better idea for this?)
resize(size()+TQSize(1,0));
resize(size()-TQSize(1,0));
if (dynamic_cast<KexiDBAutoField*>((TQWidget*)m_subwidget)) {
@@ -570,7 +570,7 @@ KexiDBAutoField::changeText(const TQString &text, bool beautify)
bool unbound = false;
if (d->autoCaption && (d->widgetType==Auto || dataSource().isEmpty())) {
if (d->designMode)
- realText = TQString::tqfromLatin1(name())+" "+i18n("Unbound Auto Field", "(unbound)");
+ realText = TQString::fromLatin1(name())+" "+i18n("Unbound Auto Field", "(unbound)");
else
realText = TQString();
unbound = true;
@@ -584,7 +584,7 @@ KexiDBAutoField::changeText(const TQString &text, bool beautify)
realText = text[0].upper() + text.mid(1);
if (d->widgetType!=Boolean) {
//! @todo ":" suffix looks weird for checkbox; remove this condition when [x] is displayed _after_ label
-//! @todo support right-to-left tqlayout where position of ":" is inverted
+//! @todo support right-to-left layout where position of ":" is inverted
realText += ": ";
}
}
@@ -594,9 +594,9 @@ KexiDBAutoField::changeText(const TQString &text, bool beautify)
}
if (unbound)
- d->label->tqsetAlignment( TQt::AlignCenter | TQt::WordBreak );
+ d->label->setAlignment( TQt::AlignCenter | TQt::WordBreak );
else
- d->label->tqsetAlignment( TQt::AlignCenter );
+ d->label->setAlignment( TQt::AlignCenter );
// TQWidget* widgetToAlterForegroundColor;
if(d->widgetType == Boolean) {
static_cast<TQCheckBox*>((TQWidget*)m_subwidget)->setText(realText);
@@ -650,15 +650,15 @@ KexiDBAutoField::setDataSource( const TQString &ds ) {
}
TQSize
-KexiDBAutoField::tqsizeHint() const
+KexiDBAutoField::sizeHint() const
{
if (d->lblPosition == NoLabel)
- return m_subwidget ? m_subwidget->tqsizeHint() : TQWidget::tqsizeHint();
+ return m_subwidget ? m_subwidget->sizeHint() : TQWidget::sizeHint();
TQSize s1(0,0);
if (m_subwidget)
- s1 = m_subwidget->tqsizeHint();
- TQSize s2(d->label->tqsizeHint());
+ s1 = m_subwidget->sizeHint();
+ TQSize s2(d->label->sizeHint());
if (d->lblPosition == Top)
return TQSize(TQMAX(s1.width(), s2.width()), s1.height()+KexiDBAutoField_SPACING+s2.height());
@@ -682,10 +682,10 @@ KexiDBAutoField::updateInformationAboutUnboundField()
if ( (d->autoCaption && (dataSource().isEmpty() || dataSourceMimeType().isEmpty()))
|| (!d->autoCaption && d->caption.isEmpty()) )
{
- d->label->setText( TQString::tqfromLatin1(name())+" "+i18n("Unbound Auto Field", " (unbound)") );
+ d->label->setText( TQString::fromLatin1(name())+" "+i18n("Unbound Auto Field", " (unbound)") );
}
// else
-// d->label->setText( TQString::tqfromLatin1(name())+" "+i18n(" (unbound)") );
+// d->label->setText( TQString::fromLatin1(name())+" "+i18n(" (unbound)") );
}
/*void
@@ -701,7 +701,7 @@ KexiDBAutoField::paintEvent( TQPaintEvent* pe )
p.setClipRect(pe->rect());
p.setFont(d->label->font());
p.drawText(rect(), TQt::AlignLeft | TQt::WordBreak,
- TQString::tqfromLatin1(name())+" "+i18n(" (unbound)"));
+ TQString::fromLatin1(name())+" "+i18n(" (unbound)"));
}
}*/
diff --git a/kexi/plugins/forms/widgets/kexidbautofield.h b/kexi/plugins/forms/widgets/kexidbautofield.h
index 653e4067..809c1186 100644
--- a/kexi/plugins/forms/widgets/kexidbautofield.h
+++ b/kexi/plugins/forms/widgets/kexidbautofield.h
@@ -132,7 +132,7 @@ class KEXIFORMUTILS_EXPORT KexiDBAutoField :
/*! @internal */
TQString fieldCaptionInternal() const;
- virtual TQSize tqsizeHint() const;
+ virtual TQSize sizeHint() const;
virtual void setFocusPolicy ( TQ_FocusPolicy policy );
//! Reimplemented to return internal editor's color.
diff --git a/kexi/plugins/forms/widgets/kexidbcombobox.cpp b/kexi/plugins/forms/widgets/kexidbcombobox.cpp
index 81c66ba6..2a25b905 100644
--- a/kexi/plugins/forms/widgets/kexidbcombobox.cpp
+++ b/kexi/plugins/forms/widgets/kexidbcombobox.cpp
@@ -59,10 +59,10 @@ class KexiDBComboBox::Private
KexiComboBoxPopup *popup;
KComboBox *paintedCombo; //!< fake combo used only to pass it as 'this' for TQStyle (because styles use <static_cast>)
- TQSize tqsizeHint; //!< A cache for KexiDBComboBox::tqsizeHint(),
+ TQSize sizeHint; //!< A cache for KexiDBComboBox::sizeHint(),
//!< rebuilt by KexiDBComboBox::fontChange() and KexiDBComboBox::styleChange()
KexiDB::QueryColumnInfo* visibleColumnInfo;
- TQPtrDict<char> *subWidgetsWithDisabledEvents; //! used to collect subwidget and its tqchildren (if isEditable is false)
+ TQPtrDict<char> *subWidgetsWithDisabledEvents; //! used to collect subwidget and its children (if isEditable is false)
bool isEditable : 1; //!< true is the combo box is editable
bool buttonPressed : 1;
bool mouseOver : 1;
@@ -124,7 +124,7 @@ bool KexiDBComboBox::isEditable() const
void KexiDBComboBox::paintEvent( TQPaintEvent * )
{
TQPainter p( this );
- TQColorGroup cg( tqpalette().active() );
+ TQColorGroup cg( palette().active() );
// if ( hasFocus() )
// cg.setColor(TQColorGroup::Base, cg.highlight());
// else
@@ -144,9 +144,9 @@ void KexiDBComboBox::paintEvent( TQPaintEvent * )
return;
}
-//! @todo support reverse tqlayout
+//! @todo support reverse layout
//bool reverse = TQApplication::reverseLayout();
- tqstyle().tqdrawComplexControl( TQStyle::CC_ComboBox, &p, d->paintedCombo /*this*/, rect(), cg,
+ tqstyle().drawComplexControl( TQStyle::CC_ComboBox, &p, d->paintedCombo /*this*/, rect(), cg,
flags, (uint)TQStyle::SC_All,
(d->buttonPressed ? TQStyle::SC_ComboBoxArrow : TQStyle::SC_None )
);
@@ -159,7 +159,7 @@ void KexiDBComboBox::paintEvent( TQPaintEvent * )
if ( hasFocus() ) {
if (0==qstrcmp(tqstyle().name(), "windows")) //a hack
p.fillRect( editorGeometry, cg.brush( TQColorGroup::Highlight ) );
- TQRect r( TQStyle::tqvisualRect( tqstyle().subRect( TQStyle::SR_ComboBoxFocusRect, d->paintedCombo ), this ) );
+ TQRect r( TQStyle::visualRect( tqstyle().subRect( TQStyle::SR_ComboBoxFocusRect, d->paintedCombo ), this ) );
r = TQRect(r.left()-1, r.top()-1, r.width()+2, r.height()+2); //enlare by 1 pixel each side to avoid covering by the subwidget
tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, &p,
r, cg, flags | TQStyle::Style_FocusAtBorder, TQStyleOption(cg.highlight()));
@@ -170,7 +170,7 @@ void KexiDBComboBox::paintEvent( TQPaintEvent * )
TQRect KexiDBComboBox::editorGeometry() const
{
- TQRect r( TQStyle::tqvisualRect(
+ TQRect r( TQStyle::visualRect(
tqstyle().querySubControlMetrics(TQStyle::CC_ComboBox, d->paintedCombo,
TQStyle::SC_ComboBoxEditField), d->paintedCombo ) );
@@ -211,20 +211,20 @@ void KexiDBComboBox::createEditor()
void KexiDBComboBox::setLabelPosition(LabelPosition position)
{
if(m_subwidget) {
- if (-1 != m_subwidget->tqmetaObject()->findProperty("frameShape", true))
+ if (-1 != m_subwidget->metaObject()->findProperty("frameShape", true))
m_subwidget->setProperty("frameShape", TQVariant((int)TQFrame::NoFrame));
m_subwidget->setGeometry( editorGeometry() );
}
// KexiSubwidgetInterface *subwidgetInterface = dynamic_cast<KexiSubwidgetInterface*>((TQWidget*)m_subwidget);
// update size policy
// if (subwidgetInterface && subwidgetInterface->subwidgetStretchRequired(this)) {
- TQSizePolicy sizePolicy( this->tqsizePolicy() );
+ TQSizePolicy sizePolicy( this->sizePolicy() );
if(position == Left)
sizePolicy.setHorData( TQSizePolicy::Minimum );
else
sizePolicy.setVerData( TQSizePolicy::Minimum );
- //m_subwidget->tqsetSizePolicy(sizePolicy);
- tqsetSizePolicy(sizePolicy);
+ //m_subwidget->setSizePolicy(sizePolicy);
+ setSizePolicy(sizePolicy);
//}
// }
}
@@ -233,7 +233,7 @@ TQRect KexiDBComboBox::buttonGeometry() const
{
TQRect arrowRect(
tqstyle().querySubControlMetrics( TQStyle::CC_ComboBox, d->paintedCombo, TQStyle::SC_ComboBoxArrow) );
- arrowRect = TQStyle::tqvisualRect(arrowRect, d->paintedCombo);
+ arrowRect = TQStyle::visualRect(arrowRect, d->paintedCombo);
arrowRect.setHeight( TQMAX( height() - (2 * arrowRect.y()), arrowRect.height() ) ); // a fix for Motif style
return arrowRect;
}
@@ -259,7 +259,7 @@ bool KexiDBComboBox::handleMousePressEvent(TQMouseEvent *e)
if ( arrowRect.contains( e->pos() ) ) {
d->arrowPressed = TRUE;
d->arrowDown = TRUE;
- tqrepaint( FALSE );
+ repaint( FALSE );
}
} else {*/
showPopup();
@@ -490,29 +490,29 @@ int KexiDBComboBox::popupWidthHint() const
void KexiDBComboBox::fontChange( const TQFont & oldFont )
{
- d->tqsizeHint = TQSize(); //force rebuild the cache
+ d->sizeHint = TQSize(); //force rebuild the cache
KexiDBAutoField::fontChange(oldFont);
}
void KexiDBComboBox::styleChange( TQStyle& oldStyle )
{
KexiDBAutoField::styleChange( oldStyle );
- d->tqsizeHint = TQSize(); //force rebuild the cache
+ d->sizeHint = TQSize(); //force rebuild the cache
if (m_subwidget)
m_subwidget->setGeometry( editorGeometry() );
}
-TQSize KexiDBComboBox::tqsizeHint() const
+TQSize KexiDBComboBox::sizeHint() const
{
- if ( isVisible() && d->tqsizeHint.isValid() )
- return d->tqsizeHint;
+ if ( isVisible() && d->sizeHint.isValid() )
+ return d->sizeHint;
const int maxWidth = 7 * fontMetrics().width(TQChar('x')) + 18;
const int maxHeight = TQMAX( fontMetrics().lineSpacing(), 14 ) + 2;
- d->tqsizeHint = (tqstyle().tqsizeFromContents(TQStyle::CT_ComboBox, d->paintedCombo,
+ d->sizeHint = (tqstyle().tqsizeFromContents(TQStyle::CT_ComboBox, d->paintedCombo,
TQSize(maxWidth, maxHeight)).expandedTo(TQApplication::globalStrut()));
- return d->tqsizeHint;
+ return d->sizeHint;
}
void KexiDBComboBox::editRequested()
diff --git a/kexi/plugins/forms/widgets/kexidbcombobox.h b/kexi/plugins/forms/widgets/kexidbcombobox.h
index 4e780aa3..60ed78d1 100644
--- a/kexi/plugins/forms/widgets/kexidbcombobox.h
+++ b/kexi/plugins/forms/widgets/kexidbcombobox.h
@@ -68,7 +68,7 @@ class KEXIFORMUTILS_EXPORT KexiDBComboBox :
//! Reimpemented because to avoid taking value from the internal editor (index is taken from the popup instead)
virtual bool valueChanged();
- virtual TQSize tqsizeHint() const;
+ virtual TQSize sizeHint() const;
//! Reimplemented after KexiDBAutoField: jsut sets \a cinfo without initializing a subwidget.
//! Initialization is performed by \ref setVisibleColumnInfo().
@@ -111,7 +111,7 @@ class KEXIFORMUTILS_EXPORT KexiDBComboBox :
virtual bool eventFilter( TQObject *o, TQEvent *e );
- //! \return internal editor's tqgeometry
+ //! \return internal editor's geometry
TQRect editorGeometry() const;
//! Creates editor. Reimplemented, because if the combo box is not editable,
diff --git a/kexi/plugins/forms/widgets/kexidbdateedit.cpp b/kexi/plugins/forms/widgets/kexidbdateedit.cpp
index 8394ef58..339ba722 100644
--- a/kexi/plugins/forms/widgets/kexidbdateedit.cpp
+++ b/kexi/plugins/forms/widgets/kexidbdateedit.cpp
@@ -19,7 +19,7 @@
*/
#include "kexidbdateedit.h"
-#include <tqlayout.h>
+#include <layout.h>
#include <tqtoolbutton.h>
#include <kpopupmenu.h>
#include <kdatepicker.h>
@@ -37,7 +37,7 @@ KexiDBDateEdit::KexiDBDateEdit(const TQDate &date, TQWidget *parent, const char
m_edit = new TQDateEdit(date, this);
m_edit->setAutoAdvance(true);
- m_edit->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding);
+ m_edit->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding);
connect( m_edit, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SLOT(slotValueChanged(const TQDate&)) );
connect( m_edit, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SIGNAL(dateChanged(const TQDate&)) );
@@ -54,7 +54,7 @@ KexiDBDateEdit::KexiDBDateEdit(const TQDate &date, TQWidget *parent, const char
m_datePickerPopupMenu = new KPopupMenu(0, "date_popup");
connect(m_datePickerPopupMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotShowDatePicker()));
- m_datePicker = new KDatePicker(m_datePickerPopupMenu, TQDate::tqcurrentDate(), 0);
+ m_datePicker = new KDatePicker(m_datePickerPopupMenu, TQDate::currentDate(), 0);
KDateTable *dt = KexiUtils::findFirstChild<KDateTable>(m_datePicker, "KDateTable");
if (dt)
@@ -64,9 +64,9 @@ KexiDBDateEdit::KexiDBDateEdit(const TQDate &date, TQWidget *parent, const char
m_datePickerPopupMenu->insertItem(m_datePicker);
btn->setPopup(m_datePickerPopupMenu);
- TQHBoxLayout* tqlayout = new TQHBoxLayout(this);
- tqlayout->addWidget(m_edit, 1);
- tqlayout->addWidget(btn, 0);
+ TQHBoxLayout* layout = new TQHBoxLayout(this);
+ layout->addWidget(m_edit, 1);
+ layout->addWidget(btn, 0);
setFocusProxy(m_edit);
}
diff --git a/kexi/plugins/forms/widgets/kexidbdatetimeedit.cpp b/kexi/plugins/forms/widgets/kexidbdatetimeedit.cpp
index ea9dede7..6f479c69 100644
--- a/kexi/plugins/forms/widgets/kexidbdatetimeedit.cpp
+++ b/kexi/plugins/forms/widgets/kexidbdatetimeedit.cpp
@@ -21,7 +21,7 @@
#include "kexidbdatetimeedit.h"
#include <tqtoolbutton.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <kpopupmenu.h>
#include <kdatepicker.h>
#include <kdatetbl.h>
@@ -36,7 +36,7 @@ KexiDBDateTimeEdit::KexiDBDateTimeEdit(const TQDateTime &datetime, TQWidget *par
m_dateEdit = new TQDateEdit(datetime.date(), this);
m_dateEdit->setAutoAdvance(true);
- m_dateEdit->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding);
+ m_dateEdit->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding);
// m_dateEdit->setFixedWidth( TQFontMetrics(m_dateEdit->font()).width("8888-88-88___") );
connect(m_dateEdit, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SLOT(slotValueChanged()));
connect(m_dateEdit, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SIGNAL(dateTimeChanged()));
@@ -48,7 +48,7 @@ KexiDBDateTimeEdit::KexiDBDateTimeEdit(const TQDateTime &datetime, TQWidget *par
m_timeEdit = new TQTimeEdit(datetime.time(), this);;
m_timeEdit->setAutoAdvance(true);
- m_timeEdit->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding);
+ m_timeEdit->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding);
connect(m_timeEdit, TQT_SIGNAL(valueChanged(const TQTime&)), this, TQT_SLOT(slotValueChanged()));
connect(m_timeEdit, TQT_SIGNAL(valueChanged(const TQTime&)), this, TQT_SIGNAL(dateTimeChanged()));
@@ -61,7 +61,7 @@ KexiDBDateTimeEdit::KexiDBDateTimeEdit(const TQDateTime &datetime, TQWidget *par
m_datePickerPopupMenu = new KPopupMenu(0, "date_popup");
connect(m_datePickerPopupMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotShowDatePicker()));
- m_datePicker = new KDatePicker(m_datePickerPopupMenu, TQDate::tqcurrentDate(), 0);
+ m_datePicker = new KDatePicker(m_datePickerPopupMenu, TQDate::currentDate(), 0);
KDateTable *dt = KexiUtils::findFirstChild<KDateTable>(m_datePicker, "KDateTable");
if (dt)
@@ -71,11 +71,11 @@ KexiDBDateTimeEdit::KexiDBDateTimeEdit(const TQDateTime &datetime, TQWidget *par
m_datePickerPopupMenu->insertItem(m_datePicker);
btn->setPopup(m_datePickerPopupMenu);
- TQHBoxLayout* tqlayout = new TQHBoxLayout(this);
- tqlayout->addWidget(m_dateEdit, 0);
- tqlayout->addWidget(btn, 0);
- tqlayout->addWidget(m_timeEdit, 0);
- //tqlayout->addStretch(1);
+ TQHBoxLayout* layout = new TQHBoxLayout(this);
+ layout->addWidget(m_dateEdit, 0);
+ layout->addWidget(btn, 0);
+ layout->addWidget(m_timeEdit, 0);
+ //layout->addStretch(1);
setFocusProxy(m_dateEdit);
}
diff --git a/kexi/plugins/forms/widgets/kexidbform.cpp b/kexi/plugins/forms/widgets/kexidbform.cpp
index 88ddf93f..17242953 100644
--- a/kexi/plugins/forms/widgets/kexidbform.cpp
+++ b/kexi/plugins/forms/widgets/kexidbform.cpp
@@ -125,13 +125,13 @@ KexiDBForm::~KexiDBForm()
KexiDataAwareObjectInterface* KexiDBForm::dataAwareObject() const { return d->dataAwareObject; }
-//tqrepaint all tqchildren widgets
+//repaint all children widgets
static void repaintAll(TQWidget *w)
{
TQObjectList *list = w->queryList(TQWIDGET_OBJECT_NAME_STRING);
TQObjectListIt it(*list);
for (TQObject *obj; (obj=it.current()); ++it ) {
- TQT_TQWIDGET(obj)->tqrepaint();
+ TQT_TQWIDGET(obj)->repaint();
}
delete list;
}
@@ -148,7 +148,7 @@ void
KexiDBForm::drawRects(const TQValueList<TQRect> &list, int type)
{
TQPainter p;
- p.tqbegin(TQT_TQPAINTDEVICE(this), true);
+ p.begin(TQT_TQPAINTDEVICE(this), true);
bool unclipped = testWFlags( WPaintUnclipped );
setWFlags( WPaintUnclipped );
@@ -192,7 +192,7 @@ void
KexiDBForm::clearForm()
{
TQPainter p;
- p.tqbegin(TQT_TQPAINTDEVICE(this), true);
+ p.begin(TQT_TQPAINTDEVICE(this), true);
bool unclipped = testWFlags( WPaintUnclipped );
setWFlags( WPaintUnclipped );
@@ -216,7 +216,7 @@ KexiDBForm::highlightWidgets(TQWidget *from, TQWidget *to)//, const TQPoint &poi
toPoint = to->parentWidget()->mapTo(this, to->pos());
TQPainter p;
- p.tqbegin(TQT_TQPAINTDEVICE(this), true);
+ p.begin(TQT_TQPAINTDEVICE(this), true);
bool unclipped = testWFlags( WPaintUnclipped );
setWFlags( WPaintUnclipped );
@@ -234,7 +234,7 @@ KexiDBForm::highlightWidgets(TQWidget *from, TQWidget *to)//, const TQPoint &poi
TQPixmap pix2 = TQPixmap::grabWidget(to);
if((from != this) && (to != this))
- p.drawLine( from->parentWidget()->mapTo(this, from->tqgeometry().center()), to->parentWidget()->mapTo(this, to->tqgeometry().center()) );
+ p.drawLine( from->parentWidget()->mapTo(this, from->geometry().center()), to->parentWidget()->mapTo(this, to->geometry().center()) );
p.drawPixmap(fromPoint.x(), fromPoint.y(), pix1);
p.drawPixmap(toPoint.x(), toPoint.y(), pix2);
@@ -268,7 +268,7 @@ KexiDBForm::highlightWidgets(TQWidget *from, TQWidget *to)//, const TQPoint &poi
}
TQSize
-KexiDBForm::tqsizeHint() const
+KexiDBForm::sizeHint() const
{
//todo: find better size (user configured?)
return TQSize(400,300);
@@ -304,7 +304,7 @@ TQPtrList<TQWidget>* KexiDBForm::orderedDataAwareWidgets() const
void KexiDBForm::updateTabStopsOrder(KFormDesigner::Form* form)
{
TQWidget *fromWidget = 0;
- //TQWidget *tqtopLevelWidget = form->widget()->tqtopLevelWidget();
+ //TQWidget *topLevelWidget = form->widget()->topLevelWidget();
//js form->updateTabStopsOrder(); //certain widgets can have now updated focusPolicy properties, fix this
uint numberOfDataAwareWidgets = 0;
// if (d->orderedFocusWidgets.isEmpty()) {
@@ -313,18 +313,18 @@ void KexiDBForm::updateTabStopsOrder(KFormDesigner::Form* form)
if (it.current()->widget()->focusPolicy() & TQ_TabFocus) {
//this widget has tab focus:
it.current()->widget()->installEventFilter(this);
- //also filter events for data-aware tqchildren of this widget (i.e. KexiDBAutoField's editors)
- TQObjectList *tqchildren = it.current()->widget()->queryList(TQWIDGET_OBJECT_NAME_STRING);
- for (TQObjectListIt tqchildrenIt(*tqchildren); tqchildrenIt.current(); ++tqchildrenIt) {
- // if (dynamic_cast<KexiFormDataItemInterface*>(tqchildrenIt.current())) {
+ //also filter events for data-aware children of this widget (i.e. KexiDBAutoField's editors)
+ TQObjectList *children = it.current()->widget()->queryList(TQWIDGET_OBJECT_NAME_STRING);
+ for (TQObjectListIt childrenIt(*children); childrenIt.current(); ++childrenIt) {
+ // if (dynamic_cast<KexiFormDataItemInterface*>(childrenIt.current())) {
kexipluginsdbg << "KexiDBForm::updateTabStopsOrder(): also adding '"
- << tqchildrenIt.current()->className() << " " << tqchildrenIt.current()->name()
+ << childrenIt.current()->className() << " " << childrenIt.current()->name()
<< "' child to filtered widgets" << endl;
- //it.current()->widget()->installEventFilter(TQT_TQWIDGET(tqchildrenIt.current()));
- tqchildrenIt.current()->installEventFilter(this);
+ //it.current()->widget()->installEventFilter(TQT_TQWIDGET(childrenIt.current()));
+ childrenIt.current()->installEventFilter(this);
// }
}
- delete tqchildren;
+ delete children;
if (fromWidget) {
kexipluginsdbg << "KexiDBForm::updateTabStopsOrder() tab order: " << fromWidget->name()
<< " -> " << it.current()->widget()->name() << endl;
@@ -361,7 +361,7 @@ void KexiDBForm::updateTabStopsOrder(KFormDesigner::Form* form)
}
fromWidget = it.current();
}
-// SET_FOCUS_USING_REASON(tqfocusWidget(), TQFocusEvent::Tab);
+// SET_FOCUS_USING_REASON(focusWidget(), TQFocusEvent::Tab);
}*/
}
@@ -399,7 +399,7 @@ bool KexiDBForm::eventFilter( TQObject * watched, TQEvent * e )
bool tab = ke->state() == Qt::NoButton && key == TQt::Key_Tab;
bool backtab = ((ke->state() == Qt::NoButton || ke->state() == TQt::ShiftButton) && key == TQt::Key_Backtab)
|| (ke->state() == TQt::ShiftButton && key == TQt::Key_Tab);
- TQObject *o = watched; //tqfocusWidget();
+ TQObject *o = watched; //focusWidget();
TQWidget* realWidget = dynamic_cast<TQWidget*>(o); //will beused below (for tab/backtab handling)
if (!tab && !backtab) {
diff --git a/kexi/plugins/forms/widgets/kexidbform.h b/kexi/plugins/forms/widgets/kexidbform.h
index fc0d25c2..29798947 100644
--- a/kexi/plugins/forms/widgets/kexidbform.h
+++ b/kexi/plugins/forms/widgets/kexidbform.h
@@ -69,7 +69,7 @@ class KEXIFORMUTILS_EXPORT KexiDBForm :
virtual void clearForm();
virtual void highlightWidgets(TQWidget *from, TQWidget *to/*, const TQPoint &p*/);
- virtual TQSize tqsizeHint() const;
+ virtual TQSize sizeHint() const;
bool autoTabStops() const;
diff --git a/kexi/plugins/forms/widgets/kexidbimagebox.cpp b/kexi/plugins/forms/widgets/kexidbimagebox.cpp
index 4165c000..23f079ae 100644
--- a/kexi/plugins/forms/widgets/kexidbimagebox.cpp
+++ b/kexi/plugins/forms/widgets/kexidbimagebox.cpp
@@ -23,7 +23,7 @@
#include <tqapplication.h>
#include <tqpixmap.h>
#include <tqstyle.h>
-#include <tqclipboard.h>
+#include <clipboard.h>
#include <tqtooltip.h>
#include <tqimage.h>
#include <tqbuffer.h>
@@ -67,7 +67,7 @@ static TQPixmap* KexiDBImageBox_pmSmall = 0;
KexiDBImageBox::KexiDBImageBox( bool designMode, TQWidget *parent, const char *name )
: KexiFrame( parent, name, TQt::WNoAutoErase )
, KexiFormDataItemInterface()
- , m_tqalignment(TQt::AlignAuto|TQt::AlignTop)
+ , m_alignment(TQt::AlignAuto|TQt::AlignTop)
, m_designMode(designMode)
, m_readOnly(false)
, m_scaledContents(false)
@@ -80,7 +80,7 @@ KexiDBImageBox::KexiDBImageBox( bool designMode, TQWidget *parent, const char *n
, m_insideSetPalette(false)
{
installEventFilter(this);
- tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Preferred);
+ setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Preferred);
//setup popup menu
m_popupMenu = new KexiImageContextMenu(this);
@@ -176,7 +176,7 @@ void KexiDBImageBox::setValueInternal( const TQVariant& add, bool removeOld, boo
m_valueMimeType = TQString();
m_pixmap = TQPixmap();
}
- tqrepaint();
+ repaint();
}
void KexiDBImageBox::setInvalidState( const TQString& displayText )
@@ -242,7 +242,7 @@ void KexiDBImageBox::setPixmapId(uint id)
if (m_insideSetData) //avoid recursion
return;
setData(KexiBLOBBuffer::self()->objectForId( id, /*unstored*/false ));
- tqrepaint();
+ repaint();
}
uint KexiDBImageBox::storedPixmapId() const
@@ -257,7 +257,7 @@ uint KexiDBImageBox::storedPixmapId() const
void KexiDBImageBox::setStoredPixmapId(uint id)
{
setData(KexiBLOBBuffer::self()->objectForId( id, /*stored*/true ));
- tqrepaint();
+ repaint();
}
bool KexiDBImageBox::hasScaledContents() const
@@ -276,14 +276,14 @@ void KexiDBImageBox::setScaledContents(bool set)
{
//todo m_pixmapLabel->setScaledContents(set);
m_scaledContents = set;
- tqrepaint();
+ repaint();
}
void KexiDBImageBox::setKeepAspectRatio(bool set)
{
m_keepAspectRatio = set;
if (m_scaledContents)
- tqrepaint();
+ repaint();
}
TQWidget* KexiDBImageBox::widget()
@@ -331,7 +331,7 @@ void KexiDBImageBox::handleInsertFromFileAction(const KURL& url)
if (!h)
return;
setData(h);
- tqrepaint();
+ repaint();
}
else {
//db-aware
@@ -401,14 +401,14 @@ void KexiDBImageBox::handleCutAction()
void KexiDBImageBox::handleCopyAction()
{
- tqApp->tqclipboard()->setPixmap(pixmap(), TQClipboard::Clipboard);
+ tqApp->clipboard()->setPixmap(pixmap(), TQClipboard::Clipboard);
}
void KexiDBImageBox::handlePasteAction()
{
if (isReadOnly() || (!m_designMode && !hasFocus()))
return;
- TQPixmap pm( tqApp->tqclipboard()->pixmap(TQClipboard::Clipboard) );
+ TQPixmap pm( tqApp->clipboard()->pixmap(TQClipboard::Clipboard) );
// if (!pm.isNull())
// setValueInternal(pm, true);
if (dataSource().isEmpty()) {
@@ -429,7 +429,7 @@ void KexiDBImageBox::handlePasteAction()
}
}
- tqrepaint();
+ repaint();
if (!dataSource().isEmpty()) {
// emit pixmapChanged();
signalValueChanged();
@@ -455,7 +455,7 @@ void KexiDBImageBox::clear()
//! @todo emit signal for setting "dirty" flag within the design
// m_pixmap = TQPixmap(); //will be loaded on demand
- tqrepaint();
+ repaint();
if (!dataSource().isEmpty()) {
// emit pixmapChanged();//valueChanged(data());
signalValueChanged();
@@ -522,17 +522,17 @@ void KexiDBImageBox::slotToggled(bool on)
TQRect screen = tqApp->desktop()->availableGeometry( m_chooser );
TQPoint p;
if ( TQApplication::reverseLayout() ) {
- if ( (mapToGlobal( m_chooser->rect().bottomLeft() ).y() + m_popupMenu->tqsizeHint().height()) <= screen.height() )
+ if ( (mapToGlobal( m_chooser->rect().bottomLeft() ).y() + m_popupMenu->sizeHint().height()) <= screen.height() )
p = m_chooser->mapToGlobal( m_chooser->rect().bottomRight() );
else
- p = m_chooser->mapToGlobal( m_chooser->rect().topRight() - TQPoint( 0, m_popupMenu->tqsizeHint().height() ) );
- p.rx() -= m_popupMenu->tqsizeHint().width();
+ p = m_chooser->mapToGlobal( m_chooser->rect().topRight() - TQPoint( 0, m_popupMenu->sizeHint().height() ) );
+ p.rx() -= m_popupMenu->sizeHint().width();
}
else {
- if ( (m_chooser->mapToGlobal( m_chooser->rect().bottomLeft() ).y() + m_popupMenu->tqsizeHint().height()) <= screen.height() )
+ if ( (m_chooser->mapToGlobal( m_chooser->rect().bottomLeft() ).y() + m_popupMenu->sizeHint().height()) <= screen.height() )
p = m_chooser->mapToGlobal( m_chooser->rect().bottomLeft() );
else
- p = m_chooser->mapToGlobal( m_chooser->rect().topLeft() - TQPoint( 0, m_popupMenu->tqsizeHint().height() ) );
+ p = m_chooser->mapToGlobal( m_chooser->rect().topLeft() - TQPoint( 0, m_popupMenu->sizeHint().height() ) );
}
if (!m_popupMenu->isVisible() && on) {
m_popupMenu->exec( p, -1 );
@@ -573,7 +573,7 @@ void KexiDBImageBox::updateActionStrings()
(see doc/dev/settings.txt) */
beautifiedImageBoxName = beautifiedImageBoxName[0].upper() + beautifiedImageBoxName.mid(1);
}
- TQToolTip::add(m_chooser, i18n("Click to show actions for \"%1\" image box").tqarg(beautifiedImageBoxName));
+ TQToolTip::add(m_chooser, i18n("Click to show actions for \"%1\" image box").arg(beautifiedImageBoxName));
}
}
}
@@ -610,11 +610,11 @@ void KexiDBImageBox::setDataSource( const TQString &ds )
}
if (!m_paletteBackgroundColorChanged && parentWidget()) {
KexiFrame::setPaletteBackgroundColor(
- dataSource().isEmpty() ? parentWidget()->paletteBackgroundColor() : tqpalette().active().base() );
+ dataSource().isEmpty() ? parentWidget()->paletteBackgroundColor() : palette().active().base() );
}
}
-TQSize KexiDBImageBox::tqsizeHint() const
+TQSize KexiDBImageBox::sizeHint() const
{
if (pixmap().isNull())
return TQSize(80, 80);
@@ -640,7 +640,7 @@ void KexiDBImageBox::paintEvent( TQPaintEvent *pe )
if (m_designMode && pixmap().isNull()) {
TQPixmap pm(size()-TQSize(m, m));
TQPainter p2;
- p2.tqbegin(TQT_TQPAINTDEVICE(&pm), this);
+ p2.begin(TQT_TQPAINTDEVICE(&pm), this);
p2.fillRect(0,0,width(),height(), bg);
updatePixmap();
@@ -665,7 +665,7 @@ void KexiDBImageBox::paintEvent( TQPaintEvent *pe )
p2.setPen( KexiUtils::contrastColor( bg ) );
p2.drawText(pm.rect(), TQt::AlignCenter,
dataSource().isEmpty()
- ? TQString::tqfromLatin1(name())+"\n"+i18n("Unbound Image Box", "(unbound)") //i18n("No Image")
+ ? TQString::fromLatin1(name())+"\n"+i18n("Unbound Image Box", "(unbound)") //i18n("No Image")
: dataSource());
p2.end();
bitBlt(this, m, m, &pm);
@@ -678,7 +678,7 @@ void KexiDBImageBox::paintEvent( TQPaintEvent *pe )
//clearing needed here because we may need to draw a pixmap with transparency
p.fillRect(0,0,width(),height(), bg);
- KexiUtils::drawPixmap( p, m, TQRect(TQPoint(0,0), internalSize), pixmap(), m_tqalignment,
+ KexiUtils::drawPixmap( p, m, TQRect(TQPoint(0,0), internalSize), pixmap(), m_alignment,
m_scaledContents, m_keepAspectRatio );
}
KexiFrame::drawFrame( &p );
@@ -687,7 +687,7 @@ void KexiDBImageBox::paintEvent( TQPaintEvent *pe )
if (!m_designMode && !dataSource().isEmpty() && hasFocus() && (!m_chooser || !m_chooser->isVisible())) {
tqstyle().tqdrawPrimitive(
TQStyle::PE_FocusRect, &p, tqstyle().subRect(TQStyle::SR_PushButtonContents, this),
- tqpalette().active() );
+ palette().active() );
}
}
@@ -697,7 +697,7 @@ void KexiDBImageBox::paintEvent( TQPaintEvent *pe )
if (oldPalette.active().background()!=palette().active().background()) {
delete KexiDBImageBox_pm;
KexiDBImageBox_pm = 0;
- tqrepaint();
+ repaint();
}
}*/
@@ -715,11 +715,11 @@ void KexiDBImageBox::updatePixmap()
}
}
-void KexiDBImageBox::tqsetAlignment(int tqalignment)
+void KexiDBImageBox::setAlignment(int alignment)
{
- m_tqalignment = tqalignment;
+ m_alignment = alignment;
if (!m_scaledContents || m_keepAspectRatio)
- tqrepaint();
+ repaint();
}
void KexiDBImageBox::setData(const KexiBLOBBuffer::Handle& handle)
@@ -737,7 +737,7 @@ void KexiDBImageBox::resizeEvent( TQResizeEvent * e )
{
KexiFrame::resizeEvent(e);
if (m_chooser) {
- TQSize s( m_chooser->tqsizeHint() );
+ TQSize s( m_chooser->sizeHint() );
TQSize margin( realLineWidth(), realLineWidth() );
s.setHeight( height() - 2*margin.height() );
s = s.boundedTo( size()-2*margin );
@@ -839,7 +839,7 @@ bool KexiDBImageBox::eventFilter( TQObject * watched, TQEvent * e )
{
if (TQT_BASE_OBJECT(watched)==TQT_BASE_OBJECT(this) || TQT_BASE_OBJECT(watched)==TQT_BASE_OBJECT(m_chooser)) { //we're watching chooser as well because it's a focus proxy even if invisible
if (e->type()==TQEvent::FocusIn || e->type()==TQEvent::FocusOut || e->type()==TQEvent::MouseButtonPress) {
- update(); //to tqrepaint focus rect
+ update(); //to repaint focus rect
}
}
// hide popup menu as soon as it loses focus
diff --git a/kexi/plugins/forms/widgets/kexidbimagebox.h b/kexi/plugins/forms/widgets/kexidbimagebox.h
index 32b4e9b1..860ee4c6 100644
--- a/kexi/plugins/forms/widgets/kexidbimagebox.h
+++ b/kexi/plugins/forms/widgets/kexidbimagebox.h
@@ -48,7 +48,7 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
TQ_PROPERTY( uint storedPixmapId READ storedPixmapId WRITE setStoredPixmapId DESIGNABLE false STORED true )
TQ_PROPERTY( bool scaledContents READ hasScaledContents WRITE setScaledContents )
TQ_PROPERTY( bool keepAspectRatio READ keepAspectRatio WRITE setKeepAspectRatio )
- TQ_PROPERTY( int tqalignment READ tqalignment WRITE tqsetAlignment )
+ TQ_PROPERTY( int alignment READ alignment WRITE setAlignment )
// TQ_PROPERTY( TQString originalFileName READ originalFileName WRITE setOriginalFileName DESIGNABLE false )
// TQ_OVERRIDE( FocusPolicy focusPolicy READ focusPolicy WRITE setFocusPolicy )
TQ_PROPERTY( bool dropDownButtonVisible READ dropDownButtonVisible WRITE setDropDownButtonVisible )
@@ -95,11 +95,11 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
// bool designMode() const { return m_designMode; }
- int tqalignment() const { return m_tqalignment; }
+ int alignment() const { return m_alignment; }
bool keepAspectRatio() const { return m_keepAspectRatio; }
- virtual TQSize tqsizeHint() const;
+ virtual TQSize sizeHint() const;
KexiImageContextMenu *contextMenu() const;
@@ -158,7 +158,7 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
void setScaledContents(bool set);
- void tqsetAlignment(int tqalignment);
+ void setAlignment(int alignment);
void setKeepAspectRatio(bool set);
@@ -258,7 +258,7 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
//moved KAction *m_insertFromFileAction, *m_saveAsAction, *m_cutAction, *m_copyAction, *m_pasteAction,
// *m_deleteAction, *m_propertiesAction;
// TQTimer m_clickTimer;
- int m_tqalignment;
+ int m_alignment;
TQ_FocusPolicy m_focusPolicyInternal; //!< Used for focusPolicyInternal()
bool m_designMode : 1;
bool m_readOnly : 1;
diff --git a/kexi/plugins/forms/widgets/kexidblabel.cpp b/kexi/plugins/forms/widgets/kexidblabel.cpp
index 2d09429e..93f35027 100644
--- a/kexi/plugins/forms/widgets/kexidblabel.cpp
+++ b/kexi/plugins/forms/widgets/kexidblabel.cpp
@@ -63,10 +63,10 @@ KexiDBInternalLabel::KexiDBInternalLabel( KexiDBLabel* parent )
: TQLabel( parent )
, m_parentLabel(parent)
{
- int a = tqalignment() | TQt::WordBreak;
+ int a = alignment() | TQt::WordBreak;
a &= (0xffffff ^ TQt::AlignVertical_Mask);
a |= TQt::AlignTop;
- tqsetAlignment( a );
+ setAlignment( a );
updateFrame();
}
@@ -132,7 +132,7 @@ TQImage KexiDBInternalLabel::makeShadow( const TQImage& textImage,
double realOpacity = SHADOW_OPACITY + TQMIN(50.0/double(256.0-tqGray(bgColor.rgb())), 50.0);
//int _h, _s, _v;
//.getHsv( &_h, &_s, &_v );
- if (tqcolorGroup().background()==TQt::red)//_s>=250 && _v>=250) //for colors like cyan or red, make the result more white
+ if (colorGroup().background()==TQt::red)//_s>=250 && _v>=250) //for colors like cyan or red, make the result more white
realOpacity += 50.0;
result.fill( (int)realOpacity );
result.setAlphaBuffer( true );
@@ -177,7 +177,7 @@ KPixmap KexiDBInternalLabel::getShadowPixmap() {
/*!
* Backup the default color used to draw text.
*/
- const TQColor textColor = tqcolorGroup().foreground();
+ const TQColor textColor = colorGroup().foreground();
/*!
* Temporary storage for the generated shadow
@@ -232,7 +232,7 @@ KPixmap KexiDBInternalLabel::getShadowPixmap() {
TQMIN( m_shadowRect.y() + ( m_shadowRect.height() * 3 / 2 ), shadowImage.height() ) ) );
shadowImage = makeShadow( shadowImage,
- tqGray( tqcolorGroup().background().rgb() ) < 127 ? TQt::white : TQt::black,
+ tqGray( colorGroup().background().rgb() ) < 127 ? TQt::white : TQt::black,
m_shadowRect );
if (shadowImage.isNull())
return KPixmap();
@@ -424,9 +424,9 @@ void KexiDBLabel::init()
m_hasFocusableWidget = false;
d->internalLabel = new KexiDBInternalLabel( this );
d->internalLabel->hide();
- d->frameColor = tqpalette().active().foreground();
+ d->frameColor = palette().active().foreground();
- tqsetAlignment( d->internalLabel->tqalignment() );
+ setAlignment( d->internalLabel->alignment() );
}
void KexiDBLabel::updatePixmapLater() {
@@ -453,7 +453,7 @@ void KexiDBLabel::updatePixmap() {
d->internalLabel->setText( text() );
d->internalLabel->setFixedSize( size() );
d->internalLabel->setPalette( palette() );
- d->internalLabel->tqsetAlignment( tqalignment() );
+ d->internalLabel->setAlignment( alignment() );
// d->shadowPixmap = KPixmap(); //parallel repaints won't hurt us cause incomplete pixmap
KPixmap shadowPixmap = d->internalLabel->getShadowPixmap();
if (shadowPixmap.isNull())
@@ -461,7 +461,7 @@ void KexiDBLabel::updatePixmap() {
d->shadowPixmap = shadowPixmap;
d->shadowPosition = d->internalLabel->m_shadowRect.topLeft();
d->pixmapDirty = false;
- tqrepaint();
+ repaint();
}
void KexiDBLabel::paintEvent( TQPaintEvent* e )
@@ -491,7 +491,7 @@ void KexiDBLabel::paintEvent( TQPaintEvent* e )
p.drawPixmap( d->internalLabel->m_shadowRect.topLeft(), d->shadowPixmap, clipRect );
}
}
- KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), tqalignment(), false );
+ KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), alignment(), false );
TQLabel::paintEvent( e );
}
@@ -577,7 +577,7 @@ void KexiDBLabel::setShadowEnabled( bool state ) {
d->pixmapDirty = true;
if (state)
d->internalLabel->updateFrame();
- tqrepaint();
+ repaint();
}
void KexiDBLabel::resizeEvent( TQResizeEvent* e ) {
@@ -636,7 +636,7 @@ void KexiDBLabel::setText( const TQString& text ) {
TQLabel::setText( text );
//This is necessary for KexiFormDataItemInterface
valueChanged();
- tqrepaint();
+ repaint();
}
bool KexiDBLabel::shadowEnabled() const
diff --git a/kexi/plugins/forms/widgets/kexidblineedit.cpp b/kexi/plugins/forms/widgets/kexidblineedit.cpp
index 5bb74e22..815adca9 100644
--- a/kexi/plugins/forms/widgets/kexidblineedit.cpp
+++ b/kexi/plugins/forms/widgets/kexidblineedit.cpp
@@ -331,14 +331,14 @@ void KexiDBLineEdit::setColumnInfo(KexiDB::QueryColumnInfo* cinfo)
/*todo
void KexiDBLineEdit::paint( TQPainter *p )
{
- KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), tqalignment(), hasFocus() );
+ KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), alignment(), hasFocus() );
}*/
void KexiDBLineEdit::paintEvent ( TQPaintEvent *pe )
{
KLineEdit::paintEvent( pe );
TQPainter p(this);
- KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), tqalignment(), hasFocus() );
+ KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), alignment(), hasFocus() );
}
bool KexiDBLineEdit::event( TQEvent * e )
diff --git a/kexi/plugins/forms/widgets/kexidbsubform.cpp b/kexi/plugins/forms/widgets/kexidbsubform.cpp
index 9c24df4a..8b4149a9 100644
--- a/kexi/plugins/forms/widgets/kexidbsubform.cpp
+++ b/kexi/plugins/forms/widgets/kexidbsubform.cpp
@@ -33,7 +33,7 @@ KexiDBSubForm::KexiDBSubForm(KFormDesigner::Form *parentForm, TQWidget *parent,
: TQScrollView(parent, name), m_parentForm(parentForm), m_form(0), m_widget(0)
{
setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken);
- viewport()->setPaletteBackgroundColor(tqcolorGroup().mid());
+ viewport()->setPaletteBackgroundColor(colorGroup().mid());
}
/*
void
diff --git a/kexi/plugins/forms/widgets/kexidbtextedit.cpp b/kexi/plugins/forms/widgets/kexidbtextedit.cpp
index c4cbe4d0..b6ab6b03 100644
--- a/kexi/plugins/forms/widgets/kexidbtextedit.cpp
+++ b/kexi/plugins/forms/widgets/kexidbtextedit.cpp
@@ -145,7 +145,7 @@ void KexiDBTextEdit::paintEvent ( TQPaintEvent *pe )
{
KTextEdit::paintEvent( pe );
TQPainter p(this);
- KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), tqalignment(), hasFocus() );
+ KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), alignment(), hasFocus() );
}
TQPopupMenu * KexiDBTextEdit::createPopupMenu(const TQPoint & pos)
diff --git a/kexi/plugins/forms/widgets/kexidbtimeedit.cpp b/kexi/plugins/forms/widgets/kexidbtimeedit.cpp
index b136fa0d..3afa0e47 100644
--- a/kexi/plugins/forms/widgets/kexidbtimeedit.cpp
+++ b/kexi/plugins/forms/widgets/kexidbtimeedit.cpp
@@ -21,7 +21,7 @@
#include "kexidbtimeedit.h"
#include <tqtoolbutton.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqpainter.h>
#include <kpopupmenu.h>
diff --git a/kexi/plugins/forms/widgets/kexiframe.cpp b/kexi/plugins/forms/widgets/kexiframe.cpp
index 09266ae4..b64d6edf 100644
--- a/kexi/plugins/forms/widgets/kexiframe.cpp
+++ b/kexi/plugins/forms/widgets/kexiframe.cpp
@@ -48,7 +48,7 @@ KexiFrame::KexiFrame( TQWidget * parent, const char * name, WFlags f )
, d( new Private() )
{
//defaults
- d->frameColor = tqpalette().active().foreground();
+ d->frameColor = palette().active().foreground();
//! @todo obtain these defaults from current template's style...
setLineWidth(2);
setFrameStyle(TQFrame::StyledPanel|TQFrame::Raised);
diff --git a/kexi/plugins/forms/widgets/kexiframe.h b/kexi/plugins/forms/widgets/kexiframe.h
index 2f6ca562..ce51766c 100644
--- a/kexi/plugins/forms/widgets/kexiframe.h
+++ b/kexi/plugins/forms/widgets/kexiframe.h
@@ -53,7 +53,7 @@ class KEXIFORMUTILS_EXPORT KexiFrame : public TQFrame
GroupBoxPanel = TQFrame::GroupBoxPanel //!< rectangular group-box-like panel depending on the GUI style
};
Shape frameShape() const;
- void setFrameShape( KexiFrame::Shape tqshape );
+ void setFrameShape( KexiFrame::Shape shape );
Shadow frameShadow() const;
void setFrameShadow( KexiFrame::Shadow shadow );
#endif
diff --git a/kexi/plugins/forms/widgets/kexiframeutils_p.cpp b/kexi/plugins/forms/widgets/kexiframeutils_p.cpp
index 331909ee..22a71001 100644
--- a/kexi/plugins/forms/widgets/kexiframeutils_p.cpp
+++ b/kexi/plugins/forms/widgets/kexiframeutils_p.cpp
@@ -26,7 +26,7 @@ void ClassName::drawFrame( TQPainter *p )
if ( frameShadow() == Plain )
qDrawPlainRect( p, frameRect(), d->frameColor, lineWidth() );
else
- qDrawShadeRect( p, frameRect(), tqcolorGroup(), frameShadow() == TQFrame::Sunken,
+ qDrawShadeRect( p, frameRect(), colorGroup(), frameShadow() == TQFrame::Sunken,
lineWidth(), midLineWidth() );
}
else {
@@ -69,9 +69,9 @@ ClassName::Shape ClassName::frameShape() const
return d->frameShape;
}
-void ClassName::setFrameShape( ClassName::Shape tqshape )
+void ClassName::setFrameShape( ClassName::Shape shape )
{
- d->frameShape = tqshape;
+ d->frameShape = shape;
update();
}
@@ -98,7 +98,7 @@ void TQFrame::drawFrame( TQPainter *p )
p->setPen( black ); // ####
p->drawRect( r ); //### a bit too simple
#else
- const TQColorGroup & g = tqcolorGroup();
+ const TQColorGroup & g = colorGroup();
#ifndef TQT_NO_STYLE
TQStyleOption opt(lineWidth(),midLineWidth());
@@ -162,24 +162,24 @@ void TQFrame::drawFrame( TQPainter *p )
case PopupPanel:
#ifndef TQT_NO_STYLE
{
- int vextra = style().tqpixelMetric(TQStyle::PM_PopupMenuFrameVerticalExtra, this),
- hextra = style().tqpixelMetric(TQStyle::PM_PopupMenuFrameHorizontalExtra, this);
+ int vextra = style().pixelMetric(TQStyle::PM_PopupMenuFrameVerticalExtra, this),
+ hextra = style().pixelMetric(TQStyle::PM_PopupMenuFrameHorizontalExtra, this);
if(vextra > 0 || hextra > 0) {
TQRect fr = frameRect();
int fw = frameWidth();
if(vextra > 0) {
- style().tqdrawControl(TQStyle::CE_PopupMenuVerticalExtra, p, this,
+ style().drawControl(TQStyle::CE_PopupMenuVerticalExtra, p, this,
TQRect(fr.x() + fw, fr.y() + fw, fr.width() - (fw*2), vextra),
g, flags, opt);
- style().tqdrawControl(TQStyle::CE_PopupMenuVerticalExtra, p, this,
+ style().drawControl(TQStyle::CE_PopupMenuVerticalExtra, p, this,
TQRect(fr.x() + fw, fr.bottom() - fw - vextra, fr.width() - (fw*2), vextra),
g, flags, opt);
}
if(hextra > 0) {
- style().tqdrawControl(TQStyle::CE_PopupMenuHorizontalExtra, p, this,
+ style().drawControl(TQStyle::CE_PopupMenuHorizontalExtra, p, this,
TQRect(fr.x() + fw, fr.y() + fw + vextra, hextra, fr.height() - (fw*2) - vextra),
g, flags, opt);
- style().tqdrawControl(TQStyle::CE_PopupMenuHorizontalExtra, p, this,
+ style().drawControl(TQStyle::CE_PopupMenuHorizontalExtra, p, this,
TQRect(fr.right() - fw - hextra, fr.y() + fw + vextra, hextra, fr.height() - (fw*2) - vextra),
g, flags, opt);
}