summaryrefslogtreecommitdiffstats
path: root/tdeui/kdockwidget_private.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tdeui/kdockwidget_private.cpp')
-rw-r--r--tdeui/kdockwidget_private.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/tdeui/kdockwidget_private.cpp b/tdeui/kdockwidget_private.cpp
index a067efe2a..13e5a7ea6 100644
--- a/tdeui/kdockwidget_private.cpp
+++ b/tdeui/kdockwidget_private.cpp
@@ -61,10 +61,10 @@ void KDockSplitter::activate(TQWidget *c0, TQWidget *c1)
divider->setLineWidth(1);
divider->raise();
- if (m_orientation == Qt::Horizontal)
- divider->setCursor(TQCursor(tqsizeVerCursor));
+ if (m_orientation == TQt::Horizontal)
+ divider->setCursor(TQCursor(TQt::sizeVerCursor));
else
- divider->setCursor(TQCursor(tqsizeHorCursor));
+ divider->setCursor(TQCursor(TQt::sizeHorCursor));
divider->installEventFilter(this);
initialised= true;
@@ -173,7 +173,7 @@ void KDockSplitter::setupMinMaxSize()
{
// Set the minimum and maximum sizes for the KDockSplitter (this)
int minx, maxx, miny, maxy;
- if (m_orientation == Qt::Horizontal) {
+ if (m_orientation == TQt::Horizontal) {
miny = child0->minimumHeight() + child1->minimumHeight() + 4;
maxy = child0->maximumHeight() + child1->maximumHeight() + 4;
minx = (child0->minimumWidth() > child1->minimumWidth()) ? child0->minimumWidth() : child1->minimumWidth();
@@ -266,15 +266,15 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev)
//
if (ev && isVisible() && divider->isVisible()) {
// real resize event.
-// kdDebug(282)<<"mKeepSize : "<< ((m_orientation == Qt::Horizontal) ? "Horizontal":"Vertical") <<endl;
+// kdDebug(282)<<"mKeepSize : "<< ((m_orientation == TQt::Horizontal) ? "Horizontal":"Vertical") <<endl;
if (mKeepSize) {
// keep the splitter on a fixed position. This may be a bit inaccurate, because
// xpos saves a proportional value, which means there might occur rounding errors.
// However, this works surprising well!
- if (m_orientation == Qt::Horizontal) {
+ if (m_orientation == TQt::Horizontal) {
if (ev->oldSize().height() != ev->size().height()) {
- if( (c1->getWidget()) && (dc=tqt_dynamic_cast<KDockContainer*>(c1->getWidget()))) {
+ if( (c1->getWidget()) && (dc=dynamic_cast<KDockContainer*>(c1->getWidget()))) {
// dockwidget is on the bottom. move xpos so that the size from child1 stays
xpos = (int)ceil(((double)factor) * checkValue(height() - child1->height() - 4) / height());
} else {
@@ -286,7 +286,7 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev)
}
} else {
if (ev->oldSize().width() != width()) {
- if( (c1->getWidget()) && (dc=tqt_dynamic_cast<KDockContainer*>(c1->getWidget()))) {
+ if( (c1->getWidget()) && (dc=dynamic_cast<KDockContainer*>(c1->getWidget()))) {
xpos = (int)ceil(((double)factor) * checkValue(width() - child1->width() - 4) / width());
} else {
// xpos should not change
@@ -307,7 +307,7 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev)
// values.
//
if ( isVisible()) {
- if (m_orientation == Qt::Horizontal) {
+ if (m_orientation == TQt::Horizontal) {
if (fixedHeight0!=-1)
xpos = checkValue(fixedHeight0) * factor / height();
else if (fixedHeight1!=-1)
@@ -327,16 +327,16 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev)
/*
// --- debugging information ---
kdDebug(282) << "isVisible() is : " << isVisible() << endl;
- kdDebug(282) << "Orientation : " << (m_orientation==Qt::Horizontal?"Horizontal":"Vertical")
+ kdDebug(282) << "Orientation : " << (m_orientation==TQt::Horizontal?"Horizontal":"Vertical")
<< endl;
kdDebug(282) << "Splitter visibility : " << divider->isVisible() << endl;;
kdDebug(282) << "Splitter procentual pos: " << xpos << endl;
if (c0->getWidget()) {
- dc=tqt_dynamic_cast<KDockContainer*>(c0->getWidget());
+ dc=dynamic_cast<KDockContainer*>(c0->getWidget());
kdDebug(282) << "Child 0 KDockContainer?: " << dc << endl;
}
if (c1->getWidget()) {
- dc=tqt_dynamic_cast<KDockContainer*>(c1->getWidget());
+ dc=dynamic_cast<KDockContainer*>(c1->getWidget());
kdDebug(282) << "Child 1 KDockContainer?: " << dc << endl;
}
kdDebug(282) << "Child0 : " << child0 << endl;
@@ -346,16 +346,16 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev)
//
// handle overlapped widgets only.
//
- if( ( (m_orientation==Qt::Vertical) &&((fixedWidth0==-1) && (fixedWidth1==-1)) ) ||
- ( (m_orientation==Qt::Horizontal) &&((fixedHeight0==-1) && (fixedHeight1==-1)) ) ) {
- if ((c0->getWidget()) && (dc=tqt_dynamic_cast<KDockContainer*>(c0->getWidget()))
+ if( ( (m_orientation==TQt::Vertical) &&((fixedWidth0==-1) && (fixedWidth1==-1)) ) ||
+ ( (m_orientation==TQt::Horizontal) &&((fixedHeight0==-1) && (fixedHeight1==-1)) ) ) {
+ if ((c0->getWidget()) && (dc=dynamic_cast<KDockContainer*>(c0->getWidget()))
&& (dc->isOverlapMode())) {
// child0 ist a KDockContainer
int position;
child0->show();
child0->raise();
divider->raise();
- if (m_orientation == Qt::Horizontal) {
+ if (m_orientation == TQt::Horizontal) {
position = checkValueOverlapped( height() * xpos / factor, child0 );
child0->setGeometry(0, 0, width(), position);
child1->setGeometry(0, dc->m_nonOverlapSize, width(), height()-dc->m_nonOverlapSize);
@@ -367,14 +367,14 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev)
divider->setGeometry(position, 0, 4, height());
}
} else {
- if ((c1->getWidget()) && (dc=tqt_dynamic_cast<KDockContainer*>(c1->getWidget()))
+ if ((c1->getWidget()) && (dc=dynamic_cast<KDockContainer*>(c1->getWidget()))
&& (dc->isOverlapMode())) {
// child1 ist a KDockContainer
int position;
child1->show();
child1->raise();
divider->raise();
- if (m_orientation == Qt::Horizontal) {
+ if (m_orientation == TQt::Horizontal) {
position = checkValueOverlapped( height() * xpos / factor, child1 );
child0->setGeometry(0, 0, width(), height()-dc->m_nonOverlapSize);
child1->setGeometry(0, position+4, width(), height()-position-4);
@@ -399,11 +399,11 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev)
// the child0 and child1 adjoin.
//
if (stdHandling) {
- int position = checkValue( (m_orientation == Qt::Vertical ? width() : height()) * xpos / factor );
+ int position = checkValue( (m_orientation == TQt::Vertical ? width() : height()) * xpos / factor );
int diff = 0;
- if (m_orientation == Qt::Horizontal) {
- if ((c1->getWidget()) && (dc=tqt_dynamic_cast<KDockContainer*>(c1->getWidget()))) {
+ if (m_orientation == TQt::Horizontal) {
+ if ((c1->getWidget()) && (dc=dynamic_cast<KDockContainer*>(c1->getWidget()))) {
// bottom is dockcontainer
if( divider->isVisible() ) {
child0->setGeometry(0, 0, width(), position);
@@ -419,7 +419,7 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev)
}
divider->setGeometry(0, position, width(), 4);
} else {
- if ((c1->getWidget()) && (dc=tqt_dynamic_cast<KDockContainer*>(c1->getWidget()))) {
+ if ((c1->getWidget()) && (dc=dynamic_cast<KDockContainer*>(c1->getWidget()))) {
// right is dockcontainer
if( divider->isVisible() ) {
child0->setGeometry(0, 0, position, height());
@@ -442,7 +442,7 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev)
int KDockSplitter::checkValueOverlapped(int position, TQWidget *overlappingWidget) const
{
if (initialised) {
- if (m_orientation == Qt::Vertical) {
+ if (m_orientation == TQt::Vertical) {
if (child0==overlappingWidget) {
if (position < child0->minimumWidth() || position > width())
position = child0->minimumWidth();
@@ -450,7 +450,7 @@ int KDockSplitter::checkValueOverlapped(int position, TQWidget *overlappingWidge
if (position > (width()-child1->minimumWidth()-4) || position < 0)
position = width()-child1->minimumWidth()-4;
}
- } else {// orientation == Qt::Horizontal
+ } else {// orientation == TQt::Horizontal
if (child0==overlappingWidget) {
if (position < (child0->minimumHeight()) || position > height())
position = child0->minimumHeight();
@@ -466,7 +466,7 @@ int KDockSplitter::checkValueOverlapped(int position, TQWidget *overlappingWidge
int KDockSplitter::checkValue( int position ) const
{
if (initialised) {
- if (m_orientation == Qt::Vertical) {
+ if (m_orientation == TQt::Vertical) {
if (position < child0->minimumWidth())
position = child0->minimumWidth();
if ((width()-4-position) < (child1->minimumWidth()))
@@ -481,9 +481,9 @@ int KDockSplitter::checkValue( int position ) const
if (position < 0) position = 0;
- if ((m_orientation == Qt::Vertical) && (position > width()))
+ if ((m_orientation == TQt::Vertical) && (position > width()))
position = width();
- if ((m_orientation == Qt::Horizontal) && (position > height()))
+ if ((m_orientation == TQt::Horizontal) && (position > height()))
position = height();
return position;
@@ -499,7 +499,7 @@ bool KDockSplitter::eventFilter(TQObject *o, TQEvent *e)
mev= (TQMouseEvent*)e;
child0->setUpdatesEnabled(mOpaqueResize);
child1->setUpdatesEnabled(mOpaqueResize);
- if (m_orientation == Qt::Horizontal) {
+ if (m_orientation == TQt::Horizontal) {
if ((fixedHeight0!=-1) || (fixedHeight1!=-1))
{
handled=true; break;
@@ -539,7 +539,7 @@ bool KDockSplitter::eventFilter(TQObject *o, TQEvent *e)
child0->setUpdatesEnabled(true);
child1->setUpdatesEnabled(true);
mev= (TQMouseEvent*)e;
- if (m_orientation == Qt::Horizontal){
+ if (m_orientation == TQt::Horizontal){
if ((fixedHeight0!=-1) || (fixedHeight1!=-1))
{
handled=true; break;
@@ -625,7 +625,7 @@ KDockButton_Private::KDockButton_Private( TQWidget *parent, const char * name )
:TQPushButton( parent, name )
{
moveMouse = false;
- setFocusPolicy( TQ_NoFocus );
+ setFocusPolicy( TQWidget::NoFocus );
}
KDockButton_Private::~KDockButton_Private()
@@ -701,7 +701,7 @@ void KDockWidgetPrivate::slotFocusEmbeddedWidget(TQWidget* w)
{
if (w) {
TQWidget* embeddedWdg = ((KDockWidget*)w)->getWidget();
- if (embeddedWdg && ((embeddedWdg->focusPolicy() == TQ_ClickFocus) || (embeddedWdg->focusPolicy() == TQ_StrongFocus))) {
+ if (embeddedWdg && ((embeddedWdg->focusPolicy() == TQWidget::ClickFocus) || (embeddedWdg->focusPolicy() == TQWidget::StrongFocus))) {
embeddedWdg->setFocus();
}
}