author | zecke <zecke> | 2004-11-11 22:00:18 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-11-11 22:00:18 (UTC) |
commit | b81a7aeacda23d4407cd88ee017b67ea48344a94 (patch) (unidiff) | |
tree | eda86d8db6cca3608cf12a298765f468bceed030 /libopie2/opieui/big-screen/osplitter.cpp | |
parent | d2d25a3c1e60a34436cd93e5214a35b3edd05c6c (diff) | |
download | opie-b81a7aeacda23d4407cd88ee017b67ea48344a94.zip opie-b81a7aeacda23d4407cd88ee017b67ea48344a94.tar.gz opie-b81a7aeacda23d4407cd88ee017b67ea48344a94.tar.bz2 |
Remove owarn to be less verbose
Diffstat (limited to 'libopie2/opieui/big-screen/osplitter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opieui/big-screen/osplitter.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/libopie2/opieui/big-screen/osplitter.cpp b/libopie2/opieui/big-screen/osplitter.cpp index f50e7f0..78e919a 100644 --- a/libopie2/opieui/big-screen/osplitter.cpp +++ b/libopie2/opieui/big-screen/osplitter.cpp | |||
@@ -79,13 +79,12 @@ OSplitter::OSplitter( Orientation orient, QWidget* parent, const char* name, WFl | |||
79 | * Destructor destructs this object and cleans up. All child | 79 | * Destructor destructs this object and cleans up. All child |
80 | * widgets will be deleted | 80 | * widgets will be deleted |
81 | * @see addWidget | 81 | * @see addWidget |
82 | */ | 82 | */ |
83 | OSplitter::~OSplitter() | 83 | OSplitter::~OSplitter() |
84 | { | 84 | { |
85 | owarn << "Deleted Splitter" << oendl; | ||
86 | m_splitter.setAutoDelete( true ); | 85 | m_splitter.setAutoDelete( true ); |
87 | m_splitter.clear(); | 86 | m_splitter.clear(); |
88 | 87 | ||
89 | delete m_hbox; | 88 | delete m_hbox; |
90 | delete m_tabWidget; | 89 | delete m_tabWidget; |
91 | } | 90 | } |
@@ -207,16 +206,13 @@ void OSplitter::removeWidget( OSplitter* split) | |||
207 | * @param label The label of the possible Tab | 206 | * @param label The label of the possible Tab |
208 | */ | 207 | */ |
209 | void OSplitter::addWidget( QWidget* wid, const QString& icon, const QString& label ) | 208 | void OSplitter::addWidget( QWidget* wid, const QString& icon, const QString& label ) |
210 | { | 209 | { |
211 | #ifdef DEBUG | 210 | #ifdef DEBUG |
212 | if (!wid ) | 211 | if (!wid ) |
213 | { | ||
214 | owarn << "Widget is not valid!" << oendl; | ||
215 | return; | 212 | return; |
216 | } | ||
217 | #endif | 213 | #endif |
218 | OSplitterContainer cont; | 214 | OSplitterContainer cont; |
219 | cont.widget = wid; | 215 | cont.widget = wid; |
220 | cont.icon =icon; | 216 | cont.icon =icon; |
221 | cont.name = label; | 217 | cont.name = label; |
222 | 218 | ||
@@ -364,15 +360,13 @@ QSize OSplitter::minimumSizeHint()const | |||
364 | void OSplitter::resizeEvent( QResizeEvent* res ) | 360 | void OSplitter::resizeEvent( QResizeEvent* res ) |
365 | { | 361 | { |
366 | QFrame::resizeEvent( res ); | 362 | QFrame::resizeEvent( res ); |
367 | /* | 363 | /* |
368 | * | 364 | * |
369 | */ | 365 | */ |
370 | // owarn << "Old size was width = " << res->oldSize().width() << " height = " << res->oldSize().height() << "" << oendl; | ||
371 | bool mode = true; | 366 | bool mode = true; |
372 | owarn << "New size is width = " << res->size().width() << " height = " << res->size().height() << " " << name() << "" << oendl; | ||
373 | if ( res->size().width() > m_size_policy && | 367 | if ( res->size().width() > m_size_policy && |
374 | m_orient == Horizontal ) | 368 | m_orient == Horizontal ) |
375 | { | 369 | { |
376 | changeHBox(); | 370 | changeHBox(); |
377 | mode = false; | 371 | mode = false; |
378 | } | 372 | } |
@@ -383,13 +377,12 @@ void OSplitter::resizeEvent( QResizeEvent* res ) | |||
383 | { | 377 | { |
384 | changeTab(); | 378 | changeTab(); |
385 | } | 379 | } |
386 | else if ( res->size().height() > m_size_policy && | 380 | else if ( res->size().height() > m_size_policy && |
387 | m_orient == Vertical ) | 381 | m_orient == Vertical ) |
388 | { | 382 | { |
389 | owarn << "Changng to vbox " << name() << "" << oendl; | ||
390 | changeVBox(); | 383 | changeVBox(); |
391 | mode = false; | 384 | mode = false; |
392 | } | 385 | } |
393 | 386 | ||
394 | emit sizeChanged(mode, m_orient ); | 387 | emit sizeChanged(mode, m_orient ); |
395 | } | 388 | } |
@@ -442,13 +435,12 @@ void OSplitter::changeTab() | |||
442 | raise(); | 435 | raise(); |
443 | show(); | 436 | show(); |
444 | m_tabWidget->setGeometry( frameRect() ); | 437 | m_tabWidget->setGeometry( frameRect() ); |
445 | return; | 438 | return; |
446 | } | 439 | } |
447 | 440 | ||
448 | owarn << " New Tab Widget " << name() << "" << oendl; | ||
449 | /* | 441 | /* |
450 | * and add all widgets this will reparent them | 442 | * and add all widgets this will reparent them |
451 | * delete m_hbox set it to 0 | 443 | * delete m_hbox set it to 0 |
452 | * | 444 | * |
453 | */ | 445 | */ |
454 | OTabWidget *tab; | 446 | OTabWidget *tab; |
@@ -469,13 +461,12 @@ void OSplitter::changeTab() | |||
469 | 461 | ||
470 | connect(tab, SIGNAL(currentChanged(QWidget*) ), | 462 | connect(tab, SIGNAL(currentChanged(QWidget*) ), |
471 | this, SIGNAL(currentChanged(QWidget*) ) ); | 463 | this, SIGNAL(currentChanged(QWidget*) ) ); |
472 | 464 | ||
473 | for ( ContainerList::Iterator it = m_container.begin(); it != m_container.end(); ++it ) | 465 | for ( ContainerList::Iterator it = m_container.begin(); it != m_container.end(); ++it ) |
474 | { | 466 | { |
475 | owarn << "Widget is " << (*it).name << "" << oendl; | ||
476 | addToTab( (*it) ); | 467 | addToTab( (*it) ); |
477 | } | 468 | } |
478 | 469 | ||
479 | for ( OSplitter* split = m_splitter.first(); split; split = m_splitter.next() ) | 470 | for ( OSplitter* split = m_splitter.first(); split; split = m_splitter.next() ) |
480 | { | 471 | { |
481 | split->reparent(this, 0, QPoint(0, 0) ); | 472 | split->reparent(this, 0, QPoint(0, 0) ); |
@@ -502,26 +493,24 @@ void OSplitter::changeHBox() | |||
502 | if (m_hbox ) | 493 | if (m_hbox ) |
503 | { | 494 | { |
504 | m_hbox->setGeometry( frameRect() ); | 495 | m_hbox->setGeometry( frameRect() ); |
505 | return; | 496 | return; |
506 | } | 497 | } |
507 | 498 | ||
508 | owarn << "new HBox " << name() << "" << oendl; | ||
509 | m_hbox = new QHBox( this ); | 499 | m_hbox = new QHBox( this ); |
510 | commonChangeBox(); | 500 | commonChangeBox(); |
511 | } | 501 | } |
512 | 502 | ||
513 | void OSplitter::changeVBox() | 503 | void OSplitter::changeVBox() |
514 | { | 504 | { |
515 | if (m_hbox ) | 505 | if (m_hbox ) |
516 | { | 506 | { |
517 | m_hbox->setGeometry( frameRect() ); | 507 | m_hbox->setGeometry( frameRect() ); |
518 | return; | 508 | return; |
519 | } | 509 | } |
520 | 510 | ||
521 | owarn << "New VBOX " << name() << "" << oendl; | ||
522 | m_hbox = new QVBox( this ); | 511 | m_hbox = new QVBox( this ); |
523 | 512 | ||
524 | commonChangeBox(); | 513 | commonChangeBox(); |
525 | 514 | ||
526 | } | 515 | } |
527 | 516 | ||
@@ -530,20 +519,17 @@ void OSplitter::changeVBox() | |||
530 | * first remove and add children | 519 | * first remove and add children |
531 | * the other splitters | 520 | * the other splitters |
532 | * it is recursive as well due the call to setTabWidget | 521 | * it is recursive as well due the call to setTabWidget |
533 | */ | 522 | */ |
534 | void OSplitter::commonChangeBox() | 523 | void OSplitter::commonChangeBox() |
535 | { | 524 | { |
536 | owarn << " Name of Splitters is " << name() << "" << oendl; | ||
537 | |||
538 | for (ContainerList::Iterator it = m_container.begin(); it != m_container.end(); ++it ) | 525 | for (ContainerList::Iterator it = m_container.begin(); it != m_container.end(); ++it ) |
539 | { | 526 | { |
540 | /* only if parent tab.. m_tabWidgets gets deleted and would do that as well */ | 527 | /* only if parent tab.. m_tabWidgets gets deleted and would do that as well */ |
541 | if (m_parentTab ) | 528 | if (m_parentTab ) |
542 | removeFromTab( (*it).widget ); | 529 | removeFromTab( (*it).widget ); |
543 | owarn << "Adding to box " << (*it).name << "" << oendl; | ||
544 | addToBox( (*it) ); | 530 | addToBox( (*it) ); |
545 | } | 531 | } |
546 | for ( OSplitter* split = m_splitter.first(); split; split = m_splitter.next() ) | 532 | for ( OSplitter* split = m_splitter.first(); split; split = m_splitter.next() ) |
547 | { | 533 | { |
548 | /* tell them the world had changed */ | 534 | /* tell them the world had changed */ |
549 | split->setTabWidget( 0 ); | 535 | split->setTabWidget( 0 ); |
@@ -557,13 +543,12 @@ void OSplitter::commonChangeBox() | |||
557 | 543 | ||
558 | 544 | ||
559 | if (m_parentTab ) | 545 | if (m_parentTab ) |
560 | m_parentTab->addTab(m_hbox, iconName(), label() ); | 546 | m_parentTab->addTab(m_hbox, iconName(), label() ); |
561 | else | 547 | else |
562 | { | 548 | { |
563 | owarn << " setting Box geometry for " << name() << "" << oendl; | ||
564 | m_hbox->setGeometry( frameRect() ); | 549 | m_hbox->setGeometry( frameRect() ); |
565 | m_hbox->show(); | 550 | m_hbox->show(); |
566 | delete m_tabWidget; | 551 | delete m_tabWidget; |
567 | m_tabWidget = 0; | 552 | m_tabWidget = 0; |
568 | show(); // also show this widget | 553 | show(); // also show this widget |
569 | } | 554 | } |