diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-14 16:45:05 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-14 16:45:05 +0000 |
commit | 48d4a26399959121f33d2bc3bfe51c7827b654fc (patch) | |
tree | 5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /src/newui/buttonbar.cpp | |
parent | 7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff) | |
download | tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip |
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/newui/buttonbar.cpp')
-rw-r--r-- | src/newui/buttonbar.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/newui/buttonbar.cpp b/src/newui/buttonbar.cpp index b2a3b47c..342e3491 100644 --- a/src/newui/buttonbar.cpp +++ b/src/newui/buttonbar.cpp @@ -32,14 +32,14 @@ namespace Ideal { //ButtonLayout class -ButtonLayout::ButtonLayout(ButtonBar *parent, Direction d, int margin, int spacing, const char *name) - :TQBoxLayout(parent, d, margin, spacing, name), m_buttonBar(parent) +ButtonLayout::ButtonLayout(ButtonBar *tqparent, Direction d, int margin, int spacing, const char *name) + :TQBoxLayout(tqparent, d, margin, spacing, name), m_buttonBar(tqparent) { } -TQSize ButtonLayout::minimumSize() const +TQSize ButtonLayout::tqminimumSize() const { - TQSize size = TQBoxLayout::minimumSize(); + TQSize size = TQBoxLayout::tqminimumSize(); if (!m_buttonBar->autoResize()) return size; @@ -54,7 +54,7 @@ TQSize ButtonLayout::minimumSize() const case Ideal::Bottom: return TQSize(0,size.height()); } - return TQBoxLayout::minimumSize(); + return TQBoxLayout::tqminimumSize(); } @@ -62,8 +62,8 @@ TQSize ButtonLayout::minimumSize() const //ButtonBar class -ButtonBar::ButtonBar(Place place, ButtonMode mode, TQWidget *parent, const char *name) - :TQWidget(parent, name), m_place(place), l(0), m_shrinked(false), m_autoResize(true) +ButtonBar::ButtonBar(Place place, ButtonMode mode, TQWidget *tqparent, const char *name) + :TQWidget(tqparent, name), m_place(place), l(0), m_shrinked(false), m_autoResize(true) { switch (m_place) { @@ -128,14 +128,14 @@ void ButtonBar::fixDimensions() { case Ideal::Left: case Ideal::Right: - setFixedWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); + setFixedWidth(tqsizeHint().width()); + setMinimumHeight(tqsizeHint().height()); setMaximumHeight(32767); break; case Ideal::Top: case Ideal::Bottom: - setFixedHeight(sizeHint().height()); - setMinimumWidth(sizeHint().width()); + setFixedHeight(tqsizeHint().height()); + setMinimumWidth(tqsizeHint().width()); setMaximumWidth(32767); break; } @@ -156,13 +156,13 @@ void ButtonBar::resizeEvent(TQResizeEvent *ev) { case Ideal::Left: case Ideal::Right: - preferredDimension = l->TQBoxLayout::minimumSize().height(); + preferredDimension = l->TQBoxLayout::tqminimumSize().height(); actualDimension = size().height(); oldDimension = ev->oldSize().height(); break; case Ideal::Top: case Ideal::Bottom: - preferredDimension = l->TQBoxLayout::minimumSize().width(); + preferredDimension = l->TQBoxLayout::tqminimumSize().width(); actualDimension = size().width(); oldDimension = ev->oldSize().width(); break; @@ -249,7 +249,7 @@ void ButtonBar::deshrink(int preferredDimension, int actualDimension) int i = 0; for (TQValueList<uint>::iterator it = texts.begin(); it != texts.end(); ++it, i++) { - if (m_buttons[i]->text().contains("...")) + if (m_buttons[i]->text().tqcontains("...")) (*it)++; newTextLength += *it; } @@ -285,7 +285,7 @@ int ButtonBar::originalDimension() int size = 0; for (ButtonList::const_iterator it = m_buttons.constBegin(); it != m_buttons.constEnd(); ++it) { - size += (*it)->sizeHint((*it)->realText()).width(); + size += (*it)->tqsizeHint((*it)->realText()).width(); } return size; } @@ -309,7 +309,7 @@ Button *ButtonBar::firstButton() Button *ButtonBar::nextTo(Button *button) { - ButtonList::iterator it = m_buttons.find(button); + ButtonList::iterator it = m_buttons.tqfind(button); Button *next = 0; if ((*it) == m_buttons.last()) next = m_buttons.first(); @@ -326,7 +326,7 @@ Button *ButtonBar::nextTo(Button *button) Button *ButtonBar::prevTo(Button *button) { - ButtonList::iterator it = m_buttons.find(button); + ButtonList::iterator it = m_buttons.tqfind(button); Button *prev = 0; if (it == m_buttons.begin()) prev = m_buttons.last(); |