summaryrefslogtreecommitdiff
path: root/libopie/ofileselector
authorzecke <zecke>2002-09-20 17:28:20 (UTC)
committer zecke <zecke>2002-09-20 17:28:20 (UTC)
commit55dd11ddae09bfc4907399c473f0387c135fdae6 (patch) (unidiff)
tree69d52e2f0e1030bbdcbf518f0a334ff4861500fa /libopie/ofileselector
parent40df2487c53a5ab484d33d619f5b6ed449c0b485 (diff)
downloadopie-55dd11ddae09bfc4907399c473f0387c135fdae6.zip
opie-55dd11ddae09bfc4907399c473f0387c135fdae6.tar.gz
opie-55dd11ddae09bfc4907399c473f0387c135fdae6.tar.bz2
OTodo know is the first implementation of OPimRecord
Diffstat (limited to 'libopie/ofileselector') (more/less context) (show whitespace changes)
-rw-r--r--libopie/ofileselector/ofileselector.cpp249
-rw-r--r--libopie/ofileselector/ofileselector.h17
-rw-r--r--libopie/ofileselector/olister.h1
3 files changed, 124 insertions, 143 deletions
diff --git a/libopie/ofileselector/ofileselector.cpp b/libopie/ofileselector/ofileselector.cpp
index 98b61f7..c52aa62 100644
--- a/libopie/ofileselector/ofileselector.cpp
+++ b/libopie/ofileselector/ofileselector.cpp
@@ -30,7 +30,9 @@
30#include <sys/stat.h> 30#include <sys/stat.h>
31 31
32#include "ofileview.h" 32#include "ofileview.h"
33#include "ofileselectormain.h"
33#include "ofileselector.h" 34#include "ofileselector.h"
35#include "olocallister.h"
34#include "olister.h" 36#include "olister.h"
35 37
36QMap<QString,QPixmap> *OFileSelector::m_pixmaps = 0; 38QMap<QString,QPixmap> *OFileSelector::m_pixmaps = 0;
@@ -101,41 +103,23 @@ OFileSelector::~OFileSelector()
101void OFileSelector::setNewVisible( bool visible ) 103void OFileSelector::setNewVisible( bool visible )
102{ 104{
103 m_shNew = visible; 105 m_shNew = visible;
104 if( m_selector == Normal ){ 106 if (m_new )
105 delete m_select;
106 // we need to initialize but keep the selected mimetype
107 QString mime = currentMimeType();
108 m_select = new FileSelector( mime ,
109 m_stack, "fileselector",
110 m_shNew, m_shClose);
111
112 connect(m_select, SIGNAL(fileSelected( const DocLnk & ) ),
113 this, SLOT( slotFileBridgeSelected(const DocLnk & ) ) );
114 connect(m_select, SIGNAL(closeMe() ),
115 this, SIGNAL(closeMe() ) );
116 //connect to close me and other signals as well
117 m_stack->addWidget( m_select, Normal );
118 }else{
119 m_new->show(); 107 m_new->show();
120 } 108 }
121}
122void OFileSelector::setCloseVisible( bool visible ) 109void OFileSelector::setCloseVisible( bool visible )
123{ 110{
124 m_shClose = visible; 111 m_shClose = visible;
125 if( m_selector == Normal ){ 112
126 setNewVisible( m_shNew ); // yeah baby 113 if( m_close )
127 }else{
128 m_close->show(); 114 m_close->show();
129 } 115 }
130}
131void OFileSelector::reread() 116void OFileSelector::reread()
132{ 117{
133 if( m_selector == Normal ){ 118 if( m_selector == Normal )
134 setNewVisible( m_shNew ); // make it a initializeSelector 119 initializeOldSelector();
135 }else { 120 else
136 reparse(); 121 reparse();
137 } 122 }
138}
139 123
140const DocLnk *OFileSelector::selected() 124const DocLnk *OFileSelector::selected()
141{ 125{
@@ -147,6 +131,7 @@ void OFileSelector::setYesCancelVisible( bool show )
147{ 131{
148 initializeYes(); // FIXME if YesCancel is not shown we will initialize it to hide it :( 132 initializeYes(); // FIXME if YesCancel is not shown we will initialize it to hide it :(
149 m_shYesNo = show; 133 m_shYesNo = show;
134
150 if( m_shYesNo ) 135 if( m_shYesNo )
151 m_boxOk->show(); 136 m_boxOk->show();
152 else 137 else
@@ -156,7 +141,6 @@ void OFileSelector::setYesCancelVisible( bool show )
156void OFileSelector::setToolbarVisible( bool show ) 141void OFileSelector::setToolbarVisible( bool show )
157{ 142{
158 m_shTool = show; 143 m_shTool = show;
159 initializeListView(); // FIXME see above waste of memory
160 144
161 if(!m_shTool ){ 145 if(!m_shTool ){
162 m_location->hide(); 146 m_location->hide();
@@ -174,6 +158,7 @@ void OFileSelector::setPermissionBarVisible( bool show )
174{ 158{
175 m_shPerm = show; 159 m_shPerm = show;
176 initializePerm(); 160 initializePerm();
161
177 if( m_shPerm ) 162 if( m_shPerm )
178 m_checkPerm->show(); 163 m_checkPerm->show();
179 else 164 else
@@ -185,10 +170,10 @@ void OFileSelector::setLineEditVisible( bool show )
185 initializeName(); 170 initializeName();
186 m_boxName->show(); 171 m_boxName->show();
187 }else{ 172 }else{
188 if( m_shLne && m_boxName != 0 ){ // check if we showed before this is the way to go 173 // check if we showed before this is the way to go
174 if( m_shLne && m_boxName != 0 )
189 m_boxName->hide(); 175 m_boxName->hide();
190 } 176 }
191 }
192 m_shLne = show; 177 m_shLne = show;
193} 178}
194 179
@@ -196,11 +181,12 @@ void OFileSelector::setChooserVisible( bool show )
196{ 181{
197 m_shChooser = show; 182 m_shChooser = show;
198 initializeChooser(); 183 initializeChooser();
199 if( m_shChooser ){ 184
185 if( m_shChooser )
200 m_boxView->hide(); 186 m_boxView->hide();
201 }else{ 187 else
202 m_boxView->show(); 188 m_boxView->show();
203 } 189
204} 190}
205 191
206QCheckBox* OFileSelector::permissionCheckbox() 192QCheckBox* OFileSelector::permissionCheckbox()
@@ -226,14 +212,17 @@ void OFileSelector::setMode(int mode) // FIXME do direct raising
226 if( m_selector == Normal ) 212 if( m_selector == Normal )
227 return; 213 return;
228} 214}
229void OFileSelector::setShowDirs(bool ) 215void OFileSelector::setShowDirs(bool dir)
230{ 216{
231 m_dir = true; 217 m_dir = dir;
218 if ( m_selector != Fileselector )
232 reparse(); 219 reparse();
233} 220}
234void OFileSelector::setCaseSensetive(bool caSe ) 221void OFileSelector::setCaseSensetive(bool caSe )
235{ 222{
236 m_case = caSe; 223 m_case = caSe;
224
225 if ( m_selector != Fileselector )
237 reparse(); 226 reparse();
238} 227}
239void OFileSelector::setShowFiles(bool show ) 228void OFileSelector::setShowFiles(bool show )
@@ -380,49 +369,35 @@ void OFileSelector::slotCancel()
380void OFileSelector::slotViewCheck(const QString &sel) 369void OFileSelector::slotViewCheck(const QString &sel)
381{ 370{
382 if( sel == tr("Documents" ) ){ 371 if( sel == tr("Documents" ) ){
383 if( m_select == 0 ){ 372 initializeOldSelector();
384 // autMime? fix cause now we use All and not the current
385 // yes currentMime fixes that for us
386 QString mime = currentMimeType();
387 m_select = new FileSelector(mime,
388 m_stack, "fileselector",
389 m_shNew, m_shClose);
390 connect(m_select, SIGNAL(fileSelected( const DocLnk & ) ),
391 this, SLOT( slotFileBridgeSelected(const DocLnk & ) ) );
392 connect(m_select, SIGNAL(closeMe() ),
393 this, SIGNAL(closeMe() ) );
394 //connect to close me and other signals as well
395
396 m_stack->addWidget( m_select, Normal );
397 }
398 m_stack->raiseWidget( Normal );
399 m_selector = Normal; 373 m_selector = Normal;
374
400 }else if( sel == tr("Files") ){ 375 }else if( sel == tr("Files") ){
401 m_selector = Extended; 376 m_selector = Extended;
402 initializeListView(); 377
403 reparse(); 378 // FIXME call the factory
404 m_stack->raiseWidget( Extended ); 379 //reparse();
405 }else if( sel == tr("All Files") ){ 380 }else if( sel == tr("All Files") ){
406 m_selector = ExtendedAll; 381 m_selector = ExtendedAll;
407 initializeListView(); 382/* see above
408 reparse(); 383 reparse(); */
409 m_stack->raiseWidget( Extended ); // same widget other QFileFilter
410 } 384 }
411} 385}
412 386
413QString OFileSelector::currentMimeType() const{ 387QString OFileSelector::currentMimeType() const{
414 QString mime; 388 QString mime;
415 QString currentText; 389 QString currentText;
416 if (m_shChooser ) 390 if (m_shChooser && m_mimeCheck )
417 currentText = m_mimeCheck->currentText(); 391 currentText = m_mimeCheck->currentText();
418 392
393 qWarning("CurrentText" + currentText );
419 if (tr("All") == currentText ) return QString::null; 394 if (tr("All") == currentText ) return QString::null;
420 else if (currentText.isEmpty() ) { 395 else if (currentText.isEmpty() ) {
421 ; 396 ;
422 }else { 397 }else {
423 QMap<QString, QStringList>::ConstIterator it; 398 QMap<QString, QStringList>::ConstIterator it;
424 it = m_mimetypes.find( currentText ); 399 it = m_mimetypes.find( currentText );
425 if ( it == m_mimetypes.end() ) { 400 if ( it != m_mimetypes.end() ) {
426 mime = it.data().join(";"); 401 mime = it.data().join(";");
427 }else{ 402 }else{
428 mime = currentText; 403 mime = currentText;
@@ -433,33 +408,11 @@ QString OFileSelector::currentMimeType() const{
433void OFileSelector::slotMimeCheck(const QString &mime) 408void OFileSelector::slotMimeCheck(const QString &mime)
434{ 409{
435 if( m_selector == Normal ){ 410 if( m_selector == Normal ){
436 //if( m_autoMime ){ 411 initializeOldSelector();
437 QString newMimeType;
438 if (mime != tr("All") ) {
439 QMap<QString, QStringList>::Iterator it;
440 it = m_mimetypes.find(mime);
441 if ( it != m_mimetypes.end() ) {
442 newMimeType = it.data().join(";");
443 }else{
444 newMimeType = mime;
445 }
446 }
447 delete m_select;
448 m_select = new FileSelector( newMimeType,
449 m_stack, "fileselector",
450 m_shNew, m_shClose);
451 412
452 connect(m_select, SIGNAL(fileSelected( const DocLnk & ) ),
453 this, SLOT( slotFileBridgeSelected(const DocLnk & ) ) );
454 connect(m_select, SIGNAL(closeMe() ),
455 this, SIGNAL(closeMe() ) );
456 //connect to close me and other signals as well
457 m_stack->addWidget( m_select, Normal );
458 m_stack->raiseWidget( Normal );
459 updateMimes(); 413 updateMimes();
460 updateMimeCheck(); 414 updateMimeCheck();
461 m_mimeCheck->setCurrentItem(indexByString( m_mimeCheck, mime) ); 415 m_mimeCheck->setCurrentItem(indexByString( m_mimeCheck, mime) );
462 //}
463 }else{ // others 416 }else{ // others
464 qWarning("Mime %s", mime.latin1() ); 417 qWarning("Mime %s", mime.latin1() );
465 if(m_shChooser ){ 418 if(m_shChooser ){
@@ -524,7 +477,11 @@ void OFileSelector::init()
524 m_lay = new QVBoxLayout( this ); 477 m_lay = new QVBoxLayout( this );
525 m_lay->setSpacing(0 ); 478 m_lay->setSpacing(0 );
526 479
527 m_stack = new QWidgetStack( this ); 480 /* take care of the main view... */
481 initToolbar();
482
483 /* initialize the file lister */
484 initLister();
528 if( m_selector == Normal ){ 485 if( m_selector == Normal ){
529 QString mime; 486 QString mime;
530 if (!m_autoMime) { 487 if (!m_autoMime) {
@@ -534,25 +491,10 @@ void OFileSelector::init()
534 mime = it.data().join(";"); 491 mime = it.data().join(";");
535 } 492 }
536 } 493 }
537 m_select = new FileSelector(mime, 494 initializeOldSelector();
538 m_stack, "fileselector", 495 }else{
539 m_shNew, m_shClose); 496 initializeView();
540
541 connect(m_select, SIGNAL(fileSelected( const DocLnk & ) ),
542 this, SLOT( slotFileBridgeSelected(const DocLnk & ) ) );
543 connect(m_select, SIGNAL(closeMe() ),
544 this, SIGNAL( closeMe() ) );
545 //connect to close me and other signals as well
546
547 m_stack->addWidget( m_select, Normal );
548 m_stack->raiseWidget( Normal );
549 }else{ // we're in init so it will be EXTENDED or EXTENDED_ALL
550 // and initializeListview will take care of those
551 // toolbar get's generade in initializeListView
552 initializeListView( ); // will raise the widget as well
553 m_stack->raiseWidget( Extended );
554 } 497 }
555 m_lay->addWidget( m_stack, 100 ); // add to the layout 10 = stretch
556 498
557 if( m_shLne ) // the LineEdit with the current FileName 499 if( m_shLne ) // the LineEdit with the current FileName
558 initializeName(); 500 initializeName();
@@ -603,6 +545,9 @@ void OFileSelector::initVars()
603 m_dir = true; 545 m_dir = true;
604 m_files = true; 546 m_files = true;
605 m_showPopup = false; 547 m_showPopup = false;
548 m_mainView = 0l;
549 m_fileView = 0l;
550 m_lister = 0l;
606 551
607 if(m_pixmaps == 0 ) // init the pixmaps 552 if(m_pixmaps == 0 ) // init the pixmaps
608 initPics(); 553 initPics();
@@ -623,14 +568,12 @@ void OFileSelector::initVars()
623 m_pseudo = 0; 568 m_pseudo = 0;
624 m_pseudoLayout = 0; 569 m_pseudoLayout = 0;
625 m_select = 0; 570 m_select = 0;
626 m_stack = 0;
627 m_lay = 0; 571 m_lay = 0;
628 m_Oselector = 0; 572 m_Oselector = 0;
629 m_boxToolbar = 0; 573 m_boxToolbar = 0;
630 m_boxOk = 0; 574 m_boxOk = 0;
631 m_boxName = 0; 575 m_boxName = 0;
632 m_boxView = 0; 576 m_boxView = 0;
633 m_custom = 0;
634 m_edit = 0; 577 m_edit = 0;
635 m_fnLabel = 0; 578 m_fnLabel = 0;
636 m_new = 0; 579 m_new = 0;
@@ -714,6 +657,7 @@ void OFileSelector::initializeChooser()
714 m_viewCheck->insertItem( tr("Files") ); 657 m_viewCheck->insertItem( tr("Files") );
715 m_viewCheck->insertItem( tr("All Files") ); 658 m_viewCheck->insertItem( tr("All Files") );
716 /* update to custom views */ 659 /* update to custom views */
660
717 updateMimeCheck(); 661 updateMimeCheck();
718 662
719 connect( m_viewCheck, SIGNAL( activated(const QString & ) ), 663 connect( m_viewCheck, SIGNAL( activated(const QString & ) ),
@@ -722,20 +666,19 @@ void OFileSelector::initializeChooser()
722 this, SLOT( slotMimeCheck( const QString & ) ) ); 666 this, SLOT( slotMimeCheck( const QString & ) ) );
723 } 667 }
724} 668}
725void OFileSelector::initializeListView() 669/* generate the buttons for the toolbar */
726{ 670void OFileSelector::initToolbar() {
727 qWarning("initializeListView"); 671 m_mainView = new OFileSelectorMain( this );
728 if( m_pseudo == 0 ){ 672
729 qWarning("init"); 673 /* now generate the tool bar */
730 m_pseudo = new QWidget( m_stack, "Pseudo Widget"); 674 qWarning( "toolbar" );
675 m_pseudo = new QWidget( m_mainView, "Pseudo Widget" );
731 m_pseudoLayout = new QVBoxLayout( m_pseudo ); 676 m_pseudoLayout = new QVBoxLayout( m_pseudo );
732 // toolbar 677
733 m_boxToolbar = new QHBox( m_pseudo ); 678 m_boxToolbar = new QHBox( m_pseudo );
734 m_boxToolbar->setSpacing(0 ); // next to each other please 679 m_boxToolbar->setSpacing( 0 );
735 680
736 // toolbar members 681 // tool bar members now
737 {
738 // location QComboBox
739 m_location = new QComboBox( m_boxToolbar ); 682 m_location = new QComboBox( m_boxToolbar );
740 m_location->setEditable( TRUE ); 683 m_location->setEditable( TRUE );
741 m_location->setDuplicatesEnabled( FALSE ); 684 m_location->setDuplicatesEnabled( FALSE );
@@ -743,8 +686,9 @@ void OFileSelector::initializeListView()
743 this, SLOT( slotLocationActivated(const QString &) ) ); 686 this, SLOT( slotLocationActivated(const QString &) ) );
744 connect( m_location->lineEdit(), SIGNAL(returnPressed() ), 687 connect( m_location->lineEdit(), SIGNAL(returnPressed() ),
745 this, SLOT(locationComboChanged() ) ); 688 this, SLOT(locationComboChanged() ) );
689
746 // UP Button 690 // UP Button
747 m_up = new QPushButton(Resource::loadIconSet("up"),"", 691 m_up = new QPushButton( Resource::loadIconSet("up"), QString::null,
748 m_boxToolbar,"cdUpButton"); 692 m_boxToolbar,"cdUpButton");
749 m_up->setFixedSize( QSize( 20, 20 ) ); 693 m_up->setFixedSize( QSize( 20, 20 ) );
750 connect(m_up ,SIGNAL(clicked()),this,SLOT(cdUP() ) ); 694 connect(m_up ,SIGNAL(clicked()),this,SLOT(cdUP() ) );
@@ -752,18 +696,21 @@ void OFileSelector::initializeListView()
752 696
753 // Home Button 697 // Home Button
754 m_homeButton = new QPushButton(Resource::loadIconSet("home") , 698 m_homeButton = new QPushButton(Resource::loadIconSet("home") ,
755 "", m_boxToolbar); 699 QString::null, m_boxToolbar );
756 m_homeButton->setFixedSize( QSize( 20, 20 ) ); 700 m_homeButton->setFixedSize( QSize( 20, 20 ) );
757 connect(m_homeButton,SIGNAL(clicked()),this,SLOT(slotHome() ) ); 701 connect(m_homeButton,SIGNAL(clicked()),this,SLOT(slotHome() ) );
758 m_homeButton->setFlat(TRUE); 702 m_homeButton->setFlat(TRUE);
703
759 // Documents Button 704 // Documents Button
760 m_docButton = new QPushButton(Resource::loadIconSet("DocsIcon"),"", 705 m_docButton = new QPushButton( Resource::loadIconSet("DocsIcon"),
761 m_boxToolbar,"docsButton"); 706 QString::null, m_boxToolbar,
707 "docsButton" );
762 m_docButton->setFixedSize( QSize( 20, 20 ) ); 708 m_docButton->setFixedSize( QSize( 20, 20 ) );
763 connect(m_homeButton,SIGNAL(clicked()),this,SLOT(slotDoc() ) ); 709 m_docButton->setFlat( true );
764 m_docButton->setFlat(TRUE); 710 connect( m_docButton, SIGNAL(clicked() ),
711 this, SLOT(slotDoc() ) );
765 712
766 // Close button 713 // close button
767 m_close = new QPushButton( Resource::loadIconSet( "close"), "", 714 m_close = new QPushButton( Resource::loadIconSet( "close"), "",
768 m_boxToolbar ); 715 m_boxToolbar );
769 connect( m_close, SIGNAL(clicked() ), this, SIGNAL(closeMe() ) ); 716 connect( m_close, SIGNAL(clicked() ), this, SIGNAL(closeMe() ) );
@@ -772,6 +719,28 @@ void OFileSelector::initializeListView()
772 m_boxToolbar->setFixedHeight( 20 ); 719 m_boxToolbar->setFixedHeight( 20 );
773 m_pseudoLayout->addWidget(m_boxToolbar ); 720 m_pseudoLayout->addWidget(m_boxToolbar );
774 721
722 /* init the locations */
723 initLocations();
724
725 if( !m_shTool ){
726 m_location->hide( );
727 m_up->hide( );
728 m_homeButton->hide( );
729 m_docButton->hide( );
730 }
731 if(!m_shClose )
732 m_close->hide();
733
734 m_mainView->setToolbar( m_pseudo );
735 m_lay->addWidget( m_mainView, 100 );
736}
737/* initialize the OLocalLister */
738void OFileSelector::initLister() {
739 m_lister = new OLocalLister(this);
740}
741/* put default locations into the bar */
742void OFileSelector::initLocations () {
743
775 // let;s fill the Location ComboBox 744 // let;s fill the Location ComboBox
776 StorageInfo storage; 745 StorageInfo storage;
777 const QList<FileSystem> &fs = storage.fileSystems(); 746 const QList<FileSystem> &fs = storage.fileSystems();
@@ -784,25 +753,7 @@ void OFileSelector::initializeListView()
784 int count = m_location->count(); 753 int count = m_location->count();
785 m_location->insertItem( m_currentDir ); 754 m_location->insertItem( m_currentDir );
786 m_location->setCurrentItem( count ); 755 m_location->setCurrentItem( count );
787 // due to the New and Close button we can not simply hide m_boxToolBar to not show it
788 if( !m_shTool ){
789 m_location->hide( );
790 m_up->hide( );
791 m_homeButton->hide( );
792 m_docButton->hide( );
793 }
794 if(!m_shClose )
795 m_close->hide();
796 //if(!m_shNew)
797 //m_close->hide();
798
799 } // off toolbar
800 // the Main ListView
801 // make a QWidgetStack first so Views can share the Toolbar
802 756
803 // m_pseudoLayout->addWidget( m_View, 288 );
804 m_stack->addWidget( m_pseudo, Extended );
805 }
806} 757}
807void OFileSelector::initializePerm() 758void OFileSelector::initializePerm()
808{ 759{
@@ -1002,10 +953,10 @@ void OFileSelector::reparse()
1002 953
1003 954
1004OFileView* OFileSelector::currentView() { 955OFileView* OFileSelector::currentView() {
1005 return 0l; 956 return m_fileView;
1006} 957}
1007OFileView* OFileSelector::currentView() const{ 958OFileView* OFileSelector::currentView() const{
1008 return 0l; 959 return m_fileView;
1009} 960}
1010int OFileSelector::filter() { 961int OFileSelector::filter() {
1011 int filter; 962 int filter;
@@ -1047,5 +998,25 @@ QPixmap OFileSelector::pixmap( const QString& s ) {
1047 return (*m_pixmaps)[s]; 998 return (*m_pixmaps)[s];
1048} 999}
1049OLister* OFileSelector::currentLister()const { 1000OLister* OFileSelector::currentLister()const {
1050 return 0l; 1001 return m_lister;
1002}
1003void OFileSelector::initializeOldSelector() {
1004 qWarning("initializeOldSelector");
1005
1006 delete m_select;
1007
1008 // we need to initialize but keep the selected mimetype
1009 /* we default not to show close and new buttons */
1010 QString mime = currentMimeType();
1011 qWarning("MimeType " + mime );
1012 m_select = new FileSelector( mime ,
1013 m_mainView, "fileselector",
1014 FALSE, FALSE);
1015
1016 connect(m_select, SIGNAL(fileSelected( const DocLnk & ) ),
1017 this, SLOT( slotFileBridgeSelected(const DocLnk & ) ) );
1018 connect(m_select, SIGNAL(closeMe() ),
1019 this, SIGNAL(closeMe() ) );
1020 //connect to close me and other signals as well
1021 m_mainView->setWidget( m_select );
1051} 1022}
diff --git a/libopie/ofileselector/ofileselector.h b/libopie/ofileselector/ofileselector.h
index a7b363f..bf9a26b 100644
--- a/libopie/ofileselector/ofileselector.h
+++ b/libopie/ofileselector/ofileselector.h
@@ -69,6 +69,7 @@ class QFileInfo;
69class QHBox; 69class QHBox;
70class OFileView; 70class OFileView;
71class OLister; 71class OLister;
72class OFileSelectorMain;
72// 73//
73 74
74/* the mimetypes one name and a list of mimetypes */ 75/* the mimetypes one name and a list of mimetypes */
@@ -342,6 +343,8 @@ class OFileSelector : public QWidget {
342 int filter(); 343 int filter();
343 int sorting(); 344 int sorting();
344 QPixmap pixmap( const QString& ); 345 QPixmap pixmap( const QString& );
346 /* our tool bar */
347 QWidget* toolBar();
345 348
346 signals: 349 signals:
347 void fileSelected( const DocLnk & ); 350 void fileSelected( const DocLnk & );
@@ -369,6 +372,9 @@ class OFileSelector : public QWidget {
369 372
370 private: 373 private:
371 374
375 OFileSelectorMain* m_mainView;
376 OLister* m_lister;
377 OFileView* m_fileView;
372 FileSelector* m_select; 378 FileSelector* m_select;
373 int m_mode, m_selector; 379 int m_mode, m_selector;
374 QComboBox *m_location, 380 QComboBox *m_location,
@@ -390,10 +396,9 @@ class OFileSelector : public QWidget {
390 396
391 QString m_currentDir; 397 QString m_currentDir;
392 QString m_name; 398 QString m_name;
393 QMap<QString, QStringList> m_mimetypes;
394 399
400 QMap<QString, QStringList> m_mimetypes;
395 401
396 QWidgetStack *m_stack;
397 QVBoxLayout *m_lay; 402 QVBoxLayout *m_lay;
398 QGridLayout *m_Oselector; 403 QGridLayout *m_Oselector;
399 404
@@ -402,7 +407,6 @@ class OFileSelector : public QWidget {
402 QHBox *m_boxName; 407 QHBox *m_boxName;
403 QHBox *m_boxView; 408 QHBox *m_boxView;
404 409
405 QPopupMenu *m_custom;
406 410
407 QLineEdit *m_edit; 411 QLineEdit *m_edit;
408 QLabel *m_fnLabel; 412 QLabel *m_fnLabel;
@@ -420,6 +424,7 @@ class OFileSelector : public QWidget {
420 bool m_dir : 1; 424 bool m_dir : 1;
421 bool m_files : 1; 425 bool m_files : 1;
422 bool m_showPopup : 1; 426 bool m_showPopup : 1;
427 bool m_showHidden : 1;
423 428
424 void initVars(); 429 void initVars();
425 430
@@ -427,7 +432,6 @@ class OFileSelector : public QWidget {
427 void initializeName(); 432 void initializeName();
428 void initializeYes(); 433 void initializeYes();
429 void initializeChooser(); 434 void initializeChooser();
430 void initializeListView();
431 void initializePerm(); 435 void initializePerm();
432 void initPics(); 436 void initPics();
433 bool compliesMime(const QString &path, 437 bool compliesMime(const QString &path,
@@ -438,6 +442,11 @@ class OFileSelector : public QWidget {
438 */ 442 */
439 void updateMimeCheck(); 443 void updateMimeCheck();
440 444
445 void initializeOldSelector();
446 void initLister();
447 void initToolbar();
448 void initLocations();
449 void initializeView() {}; // FIXME
441 /** 450 /**
442 * Returns the current mimetype 451 * Returns the current mimetype
443 */ 452 */
diff --git a/libopie/ofileselector/olister.h b/libopie/ofileselector/olister.h
index 081b876..ef61cab 100644
--- a/libopie/ofileselector/olister.h
+++ b/libopie/ofileselector/olister.h
@@ -4,6 +4,7 @@
4#include <qfileinfo.h> 4#include <qfileinfo.h>
5#include <qmap.h> 5#include <qmap.h>
6#include <qstring.h> 6#include <qstring.h>
7#include <qstringlist.h>
7 8
8class OFileSelector; 9class OFileSelector;
9/** 10/**