summaryrefslogtreecommitdiff
path: root/libopie/ofileselector.cpp
Unidiff
Diffstat (limited to 'libopie/ofileselector.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/ofileselector.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/libopie/ofileselector.cpp b/libopie/ofileselector.cpp
index 1ba94ae..2a6aed0 100644
--- a/libopie/ofileselector.cpp
+++ b/libopie/ofileselector.cpp
@@ -114,30 +114,30 @@ int ODocumentFileView::fileCount()const {
114 114
115 return m_selector->fileCount(); 115 return m_selector->fileCount();
116} 116}
117DocLnk ODocumentFileView::selectedDocument()const { 117DocLnk ODocumentFileView::selectedDocument()const {
118 if (!m_selector) 118 if (!m_selector)
119 return DocLnk(); 119 return DocLnk();
120 120
121 return m_selector->selectedDocument(); 121 return m_selector->selectedDocument();
122} 122}
123QWidget* ODocumentFileView::widget( QWidget* parent ) { 123QWidget* ODocumentFileView::widget( QWidget* parent ) {
124 if (!m_selector ) { 124 if (!m_selector ) {
125 m_selector = new FileSelector(currentMimeType().join(";"), parent, "fileselector", showNew(), showClose() ); 125 m_selector = new FileSelector(currentMimeType().join(";"), parent, "fileselector", showNew(), showClose() );
126 QObject::connect(m_selector, SIGNAL(fileSelected( const DocLnk& ) ), 126 QObject::connect(m_selector, SIGNAL(fileSelected(const DocLnk&) ),
127 selector(), SLOT(slotDocLnkBridge(const DocLnk&) ) ); 127 selector(), SLOT(slotDocLnkBridge(const DocLnk&) ) );
128 QObject::connect(m_selector, SIGNAL(closeMe() ), 128 QObject::connect(m_selector, SIGNAL(closeMe() ),
129 selector(), SIGNAL(closeMe() ) ); 129 selector(), SIGNAL(closeMe() ) );
130 QObject::connect(m_selector, SIGNAL(newSelected(const DocLnk& ) ), 130 QObject::connect(m_selector, SIGNAL(newSelected(const DocLnk&) ),
131 selector(), SIGNAL(newSelected(const DocLnk& ) ) ); 131 selector(), SIGNAL(newSelected(const DocLnk&) ) );
132 } 132 }
133 133
134 return m_selector; 134 return m_selector;
135} 135}
136 136
137/* 137/*
138 * This is the file system view used 138 * This is the file system view used
139 * we use a QListView + QListViewItems for it 139 * we use a QListView + QListViewItems for it
140 */ 140 */
141 141
142OFileSelectorItem::OFileSelectorItem( QListView* view, const QPixmap& pixmap, 142OFileSelectorItem::OFileSelectorItem( QListView* view, const QPixmap& pixmap,
143 const QString& path, const QString& date, 143 const QString& path, const QString& date,
@@ -379,26 +379,26 @@ bool OFileViewFileListView::eventFilter (QObject *o, QEvent *e) {
379 if ( (k->key()==Key_Enter) || (k->key()==Key_Return)) { 379 if ( (k->key()==Key_Enter) || (k->key()==Key_Return)) {
380 slotClicked( Qt::LeftButton,m_view->currentItem(),QPoint(0,0),0); 380 slotClicked( Qt::LeftButton,m_view->currentItem(),QPoint(0,0),0);
381 return true; 381 return true;
382 } 382 }
383 } 383 }
384 return false; 384 return false;
385} 385}
386 386
387 387
388void OFileViewFileListView::connectSlots() { 388void OFileViewFileListView::connectSlots() {
389 connect(m_view, SIGNAL(clicked(QListViewItem*) ), 389 connect(m_view, SIGNAL(clicked(QListViewItem*) ),
390 this, SLOT(slotCurrentChanged(QListViewItem*) ) ); 390 this, SLOT(slotCurrentChanged(QListViewItem*) ) );
391 connect(m_view, SIGNAL(mouseButtonClicked(int, QListViewItem*, const QPoint&, int ) ), 391 connect(m_view, SIGNAL(mouseButtonClicked(int,QListViewItem*,const QPoint&,int) ),
392 this, SLOT(slotClicked(int, QListViewItem*, const QPoint&, int ) ) ); 392 this, SLOT(slotClicked(int,QListViewItem*,const QPoint&,int) ) );
393} 393}
394void OFileViewFileListView::slotCurrentChanged( QListViewItem* item) { 394void OFileViewFileListView::slotCurrentChanged( QListViewItem* item) {
395 if (!item) 395 if (!item)
396 return; 396 return;
397#if 0 397#if 0
398 398
399 OFileSelectorItem *sel = static_cast<OFileSelectorItem*>(item); 399 OFileSelectorItem *sel = static_cast<OFileSelectorItem*>(item);
400 400
401 if (!sel->isDir() ) { 401 if (!sel->isDir() ) {
402 selector()->m_lneEdit->setText( sel->text(1) ); 402 selector()->m_lneEdit->setText( sel->text(1) );
403 // if in fileselector mode we will emit selected 403 // if in fileselector mode we will emit selected
404 if ( selector()->mode() == OFileSelector::FileSelector ) { 404 if ( selector()->mode() == OFileSelector::FileSelector ) {
@@ -771,26 +771,26 @@ void OFileSelector::initMime() {
771 m_cmbMime->insertItem( it.key() ); 771 m_cmbMime->insertItem( it.key() );
772 } 772 }
773 m_cmbMime->setCurrentItem( 0 ); 773 m_cmbMime->setCurrentItem( 0 );
774 774
775 connect( m_cmbMime, SIGNAL(activated(int) ), 775 connect( m_cmbMime, SIGNAL(activated(int) ),
776 this, SLOT(slotMimeTypeChanged() ) ); 776 this, SLOT(slotMimeTypeChanged() ) );
777 777
778} 778}
779void OFileSelector::initViews() { 779void OFileSelector::initViews() {
780 m_cmbView->insertItem( QObject::tr("Documents") ); 780 m_cmbView->insertItem( QObject::tr("Documents") );
781 m_cmbView->insertItem( QObject::tr("Files") ); 781 m_cmbView->insertItem( QObject::tr("Files") );
782 m_cmbView->insertItem( QObject::tr("All Files") ); 782 m_cmbView->insertItem( QObject::tr("All Files") );
783 connect(m_cmbView, SIGNAL(activated( const QString& ) ), 783 connect(m_cmbView, SIGNAL(activated(const QString&) ),
784 this, SLOT(slotViewChange( const QString& ) ) ); 784 this, SLOT(slotViewChange(const QString&) ) );
785 785
786 786
787 m_views.insert( QObject::tr("Documents"), new ODocumentFileView(this) ); 787 m_views.insert( QObject::tr("Documents"), new ODocumentFileView(this) );
788 788
789 /* see above why add both */ 789 /* see above why add both */
790 OFileViewInterface* in = new OFileViewFileSystem( this ); 790 OFileViewInterface* in = new OFileViewFileSystem( this );
791 m_views.insert( QObject::tr("Files"), in ); 791 m_views.insert( QObject::tr("Files"), in );
792 m_views.insert( QObject::tr("All Files"), in ); 792 m_views.insert( QObject::tr("All Files"), in );
793} 793}
794 794
795/** 795/**
796 * d'tor 796 * d'tor