-rw-r--r-- | core/apps/textedit/fileBrowser.cpp | 46 | ||||
-rw-r--r-- | core/apps/textedit/textedit.cpp | 1 |
2 files changed, 31 insertions, 16 deletions
diff --git a/core/apps/textedit/fileBrowser.cpp b/core/apps/textedit/fileBrowser.cpp index c16bd41..2e88067 100644 --- a/core/apps/textedit/fileBrowser.cpp +++ b/core/apps/textedit/fileBrowser.cpp | |||
@@ -22,2 +22,3 @@ | |||
22 | #include <qmessagebox.h> | 22 | #include <qmessagebox.h> |
23 | #include <qlayout.h> | ||
23 | #include <unistd.h> | 24 | #include <unistd.h> |
@@ -30,4 +31,3 @@ fileBrowser::fileBrowser( QWidget* parent, const char* name, bool modal, WFlags | |||
30 | if ( !name ) | 31 | if ( !name ) |
31 | setName( "fileBrowser" ); | 32 | setName( "fileBrowser" ); |
32 | resize( 240, 280 ); | ||
33 | setCaption(tr( name ) ); | 33 | setCaption(tr( name ) ); |
@@ -35,23 +35,37 @@ fileBrowser::fileBrowser( QWidget* parent, const char* name, bool modal, WFlags | |||
35 | 35 | ||
36 | QGridLayout *layout = new QGridLayout( this ); | ||
37 | layout->setSpacing( 4 ); | ||
38 | layout->setMargin( 4 ); | ||
39 | |||
40 | |||
36 | dirLabel = new QLabel(this, "DirLabel"); | 41 | dirLabel = new QLabel(this, "DirLabel"); |
37 | dirLabel->setText(currentDir.canonicalPath()); | 42 | dirLabel->setText(currentDir.canonicalPath()); |
38 | dirLabel->setGeometry(10,20,230,15); | 43 | dirLabel->setMinimumSize( QSize( 50, 15 ) ); |
44 | dirLabel->setMaximumSize( QSize( 250, 15 ) ); | ||
45 | layout->addWidget( dirLabel, 0, 0 ); | ||
39 | 46 | ||
40 | homeButton = new QPushButton( Resource::loadIconSet("home"),"",this,"homeButton"); | 47 | hideButton = new QPushButton( Resource::loadIconSet("s_hidden"),"",this,"hideButton"); |
41 | homeButton->setGeometry(200,4,25,25); | 48 | hideButton->setMinimumSize( QSize( 25, 25 ) ); |
42 | connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) ); | 49 | hideButton->setMaximumSize( QSize( 25, 25 ) ); |
43 | homeButton->setFlat(TRUE); | 50 | connect( hideButton,SIGNAL(toggled(bool)),this,SLOT( hideButtonPushed(bool)) ); |
51 | hideButton->setToggleButton(TRUE); | ||
52 | hideButton->setFlat(TRUE); | ||
53 | layout->addWidget( hideButton, 0, 1 ); | ||
44 | 54 | ||
45 | docButton = new QPushButton(Resource::loadIconSet("DocsIcon"),"",this,"docsButton"); | 55 | docButton = new QPushButton(Resource::loadIconSet("DocsIcon"),"",this,"docsButton"); |
46 | docButton->setGeometry(170,4,25,25); | 56 | docButton->setMinimumSize( QSize( 25, 25 ) ); |
57 | docButton->setMaximumSize( QSize( 25, 25 ) ); | ||
47 | connect( docButton,SIGNAL(released()),this,SLOT( docButtonPushed()) ); | 58 | connect( docButton,SIGNAL(released()),this,SLOT( docButtonPushed()) ); |
48 | docButton->setFlat(TRUE); | 59 | docButton->setFlat(TRUE); |
60 | layout->addWidget( docButton, 0, 2 ); | ||
61 | |||
62 | homeButton = new QPushButton( Resource::loadIconSet("home"),"",this,"homeButton"); | ||
63 | homeButton->setMinimumSize( QSize( 25, 25 ) ); | ||
64 | homeButton->setMaximumSize( QSize( 25, 25 ) ); | ||
65 | connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) ); | ||
66 | homeButton->setFlat(TRUE); | ||
67 | layout->addWidget( homeButton, 0, 3 ); | ||
49 | 68 | ||
50 | hideButton = new QPushButton( Resource::loadIconSet("s_hidden"),"",this,"hideButton"); | ||
51 | hideButton->setGeometry(140,4,25,25); | ||
52 | connect( hideButton,SIGNAL(toggled(bool)),this,SLOT( hideButtonPushed(bool)) ); | ||
53 | hideButton->setToggleButton(TRUE); | ||
54 | hideButton->setFlat(TRUE); | ||
55 | |||
56 | ListView = new QListView( this, "ListView" ); | 69 | ListView = new QListView( this, "ListView" ); |
70 | ListView->setMinimumSize( QSize( 100, 25 ) ); | ||
57 | ListView->addColumn( tr( "Name" ) ); | 71 | ListView->addColumn( tr( "Name" ) ); |
@@ -68,3 +82,3 @@ fileBrowser::fileBrowser( QWidget* parent, const char* name, bool modal, WFlags | |||
68 | ListView->setAllColumnsShowFocus( TRUE ); | 82 | ListView->setAllColumnsShowFocus( TRUE ); |
69 | ListView->setGeometry( QRect( 10, 35, 220, 240 ) ); | 83 | layout->addMultiCellWidget( ListView, 1, 1, 0, 3 ); |
70 | 84 | ||
@@ -77,3 +91,3 @@ fileBrowser::fileBrowser( QWidget* parent, const char* name, bool modal, WFlags | |||
77 | populateList(); | 91 | populateList(); |
78 | move(0,15); | 92 | move(0,15); |
79 | } | 93 | } |
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index c46f089..3a189cb 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp | |||
@@ -542,2 +542,3 @@ void TextEdit::newFileOpen() | |||
542 | browseForFiles=new fileBrowser(this,"Open File",TRUE,0, "*"); | 542 | browseForFiles=new fileBrowser(this,"Open File",TRUE,0, "*"); |
543 | browseForFiles->showMaximized(); | ||
543 | if( browseForFiles->exec() != -1 ) { | 544 | if( browseForFiles->exec() != -1 ) { |