summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opieui/big-screen/osplitter.cpp15
-rw-r--r--libopie2/opieui/big-screen/owidgetstack.cpp1
2 files changed, 0 insertions, 16 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
@@ -77,17 +77,16 @@ OSplitter::OSplitter( Orientation orient, QWidget* parent, const char* name, WFl
/**
* Destructor destructs this object and cleans up. All child
* widgets will be deleted
* @see addWidget
*/
OSplitter::~OSplitter()
{
- owarn << "Deleted Splitter" << oendl;
m_splitter.setAutoDelete( true );
m_splitter.clear();
delete m_hbox;
delete m_tabWidget;
}
@@ -205,20 +204,17 @@ void OSplitter::removeWidget( OSplitter* split)
* @param wid The widget which will be added
* @param icon The icon of the possible Tab
* @param label The label of the possible Tab
*/
void OSplitter::addWidget( QWidget* wid, const QString& icon, const QString& label )
{
#ifdef DEBUG
if (!wid )
- {
- owarn << "Widget is not valid!" << oendl;
return;
- }
#endif
OSplitterContainer cont;
cont.widget = wid;
cont.icon =icon;
cont.name = label;
m_container.append( cont );
@@ -362,36 +358,33 @@ QSize OSplitter::minimumSizeHint()const
* @reimplemented for internal reasons
*/
void OSplitter::resizeEvent( QResizeEvent* res )
{
QFrame::resizeEvent( res );
/*
*
*/
- // owarn << "Old size was width = " << res->oldSize().width() << " height = " << res->oldSize().height() << "" << oendl;
bool mode = true;
- owarn << "New size is width = " << res->size().width() << " height = " << res->size().height() << " " << name() << "" << oendl;
if ( res->size().width() > m_size_policy &&
m_orient == Horizontal )
{
changeHBox();
mode = false;
}
else if ( (res->size().width() <= m_size_policy &&
m_orient == Horizontal ) ||
(res->size().height() <= m_size_policy &&
m_orient == Vertical ) )
{
changeTab();
}
else if ( res->size().height() > m_size_policy &&
m_orient == Vertical )
{
- owarn << "Changng to vbox " << name() << "" << oendl;
changeVBox();
mode = false;
}
emit sizeChanged(mode, m_orient );
}
/*
@@ -440,17 +433,16 @@ void OSplitter::changeTab()
if (m_tabWidget )
{
raise();
show();
m_tabWidget->setGeometry( frameRect() );
return;
}
- owarn << " New Tab Widget " << name() << "" << oendl;
/*
* and add all widgets this will reparent them
* delete m_hbox set it to 0
*
*/
OTabWidget *tab;
if ( m_parentTab )
{
@@ -467,17 +459,16 @@ void OSplitter::changeTab()
else
tab = m_tabWidget = new OTabWidget( this );
connect(tab, SIGNAL(currentChanged(QWidget*) ),
this, SIGNAL(currentChanged(QWidget*) ) );
for ( ContainerList::Iterator it = m_container.begin(); it != m_container.end(); ++it )
{
- owarn << "Widget is " << (*it).name << "" << oendl;
addToTab( (*it) );
}
for ( OSplitter* split = m_splitter.first(); split; split = m_splitter.next() )
{
split->reparent(this, 0, QPoint(0, 0) );
split->setTabWidget( tab );
}
@@ -500,52 +491,47 @@ void OSplitter::changeTab()
void OSplitter::changeHBox()
{
if (m_hbox )
{
m_hbox->setGeometry( frameRect() );
return;
}
- owarn << "new HBox " << name() << "" << oendl;
m_hbox = new QHBox( this );
commonChangeBox();
}
void OSplitter::changeVBox()
{
if (m_hbox )
{
m_hbox->setGeometry( frameRect() );
return;
}
- owarn << "New VBOX " << name() << "" << oendl;
m_hbox = new QVBox( this );
commonChangeBox();
}
/*
* common box code
* first remove and add children
* the other splitters
* it is recursive as well due the call to setTabWidget
*/
void OSplitter::commonChangeBox()
{
- owarn << " Name of Splitters is " << name() << "" << oendl;
-
for (ContainerList::Iterator it = m_container.begin(); it != m_container.end(); ++it )
{
/* only if parent tab.. m_tabWidgets gets deleted and would do that as well */
if (m_parentTab )
removeFromTab( (*it).widget );
- owarn << "Adding to box " << (*it).name << "" << oendl;
addToBox( (*it) );
}
for ( OSplitter* split = m_splitter.first(); split; split = m_splitter.next() )
{
/* tell them the world had changed */
split->setTabWidget( 0 );
OSplitterContainer con;
con.widget = split;
@@ -555,17 +541,16 @@ void OSplitter::commonChangeBox()
}
if (m_parentTab )
m_parentTab->addTab(m_hbox, iconName(), label() );
else
{
- owarn << " setting Box geometry for " << name() << "" << oendl;
m_hbox->setGeometry( frameRect() );
m_hbox->show();
delete m_tabWidget;
m_tabWidget = 0;
show(); // also show this widget
}
}
diff --git a/libopie2/opieui/big-screen/owidgetstack.cpp b/libopie2/opieui/big-screen/owidgetstack.cpp
index 9c9f7ec..b14a643 100644
--- a/libopie2/opieui/big-screen/owidgetstack.cpp
+++ b/libopie2/opieui/big-screen/owidgetstack.cpp
@@ -305,17 +305,16 @@ void OWidgetStack::hideWidget( QWidget* wid) {
if ( m_mode == BigScreen && m_last != m_mWidget )
m_last->hide();
raiseWidget( wid );
}
bool OWidgetStack::eventFilter( QObject* obj, QEvent* e) {
- owarn << " " << obj->name() << " " << obj->className() << "" << oendl;
if ( e->type() == QEvent::Resize ) {
QResizeEvent *res = static_cast<QResizeEvent*>( e );
QSize size = res->size();
if ( size.width() >= mode_size )
switchTop();
else
switchStack();
}