summaryrefslogtreecommitdiff
authorzecke <zecke>2003-09-04 17:04:06 (UTC)
committer zecke <zecke>2003-09-04 17:04:06 (UTC)
commit302e9b70ecb247977decf97269807abe5eccbdd7 (patch) (side-by-side diff)
tree59bb2fe59f0ced82acd0d3529af16c0e0d516772
parentd11827ca5879b21488c189fb09f32ecf635644ae (diff)
downloadopie-302e9b70ecb247977decf97269807abe5eccbdd7.zip
opie-302e9b70ecb247977decf97269807abe5eccbdd7.tar.gz
opie-302e9b70ecb247977decf97269807abe5eccbdd7.tar.bz2
Rely on QFRame for the sizeHint
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/big-screen/osplitter.cpp7
-rw-r--r--libopie/big-screen/osplitter.h5
2 files changed, 7 insertions, 5 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
@@ -297,49 +297,49 @@ void OSplitter::setCurrentWidget( int 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() );
@@ -506,24 +506,25 @@ void OSplitter::commonChangeBox() {
}
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() ){
diff --git a/libopie/big-screen/osplitter.h b/libopie/big-screen/osplitter.h
index 33a085f..61a247b 100644
--- a/libopie/big-screen/osplitter.h
+++ b/libopie/big-screen/osplitter.h
@@ -82,43 +82,44 @@ public:
void setSizeChange( int width_height );
void addWidget( OSplitter* splitter );
void addWidget( QWidget* wid, const QString& icon, const QString& label );
void removeWidget( QWidget* );
void removeWidget( OSplitter* );
void setCurrentWidget( QWidget* );
void setCurrentWidget( const QString& label );
void setCurrentWidget( int );
QWidget* currentWidget()const;
+
signals:
/**
* Emitted if in tab and comes directly from the tab widget
*
*/
void currentChanged( QWidget* );
/**
* emitted whenever a border is crossed
* true if in small screen mode
* false if in bigscreen
* this signal is emitted after the layout switch
* @param b The layout mode
* @param ori The orientation
*/
void sizeChanged( bool b, Orientation ori);
public:
- QSize sizeHint()const;
- QSize minimumSizeHint()const;
+// QSize sizeHint()const;
+// QSize minimumSizeHint()const;
protected:
void resizeEvent( QResizeEvent* );
private:
/* true if OTabMode */
bool layoutMode()const;
// void reparentAll();
void setTabWidget( OTabWidget*);
void addToTab( const Opie::OSplitterContainer& );
void addToBox( const Opie::OSplitterContainer& );
void removeFromTab( QWidget* );