summaryrefslogtreecommitdiff
path: root/libopie/ofileselector.h
Side-by-side diff
Diffstat (limited to 'libopie/ofileselector.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/ofileselector.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/libopie/ofileselector.h b/libopie/ofileselector.h
index 5e98a1e..81a9e63 100644
--- a/libopie/ofileselector.h
+++ b/libopie/ofileselector.h
@@ -58,26 +58,26 @@ class FileSelector;
class QGridLayout;
class QLineEdit;
class QLabel;
class QWidgetStack;
class QHBoxLayout;
class QVBoxLayout;
class QPopupMenu;
class QFileInfo;
//
class OFileSelectorItem : public QListViewItem {
public:
OFileSelectorItem(QListView *view, const QPixmap &pixmap, const QString &path,
- const QString &date, const QString &size, const QString &mDir,
- bool isLocked=false, bool isDir=false ): QListViewItem(view) {
+ const QString &date, const QString &size, const QString &mDir,
+ bool isLocked=false, bool isDir=false ): QListViewItem(view) {
setPixmap(0, pixmap );
setText(1, path );
setText(2, size );
setText(3, date );
//setText(4, mDir );
m_dir = mDir;
dir = isDir;
mLocked = isLocked;
}
bool isLocked() const{
return mLocked;
}
@@ -85,29 +85,29 @@ class OFileSelectorItem : public QListViewItem {
return m_dir;
}
bool isDir()const{
return dir;
}
QString path()const{
return text(1 );
}
QString key(int id, bool )const {
QString ke;
if( id == 0 || id == 1 ){ // name
if( dir ){
- ke.append("0" );
- ke.append( text(1) );
+ ke.append("0" );
+ ke.append( text(1) );
}else{
- ke.append("1" );
- ke.append( text(1) );
+ ke.append("1" );
+ ke.append( text(1) );
}
}else if( id == 2 ){ // size
return text(2);
}else if( id == 3 ){ // date
return text(3);
}
return ke;
};
private:
bool mLocked:1;
bool dir:1;
QString m_dir;
@@ -181,24 +181,27 @@ class OFileSelector : public QWidget {
void fileSelected( const DocLnk & );
void fileSelected( const QString & );
void dirSelected(const QString &dir );
void closeMe();
void ok();
void cancel();
protected slots:
void slotOk();
void slotCancel();
void slotViewCheck(const QString & );
void slotMimeCheck(const QString & );
+ void locationComboActivated(const QString & );
+ void insertLocationPath(const QString &, int);
+ int indexFromString(const QString &);
protected:
void init();
void updateMimes();
protected:
private:
int m_mode, m_selector;
QComboBox *m_location, *m_mimeCheck, *m_viewCheck;
QPushButton *m_homeButton, *m_docButton, *m_hideButton, *m_ok, *m_cancel;
QPushButton *m_reread, *m_up;
QListView *m_View;