summaryrefslogtreecommitdiffstats
path: root/kompare/komparepart/kompareconnectwidget.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:51:49 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:51:49 +0000
commit4ae0c208b66e0f7954e194384464fe2d0a2c56dd (patch)
treeb0a7cd1c184f0003c0292eb416ed27f674f9cc43 /kompare/komparepart/kompareconnectwidget.cpp
parent1964ea0fb4ab57493ca2ebb709c8d3b5395fd653 (diff)
downloadtdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.tar.gz
tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1157652 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kompare/komparepart/kompareconnectwidget.cpp')
-rw-r--r--kompare/komparepart/kompareconnectwidget.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/kompare/komparepart/kompareconnectwidget.cpp b/kompare/komparepart/kompareconnectwidget.cpp
index eed8e99c..57185e5a 100644
--- a/kompare/komparepart/kompareconnectwidget.cpp
+++ b/kompare/komparepart/kompareconnectwidget.cpp
@@ -19,11 +19,11 @@
* *
***************************************************************************/
-#include <qapplication.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qstyle.h>
-#include <qtimer.h>
+#include <tqapplication.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqstyle.h>
+#include <tqtimer.h>
#include <kdebug.h>
@@ -41,19 +41,19 @@ KompareConnectWidgetFrame::KompareConnectWidgetFrame( KompareListView* left,
ViewSettings* settings,
KompareSplitter* parent,
const char* name ) :
- QSplitterHandle(Horizontal, (QSplitter *)parent, name),
+ QSplitterHandle(Horizontal, (TQSplitter *)parent, name),
m_wid ( left, right, settings, this, name ),
m_label ( "", this ),
m_layout ( this )
{
- setSizePolicy ( QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Ignored) );
- m_wid.setSizePolicy ( QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored) );
- m_label.setSizePolicy ( QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed) );
+ setSizePolicy ( TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Ignored) );
+ m_wid.setSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored) );
+ m_label.setSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Fixed) );
m_label.setMargin(3);
- QFrame* bottomLine = new QFrame(this);
- bottomLine->setFrameShape(QFrame::HLine);
- bottomLine->setFrameShadow ( QFrame::Plain );
- bottomLine->setSizePolicy ( QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed) );
+ TQFrame* bottomLine = new TQFrame(this);
+ bottomLine->setFrameShape(TQFrame::HLine);
+ bottomLine->setFrameShadow ( TQFrame::Plain );
+ bottomLine->setSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Fixed) );
bottomLine->setFixedHeight(1);
m_layout.setSpacing(0);
m_layout.setMargin(0);
@@ -66,14 +66,14 @@ KompareConnectWidgetFrame::~KompareConnectWidgetFrame()
{
}
-QSize KompareConnectWidgetFrame::sizeHint() const
+TQSize KompareConnectWidgetFrame::sizeHint() const
{
- return QSize(50, style().pixelMetric( QStyle::PM_ScrollBarExtent ) );
+ return TQSize(50, style().pixelMetric( TQStyle::PM_ScrollBarExtent ) );
}
static int kMouseOffset;
-void KompareConnectWidgetFrame::mouseMoveEvent( QMouseEvent *e )
+void KompareConnectWidgetFrame::mouseMoveEvent( TQMouseEvent *e )
{
if ( !(e->state()&LeftButton) )
return;
@@ -84,14 +84,14 @@ void KompareConnectWidgetFrame::mouseMoveEvent( QMouseEvent *e )
((KompareSplitter*)s)->moveSplitter( pos, id() );
}
-void KompareConnectWidgetFrame::mousePressEvent( QMouseEvent *e )
+void KompareConnectWidgetFrame::mousePressEvent( TQMouseEvent *e )
{
if ( e->button() == LeftButton )
kMouseOffset = s->pick( e->pos() );
QSplitterHandle::mousePressEvent(e);
}
-void KompareConnectWidgetFrame::mouseReleaseEvent( QMouseEvent *e )
+void KompareConnectWidgetFrame::mouseReleaseEvent( TQMouseEvent *e )
{
if ( !opaque() && e->button() == LeftButton ) {
QCOORD pos = s->pick( parentWidget()->mapFromGlobal(e->globalPos()) )
@@ -101,17 +101,17 @@ void KompareConnectWidgetFrame::mouseReleaseEvent( QMouseEvent *e )
}
KompareConnectWidget::KompareConnectWidget( KompareListView* left, KompareListView* right,
- ViewSettings* settings, QWidget* parent, const char* name )
- : QWidget(parent, name),
+ ViewSettings* settings, TQWidget* parent, const char* name )
+ : TQWidget(parent, name),
m_settings( settings ),
m_leftView( left ),
m_rightView( right ),
m_selectedModel( 0 ),
m_selectedDifference( 0 )
{
-// connect( m_settings, SIGNAL( settingsChanged() ), this, SLOT( slotDelayedRepaint() ) );
+// connect( m_settings, TQT_SIGNAL( settingsChanged() ), this, TQT_SLOT( slotDelayedRepaint() ) );
setBackgroundMode( NoBackground );
- setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Minimum ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum ) );
setFocusProxy( parent->parentWidget() );
}
@@ -139,7 +139,7 @@ void KompareConnectWidget::slotSetSelection( const DiffModel* model, const Diffe
void KompareConnectWidget::slotDelayedRepaint()
{
- QTimer::singleShot( 0, this, SLOT( repaint() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( repaint() ) );
}
void KompareConnectWidget::slotSetSelection( const Difference* diff )
@@ -152,13 +152,13 @@ void KompareConnectWidget::slotSetSelection( const Difference* diff )
slotDelayedRepaint();
}
-void KompareConnectWidget::paintEvent( QPaintEvent* /* e */ )
+void KompareConnectWidget::paintEvent( TQPaintEvent* /* e */ )
{
// kdDebug(8106) << "KompareConnectWidget::paintEvent()" << endl;
- QPixmap pixbuf(size());
- QPainter paint(&pixbuf, this);
- QPainter* p = &paint;
+ TQPixmap pixbuf(size());
+ TQPainter paint(&pixbuf, this);
+ TQPainter* p = &paint;
p->fillRect( 0, 0, pixbuf.width(), pixbuf.height(), white.dark(110) );
@@ -181,14 +181,14 @@ void KompareConnectWidget::paintEvent( QPaintEvent* /* e */ )
DifferenceListConstIterator diffIt = differences->at( first );
DifferenceListConstIterator dEnd = differences->at( last + 1 );
- QRect leftRect, rightRect;
+ TQRect leftRect, rightRect;
for ( int i = first; i <= last; ++diffIt, ++i )
{
Difference* diff = *diffIt;
bool selected = ( diff == m_selectedDifference );
- if ( QApplication::reverseLayout() )
+ if ( TQApplication::reverseLayout() )
{
leftRect = m_rightView->itemRect( i );
rightRect = m_leftView->itemRect( i );
@@ -211,10 +211,10 @@ void KompareConnectWidget::paintEvent( QPaintEvent* /* e */ )
br = br <= 32767 ? br : 32767;
// kdDebug(8106) << "drawing: " << tl << " " << tr << " " << bl << " " << br << endl;
- QPointArray topBezier = makeTopBezier( tl, tr );
- QPointArray bottomBezier = makeBottomBezier( bl, br );
+ TQPointArray topBezier = makeTopBezier( tl, tr );
+ TQPointArray bottomBezier = makeBottomBezier( bl, br );
- QColor color = m_settings->colorForDifferenceType( diff->type(), selected, diff->applied() ).dark(110);
+ TQColor color = m_settings->colorForDifferenceType( diff->type(), selected, diff->applied() ).dark(110);
p->setPen( color );
p->setBrush( color );
p->drawPolygon ( makeConnectPoly( topBezier, bottomBezier ) );
@@ -233,12 +233,12 @@ void KompareConnectWidget::paintEvent( QPaintEvent* /* e */ )
bitBlt(this, 0, 0, &pixbuf);
}
-QPointArray KompareConnectWidget::makeTopBezier( int tl, int tr )
+TQPointArray KompareConnectWidget::makeTopBezier( int tl, int tr )
{
int l = 0;
int r = width();
int o = (int)((double)r*0.4); // 40% of width
- QPointArray controlPoints;
+ TQPointArray controlPoints;
if ( tl != tr )
{
@@ -252,12 +252,12 @@ QPointArray KompareConnectWidget::makeTopBezier( int tl, int tr )
}
}
-QPointArray KompareConnectWidget::makeBottomBezier( int bl, int br )
+TQPointArray KompareConnectWidget::makeBottomBezier( int bl, int br )
{
int l = 0;
int r = width();
int o = (int)((double)r*0.4); // 40% of width
- QPointArray controlPoints;
+ TQPointArray controlPoints;
if ( bl != br )
{
@@ -271,9 +271,9 @@ QPointArray KompareConnectWidget::makeBottomBezier( int bl, int br )
}
}
-QPointArray KompareConnectWidget::makeConnectPoly( const QPointArray& topBezier, const QPointArray& bottomBezier )
+TQPointArray KompareConnectWidget::makeConnectPoly( const TQPointArray& topBezier, const TQPointArray& bottomBezier )
{
- QPointArray poly( topBezier.size() + bottomBezier.size() );
+ TQPointArray poly( topBezier.size() + bottomBezier.size() );
for( uint i = 0; i < topBezier.size(); i++ )
poly.setPoint( i, topBezier.point( i ) );
for( uint i = 0; i < bottomBezier.size(); i++ )