summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-03-25 03:23:28 (UTC)
committer llornkcor <llornkcor>2002-03-25 03:23:28 (UTC)
commit2538c5e0182c0c9e8a60307f43ec3d5cac045cce (patch) (unidiff)
tree2f646a603363f4abaf70ff4124435c92d98294dd
parentf978777e3dfe6c02e19d7601b20e60a95d65b1e9 (diff)
downloadopie-2538c5e0182c0c9e8a60307f43ec3d5cac045cce.zip
opie-2538c5e0182c0c9e8a60307f43ec3d5cac045cce.tar.gz
opie-2538c5e0182c0c9e8a60307f43ec3d5cac045cce.tar.bz2
public -> private
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/fileBrowser.cpp3
-rw-r--r--core/apps/textedit/fileBrowser.h23
2 files changed, 13 insertions, 13 deletions
diff --git a/core/apps/textedit/fileBrowser.cpp b/core/apps/textedit/fileBrowser.cpp
index f3e4e1e..e103bcb 100644
--- a/core/apps/textedit/fileBrowser.cpp
+++ b/core/apps/textedit/fileBrowser.cpp
@@ -28,50 +28,49 @@
28#include <qpushbutton.h> 28#include <qpushbutton.h>
29#include <qfile.h> 29#include <qfile.h>
30#include <qmessagebox.h> 30#include <qmessagebox.h>
31#include <qlayout.h> 31#include <qlayout.h>
32#include <unistd.h> 32#include <unistd.h>
33#include <qpopupmenu.h> 33#include <qpopupmenu.h>
34#include <qlineedit.h> 34#include <qlineedit.h>
35#include <qstringlist.h> 35#include <qstringlist.h>
36 36
37#include <unistd.h> 37#include <unistd.h>
38#include <stdlib.h> 38#include <stdlib.h>
39 39
40static int u_id = 1; 40static int u_id = 1;
41static int get_unique_id() 41static int get_unique_id()
42{ 42{
43 return u_id++; 43 return u_id++;
44} 44}
45 45
46fileBrowser::fileBrowser( QWidget* parent, const char* name, bool modal, WFlags fl , const QString filter ) 46fileBrowser::fileBrowser( QWidget* parent, const char* name, bool modal, WFlags fl , const QString filter )
47 : QDialog( parent, name, modal, fl ) 47 : QDialog( parent, name, modal, fl )
48{ 48{
49 if ( !name ) 49 if ( !name )
50 setName( "fileBrowser" ); 50 setName( "fileBrowser" );
51 setCaption(tr( name ) ); 51 setCaption(tr( name ) );
52 filterStr=filter; 52 filterStr = filter;
53
54// channel = new QCopChannel( "QPE/fileDialog", this ); 53// channel = new QCopChannel( "QPE/fileDialog", this );
55// connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), 54// connect( channel, SIGNAL(received(const QCString&, const QByteArray&)),
56// this, SLOT(receive(const QCString&, const QByteArray&)) ); 55// this, SLOT(receive(const QCString&, const QByteArray&)) );
57 56
58 QGridLayout *layout = new QGridLayout( this ); 57 QGridLayout *layout = new QGridLayout( this );
59 layout->setSpacing( 4 ); 58 layout->setSpacing( 4 );
60 layout->setMargin( 4 ); 59 layout->setMargin( 4 );
61 60
62 dirPathCombo = new QComboBox( FALSE, this, "dorPathCombo" ); 61 dirPathCombo = new QComboBox( FALSE, this, "dorPathCombo" );
63 dirPathCombo->setEditable(TRUE); 62 dirPathCombo->setEditable(TRUE);
64 63
65 connect( dirPathCombo, SIGNAL( activated( const QString & ) ), 64 connect( dirPathCombo, SIGNAL( activated( const QString & ) ),
66 this, SLOT( dirPathComboActivated( const QString & ) ) ); 65 this, SLOT( dirPathComboActivated( const QString & ) ) );
67 66
68 connect( dirPathCombo->lineEdit(), SIGNAL( returnPressed( ) ), 67 connect( dirPathCombo->lineEdit(), SIGNAL( returnPressed( ) ),
69 this, SLOT( dirPathEditPressed( ) ) ); 68 this, SLOT( dirPathEditPressed( ) ) );
70 69
71 dirPathStringList << "/"; 70 dirPathStringList << "/";
72// we can get the storage here 71// we can get the storage here
73 72
74 layout->addMultiCellWidget( dirPathCombo, 0, 0, 0, 4 ); 73 layout->addMultiCellWidget( dirPathCombo, 0, 0, 0, 4 );
75 74
76 cdUpButton = new QPushButton(Resource::loadIconSet("up"),"",this,"cdUpButton"); 75 cdUpButton = new QPushButton(Resource::loadIconSet("up"),"",this,"cdUpButton");
77 cdUpButton ->setMinimumSize( QSize( 20, 20 ) ); 76 cdUpButton ->setMinimumSize( QSize( 20, 20 ) );
diff --git a/core/apps/textedit/fileBrowser.h b/core/apps/textedit/fileBrowser.h
index 42f93b6..77ac166 100644
--- a/core/apps/textedit/fileBrowser.h
+++ b/core/apps/textedit/fileBrowser.h
@@ -31,67 +31,68 @@ copyright Sun 02-17-2002 22:28:23 L. J. Potter ljp@llornkcor.com
31class QLineEdit; 31class QLineEdit;
32 32
33class QVBoxLayout; 33class QVBoxLayout;
34class QHBoxLayout; 34class QHBoxLayout;
35class QGridLayout; 35class QGridLayout;
36class QListView; 36class QListView;
37class QListViewItem; 37class QListViewItem;
38class QPushButton; 38class QPushButton;
39class QComboBox; 39class QComboBox;
40class QWidgetStack; 40class QWidgetStack;
41class FileSelector; 41class FileSelector;
42class QPoint; 42class QPoint;
43class MenuButton; 43class MenuButton;
44class QRegExp; 44class QRegExp;
45 45
46 46
47class fileBrowser : public QDialog 47class fileBrowser : public QDialog
48{ 48{
49 Q_OBJECT 49 Q_OBJECT
50 50
51public: 51public:
52 fileBrowser( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ,const QString filter=0); 52 fileBrowser( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ,const QString filter=0);
53 ~fileBrowser(); 53 ~fileBrowser();
54 54
55 QString selectedFileName, mimeType;
56 QFile file;
57 QStringList fileList;
58 QComboBox *SelectionCombo;
59public slots:
60 void setFileView( int );
61
62private:
63// QDict<void> mimes;
55 QPushButton *buttonOk, *buttonCancel, *homeButton, *docButton, *hideButton, *cdUpButton; 64 QPushButton *buttonOk, *buttonCancel, *homeButton, *docButton, *hideButton, *cdUpButton;
56 QListView* ListView; 65 QListView* ListView;
57
58 QLabel *dirLabel; 66 QLabel *dirLabel;
59 QString selectedFileName, filterStr; 67 QString filterStr;
60 QDir currentDir; 68 QDir currentDir;
61 QFile file; 69 QStringList dirPathStringList;
62 QStringList fileList, dirPathStringList;
63 QListViewItem * item; 70 QListViewItem * item;
64 QComboBox *SelectionCombo, *dirPathCombo; 71 QComboBox *dirPathCombo;
65 MenuButton *typemb; 72 MenuButton *typemb;
66 QWidgetStack *FileStack; 73 QWidgetStack *FileStack;
67 FileSelector *fileSelector; 74 FileSelector *fileSelector;
68 QString mimeType;
69public slots:
70 void setFileView( int );
71
72private:
73// QDict<void> mimes;
74 QRegExp tf; 75 QRegExp tf;
75 QStringList getMimeTypes(); 76 QStringList getMimeTypes();
76 void fillCombo( const QString&); 77 void fillCombo( const QString&);
77 78
78private slots: 79private slots:
79 void populateList(); 80 void populateList();
80 void homeButtonPushed(); 81 void homeButtonPushed();
81 void docButtonPushed(); 82 void docButtonPushed();
82 void ListPressed( int, QListViewItem *, const QPoint&, int); 83 void ListPressed( int, QListViewItem *, const QPoint&, int);
83 void showListMenu(QListViewItem*); 84 void showListMenu(QListViewItem*);
84 void doCd(); 85 void doCd();
85 void makDir(); 86 void makDir();
86 void localRename(); 87 void localRename();
87 void localDelete(); 88 void localDelete();
88 void receive( const QCString &msg, const QByteArray &data ); 89 void receive( const QCString &msg, const QByteArray &data );
89 void dirPathComboActivated( const QString & ); 90 void dirPathComboActivated( const QString & );
90 void upDir(); 91 void upDir();
91 void listClicked( QListViewItem * ); 92 void listClicked( QListViewItem * );
92 void selectionChanged( const QString & ); 93 void selectionChanged( const QString & );
93 void OnOK(); 94 void OnOK();
94 void docOpen( const DocLnk & ); 95 void docOpen( const DocLnk & );
95 void updateMimeTypeMenu(); 96 void updateMimeTypeMenu();
96 void showType(const QString &); 97 void showType(const QString &);
97 void dirPathEditPressed(); 98 void dirPathEditPressed();