Browse Source

Fix koffice FTBFS


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1247909 283d02a7-25f6-0310-bc7c-ecb5cbfe19
tags/v3.5.13
tpearson 7 years ago
parent
commit
2cdbd87e39
2 changed files with 35 additions and 35 deletions
  1. 33
    33
      kdgantt/KDGanttMinimizeSplitter.cpp
  2. 2
    2
      kdgantt/KDGanttMinimizeSplitter.h

+ 33
- 33
kdgantt/KDGanttMinimizeSplitter.cpp View File

@@ -284,7 +284,7 @@ void KDGanttSplitterHandle::paintEvent( TQPaintEvent * )
284 284
     bitBlt( this, 0, 0, &buffer );
285 285
 }
286 286
 
287
-class TQSplitterLayoutStruct
287
+class KDGanttSplitterLayoutStruct
288 288
 {
289 289
 public:
290 290
     KDGanttMinimizeSplitter::ResizeMode mode;
@@ -298,7 +298,7 @@ class TQSplitterData
298 298
 public:
299 299
     TQSplitterData() : opaque( FALSE ), firstShow( TRUE ) {}
300 300
 
301
-    TQPtrList<TQSplitterLayoutStruct> list;
301
+    TQPtrList<KDGanttSplitterLayoutStruct> list;
302 302
     bool opaque;
303 303
     bool firstShow;
304 304
 };
@@ -438,7 +438,7 @@ void KDGanttMinimizeSplitter::setOrientation( Qt::Orientation o )
438 438
     else
439 439
 	tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Expanding ) );
440 440
 
441
-    TQSplitterLayoutStruct *s = data->list.first();
441
+    KDGanttSplitterLayoutStruct *s = data->list.first();
442 442
     while ( s ) {
443 443
 	if ( s->isSplitter )
444 444
 	    ((KDGanttSplitterHandle*)s->wid)->setOrientation( o );
@@ -466,12 +466,12 @@ void KDGanttMinimizeSplitter::resizeEvent( TQResizeEvent * )
466 466
   needed.  (If \a first is TRUE, then recalcId is very probably
467 467
   needed.)
468 468
 */
469
-TQSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( TQWidget *w, bool first )
469
+KDGanttSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( TQWidget *w, bool first )
470 470
 {
471
-    TQSplitterLayoutStruct *s;
471
+    KDGanttSplitterLayoutStruct *s;
472 472
     KDGanttSplitterHandle *newHandle = 0;
473 473
     if ( data->list.count() > 0 ) {
474
-	s = new TQSplitterLayoutStruct;
474
+	s = new KDGanttSplitterLayoutStruct;
475 475
 	s->mode = KeepSize;
476 476
 	TQString tmp = "qt_splithandle_";
477 477
 	tmp += w->name();
@@ -485,7 +485,7 @@ TQSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( TQWidget *w, bool fi
485 485
 	else
486 486
 	    data->list.append( s );
487 487
     }
488
-    s = new TQSplitterLayoutStruct;
488
+    s = new KDGanttSplitterLayoutStruct;
489 489
     s->mode = Stretch;
490 490
     s->wid = w;
491 491
     if ( !testWState( WState_Resized ) && w->tqsizeHint().isValid() )
@@ -516,7 +516,7 @@ void KDGanttMinimizeSplitter::childEvent( TQChildEvent *c )
516 516
 	if ( ((TQWidget*)c->child())->testWFlags( WType_TopLevel ) )
517 517
 	    return;
518 518
 
519
-	TQSplitterLayoutStruct *s = data->list.first();
519
+	KDGanttSplitterLayoutStruct *s = data->list.first();
520 520
 	while ( s ) {
521 521
 	    if ( s->wid == c->child() )
522 522
 		return;
@@ -526,10 +526,10 @@ void KDGanttMinimizeSplitter::childEvent( TQChildEvent *c )
526 526
 	recalc( isVisible() );
527 527
 
528 528
     } else if ( c->type() == TQEvent::ChildRemoved ) {
529
-	TQSplitterLayoutStruct *p = 0;
529
+	KDGanttSplitterLayoutStruct *p = 0;
530 530
 	if ( data->list.count() > 1 )
531 531
 	    p = data->list.at(1); //remove handle _after_ first widget.
532
-	TQSplitterLayoutStruct *s = data->list.first();
532
+	KDGanttSplitterLayoutStruct *s = data->list.first();
533 533
 	while ( s ) {
534 534
 	    if ( s->wid == c->child() ) {
535 535
 		data->list.removeRef( s );
@@ -615,7 +615,7 @@ void KDGanttMinimizeSplitter::drawSplitter( TQPainter *p,
615 615
 */
616 616
 int KDGanttMinimizeSplitter::idAfter( TQWidget* w ) const
617 617
 {
618
-    TQSplitterLayoutStruct *s = data->list.first();
618
+    KDGanttSplitterLayoutStruct *s = data->list.first();
619 619
     bool seen_w = FALSE;
620 620
     while ( s ) {
621 621
 	if ( s->isSplitter && seen_w )
@@ -644,7 +644,7 @@ void KDGanttMinimizeSplitter::moveSplitter( TQCOORD p, int id )
644 644
 {
645 645
     p = adjustPos( p, id );
646 646
 
647
-    TQSplitterLayoutStruct *s = data->list.at(id);
647
+    KDGanttSplitterLayoutStruct *s = data->list.at(id);
648 648
     int oldP = orient ==Qt::Horizontal ? s->wid->x() : s->wid->y();
649 649
     bool upLeft;
650 650
     if ( TQApplication::reverseLayout() && orient ==Qt::Horizontal ) {
@@ -680,7 +680,7 @@ void KDGanttMinimizeSplitter::moveBefore( int pos, int id, bool upLeft )
680 680
 {
681 681
     if( id < 0 )
682 682
 	return;
683
-    TQSplitterLayoutStruct *s = data->list.at(id);
683
+    KDGanttSplitterLayoutStruct *s = data->list.at(id);
684 684
     if ( !s )
685 685
 	return;
686 686
     TQWidget *w = s->wid;
@@ -729,7 +729,7 @@ void KDGanttMinimizeSplitter::moveBefore( int pos, int id, bool upLeft )
729 729
 */
730 730
 void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft )
731 731
 {
732
-    TQSplitterLayoutStruct *s = id < int(data->list.count()) ?
732
+    KDGanttSplitterLayoutStruct *s = id < int(data->list.count()) ?
733 733
 			       data->list.at(id) : 0;
734 734
     if ( !s )
735 735
 	return;
@@ -781,7 +781,7 @@ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft )
781 781
 
782 782
 void KDGanttMinimizeSplitter::expandPos( int id, int*  min, int* max )
783 783
 {
784
-    TQSplitterLayoutStruct *s = data->list.at(id-1);
784
+    KDGanttSplitterLayoutStruct *s = data->list.at(id-1);
785 785
     TQWidget* w = s->wid;
786 786
     *min = pick( w->mapToParent( TQPoint(0,0) ) );
787 787
 
@@ -789,7 +789,7 @@ void KDGanttMinimizeSplitter::expandPos( int id, int*  min, int* max )
789 789
         pick( size() );
790 790
     }
791 791
     else {
792
-        TQSplitterLayoutStruct *s = data->list.at(id+1);
792
+        KDGanttSplitterLayoutStruct *s = data->list.at(id+1);
793 793
         TQWidget* w = s->wid;
794 794
         *max = pick( w->mapToParent( TQPoint( w->width(), w->height() ) ) ) -8;
795 795
     }
@@ -813,7 +813,7 @@ void KDGanttMinimizeSplitter::getRange( int id, int *min, int *max )
813 813
 	return;
814 814
     int i;
815 815
     for ( i = 0; i < id; i++ ) {
816
-	TQSplitterLayoutStruct *s = data->list.at(i);
816
+	KDGanttSplitterLayoutStruct *s = data->list.at(i);
817 817
 	if ( s->wid->isHidden() ) {
818 818
 	    //ignore
819 819
 	} else if ( s->isSplitter ) {
@@ -825,7 +825,7 @@ void KDGanttMinimizeSplitter::getRange( int id, int *min, int *max )
825 825
 	}
826 826
     }
827 827
     for ( i = id; i < n; i++ ) {
828
-	TQSplitterLayoutStruct *s = data->list.at(i);
828
+	KDGanttSplitterLayoutStruct *s = data->list.at(i);
829 829
 	if ( s->wid->isHidden() ) {
830 830
 	    //ignore
831 831
 	} else if ( s->isSplitter ) {
@@ -877,7 +877,7 @@ void KDGanttMinimizeSplitter::doResize()
877 877
     TQMemArray<TQLayoutStruct> a( n );
878 878
     for ( i = 0; i< n; i++ ) {
879 879
 	a[i].init();
880
-	TQSplitterLayoutStruct *s = data->list.at(i);
880
+	KDGanttSplitterLayoutStruct *s = data->list.at(i);
881 881
 	if ( s->wid->isHidden() ) {
882 882
 	    a[i].stretch = 0;
883 883
 	    a[i].tqsizeHint = a[i].tqminimumSize = 0;
@@ -908,7 +908,7 @@ void KDGanttMinimizeSplitter::doResize()
908 908
     kdganttGeomCalc( a, 0, n, pick( r.topLeft() ), pick( r.size() ), 0 );
909 909
 
910 910
     for ( i = 0; i< n; i++ ) {
911
-	TQSplitterLayoutStruct *s = data->list.at(i);
911
+	KDGanttSplitterLayoutStruct *s = data->list.at(i);
912 912
 	setG( s->wid, a[i].pos, a[i].size );
913 913
     }
914 914
 
@@ -930,9 +930,9 @@ void KDGanttMinimizeSplitter::recalc( bool update )
930 930
       The splitter before any other visible widget is visible.
931 931
     */
932 932
     for ( int i = 0; i< n; i++ ) {
933
-	TQSplitterLayoutStruct *s = data->list.at(i);
933
+	KDGanttSplitterLayoutStruct *s = data->list.at(i);
934 934
 	if ( !s->isSplitter ) {
935
-	    TQSplitterLayoutStruct *p = (i > 0) ? data->list.at( i-1 ) : 0;
935
+	    KDGanttSplitterLayoutStruct *p = (i > 0) ? data->list.at( i-1 ) : 0;
936 936
 	    if ( p && p->isSplitter )
937 937
 		if ( first || s->wid->isHidden() )
938 938
 		    p->wid->hide(); //may trigger new recalc
@@ -945,7 +945,7 @@ void KDGanttMinimizeSplitter::recalc( bool update )
945 945
 
946 946
     bool empty=TRUE;
947 947
     for ( int j = 0; j< n; j++ ) {
948
-	TQSplitterLayoutStruct *s = data->list.at(j);
948
+	KDGanttSplitterLayoutStruct *s = data->list.at(j);
949 949
 	if ( !s->wid->isHidden() ) {
950 950
 	    empty = FALSE;
951 951
 	    if ( s->isSplitter ) {
@@ -996,7 +996,7 @@ void KDGanttMinimizeSplitter::recalc( bool update )
996 996
 void KDGanttMinimizeSplitter::setResizeMode( TQWidget *w, ResizeMode mode )
997 997
 {
998 998
     processChildEvents();
999
-    TQSplitterLayoutStruct *s = data->list.first();
999
+    KDGanttSplitterLayoutStruct *s = data->list.first();
1000 1000
     while ( s ) {
1001 1001
 	if ( s->wid == w  ) {
1002 1002
 	    s->mode = mode;
@@ -1043,11 +1043,11 @@ void KDGanttMinimizeSplitter::moveToFirst( TQWidget *w )
1043 1043
 {
1044 1044
     processChildEvents();
1045 1045
     bool found = FALSE;
1046
-    TQSplitterLayoutStruct *s = data->list.first();
1046
+    KDGanttSplitterLayoutStruct *s = data->list.first();
1047 1047
     while ( s ) {
1048 1048
 	if ( s->wid == w  ) {
1049 1049
 	    found = TRUE;
1050
-	    TQSplitterLayoutStruct *p = data->list.prev();
1050
+	    KDGanttSplitterLayoutStruct *p = data->list.prev();
1051 1051
 	    if ( p ) { // not already at first place
1052 1052
 		data->list.take(); //take p
1053 1053
 		data->list.take(); // take s
@@ -1072,12 +1072,12 @@ void KDGanttMinimizeSplitter::moveToLast( TQWidget *w )
1072 1072
 {
1073 1073
     processChildEvents();
1074 1074
     bool found = FALSE;
1075
-    TQSplitterLayoutStruct *s = data->list.first();
1075
+    KDGanttSplitterLayoutStruct *s = data->list.first();
1076 1076
     while ( s ) {
1077 1077
 	if ( s->wid == w  ) {
1078 1078
 	    found = TRUE;
1079 1079
 	    data->list.take(); // take s
1080
-	    TQSplitterLayoutStruct *p = data->list.current();
1080
+	    KDGanttSplitterLayoutStruct *p = data->list.current();
1081 1081
 	    if ( p ) { // the splitter handle after s
1082 1082
 		data->list.take(); //take p
1083 1083
 		data->list.append( p );
@@ -1097,7 +1097,7 @@ void KDGanttMinimizeSplitter::recalcId()
1097 1097
 {
1098 1098
     int n = data->list.count();
1099 1099
     for ( int i = 0; i < n; i++ ) {
1100
-	TQSplitterLayoutStruct *s = data->list.at(i);
1100
+	KDGanttSplitterLayoutStruct *s = data->list.at(i);
1101 1101
 	if ( s->isSplitter )
1102 1102
 	    ((KDGanttSplitterHandle*)s->wid)->setId(i);
1103 1103
     }
@@ -1168,7 +1168,7 @@ TQSize KDGanttMinimizeSplitter::tqminimumSizeHint() const
1168 1168
 
1169 1169
 void KDGanttMinimizeSplitter::storeSizes()
1170 1170
 {
1171
-    TQSplitterLayoutStruct *s = data->list.first();
1171
+    KDGanttSplitterLayoutStruct *s = data->list.first();
1172 1172
     while ( s ) {
1173 1173
 	if ( !s->isSplitter )
1174 1174
 	    s->sizer = pick( s->wid->size() );
@@ -1253,7 +1253,7 @@ TQValueList<int> KDGanttMinimizeSplitter::sizes() const
1253 1253
 	that->polish();
1254 1254
     }
1255 1255
     TQValueList<int> list;
1256
-    TQSplitterLayoutStruct *s = data->list.first();
1256
+    KDGanttSplitterLayoutStruct *s = data->list.first();
1257 1257
     while ( s ) {
1258 1258
 	if ( !s->isSplitter )
1259 1259
 	    list.append( s->sizer );
@@ -1281,7 +1281,7 @@ void KDGanttMinimizeSplitter::setSizes( TQValueList<int> list )
1281 1281
 {
1282 1282
     processChildEvents();
1283 1283
     TQValueList<int>::Iterator it = list.begin();
1284
-    TQSplitterLayoutStruct *s = data->list.first();
1284
+    KDGanttSplitterLayoutStruct *s = data->list.first();
1285 1285
     while ( s && it != list.end() ) {
1286 1286
 	if ( !s->isSplitter ) {
1287 1287
 	    s->sizer = *it;
@@ -1311,7 +1311,7 @@ void KDGanttMinimizeSplitter::processChildEvents()
1311 1311
 void KDGanttMinimizeSplitter::styleChange( TQStyle& old )
1312 1312
 {
1313 1313
     int sw = tqstyle().tqpixelMetric(TQStyle::PM_SplitterWidth, this);
1314
-    TQSplitterLayoutStruct *s = data->list.first();
1314
+    KDGanttSplitterLayoutStruct *s = data->list.first();
1315 1315
     while ( s ) {
1316 1316
 	if ( s->isSplitter )
1317 1317
 	    s->sizer = sw;

+ 2
- 2
kdgantt/KDGanttMinimizeSplitter.h View File

@@ -42,7 +42,7 @@
42 42
 #ifndef TQT_NO_SPLITTER
43 43
 
44 44
 class TQSplitterData;
45
-class TQSplitterLayoutStruct;
45
+class KDGanttSplitterLayoutStruct;
46 46
 
47 47
 class KDGanttMinimizeSplitter : public TQFrame
48 48
 {
@@ -103,7 +103,7 @@ private:
103 103
     void doResize();
104 104
     void storeSizes();
105 105
     void processChildEvents();
106
-    TQSplitterLayoutStruct *addWidget( TQWidget*, bool first = FALSE );
106
+    KDGanttSplitterLayoutStruct *addWidget( TQWidget*, bool first = FALSE );
107 107
     void recalcId();
108 108
     void moveBefore( int pos, int id, bool upLeft );
109 109
     void moveAfter( int pos, int id, bool upLeft );

Loading…
Cancel
Save