summaryrefslogtreecommitdiffstats
path: root/quanta/utility/toolbartabwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'quanta/utility/toolbartabwidget.cpp')
-rw-r--r--quanta/utility/toolbartabwidget.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/quanta/utility/toolbartabwidget.cpp b/quanta/utility/toolbartabwidget.cpp
index 29c7cfa9..cd3ac37e 100644
--- a/quanta/utility/toolbartabwidget.cpp
+++ b/quanta/utility/toolbartabwidget.cpp
@@ -38,36 +38,36 @@
//app includes
#include "toolbartabwidget.h"
-ToolbarTabWidget::ToolbarTabWidget(TQWidget * parent, const char * name, WFlags f)
-:TQTabWidget(parent, name, f)
+ToolbarTabWidget::ToolbarTabWidget(TQWidget * tqparent, const char * name, WFlags f)
+:TQTabWidget(tqparent, name, f)
{
m_popupMenu = new KPopupMenu(this);
m_popupMenu->insertTitle(i18n("Toolbar Menu"), 1);
- m_popupMenu->insertItem(i18n("New Action..."), parent, TQT_SLOT(slotNewAction()));
+ m_popupMenu->insertItem(i18n("New Action..."), tqparent, TQT_SLOT(slotNewAction()));
m_popupMenu->insertSeparator();
- m_popupMenu->insertItem(i18n("New Toolbar..."), parent, TQT_SLOT(slotAddToolbar()));
+ m_popupMenu->insertItem(i18n("New Toolbar..."), tqparent, TQT_SLOT(slotAddToolbar()));
m_popupMenu->insertItem(i18n("Remove Toolbar"), this, TQT_SLOT(slotRemoveToolbar()));
m_popupMenu->insertItem(i18n("Rename Toolbar..."), this, TQT_SLOT(slotRenameToolbar()));
m_popupMenu->insertItem(SmallIconSet("configure_toolbars"), i18n("Configure Toolbars..."), this, TQT_SLOT(slotEditToolbar()));
connect(this, TQT_SIGNAL(removeToolbar(const TQString&)),
- parent, TQT_SLOT(slotRemoveToolbar(const TQString&)));
+ tqparent, TQT_SLOT(slotRemoveToolbar(const TQString&)));
connect(this, TQT_SIGNAL(renameToolbar(const TQString&)),
- parent, TQT_SLOT(slotRenameToolbar(const TQString&)));
+ tqparent, TQT_SLOT(slotRenameToolbar(const TQString&)));
connect(this, TQT_SIGNAL(editToolbar(const TQString&)),
- parent, TQT_SLOT(slotConfigureToolbars(const TQString&)));
+ tqparent, TQT_SLOT(slotConfigureToolbars(const TQString&)));
connect(this, TQT_SIGNAL(newAction()),
- parent, TQT_SLOT(slotNewAction()));
+ tqparent, TQT_SLOT(slotNewAction()));
connect(this, TQT_SIGNAL(addToolbar()),
- parent, TQT_SLOT(slotAddToolbar()));
+ tqparent, TQT_SLOT(slotAddToolbar()));
KAcceleratorManager::setNoAccel(this);
}
void ToolbarTabWidget::insertTab(TQWidget *child, const TQString &label, const TQString &id)
{
- if (child->inherits("KToolBar") && child->parentWidget())
+ if (child->inherits("KToolBar") && child->tqparentWidget())
{
- TQTabWidget::insertTab(child->parentWidget(), label);
+ TQTabWidget::insertTab(child->tqparentWidget(), label);
toolbarList.insert(id, child);
}
}
@@ -78,7 +78,7 @@ TQWidget* ToolbarTabWidget::page(int index)
for (TQMap<TQString, TQWidget*>::Iterator it = toolbarList.begin(); it != toolbarList.end(); ++it)
{
- if (it.data()->parentWidget() == w)
+ if (it.data()->tqparentWidget() == w)
{
w = *it;
break;
@@ -92,7 +92,7 @@ TQString ToolbarTabWidget::id(TQWidget *w) const
TQString idStr;
for (TQMap<TQString, TQWidget*>::ConstIterator it = toolbarList.constBegin(); it != toolbarList.constEnd(); ++it)
{
- if (it.data()->parentWidget() == w)
+ if (it.data()->tqparentWidget() == w)
{
idStr = it.key();
break;
@@ -107,7 +107,7 @@ TQString ToolbarTabWidget::id(int index) const
TQString idStr;
for (TQMap<TQString, TQWidget*>::ConstIterator it = toolbarList.constBegin(); it != toolbarList.constEnd(); ++it)
{
- if (it.data()->parentWidget() == w)
+ if (it.data()->tqparentWidget() == w)
{
idStr = it.key();
break;
@@ -118,16 +118,16 @@ TQString ToolbarTabWidget::id(int index) const
TQWidget* ToolbarTabWidget::page(const TQString& id)
{
- TQWidget *w = toolbarList.find(id).data();
+ TQWidget *w = toolbarList.tqfind(id).data();
return w;
}
void ToolbarTabWidget::removePage(TQWidget * w)
{
- TQWidget *parent = w->parentWidget();
- if (w->inherits("KToolBar") && parent)
+ TQWidget *tqparent = w->tqparentWidget();
+ if (w->inherits("KToolBar") && tqparent)
{
- TQTabWidget::removePage(parent);
+ TQTabWidget::removePage(tqparent);
for (TQMap<TQString, TQWidget*>::ConstIterator it = toolbarList.constBegin(); it != toolbarList.constEnd(); ++it)
{
if (it.data() == w)
@@ -136,7 +136,7 @@ void ToolbarTabWidget::removePage(TQWidget * w)
break;
}
}
- delete parent;
+ delete tqparent;
}
}
@@ -169,7 +169,7 @@ void ToolbarTabWidget::mousePressEvent ( TQMouseEvent * e )
TQRect r = tab->rect();
TQPoint p1 = mapToGlobal(r.topLeft());
TQPoint p2 = mapToGlobal(r.bottomRight());
- if (TQRect(p1, p2).contains(p))
+ if (TQRect(p1, p2).tqcontains(p))
break;
else
tab = 0L;
@@ -179,7 +179,7 @@ void ToolbarTabWidget::mousePressEvent ( TQMouseEvent * e )
pageW = currentPage();
for (TQMap<TQString, TQWidget*>::Iterator it = toolbarList.begin(); it != toolbarList.end(); ++it)
{
- if (it.data()->parentWidget() == pageW)
+ if (it.data()->tqparentWidget() == pageW)
{
tabUnderMouse = it.key();
break;
@@ -223,11 +223,11 @@ int ToolbarTabWidget::tabHeight() const
}
-QuantaToolBar::QuantaToolBar(TQWidget *parent, const char *name, bool honor_style, bool readConfig)
-:KToolBar (parent, name=0, honor_style, readConfig)
+QuantaToolBar::QuantaToolBar(TQWidget *tqparent, const char *name, bool honor_style, bool readConfig)
+:KToolBar (tqparent, name=0, honor_style, readConfig)
{
m_popupMenu = new KPopupMenu(this);
- m_toolbarTab = dynamic_cast<ToolbarTabWidget*>(parent->parentWidget());
+ m_toolbarTab = dynamic_cast<ToolbarTabWidget*>(tqparent->tqparentWidget());
currentActionName = "";
m_iconTextMenu = new KPopupMenu(this);
m_iconTextMenu->setCheckable(true);
@@ -307,18 +307,18 @@ void QuantaToolBar::mousePressEvent(TQMouseEvent *e)
m_popupMenu->insertTitle(i18n("Toolbar Menu") + " - "
+ i18n(m_toolbarTab->tabUnderMouseLabel.utf8()));
m_popupMenu->insertItem(i18n("New Action..."), m_toolbarTab, TQT_SIGNAL(newAction()));
- TQObjectList* childrenList = queryList("KToolBarButton");
- for (uint i = 0; i < childrenList->count(); i++)
+ TQObjectList* tqchildrenList = queryList("KToolBarButton");
+ for (uint i = 0; i < tqchildrenList->count(); i++)
{
- KToolBarButton *w = static_cast<KToolBarButton*>(childrenList->at(i));
- TQPoint p1 = w->parentWidget()->mapToGlobal(w->pos());
+ KToolBarButton *w = static_cast<KToolBarButton*>(TQT_TQWIDGET(tqchildrenList->at(i)));
+ TQPoint p1 = w->tqparentWidget()->mapToGlobal(w->pos());
TQPoint p2 = TQPoint(p1.x() + w->width(), p1.y()+w->height());
- if (TQRect(p1, p2).contains(p))
+ if (TQRect(p1, p2).tqcontains(p))
{
currentActionName = w->textLabel();
TQString actionName = currentActionName;
- m_popupMenu->insertItem(i18n("Remove Action - %1").arg(actionName.replace('&',"&&")), this, TQT_SLOT(slotRemoveAction()));
- m_popupMenu->insertItem(i18n("Edit Action - %1").arg(actionName), this, TQT_SLOT(slotEditAction()));
+ m_popupMenu->insertItem(i18n("Remove Action - %1").tqarg(actionName.tqreplace('&',"&&")), this, TQT_SLOT(slotRemoveAction()));
+ m_popupMenu->insertItem(i18n("Edit Action - %1").tqarg(actionName), this, TQT_SLOT(slotEditAction()));
break;
}
}
@@ -341,7 +341,7 @@ void QuantaToolBar::slotEditAction()
void QuantaToolBar::slotRemoveAction()
{
- if ( KMessageBox::warningContinueCancel(this, i18n("<qt>Are you sure you want to remove the <b>%1</b> action?</qt>").arg(currentActionName),TQString::null,KStdGuiItem::del()) == KMessageBox::Continue )
+ if ( KMessageBox::warningContinueCancel(this, i18n("<qt>Are you sure you want to remove the <b>%1</b> action?</qt>").tqarg(currentActionName),TQString(),KStdGuiItem::del()) == KMessageBox::Continue )
{
emit removeAction(m_toolbarTab->tabUnderMouse, currentActionName);
}