summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/queries
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2011-12-18 18:12:30 -0600
committerTimothy Pearson <[email protected]>2011-12-18 18:12:30 -0600
commit11191ef0b9908604d1d7aaca382b011ef22c454c (patch)
treed38f0ccd8bfcc9756f5cfc42fb2ad1dad351e6aa /kexi/plugins/queries
parentc9cb4f487428aad5d8cda5e3a4b9ad87390d7e54 (diff)
downloadkoffice-11191ef0b9908604d1d7aaca382b011ef22c454c.tar.gz
koffice-11191ef0b9908604d1d7aaca382b011ef22c454c.zip
Rename old tq methods that no longer need a unique name
Diffstat (limited to 'kexi/plugins/queries')
-rw-r--r--kexi/plugins/queries/kexiaddparamwidget.ui2
-rw-r--r--kexi/plugins/queries/kexiquerydesignerguieditor.cpp18
-rw-r--r--kexi/plugins/queries/kexiquerydesignerguieditor.h2
-rw-r--r--kexi/plugins/queries/kexiquerydesignersql.cpp40
-rw-r--r--kexi/plugins/queries/kexiquerydesignersqlhistory.cpp16
-rw-r--r--kexi/plugins/queries/kexiqueryview.cpp2
6 files changed, 40 insertions, 40 deletions
diff --git a/kexi/plugins/queries/kexiaddparamwidget.ui b/kexi/plugins/queries/kexiaddparamwidget.ui
index a1f28a79..ed1864f6 100644
--- a/kexi/plugins/queries/kexiaddparamwidget.ui
+++ b/kexi/plugins/queries/kexiaddparamwidget.ui
@@ -73,7 +73,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="tqsizeHint">
+ <property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
diff --git a/kexi/plugins/queries/kexiquerydesignerguieditor.cpp b/kexi/plugins/queries/kexiquerydesignerguieditor.cpp
index e215ab90..c6708e7f 100644
--- a/kexi/plugins/queries/kexiquerydesignerguieditor.cpp
+++ b/kexi/plugins/queries/kexiquerydesignerguieditor.cpp
@@ -193,8 +193,8 @@ KexiQueryDesignerGuiEditor::KexiQueryDesignerGuiEditor(
addChildView(d->relations);
addChildView(d->dataTable);
setViewWidget(d->dataTable, true);
- d->relations->tqsetSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Expanding);
- d->head->tqsetSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Expanding);
+ d->relations->setSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Expanding);
+ d->head->setSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Expanding);
updateGeometry();
d->spl->setSizes(TQValueList<int>()<< 800<<400);
}
@@ -624,7 +624,7 @@ KexiQueryDesignerGuiEditor::afterSwitchFrom(int mode)
if (!m_dialog->neverSaved()) {
if (!loadLayout()) {
//err msg
- parentDialog()->settqStatus(conn,
+ parentDialog()->setStatus(conn,
i18n("Query definition loading failed."),
i18n("Query design may be corrupted so it could not be opened even in text view.\n"
"You can delete the query and create it again."));
@@ -639,7 +639,7 @@ KexiQueryDesignerGuiEditor::afterSwitchFrom(int mode)
KexiDB::ResultInfo result;
showFieldsForQuery( q, result );
if (!result.success) {
- parentDialog()->settqStatus(&result, i18n("Query definition loading failed."));
+ parentDialog()->setStatus(&result, i18n("Query definition loading failed."));
tempData()->proposeOpeningInTextViewModeBecauseOfProblems = true;
return false;
}
@@ -662,7 +662,7 @@ KexiQueryDesignerGuiEditor::afterSwitchFrom(int mode)
KexiDB::ResultInfo result;
showFieldsAndRelationsForQuery( tempData()->query(), result );
if (!result.success) {
- parentDialog()->settqStatus(&result, i18n("Query definition loading failed."));
+ parentDialog()->setStatus(&result, i18n("Query definition loading failed."));
return false;
}
}
@@ -1083,7 +1083,7 @@ bool KexiQueryDesignerGuiEditor::loadLayout()
KexiDB::ResultInfo result;
showRelationsForQuery( q, result );
if (!result.success) {
- parentDialog()->settqStatus(&result, i18n("Query definition loading failed."));
+ parentDialog()->setStatus(&result, i18n("Query definition loading failed."));
return false;
}
}
@@ -1177,10 +1177,10 @@ bool KexiQueryDesignerGuiEditor::storeLayout()
return true;
}
-TQSize KexiQueryDesignerGuiEditor::tqsizeHint() const
+TQSize KexiQueryDesignerGuiEditor::sizeHint() const
{
- TQSize s1 = d->relations->tqsizeHint();
- TQSize s2 = d->head->tqsizeHint();
+ TQSize s1 = d->relations->sizeHint();
+ TQSize s2 = d->head->sizeHint();
return TQSize(TQMAX(s1.width(),s2.width()), s1.height()+s2.height());
}
diff --git a/kexi/plugins/queries/kexiquerydesignerguieditor.h b/kexi/plugins/queries/kexiquerydesignerguieditor.h
index c97c140d..d96fd987 100644
--- a/kexi/plugins/queries/kexiquerydesignerguieditor.h
+++ b/kexi/plugins/queries/kexiquerydesignerguieditor.h
@@ -69,7 +69,7 @@ class KexiQueryDesignerGuiEditor : public KexiViewBase
KexiRelationWidget *relationView() const;
- virtual TQSize tqsizeHint() const;
+ virtual TQSize sizeHint() const;
public slots:
virtual void setFocus();
diff --git a/kexi/plugins/queries/kexiquerydesignersql.cpp b/kexi/plugins/queries/kexiquerydesignersql.cpp
index 37fab0e6..43353b84 100644
--- a/kexi/plugins/queries/kexiquerydesignersql.cpp
+++ b/kexi/plugins/queries/kexiquerydesignersql.cpp
@@ -73,7 +73,7 @@ class KexiQueryDesignerSQLView::Private
}
KexiQueryDesignerSQLEditor *editor;
KexiQueryDesignerSQLHistory *history;
- TQLabel *pixmaptqStatus, *lbltqStatus;
+ TQLabel *pixmapStatus, *lblStatus;
TQHBox *status_hbox;
TQVBox *history_section;
KexiSectionHeader *head, *historyHead;
@@ -120,18 +120,18 @@ KexiQueryDesignerSQLView::KexiQueryDesignerSQLView(KexiMainWindow *mainWin, TQWi
d->status_hbox->installEventFilter(this);
d->splitter->setResizeMode(d->history_section, TQSplitter::KeepSize);
d->status_hbox->setSpacing(0);
- d->pixmaptqStatus = new TQLabel(d->status_hbox);
- d->pixmaptqStatus->setFixedWidth(d->statusPixmapOk.width()*3/2);
- d->pixmaptqStatus->tqsetAlignment(AlignHCenter | AlignTop);
- d->pixmaptqStatus->setMargin(d->statusPixmapOk.width()/4);
- d->pixmaptqStatus->setPaletteBackgroundColor( tqpalette().active().color(TQColorGroup::Base) );
-
- d->lbltqStatus = new TQLabel(d->status_hbox);
- d->lbltqStatus->tqsetAlignment(AlignLeft | AlignTop | WordBreak);
- d->lbltqStatus->setMargin(d->statusPixmapOk.width()/4);
- d->lbltqStatus->tqsetSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Expanding );
- d->lbltqStatus->resize(d->lbltqStatus->width(),d->statusPixmapOk.width()*3);
- d->lbltqStatus->setPaletteBackgroundColor( tqpalette().active().color(TQColorGroup::Base) );
+ d->pixmapStatus = new TQLabel(d->status_hbox);
+ d->pixmapStatus->setFixedWidth(d->statusPixmapOk.width()*3/2);
+ d->pixmapStatus->setAlignment(AlignHCenter | AlignTop);
+ d->pixmapStatus->setMargin(d->statusPixmapOk.width()/4);
+ d->pixmapStatus->setPaletteBackgroundColor( tqpalette().active().color(TQColorGroup::Base) );
+
+ d->lblStatus = new TQLabel(d->status_hbox);
+ d->lblStatus->setAlignment(AlignLeft | AlignTop | WordBreak);
+ d->lblStatus->setMargin(d->statusPixmapOk.width()/4);
+ d->lblStatus->setSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Expanding );
+ d->lblStatus->resize(d->lblStatus->width(),d->statusPixmapOk.width()*3);
+ d->lblStatus->setPaletteBackgroundColor( tqpalette().active().color(TQColorGroup::Base) );
TQHBoxLayout *b = new TQHBoxLayout(this);
b->addWidget(d->splitter);
@@ -171,36 +171,36 @@ KexiQueryDesignerSQLEditor *KexiQueryDesignerSQLView::editor() const
void KexiQueryDesignerSQLView::setStatusOk()
{
- d->pixmaptqStatus->setPixmap(d->statusPixmapOk);
+ d->pixmapStatus->setPixmap(d->statusPixmapOk);
setStatusText("<h2>"+i18n("The query is correct")+"</h2>");
d->history->addEvent(d->editor->text().stripWhiteSpace(), true, TQString());
}
void KexiQueryDesignerSQLView::setStatusError(const TQString& msg)
{
- d->pixmaptqStatus->setPixmap(d->statusPixmapErr);
+ d->pixmapStatus->setPixmap(d->statusPixmapErr);
setStatusText("<h2>"+i18n("The query is incorrect")+"</h2><p>"+msg+"</p>");
d->history->addEvent(d->editor->text().stripWhiteSpace(), false, msg);
}
void KexiQueryDesignerSQLView::setStatusEmpty()
{
- d->pixmaptqStatus->setPixmap(d->statusPixmapInfo);
+ d->pixmapStatus->setPixmap(d->statusPixmapInfo);
setStatusText(i18n("Please enter your query and execute \"Check query\" function to verify it."));
}
void KexiQueryDesignerSQLView::setStatusText(const TQString& text)
{
if (!d->action_toggle_history->isChecked()) {
- TQSimpleRichText rt(text, d->lbltqStatus->font());
- rt.setWidth(d->lbltqStatus->width());
+ TQSimpleRichText rt(text, d->lblStatus->font());
+ rt.setWidth(d->lblStatus->width());
TQValueList<int> sz = d->splitter->sizes();
- const int newHeight = rt.height()+d->lbltqStatus->margin()*2;
+ const int newHeight = rt.height()+d->lblStatus->margin()*2;
if (sz[1]<newHeight) {
sz[1] = newHeight;
d->splitter->setSizes(sz);
}
- d->lbltqStatus->setText(text);
+ d->lblStatus->setText(text);
}
}
diff --git a/kexi/plugins/queries/kexiquerydesignersqlhistory.cpp b/kexi/plugins/queries/kexiquerydesignersqlhistory.cpp
index 7cc62620..503b432a 100644
--- a/kexi/plugins/queries/kexiquerydesignersqlhistory.cpp
+++ b/kexi/plugins/queries/kexiquerydesignersqlhistory.cpp
@@ -61,7 +61,7 @@ KexiQueryDesignerSQLHistory::drawContents(TQPainter *p, int cx, int cy, int cw,
{
p->saveWorldMatrix();
p->translate(0, y);
- it->drawItem(p, visibleWidth(), tqcolorGroup());
+ it->drawItem(p, visibleWidth(), colorGroup());
p->restoreWorldMatrix();
}
y += it->tqgeometry(y, visibleWidth(), fontMetrics()).height() + 5;
@@ -79,7 +79,7 @@ KexiQueryDesignerSQLHistory::contentsMousePressEvent(TQMouseEvent * e)
if(it.current()->isSelected())
{
//clear
- it.current()->setSelected(false, tqcolorGroup());
+ it.current()->setSelected(false, colorGroup());
updateContents(it.current()->tqgeometry(y, visibleWidth(), fontMetrics()));
}
@@ -94,11 +94,11 @@ KexiQueryDesignerSQLHistory::contentsMousePressEvent(TQMouseEvent * e)
//now do update
if (popupHistory) {
if (m_selected && m_selected != popupHistory) {
- m_selected->setSelected(false, tqcolorGroup());
+ m_selected->setSelected(false, colorGroup());
updateContents(m_selected->tqgeometry(pos, visibleWidth(), fontMetrics()));
}
m_selected = popupHistory;
- m_selected->setSelected(true, tqcolorGroup());
+ m_selected->setSelected(true, colorGroup());
updateContents(m_selected->tqgeometry(pos, visibleWidth(), fontMetrics()));
if(e->button() == Qt::RightButton) {
m_popup->exec(e->globalPos());
@@ -142,18 +142,18 @@ KexiQueryDesignerSQLHistory::addEntry(HistoryEntry *e)
resizeContents(visibleWidth() - 1, y);
if (m_selected) {
- m_selected->setSelected(false, tqcolorGroup());
+ m_selected->setSelected(false, colorGroup());
}
m_selected = e;
- m_selected->setSelected(true, tqcolorGroup());
+ m_selected->setSelected(true, colorGroup());
ensureVisible(0,y+5);
updateContents();
/* ensureVisible(0, 0);
if (m_selected) {
- m_selected->setSelected(false, tqcolorGroup());
+ m_selected->setSelected(false, colorGroup());
}
m_selected = e;
- m_selected->setSelected(true, tqcolorGroup());
+ m_selected->setSelected(true, colorGroup());
// updateContents();
updateContents(m_selected->tqgeometry(0, visibleWidth(), fontMetrics()));*/
}
diff --git a/kexi/plugins/queries/kexiqueryview.cpp b/kexi/plugins/queries/kexiqueryview.cpp
index c57224ea..1b3c16d7 100644
--- a/kexi/plugins/queries/kexiqueryview.cpp
+++ b/kexi/plugins/queries/kexiqueryview.cpp
@@ -83,7 +83,7 @@ tristate KexiQueryView::executeQuery(KexiDB::QuerySchema *query)
}
d->cursor = mainWin()->project()->dbConnection()->executeQuery(*query, params);
if (!d->cursor) {
- parentDialog()->settqStatus(parentDialog()->mainWin()->project()->dbConnection(),
+ parentDialog()->setStatus(parentDialog()->mainWin()->project()->dbConnection(),
i18n("Query executing failed."));
//todo: also provide server result and sql statement
return false;