summaryrefslogtreecommitdiffstats
path: root/kdgantt/KDGanttMinimizeSplitter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdgantt/KDGanttMinimizeSplitter.cpp')
-rw-r--r--kdgantt/KDGanttMinimizeSplitter.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/kdgantt/KDGanttMinimizeSplitter.cpp b/kdgantt/KDGanttMinimizeSplitter.cpp
index b965be25..75c52583 100644
--- a/kdgantt/KDGanttMinimizeSplitter.cpp
+++ b/kdgantt/KDGanttMinimizeSplitter.cpp
@@ -284,7 +284,7 @@ void KDGanttSplitterHandle::paintEvent( TQPaintEvent * )
bitBlt( this, 0, 0, &buffer );
}
-class TQSplitterLayoutStruct
+class KDGanttSplitterLayoutStruct
{
public:
KDGanttMinimizeSplitter::ResizeMode mode;
@@ -298,7 +298,7 @@ class TQSplitterData
public:
TQSplitterData() : opaque( FALSE ), firstShow( TRUE ) {}
- TQPtrList<TQSplitterLayoutStruct> list;
+ TQPtrList<KDGanttSplitterLayoutStruct> list;
bool opaque;
bool firstShow;
};
@@ -438,7 +438,7 @@ void KDGanttMinimizeSplitter::setOrientation( Qt::Orientation o )
else
tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Expanding ) );
- TQSplitterLayoutStruct *s = data->list.first();
+ KDGanttSplitterLayoutStruct *s = data->list.first();
while ( s ) {
if ( s->isSplitter )
((KDGanttSplitterHandle*)s->wid)->setOrientation( o );
@@ -466,12 +466,12 @@ void KDGanttMinimizeSplitter::resizeEvent( TQResizeEvent * )
needed. (If \a first is TRUE, then recalcId is very probably
needed.)
*/
-TQSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( TQWidget *w, bool first )
+KDGanttSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( TQWidget *w, bool first )
{
- TQSplitterLayoutStruct *s;
+ KDGanttSplitterLayoutStruct *s;
KDGanttSplitterHandle *newHandle = 0;
if ( data->list.count() > 0 ) {
- s = new TQSplitterLayoutStruct;
+ s = new KDGanttSplitterLayoutStruct;
s->mode = KeepSize;
TQString tmp = "qt_splithandle_";
tmp += w->name();
@@ -485,7 +485,7 @@ TQSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( TQWidget *w, bool fi
else
data->list.append( s );
}
- s = new TQSplitterLayoutStruct;
+ s = new KDGanttSplitterLayoutStruct;
s->mode = Stretch;
s->wid = w;
if ( !testWState( WState_Resized ) && w->tqsizeHint().isValid() )
@@ -516,7 +516,7 @@ void KDGanttMinimizeSplitter::childEvent( TQChildEvent *c )
if ( ((TQWidget*)c->child())->testWFlags( WType_TopLevel ) )
return;
- TQSplitterLayoutStruct *s = data->list.first();
+ KDGanttSplitterLayoutStruct *s = data->list.first();
while ( s ) {
if ( s->wid == c->child() )
return;
@@ -526,10 +526,10 @@ void KDGanttMinimizeSplitter::childEvent( TQChildEvent *c )
recalc( isVisible() );
} else if ( c->type() == TQEvent::ChildRemoved ) {
- TQSplitterLayoutStruct *p = 0;
+ KDGanttSplitterLayoutStruct *p = 0;
if ( data->list.count() > 1 )
p = data->list.at(1); //remove handle _after_ first widget.
- TQSplitterLayoutStruct *s = data->list.first();
+ KDGanttSplitterLayoutStruct *s = data->list.first();
while ( s ) {
if ( s->wid == c->child() ) {
data->list.removeRef( s );
@@ -615,7 +615,7 @@ void KDGanttMinimizeSplitter::drawSplitter( TQPainter *p,
*/
int KDGanttMinimizeSplitter::idAfter( TQWidget* w ) const
{
- TQSplitterLayoutStruct *s = data->list.first();
+ KDGanttSplitterLayoutStruct *s = data->list.first();
bool seen_w = FALSE;
while ( s ) {
if ( s->isSplitter && seen_w )
@@ -644,7 +644,7 @@ void KDGanttMinimizeSplitter::moveSplitter( TQCOORD p, int id )
{
p = adjustPos( p, id );
- TQSplitterLayoutStruct *s = data->list.at(id);
+ KDGanttSplitterLayoutStruct *s = data->list.at(id);
int oldP = orient ==Qt::Horizontal ? s->wid->x() : s->wid->y();
bool upLeft;
if ( TQApplication::reverseLayout() && orient ==Qt::Horizontal ) {
@@ -680,7 +680,7 @@ void KDGanttMinimizeSplitter::moveBefore( int pos, int id, bool upLeft )
{
if( id < 0 )
return;
- TQSplitterLayoutStruct *s = data->list.at(id);
+ KDGanttSplitterLayoutStruct *s = data->list.at(id);
if ( !s )
return;
TQWidget *w = s->wid;
@@ -729,7 +729,7 @@ void KDGanttMinimizeSplitter::moveBefore( int pos, int id, bool upLeft )
*/
void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft )
{
- TQSplitterLayoutStruct *s = id < int(data->list.count()) ?
+ KDGanttSplitterLayoutStruct *s = id < int(data->list.count()) ?
data->list.at(id) : 0;
if ( !s )
return;
@@ -781,7 +781,7 @@ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft )
void KDGanttMinimizeSplitter::expandPos( int id, int* min, int* max )
{
- TQSplitterLayoutStruct *s = data->list.at(id-1);
+ KDGanttSplitterLayoutStruct *s = data->list.at(id-1);
TQWidget* w = s->wid;
*min = pick( w->mapToParent( TQPoint(0,0) ) );
@@ -789,7 +789,7 @@ void KDGanttMinimizeSplitter::expandPos( int id, int* min, int* max )
pick( size() );
}
else {
- TQSplitterLayoutStruct *s = data->list.at(id+1);
+ KDGanttSplitterLayoutStruct *s = data->list.at(id+1);
TQWidget* w = s->wid;
*max = pick( w->mapToParent( TQPoint( w->width(), w->height() ) ) ) -8;
}
@@ -813,7 +813,7 @@ void KDGanttMinimizeSplitter::getRange( int id, int *min, int *max )
return;
int i;
for ( i = 0; i < id; i++ ) {
- TQSplitterLayoutStruct *s = data->list.at(i);
+ KDGanttSplitterLayoutStruct *s = data->list.at(i);
if ( s->wid->isHidden() ) {
//ignore
} else if ( s->isSplitter ) {
@@ -825,7 +825,7 @@ void KDGanttMinimizeSplitter::getRange( int id, int *min, int *max )
}
}
for ( i = id; i < n; i++ ) {
- TQSplitterLayoutStruct *s = data->list.at(i);
+ KDGanttSplitterLayoutStruct *s = data->list.at(i);
if ( s->wid->isHidden() ) {
//ignore
} else if ( s->isSplitter ) {
@@ -877,7 +877,7 @@ void KDGanttMinimizeSplitter::doResize()
TQMemArray<TQLayoutStruct> a( n );
for ( i = 0; i< n; i++ ) {
a[i].init();
- TQSplitterLayoutStruct *s = data->list.at(i);
+ KDGanttSplitterLayoutStruct *s = data->list.at(i);
if ( s->wid->isHidden() ) {
a[i].stretch = 0;
a[i].tqsizeHint = a[i].tqminimumSize = 0;
@@ -908,7 +908,7 @@ void KDGanttMinimizeSplitter::doResize()
kdganttGeomCalc( a, 0, n, pick( r.topLeft() ), pick( r.size() ), 0 );
for ( i = 0; i< n; i++ ) {
- TQSplitterLayoutStruct *s = data->list.at(i);
+ KDGanttSplitterLayoutStruct *s = data->list.at(i);
setG( s->wid, a[i].pos, a[i].size );
}
@@ -930,9 +930,9 @@ void KDGanttMinimizeSplitter::recalc( bool update )
The splitter before any other visible widget is visible.
*/
for ( int i = 0; i< n; i++ ) {
- TQSplitterLayoutStruct *s = data->list.at(i);
+ KDGanttSplitterLayoutStruct *s = data->list.at(i);
if ( !s->isSplitter ) {
- TQSplitterLayoutStruct *p = (i > 0) ? data->list.at( i-1 ) : 0;
+ KDGanttSplitterLayoutStruct *p = (i > 0) ? data->list.at( i-1 ) : 0;
if ( p && p->isSplitter )
if ( first || s->wid->isHidden() )
p->wid->hide(); //may trigger new recalc
@@ -945,7 +945,7 @@ void KDGanttMinimizeSplitter::recalc( bool update )
bool empty=TRUE;
for ( int j = 0; j< n; j++ ) {
- TQSplitterLayoutStruct *s = data->list.at(j);
+ KDGanttSplitterLayoutStruct *s = data->list.at(j);
if ( !s->wid->isHidden() ) {
empty = FALSE;
if ( s->isSplitter ) {
@@ -996,7 +996,7 @@ void KDGanttMinimizeSplitter::recalc( bool update )
void KDGanttMinimizeSplitter::setResizeMode( TQWidget *w, ResizeMode mode )
{
processChildEvents();
- TQSplitterLayoutStruct *s = data->list.first();
+ KDGanttSplitterLayoutStruct *s = data->list.first();
while ( s ) {
if ( s->wid == w ) {
s->mode = mode;
@@ -1043,11 +1043,11 @@ void KDGanttMinimizeSplitter::moveToFirst( TQWidget *w )
{
processChildEvents();
bool found = FALSE;
- TQSplitterLayoutStruct *s = data->list.first();
+ KDGanttSplitterLayoutStruct *s = data->list.first();
while ( s ) {
if ( s->wid == w ) {
found = TRUE;
- TQSplitterLayoutStruct *p = data->list.prev();
+ KDGanttSplitterLayoutStruct *p = data->list.prev();
if ( p ) { // not already at first place
data->list.take(); //take p
data->list.take(); // take s
@@ -1072,12 +1072,12 @@ void KDGanttMinimizeSplitter::moveToLast( TQWidget *w )
{
processChildEvents();
bool found = FALSE;
- TQSplitterLayoutStruct *s = data->list.first();
+ KDGanttSplitterLayoutStruct *s = data->list.first();
while ( s ) {
if ( s->wid == w ) {
found = TRUE;
data->list.take(); // take s
- TQSplitterLayoutStruct *p = data->list.current();
+ KDGanttSplitterLayoutStruct *p = data->list.current();
if ( p ) { // the splitter handle after s
data->list.take(); //take p
data->list.append( p );
@@ -1097,7 +1097,7 @@ void KDGanttMinimizeSplitter::recalcId()
{
int n = data->list.count();
for ( int i = 0; i < n; i++ ) {
- TQSplitterLayoutStruct *s = data->list.at(i);
+ KDGanttSplitterLayoutStruct *s = data->list.at(i);
if ( s->isSplitter )
((KDGanttSplitterHandle*)s->wid)->setId(i);
}
@@ -1168,7 +1168,7 @@ TQSize KDGanttMinimizeSplitter::tqminimumSizeHint() const
void KDGanttMinimizeSplitter::storeSizes()
{
- TQSplitterLayoutStruct *s = data->list.first();
+ KDGanttSplitterLayoutStruct *s = data->list.first();
while ( s ) {
if ( !s->isSplitter )
s->sizer = pick( s->wid->size() );
@@ -1253,7 +1253,7 @@ TQValueList<int> KDGanttMinimizeSplitter::sizes() const
that->polish();
}
TQValueList<int> list;
- TQSplitterLayoutStruct *s = data->list.first();
+ KDGanttSplitterLayoutStruct *s = data->list.first();
while ( s ) {
if ( !s->isSplitter )
list.append( s->sizer );
@@ -1281,7 +1281,7 @@ void KDGanttMinimizeSplitter::setSizes( TQValueList<int> list )
{
processChildEvents();
TQValueList<int>::Iterator it = list.begin();
- TQSplitterLayoutStruct *s = data->list.first();
+ KDGanttSplitterLayoutStruct *s = data->list.first();
while ( s && it != list.end() ) {
if ( !s->isSplitter ) {
s->sizer = *it;
@@ -1311,7 +1311,7 @@ void KDGanttMinimizeSplitter::processChildEvents()
void KDGanttMinimizeSplitter::styleChange( TQStyle& old )
{
int sw = tqstyle().tqpixelMetric(TQStyle::PM_SplitterWidth, this);
- TQSplitterLayoutStruct *s = data->list.first();
+ KDGanttSplitterLayoutStruct *s = data->list.first();
while ( s ) {
if ( s->isSplitter )
s->sizer = sw;