author | llornkcor <llornkcor> | 2002-02-19 03:19:17 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-02-19 03:19:17 (UTC) |
commit | 789c9e0069f71afececf81204879462f3117e583 (patch) (side-by-side diff) | |
tree | 696073b7c8689379f914a81099163507546349a1 | |
parent | 994691c1659fdac4980b0319aa8fab1c98ef3c73 (diff) | |
download | opie-789c9e0069f71afececf81204879462f3117e583.zip opie-789c9e0069f71afececf81204879462f3117e583.tar.gz opie-789c9e0069f71afececf81204879462f3117e583.tar.bz2 |
set listviewcolum stuff on dialogs
-rw-r--r-- | core/apps/textedit/fileBrowser.cpp | 3 | ||||
-rw-r--r-- | core/apps/textedit/fileSaver.cpp | 6 |
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 @@ -33,17 +33,18 @@ fileBrowser::fileBrowser( QWidget* parent, const char* name, bool modal, WFlags 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 *)) ); 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 @@ -38,31 +38,33 @@ fileSaver::fileSaver( QWidget* parent, const char* name, bool modal, WFlags fl 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() { @@ -157,17 +159,17 @@ void fileSaver::listClicked(QListViewItem *selectedItem) } void fileSaver::closeEvent( QCloseEvent *e ) { if(e->isAccepted()) { - e->accept(); + e->accept(); } else { qDebug("not accepted"); done(-1); } } void fileSaver::accept() { selectedFileName = fileEdit->text(); |