summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-02-19 03:19:17 (UTC)
committer llornkcor <llornkcor>2002-02-19 03:19:17 (UTC)
commit789c9e0069f71afececf81204879462f3117e583 (patch) (side-by-side diff)
tree696073b7c8689379f914a81099163507546349a1
parent994691c1659fdac4980b0319aa8fab1c98ef3c73 (diff)
downloadopie-789c9e0069f71afececf81204879462f3117e583.zip
opie-789c9e0069f71afececf81204879462f3117e583.tar.gz
opie-789c9e0069f71afececf81204879462f3117e583.tar.bz2
set listviewcolum stuff on dialogs
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/fileBrowser.cpp3
-rw-r--r--core/apps/textedit/fileSaver.cpp6
2 files changed, 6 insertions, 3 deletions
diff --git a/core/apps/textedit/fileBrowser.cpp b/core/apps/textedit/fileBrowser.cpp
index bb420e6..2275388 100644
--- a/core/apps/textedit/fileBrowser.cpp
+++ b/core/apps/textedit/fileBrowser.cpp
@@ -29,25 +29,26 @@ fileBrowser::fileBrowser( QWidget* parent, const char* name, bool modal, WFlags
setCaption(tr( "Browse for file" ) );
filterStr=filter;
dirLabel = new QLabel(this, "DirLabel");
dirLabel->setText(currentDir.canonicalPath());
dirLabel->setGeometry(10,4,230,30);
ListView = new QListView( this, "ListView" );
ListView->addColumn( tr( "Name" ) );
ListView->setColumnWidth(0,140);
ListView->setSorting( 2, FALSE);
ListView->addColumn( tr( "Size" ) );
ListView->setColumnWidth(1,59);
// ListView->addColumn( tr( "" ) );
-// ListView->setColumnWidth(1,59);
+ ListView->setColumnWidthMode(0,QListView::Manual);
+ ListView->setColumnAlignment(1,QListView::AlignRight);
// ListView->setMultiSelection(true);
// ListView->setSelectionMode(QListView::Extended);
ListView->setAllColumnsShowFocus( TRUE );
ListView->setGeometry( QRect( 10, 35, 220, 240 ) );
// signals and slots connections
connect( ListView, SIGNAL(doubleClicked( QListViewItem*)), SLOT(listDoubleClicked(QListViewItem *)) );
connect( ListView, SIGNAL(pressed( QListViewItem*)), SLOT(listClicked(QListViewItem *)) );
currentDir.setPath(QDir::currentDirPath());
populateList();
}
diff --git a/core/apps/textedit/fileSaver.cpp b/core/apps/textedit/fileSaver.cpp
index af51fc3..b813ed3 100644
--- a/core/apps/textedit/fileSaver.cpp
+++ b/core/apps/textedit/fileSaver.cpp
@@ -34,39 +34,41 @@ 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);
ListView = new QListView( this, "ListView" );
ListView->addColumn( tr( "Name" ) );
ListView->setColumnWidth(0,140);
ListView->setSorting( 2, FALSE);
ListView->addColumn( tr( "Size" ) );
ListView->setColumnWidth(1,59);
+ ListView->setColumnWidthMode(0,QListView::Manual);
+ ListView->setColumnAlignment(1,QListView::AlignRight);
// ListView->setMultiSelection(true);
// ListView->setSelectionMode(QListView::Extended);
ListView->setAllColumnsShowFocus( TRUE );
ListView->setGeometry( QRect( 10, 35, 220, 160 ) );
fileEdit= new QLineEdit(this);
fileEdit->setGeometry( QRect( 10, 200, 200, 22));
fileEdit->setText( tmpFileName);
// signals and slots connections
connect( ListView, SIGNAL(doubleClicked( QListViewItem*)), SLOT(listDoubleClicked(QListViewItem *)) );
connect( ListView, SIGNAL(pressed( QListViewItem*)), SLOT(listClicked(QListViewItem *)) );
-
+
// tmpFileName=fi.FilePath();
// qDebug( tmpFileName);
currentDir.setPath( QDir::currentDirPath() );
populateList();
}
fileSaver::~fileSaver()
{
}
void fileSaver::populateList()
@@ -153,25 +155,25 @@ void fileSaver::listClicked(QListViewItem *selectedItem)
// OnOK();
} //end not symlink
chdir(strItem.latin1());
}
void fileSaver::closeEvent( QCloseEvent *e )
{
if(e->isAccepted()) {
- e->accept();
+ e->accept();
} else {
qDebug("not accepted");
done(-1);
}
}
void fileSaver::accept() {
selectedFileName = fileEdit->text();
QString path = currentDir.canonicalPath()+"/" + selectedFileName;
if( path.find("//",0,TRUE) ==-1 ) {
selectedFileName = path;
} else {