summaryrefslogtreecommitdiff
path: root/libopie/big-screen/osplitter.cpp
Side-by-side diff
Diffstat (limited to 'libopie/big-screen/osplitter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/big-screen/osplitter.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/libopie/big-screen/osplitter.cpp b/libopie/big-screen/osplitter.cpp
index b09bc94..0c9ed6c 100644
--- a/libopie/big-screen/osplitter.cpp
+++ b/libopie/big-screen/osplitter.cpp
@@ -285,73 +285,73 @@ void OSplitter::setCurrentWidget( const QString& label ) {
/**
* This will only work when the TabWidget is active
* If everything is visible this signal is kindly ignored
* @see OTabWidget::setCurrentTab(int)
*
* @param tab The tab to make current
*/
void OSplitter::setCurrentWidget( int tab ) {
if (m_tabWidget )
m_tabWidget->setCurrentTab( tab );
}
/**
* return the currently activated widget if in tab widget mode
* or null because all widgets are visible
*/
QWidget* OSplitter::currentWidget() const{
if (m_tabWidget)
return m_tabWidget->currentWidget();
else if (m_parentTab )
return m_parentTab->currentWidget();
return 0l;
}
-
-
+/* wrong */
+#if 0
/**
* @reimplented for internal reasons
* returns the sizeHint of one of its sub widgets
*/
QSize OSplitter::sizeHint()const {
if (m_parentTab )
return QFrame::sizeHint();
if (m_hbox )
return m_hbox->sizeHint();
else
return m_tabWidget->sizeHint();
}
QSize OSplitter::minimumSizeHint()const {
if (m_parentTab )
return QFrame::minimumSizeHint();
if (m_hbox)
return m_hbox->sizeHint();
else
return m_tabWidget->sizeHint();
}
-
+#endif
/**
* @reimplemented for internal reasons
*/
void OSplitter::resizeEvent( QResizeEvent* res ) {
QFrame::resizeEvent( res );
/*
*
*/
// qWarning("Old size was width = %d height = %d", res->oldSize().width(), res->oldSize().height() );
bool mode = true;
qWarning("New size is width = %d height = %d %s", res->size().width(), res->size().height(), name() );
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 ) {
qWarning("Changng to vbox %s", name() );
@@ -494,48 +494,49 @@ void OSplitter::commonChangeBox() {
removeFromTab( (*it).widget );
qWarning("Adding to box %s", (*it).name.latin1() );
addToBox( (*it) );
}
for ( OSplitter* split = m_splitter.first(); split; split = m_splitter.next() ) {
/* tell them the world had changed */
split->setTabWidget( 0 );
Opie::OSplitterContainer con;
con.widget = split;
// con.widget = split->m_tabWidget ? static_cast<QWidget*>(split->m_tabWidget)
// : static_cast<QWidget*>(split->m_hbox);
addToBox( con );
}
if (m_parentTab )
m_parentTab->addTab(m_hbox, iconName(), label() );
else {
qWarning(" setting Box geometry for %s", name() );
m_hbox->setGeometry( frameRect() );
m_hbox->show();
delete m_tabWidget;
m_tabWidget = 0;
+ show(); // also show this widget
}
}
/*
* sets the tabwidget, removes tabs, and relayouts the widget
*/
void OSplitter::setTabWidget( OTabWidget* wid) {
/* clean up cause m_parentTab will not be available for us */
if ( m_parentTab ) {
if (m_hbox )
m_parentTab->removePage( m_hbox );
else if (!m_container.isEmpty() ){
ContainerList::Iterator it = m_container.begin();
for ( ; it != m_container.end(); ++it )
m_parentTab->removePage( (*it).widget );
}
}
/* the parent Splitter changed so either make us indepent or dep */
m_parentTab = wid;
QWidget *tab = m_tabWidget;
QWidget *box = m_hbox;
m_hbox = 0; m_tabWidget = 0;