diff options
Diffstat (limited to 'src/gui/overlaywidget.cpp')
-rw-r--r-- | src/gui/overlaywidget.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/gui/overlaywidget.cpp b/src/gui/overlaywidget.cpp index 6214ca8..54d27fe 100644 --- a/src/gui/overlaywidget.cpp +++ b/src/gui/overlaywidget.cpp @@ -13,11 +13,11 @@ #include "overlaywidget.h" -#include <qlayout.h> +#include <tqlayout.h> using Tellico::GUI::OverlayWidget; -OverlayWidget::OverlayWidget(QWidget* parent, QWidget* anchor) : QFrame(parent) +OverlayWidget::OverlayWidget(TQWidget* tqparent, TQWidget* anchor) : TQFrame(tqparent) , m_anchor(anchor) , m_corner(TopRight) { m_anchor->installEventFilter(this); @@ -33,8 +33,8 @@ void OverlayWidget::setCorner(Corner corner_) { reposition(); } -void OverlayWidget::addWidget(QWidget* widget_) { - layout()->add(widget_); +void OverlayWidget::addWidget(TQWidget* widget_) { + tqlayout()->add(widget_); adjustSize(); } @@ -43,10 +43,10 @@ void OverlayWidget::reposition() { return; } - setMaximumSize(parentWidget()->size()); + setMaximumSize(tqparentWidget()->size()); adjustSize(); - QPoint p; + TQPoint p; switch(m_corner) { case BottomLeft: @@ -70,9 +70,9 @@ void OverlayWidget::reposition() { } // Position in the toplevelwidget's coordinates - QPoint pTopLevel = m_anchor->mapTo(topLevelWidget(), p); - // Position in the widget's parentWidget coordinates - QPoint pParent = parentWidget()->mapFrom(topLevelWidget(), pTopLevel); + TQPoint pTopLevel = m_anchor->mapTo(tqtopLevelWidget(), p); + // Position in the widget's tqparentWidget coordinates + TQPoint pParent = tqparentWidget()->mapFrom(tqtopLevelWidget(), pTopLevel); // keep it on the screen if(pParent.x() < 0) { pParent.rx() = 0; @@ -80,25 +80,25 @@ void OverlayWidget::reposition() { move(pParent); } -bool OverlayWidget::eventFilter(QObject* object_, QEvent* event_) { - if(object_ == m_anchor && (event_->type() == QEvent::Move || event_->type() == QEvent::Resize)) { +bool OverlayWidget::eventFilter(TQObject* object_, TQEvent* event_) { + if(TQT_BASE_OBJECT(object_) == TQT_BASE_OBJECT(m_anchor) && (event_->type() == TQEvent::Move || event_->type() == TQEvent::Resize)) { reposition(); } - return QFrame::eventFilter(object_, event_); + return TQFrame::eventFilter(object_, event_); } -void OverlayWidget::resizeEvent(QResizeEvent* event_) { +void OverlayWidget::resizeEvent(TQResizeEvent* event_) { reposition(); - QFrame::resizeEvent(event_); + TQFrame::resizeEvent(event_); } -bool OverlayWidget::event(QEvent* event_) { - if(event_->type() == QEvent::ChildInserted) { +bool OverlayWidget::event(TQEvent* event_) { + if(event_->type() == TQEvent::ChildInserted) { adjustSize(); } - return QFrame::event(event_); + return TQFrame::event(event_); } #include "overlaywidget.moc" |