summaryrefslogtreecommitdiff
path: root/libopie
Unidiff
Diffstat (limited to 'libopie') (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 ) {
297/** 297/**
298 * return the currently activated widget if in tab widget mode 298 * return the currently activated widget if in tab widget mode
299 * or null because all widgets are visible 299 * or null because all widgets are visible
300 */ 300 */
301QWidget* OSplitter::currentWidget() const{ 301QWidget* OSplitter::currentWidget() const{
302 if (m_tabWidget) 302 if (m_tabWidget)
303 return m_tabWidget->currentWidget(); 303 return m_tabWidget->currentWidget();
304 else if (m_parentTab ) 304 else if (m_parentTab )
305 return m_parentTab->currentWidget(); 305 return m_parentTab->currentWidget();
306 306
307 return 0l; 307 return 0l;
308} 308}
309 309/* wrong */
310 310#if 0
311/** 311/**
312 * @reimplented for internal reasons 312 * @reimplented for internal reasons
313 * returns the sizeHint of one of its sub widgets 313 * returns the sizeHint of one of its sub widgets
314 */ 314 */
315QSize OSplitter::sizeHint()const { 315QSize OSplitter::sizeHint()const {
316 if (m_parentTab ) 316 if (m_parentTab )
317 return QFrame::sizeHint(); 317 return QFrame::sizeHint();
318 318
319 if (m_hbox ) 319 if (m_hbox )
320 return m_hbox->sizeHint(); 320 return m_hbox->sizeHint();
321 else 321 else
322 return m_tabWidget->sizeHint(); 322 return m_tabWidget->sizeHint();
323} 323}
324 324
325QSize OSplitter::minimumSizeHint()const { 325QSize OSplitter::minimumSizeHint()const {
326 if (m_parentTab ) 326 if (m_parentTab )
327 return QFrame::minimumSizeHint(); 327 return QFrame::minimumSizeHint();
328 if (m_hbox) 328 if (m_hbox)
329 return m_hbox->sizeHint(); 329 return m_hbox->sizeHint();
330 else 330 else
331 return m_tabWidget->sizeHint(); 331 return m_tabWidget->sizeHint();
332} 332}
333 333#endif
334 334
335/** 335/**
336 * @reimplemented for internal reasons 336 * @reimplemented for internal reasons
337 */ 337 */
338void OSplitter::resizeEvent( QResizeEvent* res ) { 338void OSplitter::resizeEvent( QResizeEvent* res ) {
339 QFrame::resizeEvent( res ); 339 QFrame::resizeEvent( res );
340 /* 340 /*
341 * 341 *
342 */ 342 */
343// qWarning("Old size was width = %d height = %d", res->oldSize().width(), res->oldSize().height() ); 343// qWarning("Old size was width = %d height = %d", res->oldSize().width(), res->oldSize().height() );
344 bool mode = true; 344 bool mode = true;
345 qWarning("New size is width = %d height = %d %s", res->size().width(), res->size().height(), name() ); 345 qWarning("New size is width = %d height = %d %s", res->size().width(), res->size().height(), name() );
@@ -506,24 +506,25 @@ void OSplitter::commonChangeBox() {
506 } 506 }
507 507
508 508
509 509
510 if (m_parentTab ) 510 if (m_parentTab )
511 m_parentTab->addTab(m_hbox, iconName(), label() ); 511 m_parentTab->addTab(m_hbox, iconName(), label() );
512 else { 512 else {
513 qWarning(" setting Box geometry for %s", name() ); 513 qWarning(" setting Box geometry for %s", name() );
514 m_hbox->setGeometry( frameRect() ); 514 m_hbox->setGeometry( frameRect() );
515 m_hbox->show(); 515 m_hbox->show();
516 delete m_tabWidget; 516 delete m_tabWidget;
517 m_tabWidget = 0; 517 m_tabWidget = 0;
518 show(); // also show this widget
518 } 519 }
519} 520}
520 521
521/* 522/*
522 * sets the tabwidget, removes tabs, and relayouts the widget 523 * sets the tabwidget, removes tabs, and relayouts the widget
523 */ 524 */
524void OSplitter::setTabWidget( OTabWidget* wid) { 525void OSplitter::setTabWidget( OTabWidget* wid) {
525 /* clean up cause m_parentTab will not be available for us */ 526 /* clean up cause m_parentTab will not be available for us */
526 if ( m_parentTab ) { 527 if ( m_parentTab ) {
527 if (m_hbox ) 528 if (m_hbox )
528 m_parentTab->removePage( m_hbox ); 529 m_parentTab->removePage( m_hbox );
529 else if (!m_container.isEmpty() ){ 530 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:
82 void setSizeChange( int width_height ); 82 void setSizeChange( int width_height );
83 83
84 void addWidget( OSplitter* splitter ); 84 void addWidget( OSplitter* splitter );
85 void addWidget( QWidget* wid, const QString& icon, const QString& label ); 85 void addWidget( QWidget* wid, const QString& icon, const QString& label );
86 void removeWidget( QWidget* ); 86 void removeWidget( QWidget* );
87 void removeWidget( OSplitter* ); 87 void removeWidget( OSplitter* );
88 88
89 void setCurrentWidget( QWidget* ); 89 void setCurrentWidget( QWidget* );
90 void setCurrentWidget( const QString& label ); 90 void setCurrentWidget( const QString& label );
91 void setCurrentWidget( int ); 91 void setCurrentWidget( int );
92 QWidget* currentWidget()const; 92 QWidget* currentWidget()const;
93 93
94
94signals: 95signals:
95 /** 96 /**
96 * Emitted if in tab and comes directly from the tab widget 97 * Emitted if in tab and comes directly from the tab widget
97 * 98 *
98 */ 99 */
99 void currentChanged( QWidget* ); 100 void currentChanged( QWidget* );
100 101
101 /** 102 /**
102 * emitted whenever a border is crossed 103 * emitted whenever a border is crossed
103 * true if in small screen mode 104 * true if in small screen mode
104 * false if in bigscreen 105 * false if in bigscreen
105 * this signal is emitted after the layout switch 106 * this signal is emitted after the layout switch
106 * @param b The layout mode 107 * @param b The layout mode
107 * @param ori The orientation 108 * @param ori The orientation
108 */ 109 */
109 void sizeChanged( bool b, Orientation ori); 110 void sizeChanged( bool b, Orientation ori);
110public: 111public:
111 QSize sizeHint()const; 112// QSize sizeHint()const;
112 QSize minimumSizeHint()const; 113// QSize minimumSizeHint()const;
113 114
114protected: 115protected:
115 void resizeEvent( QResizeEvent* ); 116 void resizeEvent( QResizeEvent* );
116 117
117private: 118private:
118 /* true if OTabMode */ 119 /* true if OTabMode */
119 bool layoutMode()const; 120 bool layoutMode()const;
120// void reparentAll(); 121// void reparentAll();
121 void setTabWidget( OTabWidget*); 122 void setTabWidget( OTabWidget*);
122 void addToTab( const Opie::OSplitterContainer& ); 123 void addToTab( const Opie::OSplitterContainer& );
123 void addToBox( const Opie::OSplitterContainer& ); 124 void addToBox( const Opie::OSplitterContainer& );
124 void removeFromTab( QWidget* ); 125 void removeFromTab( QWidget* );