summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/fileBrowser.cpp22
-rw-r--r--core/apps/textedit/fileBrowser.h2
-rw-r--r--core/apps/textedit/fileSaver.cpp29
-rw-r--r--core/apps/textedit/fileSaver.h2
-rw-r--r--core/apps/textedit/textedit.cpp3
5 files changed, 45 insertions, 13 deletions
diff --git a/core/apps/textedit/fileBrowser.cpp b/core/apps/textedit/fileBrowser.cpp
index 2275388..3e3cc3a 100644
--- a/core/apps/textedit/fileBrowser.cpp
+++ b/core/apps/textedit/fileBrowser.cpp
@@ -15,2 +15,3 @@
#include <qpe/config.h>
+#include <qpe/resource.h>
@@ -27,8 +28,15 @@ fileBrowser::fileBrowser( QWidget* parent, const char* name, bool modal, WFlags
setName( "fileBrowser" );
- resize( 236, 280 );
+ resize( 240, 280 );
setCaption(tr( "Browse for file" ) );
filterStr=filter;
+
dirLabel = new QLabel(this, "DirLabel");
dirLabel->setText(currentDir.canonicalPath());
- dirLabel->setGeometry(10,4,230,30);
+ dirLabel->setGeometry(10,20,230,15);
+
+ QPushButton *homeButton;
+ homeButton = new QPushButton(Resource::loadIconSet("home"),"",this,"homeButton");
+ homeButton->setGeometry(200,4,25,25);
+ connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) );
+
ListView = new QListView( this, "ListView" );
@@ -53,2 +61,3 @@ fileBrowser::fileBrowser( QWidget* parent, const char* name, bool modal, WFlags
populateList();
+ move(0,15);
}
@@ -96,3 +105,3 @@ void fileBrowser::populateList()
ListView->setSorting( 2, FALSE);
- dirLabel->setText("Current Directory:\n"+currentDir.canonicalPath());
+ dirLabel->setText(currentDir.canonicalPath());
}
@@ -164 +173,8 @@ void fileBrowser::OnOK()
}
+
+void fileBrowser::homeButtonPushed() {
+ chdir( QDir::homeDirPath().latin1() );
+ currentDir.cd( QDir::homeDirPath(), TRUE);
+ populateList();
+ update();
+}
diff --git a/core/apps/textedit/fileBrowser.h b/core/apps/textedit/fileBrowser.h
index 17ed862..c0e1d4a 100644
--- a/core/apps/textedit/fileBrowser.h
+++ b/core/apps/textedit/fileBrowser.h
@@ -52,3 +52,3 @@ QListViewItem * item;
public slots:
-
+void homeButtonPushed();
private:
diff --git a/core/apps/textedit/fileSaver.cpp b/core/apps/textedit/fileSaver.cpp
index 9e9e863..de594aa 100644
--- a/core/apps/textedit/fileSaver.cpp
+++ b/core/apps/textedit/fileSaver.cpp
@@ -15,2 +15,4 @@
#include <qpe/config.h>
+#include <qpe/resource.h>
+
#include <qpe/qpeapplication.h>
@@ -30,3 +32,3 @@ fileSaver::fileSaver( QWidget* parent, const char* name, bool modal, WFlags fl
setName( "fileSaver" );
- resize( 236, 280 );
+ resize( 240, 280 );
setCaption(tr( "Save file" ) );
@@ -35,7 +37,11 @@ fileSaver::fileSaver( QWidget* parent, const char* name, bool modal, WFlags fl
// qDebug( tmpFileName);
-
dirLabel = new QLabel(this, "DirLabel");
dirLabel->setText(currentDir.canonicalPath());
- dirLabel->setGeometry(10,4,230,30);
+ dirLabel->setGeometry(10,20,230,15);
+ QPushButton *homeButton;
+ homeButton = new QPushButton(Resource::loadIconSet("home"),"",this,"homeButton");
+ homeButton->setGeometry(200,4,25,25);
+ connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) );
+
ListView = new QListView( this, "ListView" );
@@ -52,6 +58,6 @@ fileSaver::fileSaver( QWidget* parent, const char* name, bool modal, WFlags fl
ListView->setAllColumnsShowFocus( TRUE );
- ListView->setGeometry( QRect( 10, 35, 220, 160 ) );
+ ListView->setGeometry( QRect( 10,35,220,125));
fileEdit= new QLineEdit(this);
- fileEdit->setGeometry( QRect( 10, 200, 200, 22));
+ fileEdit->setGeometry( QRect( 10, 162, 205, 17));
@@ -61,3 +67,3 @@ fileSaver::fileSaver( QWidget* parent, const char* name, bool modal, WFlags fl
filePermCheck->setText("set file permissions");
- filePermCheck->setGeometry(10, 220, 150,22);
+ filePermCheck->setGeometry(10, 178, 150,17);
// signals and slots connections
@@ -70,2 +76,4 @@ fileSaver::fileSaver( QWidget* parent, const char* name, bool modal, WFlags fl
populateList();
+ move(0,15);
+
}
@@ -111,3 +119,3 @@ void fileSaver::populateList()
ListView->setSorting( 2, FALSE);
- dirLabel->setText("Current Directory:\n"+currentDir.canonicalPath());
+ dirLabel->setText(currentDir.canonicalPath());
@@ -188 +196,8 @@ void fileSaver::accept() {
}
+
+void fileSaver::homeButtonPushed() {
+ chdir( QDir::homeDirPath().latin1() );
+ currentDir.cd( QDir::homeDirPath(), TRUE);
+ populateList();
+ update();
+}
diff --git a/core/apps/textedit/fileSaver.h b/core/apps/textedit/fileSaver.h
index ce4493e..526085d 100644
--- a/core/apps/textedit/fileSaver.h
+++ b/core/apps/textedit/fileSaver.h
@@ -57,3 +57,3 @@ QListViewItem * item;
public slots:
-
+void homeButtonPushed();
private:
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp
index bc975f3..72cc4d1 100644
--- a/core/apps/textedit/textedit.cpp
+++ b/core/apps/textedit/textedit.cpp
@@ -765,3 +765,3 @@ bool TextEdit::saveAs()
- fileSaveDlg=new fileSaver(this,"SaveFile",TRUE,0, currentFileName);
+ fileSaveDlg=new fileSaver(this,"SaveFile",TRUE, 0, currentFileName);
qDebug("wanna save filename "+currentFileName);
@@ -891,2 +891,3 @@ void TextEdit::editDelete()
clear();
+ setCaption( tr("Text Editor") );
}