diff options
Diffstat (limited to 'kicker/kicker/ui/addapplet.cpp')
-rw-r--r-- | kicker/kicker/ui/addapplet.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/kicker/kicker/ui/addapplet.cpp b/kicker/kicker/ui/addapplet.cpp index 0db6bc352..fb5e3f16d 100644 --- a/kicker/kicker/ui/addapplet.cpp +++ b/kicker/kicker/ui/addapplet.cpp @@ -61,7 +61,7 @@ AppletWidget::AppletWidget(const AppletInfo& info, bool odd, TQWidget *parent) m_odd(odd), m_selected(false) { - setFocusPolicy(TQ_StrongFocus); + setFocusPolicy(TQWidget::StrongFocus); setSelected(m_selected); itemTitle->setText("<h3>" + info.name() + "</h3>"); @@ -84,8 +84,8 @@ bool AppletWidget::eventFilter(TQObject*, TQEvent* e) { if (e->type() == TQEvent::MouseButtonPress) { - TQMouseEvent* me = TQT_TQMOUSEEVENT(e); - if (me->button() & Qt::LeftButton) + TQMouseEvent* me = static_cast<TQMouseEvent*>(e); + if (me->button() & TQt::LeftButton) { m_dragStart = me->pos(); } @@ -97,7 +97,7 @@ bool AppletWidget::eventFilter(TQObject*, TQEvent* e) if (e->type() == TQEvent::MouseMove) { - TQMouseEvent* me = TQT_TQMOUSEEVENT(e); + TQMouseEvent* me = static_cast<TQMouseEvent*>(e); if ((me->pos() - m_dragStart).manhattanLength() > TDEGlobalSettings::dndEventDelay()) { @@ -123,21 +123,21 @@ bool AppletWidget::eventFilter(TQObject*, TQEvent* e) void AppletWidget::keyPressEvent(TQKeyEvent *e) { - if (e->key() == Qt::Key_Enter || - e->key() == Qt::Key_Return) + if (e->key() == TQt::Key_Enter || + e->key() == TQt::Key_Return) { emit doubleClicked(this); } - else if (e->key() == Qt::Key_Up) + else if (e->key() == TQt::Key_Up) { TQKeyEvent fakedKeyPress(TQEvent::KeyPress, TQt::Key_BackTab, 0, 0); TQKeyEvent fakedKeyRelease(TQEvent::KeyRelease, Key_BackTab, 0, 0); TQApplication::sendEvent(this, &fakedKeyPress); TQApplication::sendEvent(this, &fakedKeyRelease); } - else if (e->key() == Qt::Key_Down) + else if (e->key() == TQt::Key_Down) { - TQKeyEvent fakedKeyPress(TQEvent::KeyPress, Qt::Key_Tab, 0, 0); + TQKeyEvent fakedKeyPress(TQEvent::KeyPress, TQt::Key_Tab, 0, 0); TQKeyEvent fakedKeyRelease(TQEvent::KeyRelease, Key_Escape, 0, 0); TQApplication::sendEvent(this, &fakedKeyPress); TQApplication::sendEvent(this, &fakedKeyRelease); @@ -150,7 +150,7 @@ void AppletWidget::keyPressEvent(TQKeyEvent *e) void AppletWidget::mousePressEvent(TQMouseEvent *e) { - if (e->button() == Qt::LeftButton) + if (e->button() == TQt::LeftButton) { emit clicked(this); m_dragStart = e->pos(); @@ -162,7 +162,7 @@ void AppletWidget::mousePressEvent(TQMouseEvent *e) void AppletWidget::mouseMoveEvent(TQMouseEvent *e) { - if (e->button() == Qt::LeftButton && + if (e->button() == TQt::LeftButton && !m_dragStart.isNull() && (e->pos() - m_dragStart).manhattanLength() > TDEGlobalSettings::dndEventDelay()) @@ -186,7 +186,7 @@ void AppletWidget::mouseReleaseEvent(TQMouseEvent *e) void AppletWidget::mouseDoubleClickEvent(TQMouseEvent *e) { - if (!e->button() == Qt::LeftButton) + if (!e->button() == TQt::LeftButton) { AppletItem::mouseDoubleClickEvent(e); return; @@ -254,16 +254,16 @@ AddAppletDialog::AddAppletDialog(ContainerArea* cArea, m_mainWidget->appletInstall->setGuiItem(addGuiItem); m_mainWidget->closeButton->setGuiItem(KStdGuiItem::close()); - connect(m_mainWidget->appletSearch, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(delayedSearch())); - connect(m_searchDelay, TQT_SIGNAL(timeout()), this, TQT_SLOT(search())); - connect(m_mainWidget->appletFilter, TQT_SIGNAL(activated(int)), this, TQT_SLOT(filter(int))); - connect(m_mainWidget->appletInstall, TQT_SIGNAL(clicked()), this, TQT_SLOT(addCurrentApplet())); - connect(m_mainWidget->closeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(close())); + connect(m_mainWidget->appletSearch, TQ_SIGNAL(textChanged(const TQString&)), this, TQ_SLOT(delayedSearch())); + connect(m_searchDelay, TQ_SIGNAL(timeout()), this, TQ_SLOT(search())); + connect(m_mainWidget->appletFilter, TQ_SIGNAL(activated(int)), this, TQ_SLOT(filter(int))); + connect(m_mainWidget->appletInstall, TQ_SIGNAL(clicked()), this, TQ_SLOT(addCurrentApplet())); + connect(m_mainWidget->closeButton, TQ_SIGNAL(clicked()), this, TQ_SLOT(close())); m_selectedType = AppletInfo::Undefined; m_appletBox = 0; - TQTimer::singleShot(0, this, TQT_SLOT(populateApplets())); + TQTimer::singleShot(0, this, TQ_SLOT(populateApplets())); } void AddAppletDialog::updateInsertionPoint() @@ -303,9 +303,9 @@ void AddAppletDialog::resizeAppletView() bool AddAppletDialog::eventFilter(TQObject *o, TQEvent *e) { if (e->type() == TQEvent::Resize) - TQTimer::singleShot(0, this, TQT_SLOT(resizeAppletView())); + TQTimer::singleShot(0, this, TQ_SLOT(resizeAppletView())); - return TQT_TQOBJECT(this)->TQObject::eventFilter(o, e); + return this->TQObject::eventFilter(o, e); } void AddAppletDialog::populateApplets() @@ -372,10 +372,10 @@ void AddAppletDialog::populateApplets() setTabOrder(prevTabWidget, itemWidget); prevTabWidget = itemWidget; - connect(itemWidget, TQT_SIGNAL(clicked(AppletWidget*)), - this, TQT_SLOT(selectApplet(AppletWidget*))); - connect(itemWidget, TQT_SIGNAL(doubleClicked(AppletWidget*)), - this, TQT_SLOT(addApplet(AppletWidget*))); + connect(itemWidget, TQ_SIGNAL(clicked(AppletWidget*)), + this, TQ_SLOT(selectApplet(AppletWidget*))); + connect(itemWidget, TQ_SIGNAL(doubleClicked(AppletWidget*)), + this, TQ_SLOT(addApplet(AppletWidget*))); if (m_closing) { @@ -518,7 +518,7 @@ void AddAppletDialog::search() } } - TQTimer::singleShot(0, this, TQT_SLOT(resizeAppletView())); + TQTimer::singleShot(0, this, TQ_SLOT(resizeAppletView())); } void AddAppletDialog::filter(int i) |