author | llornkcor <llornkcor> | 2003-05-26 02:51:00 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-05-26 02:51:00 (UTC) |
commit | eaa924af86511fd43fc9eac5438e73972f82158b (patch) (unidiff) | |
tree | f6a0c07eba3951d50935ab1a7edccc95a1659949 | |
parent | 3fee41c94625fdef794a2eaabfc440cd01a1b11a (diff) | |
download | opie-eaa924af86511fd43fc9eac5438e73972f82158b.zip opie-eaa924af86511fd43fc9eac5438e73972f82158b.tar.gz opie-eaa924af86511fd43fc9eac5438e73972f82158b.tar.bz2 |
remove extra includes
-rw-r--r-- | noncore/net/opieftp/filePermissions.cpp | 4 | ||||
-rw-r--r-- | noncore/net/opieftp/inputDialog.cpp | 4 | ||||
-rw-r--r-- | noncore/net/opieftp/main.cpp | 4 | ||||
-rw-r--r-- | noncore/net/opieftp/opieftp.cpp | 14 |
4 files changed, 0 insertions, 26 deletions
diff --git a/noncore/net/opieftp/filePermissions.cpp b/noncore/net/opieftp/filePermissions.cpp index ab094db..f545c1f 100644 --- a/noncore/net/opieftp/filePermissions.cpp +++ b/noncore/net/opieftp/filePermissions.cpp | |||
@@ -1,216 +1,212 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** copyright 2002 ljp ljp@llornkcor.com | 2 | ** copyright 2002 ljp ljp@llornkcor.com |
3 | ** Created: Sat Feb 23 19:44:40 2002 L.J. Potter | 3 | ** Created: Sat Feb 23 19:44:40 2002 L.J. Potter |
4 | ** | 4 | ** |
5 | ** This file may be distributed and/or modified under the terms of the | 5 | ** This file may be distributed and/or modified under the terms of the |
6 | ** GNU General Public License version 2 as published by the Free Software | 6 | ** GNU General Public License version 2 as published by the Free Software |
7 | ** Foundation and appearing in the file LICENSE.GPL included in the | 7 | ** Foundation and appearing in the file LICENSE.GPL included in the |
8 | ** packaging of this file. | 8 | ** packaging of this file. |
9 | ** | 9 | ** |
10 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 10 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
11 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 11 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
12 | ** | 12 | ** |
13 | ****************************************************************************/ | 13 | ****************************************************************************/ |
14 | #include "filePermissions.h" | 14 | #include "filePermissions.h" |
15 | 15 | ||
16 | #include <qfile.h> | ||
17 | #include <qfileinfo.h> | 16 | #include <qfileinfo.h> |
18 | 17 | ||
19 | #include <qcheckbox.h> | 18 | #include <qcheckbox.h> |
20 | #include <qlabel.h> | 19 | #include <qlabel.h> |
21 | #include <qlineedit.h> | 20 | #include <qlineedit.h> |
22 | #include <qlayout.h> | ||
23 | #include <qvariant.h> | ||
24 | #include <qtooltip.h> | ||
25 | #include <qmessagebox.h> | 21 | #include <qmessagebox.h> |
26 | 22 | ||
27 | #include <unistd.h> | 23 | #include <unistd.h> |
28 | #include <sys/stat.h> | 24 | #include <sys/stat.h> |
29 | #include <stdlib.h> | 25 | #include <stdlib.h> |
30 | #include <sys/types.h> | 26 | #include <sys/types.h> |
31 | #include <pwd.h> | 27 | #include <pwd.h> |
32 | #include <grp.h> | 28 | #include <grp.h> |
33 | 29 | ||
34 | filePermissions::filePermissions( QWidget* parent, const char* name, bool modal, WFlags fl, const QString &fileName, bool useRemote ) | 30 | filePermissions::filePermissions( QWidget* parent, const char* name, bool modal, WFlags fl, const QString &fileName, bool useRemote ) |
35 | : QDialog( parent, name, modal, fl ) | 31 | : QDialog( parent, name, modal, fl ) |
36 | { | 32 | { |
37 | if ( !name ) | 33 | if ( !name ) |
38 | setName( tr("filePermissions") ); | 34 | setName( tr("filePermissions") ); |
39 | // qDebug("FilePermissions "+fileName); | 35 | // qDebug("FilePermissions "+fileName); |
40 | resize( 236, 210 ); | 36 | resize( 236, 210 ); |
41 | isRemote=useRemote; | 37 | isRemote=useRemote; |
42 | setMaximumSize( QSize( 236, 210 ) ); | 38 | setMaximumSize( QSize( 236, 210 ) ); |
43 | setCaption( tr( "Set File Permissions" ) ); | 39 | setCaption( tr( "Set File Permissions" ) ); |
44 | 40 | ||
45 | TextLabel1 = new QLabel( this, "TextLabel1" ); | 41 | TextLabel1 = new QLabel( this, "TextLabel1" ); |
46 | TextLabel1->setGeometry( QRect( 25, 5, 175, 20 ) ); | 42 | TextLabel1->setGeometry( QRect( 25, 5, 175, 20 ) ); |
47 | TextLabel1->setText( tr( "Set file permissions for:" ) ); | 43 | TextLabel1->setText( tr( "Set file permissions for:" ) ); |
48 | 44 | ||
49 | LineEdit1 = new QLineEdit( this, "LineEdit1" ); | 45 | LineEdit1 = new QLineEdit( this, "LineEdit1" ); |
50 | LineEdit1->setGeometry( QRect( 10, 25, 218, 22 ) ); | 46 | LineEdit1->setGeometry( QRect( 10, 25, 218, 22 ) ); |
51 | LineEdit1->setReadOnly(true); | 47 | LineEdit1->setReadOnly(true); |
52 | 48 | ||
53 | TextLabel4 = new QLabel( this, "TextLabel4" ); | 49 | TextLabel4 = new QLabel( this, "TextLabel4" ); |
54 | TextLabel4->setGeometry( QRect( 5, 85, 50, 15 ) ); | 50 | TextLabel4->setGeometry( QRect( 5, 85, 50, 15 ) ); |
55 | TextLabel4->setText( tr( "owner" ) ); | 51 | TextLabel4->setText( tr( "owner" ) ); |
56 | 52 | ||
57 | TextLabel4_2 = new QLabel( this, "TextLabel4_2" ); | 53 | TextLabel4_2 = new QLabel( this, "TextLabel4_2" ); |
58 | TextLabel4_2->setGeometry( QRect( 5, 105, 50, 15 ) ); | 54 | TextLabel4_2->setGeometry( QRect( 5, 105, 50, 15 ) ); |
59 | TextLabel4_2->setText( tr( "group" ) ); | 55 | TextLabel4_2->setText( tr( "group" ) ); |
60 | 56 | ||
61 | TextLabel4_3 = new QLabel( this, "TextLabel4_3" ); | 57 | TextLabel4_3 = new QLabel( this, "TextLabel4_3" ); |
62 | TextLabel4_3->setGeometry( QRect( 5, 125, 50, 15 ) ); | 58 | TextLabel4_3->setGeometry( QRect( 5, 125, 50, 15 ) ); |
63 | TextLabel4_3->setText( tr( "others" ) ); | 59 | TextLabel4_3->setText( tr( "others" ) ); |
64 | 60 | ||
65 | CheckBox1 = new QCheckBox( this, "CheckBox1" ); | 61 | CheckBox1 = new QCheckBox( this, "CheckBox1" ); |
66 | CheckBox1->setGeometry( QRect( 75, 85, 20, 16 ) ); | 62 | CheckBox1->setGeometry( QRect( 75, 85, 20, 16 ) ); |
67 | connect(CheckBox1, SIGNAL(released()),this,SLOT(ownReadCheck())); | 63 | connect(CheckBox1, SIGNAL(released()),this,SLOT(ownReadCheck())); |
68 | 64 | ||
69 | CheckBox1_2 = new QCheckBox( this, "CheckBox1_2" ); | 65 | CheckBox1_2 = new QCheckBox( this, "CheckBox1_2" ); |
70 | CheckBox1_2->setGeometry( QRect( 135, 85, 20, 16 ) ); | 66 | CheckBox1_2->setGeometry( QRect( 135, 85, 20, 16 ) ); |
71 | connect(CheckBox1_2, SIGNAL(released()),this,SLOT(ownWriteCheck())); | 67 | connect(CheckBox1_2, SIGNAL(released()),this,SLOT(ownWriteCheck())); |
72 | 68 | ||
73 | CheckBox1_3 = new QCheckBox( this, "CheckBox1_3" ); | 69 | CheckBox1_3 = new QCheckBox( this, "CheckBox1_3" ); |
74 | CheckBox1_3->setGeometry( QRect( 195, 85, 20, 16 ) ); | 70 | CheckBox1_3->setGeometry( QRect( 195, 85, 20, 16 ) ); |
75 | connect(CheckBox1_3, SIGNAL(released()),this,SLOT(ownExeCheck())); | 71 | connect(CheckBox1_3, SIGNAL(released()),this,SLOT(ownExeCheck())); |
76 | 72 | ||
77 | CheckBox1_4 = new QCheckBox( this, "CheckBox1_4" ); | 73 | CheckBox1_4 = new QCheckBox( this, "CheckBox1_4" ); |
78 | CheckBox1_4->setGeometry( QRect( 75, 105, 20, 16 ) ); | 74 | CheckBox1_4->setGeometry( QRect( 75, 105, 20, 16 ) ); |
79 | connect(CheckBox1_4, SIGNAL(released()),this,SLOT(grpReadCheck())); | 75 | connect(CheckBox1_4, SIGNAL(released()),this,SLOT(grpReadCheck())); |
80 | 76 | ||
81 | CheckBox1_5 = new QCheckBox( this, "CheckBox1_5" ); | 77 | CheckBox1_5 = new QCheckBox( this, "CheckBox1_5" ); |
82 | CheckBox1_5->setGeometry( QRect( 135, 105, 20, 16 ) ); | 78 | CheckBox1_5->setGeometry( QRect( 135, 105, 20, 16 ) ); |
83 | connect(CheckBox1_5, SIGNAL(released()),this,SLOT(grpWriteCheck())); | 79 | connect(CheckBox1_5, SIGNAL(released()),this,SLOT(grpWriteCheck())); |
84 | 80 | ||
85 | CheckBox1_6 = new QCheckBox( this, "CheckBox1_6" ); | 81 | CheckBox1_6 = new QCheckBox( this, "CheckBox1_6" ); |
86 | CheckBox1_6->setGeometry( QRect( 195, 105, 20, 16 ) ); | 82 | CheckBox1_6->setGeometry( QRect( 195, 105, 20, 16 ) ); |
87 | connect(CheckBox1_6, SIGNAL(released()),this,SLOT(grpExeCheck())); | 83 | connect(CheckBox1_6, SIGNAL(released()),this,SLOT(grpExeCheck())); |
88 | 84 | ||
89 | CheckBox1_7 = new QCheckBox( this, "CheckBox1_7" ); | 85 | CheckBox1_7 = new QCheckBox( this, "CheckBox1_7" ); |
90 | CheckBox1_7->setGeometry( QRect( 75, 125, 16, 16 ) ); | 86 | CheckBox1_7->setGeometry( QRect( 75, 125, 16, 16 ) ); |
91 | connect(CheckBox1_7, SIGNAL(released()),this,SLOT(wrldReadCheck())); | 87 | connect(CheckBox1_7, SIGNAL(released()),this,SLOT(wrldReadCheck())); |
92 | 88 | ||
93 | CheckBox1_8 = new QCheckBox( this, "CheckBox1_8" ); | 89 | CheckBox1_8 = new QCheckBox( this, "CheckBox1_8" ); |
94 | CheckBox1_8->setGeometry( QRect( 135, 125, 20, 16 ) ); | 90 | CheckBox1_8->setGeometry( QRect( 135, 125, 20, 16 ) ); |
95 | connect(CheckBox1_8, SIGNAL(released()),this,SLOT(wrldWriteCheck())); | 91 | connect(CheckBox1_8, SIGNAL(released()),this,SLOT(wrldWriteCheck())); |
96 | 92 | ||
97 | CheckBox1_8_2 = new QCheckBox( this, "CheckBox1_8_2" ); | 93 | CheckBox1_8_2 = new QCheckBox( this, "CheckBox1_8_2" ); |
98 | CheckBox1_8_2->setGeometry( QRect( 195, 125, 20, 16 ) ); | 94 | CheckBox1_8_2->setGeometry( QRect( 195, 125, 20, 16 ) ); |
99 | connect(CheckBox1_8_2, SIGNAL(released()),this,SLOT(wrldExeCheck())); | 95 | connect(CheckBox1_8_2, SIGNAL(released()),this,SLOT(wrldExeCheck())); |
100 | 96 | ||
101 | GroupLineEdit = new QLineEdit( this, "GroupLineEdit" ); | 97 | GroupLineEdit = new QLineEdit( this, "GroupLineEdit" ); |
102 | GroupLineEdit->setGeometry( QRect( 125, 155, 106, 22 ) ); | 98 | GroupLineEdit->setGeometry( QRect( 125, 155, 106, 22 ) ); |
103 | 99 | ||
104 | OwnerLineEdit = new QLineEdit( this, "OwnerLineEdit" ); | 100 | OwnerLineEdit = new QLineEdit( this, "OwnerLineEdit" ); |
105 | OwnerLineEdit->setGeometry( QRect( 10, 155, 106, 22 ) ); | 101 | OwnerLineEdit->setGeometry( QRect( 10, 155, 106, 22 ) ); |
106 | 102 | ||
107 | TextLabel5 = new QLabel( this, "TextLabel5" ); | 103 | TextLabel5 = new QLabel( this, "TextLabel5" ); |
108 | TextLabel5->setGeometry( QRect( 45, 180, 40, 16 ) ); | 104 | TextLabel5->setGeometry( QRect( 45, 180, 40, 16 ) ); |
109 | TextLabel5->setText( tr( "Owner" ) ); | 105 | TextLabel5->setText( tr( "Owner" ) ); |
110 | 106 | ||
111 | TextLabel5_2 = new QLabel( this, "TextLabel5_2" ); | 107 | TextLabel5_2 = new QLabel( this, "TextLabel5_2" ); |
112 | TextLabel5_2->setGeometry( QRect( 155, 180, 40, 16 ) ); | 108 | TextLabel5_2->setGeometry( QRect( 155, 180, 40, 16 ) ); |
113 | TextLabel5_2->setText( tr( "Group" ) ); | 109 | TextLabel5_2->setText( tr( "Group" ) ); |
114 | 110 | ||
115 | ModeLine = new QLineEdit( this, "TextLabelMode" ); | 111 | ModeLine = new QLineEdit( this, "TextLabelMode" ); |
116 | ModeLine->setGeometry( QRect( 10, 60, 40, 15 ) ); | 112 | ModeLine->setGeometry( QRect( 10, 60, 40, 15 ) ); |
117 | 113 | ||
118 | TextLabel3_2 = new QLabel( this, "TextLabel3_2" ); | 114 | TextLabel3_2 = new QLabel( this, "TextLabel3_2" ); |
119 | TextLabel3_2->setGeometry( QRect( 60, 55, 50, 20 ) ); | 115 | TextLabel3_2->setGeometry( QRect( 60, 55, 50, 20 ) ); |
120 | TextLabel3_2->setText( tr( "read" ) ); | 116 | TextLabel3_2->setText( tr( "read" ) ); |
121 | TextLabel3_2->setAlignment( int( QLabel::AlignBottom | QLabel::AlignHCenter ) ); | 117 | TextLabel3_2->setAlignment( int( QLabel::AlignBottom | QLabel::AlignHCenter ) ); |
122 | 118 | ||
123 | TextLabel3_2_2 = new QLabel( this, "TextLabel3_2_2" ); | 119 | TextLabel3_2_2 = new QLabel( this, "TextLabel3_2_2" ); |
124 | TextLabel3_2_2->setGeometry( QRect( 120, 55, 50, 20 ) ); | 120 | TextLabel3_2_2->setGeometry( QRect( 120, 55, 50, 20 ) ); |
125 | TextLabel3_2_2->setText( tr( "write" ) ); | 121 | TextLabel3_2_2->setText( tr( "write" ) ); |
126 | TextLabel3_2_2->setAlignment( int( QLabel::AlignBottom | QLabel::AlignHCenter ) ); | 122 | TextLabel3_2_2->setAlignment( int( QLabel::AlignBottom | QLabel::AlignHCenter ) ); |
127 | 123 | ||
128 | TextLabel3 = new QLabel( this, "TextLabel3" ); | 124 | TextLabel3 = new QLabel( this, "TextLabel3" ); |
129 | TextLabel3->setGeometry( QRect( 180, 55, 50, 20 ) ); | 125 | TextLabel3->setGeometry( QRect( 180, 55, 50, 20 ) ); |
130 | TextLabel3->setText( tr( "execute" ) ); | 126 | TextLabel3->setText( tr( "execute" ) ); |
131 | TextLabel3->setAlignment( int( QLabel::AlignBottom | QLabel::AlignHCenter ) ); | 127 | TextLabel3->setAlignment( int( QLabel::AlignBottom | QLabel::AlignHCenter ) ); |
132 | 128 | ||
133 | struct stat buf; | 129 | struct stat buf; |
134 | mode_t mode; | 130 | mode_t mode; |
135 | file = fileName; | 131 | file = fileName; |
136 | QFileInfo fi(file); | 132 | QFileInfo fi(file); |
137 | 133 | ||
138 | LineEdit1->setText( file); | 134 | LineEdit1->setText( file); |
139 | OwnerLineEdit->setText( fi.owner()); | 135 | OwnerLineEdit->setText( fi.owner()); |
140 | GroupLineEdit->setText( fi.group()); | 136 | GroupLineEdit->setText( fi.group()); |
141 | 137 | ||
142 | if( fi.permission( QFileInfo::ReadUser)) { CheckBox1->setChecked(true); } | 138 | if( fi.permission( QFileInfo::ReadUser)) { CheckBox1->setChecked(true); } |
143 | if( fi.permission( QFileInfo::WriteUser)) { CheckBox1_2->setChecked(true); } | 139 | if( fi.permission( QFileInfo::WriteUser)) { CheckBox1_2->setChecked(true); } |
144 | if( fi.permission( QFileInfo::ExeUser)) { CheckBox1_3->setChecked(true); } | 140 | if( fi.permission( QFileInfo::ExeUser)) { CheckBox1_3->setChecked(true); } |
145 | 141 | ||
146 | if( fi.permission( QFileInfo::ReadGroup)) { CheckBox1_4->setChecked(true); } | 142 | if( fi.permission( QFileInfo::ReadGroup)) { CheckBox1_4->setChecked(true); } |
147 | if( fi.permission( QFileInfo::WriteGroup)) { CheckBox1_5->setChecked(true); } | 143 | if( fi.permission( QFileInfo::WriteGroup)) { CheckBox1_5->setChecked(true); } |
148 | if( fi.permission( QFileInfo::ExeGroup)) { CheckBox1_6->setChecked(true); } | 144 | if( fi.permission( QFileInfo::ExeGroup)) { CheckBox1_6->setChecked(true); } |
149 | 145 | ||
150 | if( fi.permission( QFileInfo::ReadOther)) { CheckBox1_7->setChecked(true); } | 146 | if( fi.permission( QFileInfo::ReadOther)) { CheckBox1_7->setChecked(true); } |
151 | if( fi.permission( QFileInfo::WriteOther)) { CheckBox1_8->setChecked(true); } | 147 | if( fi.permission( QFileInfo::WriteOther)) { CheckBox1_8->setChecked(true); } |
152 | if( fi.permission( QFileInfo::ExeOther)) { CheckBox1_8_2->setChecked(true); } | 148 | if( fi.permission( QFileInfo::ExeOther)) { CheckBox1_8_2->setChecked(true); } |
153 | 149 | ||
154 | stat(file.latin1(), &buf); | 150 | stat(file.latin1(), &buf); |
155 | mode = buf.st_mode; | 151 | mode = buf.st_mode; |
156 | modeStr.sprintf("%#o", buf.st_mode & ~(S_IFMT) ); | 152 | modeStr.sprintf("%#o", buf.st_mode & ~(S_IFMT) ); |
157 | ModeLine->setText(modeStr); | 153 | ModeLine->setText(modeStr); |
158 | bool ok; | 154 | bool ok; |
159 | i_mode = modeStr.toInt(&ok,10); | 155 | i_mode = modeStr.toInt(&ok,10); |
160 | 156 | ||
161 | } | 157 | } |
162 | 158 | ||
163 | /* | 159 | /* |
164 | * Destroys the object and frees any allocated resources | 160 | * Destroys the object and frees any allocated resources |
165 | */ | 161 | */ |
166 | filePermissions::~filePermissions() | 162 | filePermissions::~filePermissions() |
167 | { | 163 | { |
168 | } | 164 | } |
169 | 165 | ||
170 | 166 | ||
171 | // might this be better as a callback routine??? | 167 | // might this be better as a callback routine??? |
172 | void filePermissions::ownReadCheck() { | 168 | void filePermissions::ownReadCheck() { |
173 | if(CheckBox1->isChecked()) { i_mode +=400; } | 169 | if(CheckBox1->isChecked()) { i_mode +=400; } |
174 | else i_mode -=400; | 170 | else i_mode -=400; |
175 | modeStr.sprintf("0%d",i_mode); | 171 | modeStr.sprintf("0%d",i_mode); |
176 | ModeLine->setText( modeStr); | 172 | ModeLine->setText( modeStr); |
177 | // 0400 | 173 | // 0400 |
178 | } | 174 | } |
179 | 175 | ||
180 | void filePermissions::ownWriteCheck() { | 176 | void filePermissions::ownWriteCheck() { |
181 | if(CheckBox1_2->isChecked()) { i_mode +=200; } | 177 | if(CheckBox1_2->isChecked()) { i_mode +=200; } |
182 | else i_mode -=200; | 178 | else i_mode -=200; |
183 | modeStr.sprintf("0%d",i_mode); | 179 | modeStr.sprintf("0%d",i_mode); |
184 | ModeLine->setText(modeStr); | 180 | ModeLine->setText(modeStr); |
185 | // 0200 | 181 | // 0200 |
186 | } | 182 | } |
187 | 183 | ||
188 | void filePermissions::ownExeCheck() { | 184 | void filePermissions::ownExeCheck() { |
189 | if(CheckBox1_3->isChecked()) { i_mode +=100; } | 185 | if(CheckBox1_3->isChecked()) { i_mode +=100; } |
190 | else i_mode -=100; | 186 | else i_mode -=100; |
191 | modeStr.sprintf("0%d",i_mode); | 187 | modeStr.sprintf("0%d",i_mode); |
192 | ModeLine->setText(modeStr); | 188 | ModeLine->setText(modeStr); |
193 | // 0100 | 189 | // 0100 |
194 | } | 190 | } |
195 | 191 | ||
196 | void filePermissions::grpReadCheck() { | 192 | void filePermissions::grpReadCheck() { |
197 | if(CheckBox1_4->isChecked()) { i_mode +=40; } | 193 | if(CheckBox1_4->isChecked()) { i_mode +=40; } |
198 | else i_mode -=40; | 194 | else i_mode -=40; |
199 | modeStr.sprintf("0%d",i_mode); | 195 | modeStr.sprintf("0%d",i_mode); |
200 | ModeLine->setText(modeStr); | 196 | ModeLine->setText(modeStr); |
201 | // 0040 | 197 | // 0040 |
202 | } | 198 | } |
203 | 199 | ||
204 | void filePermissions::grpWriteCheck() { | 200 | void filePermissions::grpWriteCheck() { |
205 | if(CheckBox1_5->isChecked()) { i_mode +=20; } | 201 | if(CheckBox1_5->isChecked()) { i_mode +=20; } |
206 | else i_mode -=20; | 202 | else i_mode -=20; |
207 | modeStr.sprintf("0%d",i_mode); | 203 | modeStr.sprintf("0%d",i_mode); |
208 | ModeLine->setText(modeStr); | 204 | ModeLine->setText(modeStr); |
209 | // 0020 | 205 | // 0020 |
210 | } | 206 | } |
211 | 207 | ||
212 | void filePermissions::grpExeCheck() { | 208 | void filePermissions::grpExeCheck() { |
213 | if(CheckBox1_6->isChecked()) { i_mode +=10; } | 209 | if(CheckBox1_6->isChecked()) { i_mode +=10; } |
214 | else i_mode -=10; | 210 | else i_mode -=10; |
215 | modeStr.sprintf("0%d",i_mode); | 211 | modeStr.sprintf("0%d",i_mode); |
216 | ModeLine->setText(modeStr); | 212 | ModeLine->setText(modeStr); |
diff --git a/noncore/net/opieftp/inputDialog.cpp b/noncore/net/opieftp/inputDialog.cpp index 373db3b..23741c0 100644 --- a/noncore/net/opieftp/inputDialog.cpp +++ b/noncore/net/opieftp/inputDialog.cpp | |||
@@ -1,44 +1,40 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | inputDialog.cpp | 2 | inputDialog.cpp |
3 | ------------------- | 3 | ------------------- |
4 | ** Created: Sat Mar 9 23:33:09 2002 | 4 | ** Created: Sat Mar 9 23:33:09 2002 |
5 | copyright : (C) 2002 by ljp | 5 | copyright : (C) 2002 by ljp |
6 | email : ljp@llornkcor.com | 6 | email : ljp@llornkcor.com |
7 | * This program is free software; you can redistribute it and/or modify * | 7 | * This program is free software; you can redistribute it and/or modify * |
8 | * it under the terms of the GNU General Public License as published by * | 8 | * it under the terms of the GNU General Public License as published by * |
9 | * the Free Software Foundation; either version 2 of the License, or * | 9 | * the Free Software Foundation; either version 2 of the License, or * |
10 | * (at your option) any later version. * | 10 | * (at your option) any later version. * |
11 | ***************************************************************************/ | 11 | ***************************************************************************/ |
12 | 12 | ||
13 | #include "inputDialog.h" | 13 | #include "inputDialog.h" |
14 | 14 | ||
15 | #include <qlineedit.h> | 15 | #include <qlineedit.h> |
16 | #include <qlayout.h> | ||
17 | #include <qvariant.h> | ||
18 | #include <qtooltip.h> | ||
19 | #include <qwhatsthis.h> | ||
20 | 16 | ||
21 | 17 | ||
22 | InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) | 18 | InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) |
23 | : QDialog( parent, name, modal, fl ) | 19 | : QDialog( parent, name, modal, fl ) |
24 | { | 20 | { |
25 | if ( !name ) | 21 | if ( !name ) |
26 | setName( "InputDialog" ); | 22 | setName( "InputDialog" ); |
27 | resize( 234, 50 ); | 23 | resize( 234, 50 ); |
28 | setMaximumSize( QSize( 240, 50 ) ); | 24 | setMaximumSize( QSize( 240, 50 ) ); |
29 | setCaption( tr(name ) ); | 25 | setCaption( tr(name ) ); |
30 | 26 | ||
31 | LineEdit1 = new QLineEdit( this, "LineEdit1" ); | 27 | LineEdit1 = new QLineEdit( this, "LineEdit1" ); |
32 | LineEdit1->setGeometry( QRect( 10, 10, 216, 22 ) ); | 28 | LineEdit1->setGeometry( QRect( 10, 10, 216, 22 ) ); |
33 | } | 29 | } |
34 | 30 | ||
35 | InputDialog::~InputDialog() | 31 | InputDialog::~InputDialog() |
36 | { | 32 | { |
37 | inputText= LineEdit1->text(); | 33 | inputText= LineEdit1->text(); |
38 | 34 | ||
39 | } | 35 | } |
40 | 36 | ||
41 | void InputDialog::setTextEdit(const QString &string) | 37 | void InputDialog::setTextEdit(const QString &string) |
42 | { | 38 | { |
43 | LineEdit1->setText(string); | 39 | LineEdit1->setText(string); |
44 | } | 40 | } |
diff --git a/noncore/net/opieftp/main.cpp b/noncore/net/opieftp/main.cpp index 28676e1..4f5a7d4 100644 --- a/noncore/net/opieftp/main.cpp +++ b/noncore/net/opieftp/main.cpp | |||
@@ -1,31 +1,27 @@ | |||
1 | 1 | ||
2 | /*************************************************************************** | 2 | /*************************************************************************** |
3 | main.cpp - description | 3 | main.cpp - description |
4 | ------------------- | 4 | ------------------- |
5 | begin : March 10, 2002 | 5 | begin : March 10, 2002 |
6 | copyright : (C) 2002 by llornkcor | 6 | copyright : (C) 2002 by llornkcor |
7 | email : ljp@llornkcor.com | 7 | email : ljp@llornkcor.com |
8 | * This program is free software; you can redistribute it and/or modify * | 8 | * This program is free software; you can redistribute it and/or modify * |
9 | * it under the terms of the GNU General Public License as published by * | 9 | * it under the terms of the GNU General Public License as published by * |
10 | * the Free Software Foundation; either version 2 of the License, or * | 10 | * the Free Software Foundation; either version 2 of the License, or * |
11 | * (at your option) any later version. * | 11 | * (at your option) any later version. * |
12 | ***************************************************************************/ | 12 | ***************************************************************************/ |
13 | #include <qpe/qpeapplication.h> | 13 | #include <qpe/qpeapplication.h> |
14 | #include <qpe/qcopenvelope_qws.h> | ||
15 | #include <qpe/config.h> | ||
16 | #include <qstring.h> | ||
17 | #include <qstringlist.h> | ||
18 | 14 | ||
19 | 15 | ||
20 | 16 | ||
21 | #include "opieftp.h" | 17 | #include "opieftp.h" |
22 | 18 | ||
23 | int main(int argc, char *argv[]) | 19 | int main(int argc, char *argv[]) |
24 | { | 20 | { |
25 | QPEApplication a(argc, argv); | 21 | QPEApplication a(argc, argv); |
26 | 22 | ||
27 | OpieFtp opieftp; | 23 | OpieFtp opieftp; |
28 | a.showMainWidget( &opieftp); | 24 | a.showMainWidget( &opieftp); |
29 | return a.exec(); | 25 | return a.exec(); |
30 | } | 26 | } |
31 | 27 | ||
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp index e81b7ca..668a03d 100644 --- a/noncore/net/opieftp/opieftp.cpp +++ b/noncore/net/opieftp/opieftp.cpp | |||
@@ -1,245 +1,231 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | opieftp.cpp | 2 | opieftp.cpp |
3 | ------------------- | 3 | ------------------- |
4 | ** Created: Sat Mar 9 23:33:09 2002 | 4 | ** Created: Sat Mar 9 23:33:09 2002 |
5 | copyright : (C) 2002 by ljp | 5 | copyright : (C) 2002 by ljp |
6 | email : ljp@llornkcor.com | 6 | email : ljp@llornkcor.com |
7 | * This program is free software; you can redistribute it and/or modify * | 7 | * This program is free software; you can redistribute it and/or modify * |
8 | * it under the terms of the GNU General Public License as published by * | 8 | * it under the terms of the GNU General Public License as published by * |
9 | * the Free Software Foundation; either version 2 of the License, or * | 9 | * the Free Software Foundation; either version 2 of the License, or * |
10 | * (at your option) any later version. * | 10 | * (at your option) any later version. * |
11 | ***************************************************************************/ | 11 | ***************************************************************************/ |
12 | //#define DEVELOPERS_VERSION | 12 | //#define DEVELOPERS_VERSION |
13 | 13 | ||
14 | #include "opieftp.h" | 14 | #include "opieftp.h" |
15 | 15 | ||
16 | extern "C" { | 16 | extern "C" { |
17 | #include "../ftplib/ftplib.h" | 17 | #include "../ftplib/ftplib.h" |
18 | } | 18 | } |
19 | 19 | ||
20 | #include "inputDialog.h" | 20 | #include "inputDialog.h" |
21 | 21 | ||
22 | #include <qpe/qpemenubar.h> | 22 | #include <qpe/qpemenubar.h> |
23 | #include <qpe/qpetoolbar.h> | ||
24 | #include <qpe/qpeapplication.h> | 23 | #include <qpe/qpeapplication.h> |
25 | #include <qpe/resource.h> | 24 | #include <qpe/resource.h> |
26 | #include <qpe/qcopenvelope_qws.h> | ||
27 | #include <qpe/config.h> | 25 | #include <qpe/config.h> |
28 | #include <qpe/mimetype.h> | 26 | #include <qpe/mimetype.h> |
29 | #include <qpe/qpemessagebox.h> | ||
30 | 27 | ||
31 | #include <qstringlist.h> | ||
32 | #include <qtextstream.h> | 28 | #include <qtextstream.h> |
33 | #include <qpushbutton.h> | 29 | #include <qpushbutton.h> |
34 | #include <qtoolbutton.h> | 30 | #include <qtoolbutton.h> |
35 | #include <qdatetime.h> | ||
36 | #include <qdir.h> | ||
37 | #include <qfile.h> | ||
38 | #include <qstring.h> | ||
39 | #include <qcombobox.h> | 31 | #include <qcombobox.h> |
40 | #include <qpopupmenu.h> | ||
41 | #include <qlistview.h> | 32 | #include <qlistview.h> |
42 | #include <qmainwindow.h> | ||
43 | #include <qlabel.h> | 33 | #include <qlabel.h> |
44 | #include <qprogressbar.h> | 34 | #include <qprogressbar.h> |
45 | #include <qspinbox.h> | 35 | #include <qspinbox.h> |
46 | #include <qtabwidget.h> | 36 | #include <qtabwidget.h> |
47 | #include <qwidget.h> | ||
48 | #include <qlayout.h> | 37 | #include <qlayout.h> |
49 | #include <qimage.h> | ||
50 | #include <qpixmap.h> | ||
51 | #include <qmessagebox.h> | 38 | #include <qmessagebox.h> |
52 | #include <qlineedit.h> | 39 | #include <qlineedit.h> |
53 | #include <qregexp.h> | ||
54 | #include <qlistbox.h> | 40 | #include <qlistbox.h> |
55 | 41 | ||
56 | #include <unistd.h> | 42 | #include <unistd.h> |
57 | #include <stdlib.h> | 43 | #include <stdlib.h> |
58 | 44 | ||
59 | 45 | ||
60 | QProgressBar *ProgressBar; | 46 | QProgressBar *ProgressBar; |
61 | static netbuf *conn=NULL; | 47 | static netbuf *conn=NULL; |
62 | 48 | ||
63 | static int log_progress(netbuf *, int xfered, void *) | 49 | static int log_progress(netbuf *, int xfered, void *) |
64 | { | 50 | { |
65 | // int fsz = *(int *)arg; | 51 | // int fsz = *(int *)arg; |
66 | // int pct = (xfered * 100) / fsz; | 52 | // int pct = (xfered * 100) / fsz; |
67 | // printf("%3d%%\r", pct); | 53 | // printf("%3d%%\r", pct); |
68 | // fflush(stdout); | 54 | // fflush(stdout); |
69 | ProgressBar->setProgress(xfered); | 55 | ProgressBar->setProgress(xfered); |
70 | qApp->processEvents(); | 56 | qApp->processEvents(); |
71 | return 1; | 57 | return 1; |
72 | } | 58 | } |
73 | 59 | ||
74 | OpieFtp::OpieFtp( ) | 60 | OpieFtp::OpieFtp( ) |
75 | : QMainWindow( ) | 61 | : QMainWindow( ) |
76 | { | 62 | { |
77 | setCaption( tr( "OpieFtp" ) ); | 63 | setCaption( tr( "OpieFtp" ) ); |
78 | fuckeduphack=FALSE; | 64 | fuckeduphack=FALSE; |
79 | QGridLayout *layout = new QGridLayout( this ); | 65 | QGridLayout *layout = new QGridLayout( this ); |
80 | layout->setSpacing( 2); | 66 | layout->setSpacing( 2); |
81 | layout->setMargin( 2); | 67 | layout->setMargin( 2); |
82 | 68 | ||
83 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); | 69 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); |
84 | 70 | ||
85 | QPEMenuBar *menuBar = new QPEMenuBar(this); | 71 | QPEMenuBar *menuBar = new QPEMenuBar(this); |
86 | // QPEToolBar *menuBar = new QPEToolBar(this); | 72 | // QPEToolBar *menuBar = new QPEToolBar(this); |
87 | // menuBar->setHorizontalStretchable( TRUE ); | 73 | // menuBar->setHorizontalStretchable( TRUE ); |
88 | 74 | ||
89 | QWMatrix matrix; | 75 | QWMatrix matrix; |
90 | QPixmap pix(Resource::loadPixmap( "UnknownDocument" )); | 76 | QPixmap pix(Resource::loadPixmap( "UnknownDocument" )); |
91 | matrix.scale( .4, .4); | 77 | matrix.scale( .4, .4); |
92 | unknownXpm = pix.xForm(matrix); | 78 | unknownXpm = pix.xForm(matrix); |
93 | 79 | ||
94 | connectionMenu = new QPopupMenu( this ); | 80 | connectionMenu = new QPopupMenu( this ); |
95 | localMenu = new QPopupMenu( this ); | 81 | localMenu = new QPopupMenu( this ); |
96 | remoteMenu = new QPopupMenu( this ); | 82 | remoteMenu = new QPopupMenu( this ); |
97 | tabMenu = new QPopupMenu( this ); | 83 | tabMenu = new QPopupMenu( this ); |
98 | 84 | ||
99 | layout->addMultiCellWidget( menuBar, 0, 0, 0, 2 ); | 85 | layout->addMultiCellWidget( menuBar, 0, 0, 0, 2 ); |
100 | 86 | ||
101 | menuBar->insertItem( tr( "Connection" ), connectionMenu); | 87 | menuBar->insertItem( tr( "Connection" ), connectionMenu); |
102 | // menuBar->insertItem( tr( "Local" ), localMenu); | 88 | // menuBar->insertItem( tr( "Local" ), localMenu); |
103 | // menuBar->insertItem( tr( "Remote" ), remoteMenu); | 89 | // menuBar->insertItem( tr( "Remote" ), remoteMenu); |
104 | menuBar->insertItem( tr( "View" ), tabMenu); | 90 | menuBar->insertItem( tr( "View" ), tabMenu); |
105 | 91 | ||
106 | tabMenu->insertItem( tr( "Local" ), localMenu); | 92 | tabMenu->insertItem( tr( "Local" ), localMenu); |
107 | tabMenu->insertItem( tr( "Remote" ), remoteMenu); | 93 | tabMenu->insertItem( tr( "Remote" ), remoteMenu); |
108 | 94 | ||
109 | connectionMenu->insertItem( tr( "New" ), this, SLOT( newConnection() )); | 95 | connectionMenu->insertItem( tr( "New" ), this, SLOT( newConnection() )); |
110 | connectionMenu->insertItem( tr( "Connect" ), this, SLOT( connector() )); | 96 | connectionMenu->insertItem( tr( "Connect" ), this, SLOT( connector() )); |
111 | connectionMenu->insertItem( tr( "Disconnect" ), this, SLOT( disConnector() )); | 97 | connectionMenu->insertItem( tr( "Disconnect" ), this, SLOT( disConnector() )); |
112 | 98 | ||
113 | localMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); | 99 | localMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); |
114 | localMenu->insertSeparator(); | 100 | localMenu->insertSeparator(); |
115 | localMenu->insertItem( tr( "Upload" ), this, SLOT( localUpload() )); | 101 | localMenu->insertItem( tr( "Upload" ), this, SLOT( localUpload() )); |
116 | localMenu->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); | 102 | localMenu->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); |
117 | localMenu->insertItem( tr( "Rename" ), this, SLOT( localRename() )); | 103 | localMenu->insertItem( tr( "Rename" ), this, SLOT( localRename() )); |
118 | localMenu->insertSeparator(); | 104 | localMenu->insertSeparator(); |
119 | localMenu->insertItem( tr( "Delete" ), this, SLOT( localDelete() )); | 105 | localMenu->insertItem( tr( "Delete" ), this, SLOT( localDelete() )); |
120 | localMenu->setCheckable(TRUE); | 106 | localMenu->setCheckable(TRUE); |
121 | 107 | ||
122 | remoteMenu->insertItem( tr( "Download" ), this, SLOT( remoteDownload() )); | 108 | remoteMenu->insertItem( tr( "Download" ), this, SLOT( remoteDownload() )); |
123 | remoteMenu->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); | 109 | remoteMenu->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); |
124 | remoteMenu->insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); | 110 | remoteMenu->insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); |
125 | remoteMenu->insertSeparator(); | 111 | remoteMenu->insertSeparator(); |
126 | remoteMenu->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); | 112 | remoteMenu->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); |
127 | 113 | ||
128 | tabMenu->insertSeparator(); | 114 | tabMenu->insertSeparator(); |
129 | tabMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() )); | 115 | tabMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() )); |
130 | tabMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() )); | 116 | tabMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() )); |
131 | tabMenu->insertItem( tr( "Switch to Config" ), this, SLOT( switchToConfigTab() )); | 117 | tabMenu->insertItem( tr( "Switch to Config" ), this, SLOT( switchToConfigTab() )); |
132 | tabMenu->insertSeparator(); | 118 | tabMenu->insertSeparator(); |
133 | // tabMenu->insertItem( tr( "About" ), this, SLOT( doAbout() )); | 119 | // tabMenu->insertItem( tr( "About" ), this, SLOT( doAbout() )); |
134 | tabMenu->setCheckable(TRUE); | 120 | tabMenu->setCheckable(TRUE); |
135 | 121 | ||
136 | 122 | ||
137 | 123 | ||
138 | cdUpButton = new QToolButton( this,"cdUpButton"); | 124 | cdUpButton = new QToolButton( this,"cdUpButton"); |
139 | cdUpButton->setPixmap(Resource::loadPixmap("up")); | 125 | cdUpButton->setPixmap(Resource::loadPixmap("up")); |
140 | cdUpButton ->setFixedSize( QSize( 20, 20 ) ); | 126 | cdUpButton ->setFixedSize( QSize( 20, 20 ) ); |
141 | connect( cdUpButton ,SIGNAL(released()),this,SLOT( upDir()) ); | 127 | connect( cdUpButton ,SIGNAL(released()),this,SLOT( upDir()) ); |
142 | layout->addMultiCellWidget( cdUpButton, 0, 0, 3, 3 ); | 128 | layout->addMultiCellWidget( cdUpButton, 0, 0, 3, 3 ); |
143 | cdUpButton->hide(); | 129 | cdUpButton->hide(); |
144 | 130 | ||
145 | // docButton = new QPushButton(Resource::loadIconSet("DocsIcon"),"",this,"docsButton"); | 131 | // docButton = new QPushButton(Resource::loadIconSet("DocsIcon"),"",this,"docsButton"); |
146 | // docButton->setFixedSize( QSize( 20, 20 ) ); | 132 | // docButton->setFixedSize( QSize( 20, 20 ) ); |
147 | // connect( docButton,SIGNAL(released()),this,SLOT( docButtonPushed()) ); | 133 | // connect( docButton,SIGNAL(released()),this,SLOT( docButtonPushed()) ); |
148 | // docButton->setFlat(TRUE); | 134 | // docButton->setFlat(TRUE); |
149 | // layout->addMultiCellWidget( docButton, 0, 0, 6, 6 ); | 135 | // layout->addMultiCellWidget( docButton, 0, 0, 6, 6 ); |
150 | 136 | ||
151 | homeButton = new QToolButton(this,"homeButton"); | 137 | homeButton = new QToolButton(this,"homeButton"); |
152 | homeButton->setPixmap( Resource::loadPixmap("home")); | 138 | homeButton->setPixmap( Resource::loadPixmap("home")); |
153 | homeButton->setFixedSize( QSize( 20, 20 ) ); | 139 | homeButton->setFixedSize( QSize( 20, 20 ) ); |
154 | connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) ); | 140 | connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) ); |
155 | layout->addMultiCellWidget( homeButton, 0, 0, 4, 4); | 141 | layout->addMultiCellWidget( homeButton, 0, 0, 4, 4); |
156 | homeButton->hide(); | 142 | homeButton->hide(); |
157 | 143 | ||
158 | TabWidget = new QTabWidget( this, "TabWidget" ); | 144 | TabWidget = new QTabWidget( this, "TabWidget" ); |
159 | layout->addMultiCellWidget( TabWidget, 1, 1, 0, 4 ); | 145 | layout->addMultiCellWidget( TabWidget, 1, 1, 0, 4 ); |
160 | 146 | ||
161 | // TabWidget->setTabShape(QTabWidget::Triangular); | 147 | // TabWidget->setTabShape(QTabWidget::Triangular); |
162 | 148 | ||
163 | tab = new QWidget( TabWidget, "tab" ); | 149 | tab = new QWidget( TabWidget, "tab" ); |
164 | tabLayout = new QGridLayout( tab ); | 150 | tabLayout = new QGridLayout( tab ); |
165 | tabLayout->setSpacing( 2); | 151 | tabLayout->setSpacing( 2); |
166 | tabLayout->setMargin( 2); | 152 | tabLayout->setMargin( 2); |
167 | 153 | ||
168 | Local_View = new QListView( tab, "Local_View" ); | 154 | Local_View = new QListView( tab, "Local_View" ); |
169 | // Local_View->setResizePolicy( QListView::AutoOneFit ); | 155 | // Local_View->setResizePolicy( QListView::AutoOneFit ); |
170 | Local_View->addColumn( tr("File"),150); | 156 | Local_View->addColumn( tr("File"),150); |
171 | Local_View->addColumn( tr("Date"),-1); | 157 | Local_View->addColumn( tr("Date"),-1); |
172 | Local_View->setColumnAlignment(1,QListView::AlignRight); | 158 | Local_View->setColumnAlignment(1,QListView::AlignRight); |
173 | Local_View->addColumn( tr("Size"),-1); | 159 | Local_View->addColumn( tr("Size"),-1); |
174 | Local_View->setColumnAlignment(2,QListView::AlignRight); | 160 | Local_View->setColumnAlignment(2,QListView::AlignRight); |
175 | Local_View->setAllColumnsShowFocus(TRUE); | 161 | Local_View->setAllColumnsShowFocus(TRUE); |
176 | 162 | ||
177 | Local_View->setMultiSelection( TRUE); | 163 | Local_View->setMultiSelection( TRUE); |
178 | Local_View->setSelectionMode(QListView::Extended); | 164 | Local_View->setSelectionMode(QListView::Extended); |
179 | Local_View->setFocusPolicy(QWidget::ClickFocus); | 165 | Local_View->setFocusPolicy(QWidget::ClickFocus); |
180 | 166 | ||
181 | QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold); | 167 | QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold); |
182 | 168 | ||
183 | tabLayout->addWidget( Local_View, 0, 0 ); | 169 | tabLayout->addWidget( Local_View, 0, 0 ); |
184 | 170 | ||
185 | connect( Local_View, SIGNAL( clicked( QListViewItem*)), | 171 | connect( Local_View, SIGNAL( clicked( QListViewItem*)), |
186 | this,SLOT( localListClicked(QListViewItem *)) ); | 172 | this,SLOT( localListClicked(QListViewItem *)) ); |
187 | // connect( Local_View, SIGNAL( doubleClicked( QListViewItem*)), | 173 | // connect( Local_View, SIGNAL( doubleClicked( QListViewItem*)), |
188 | // this,SLOT( localListClicked(QListViewItem *)) ); | 174 | // this,SLOT( localListClicked(QListViewItem *)) ); |
189 | connect( Local_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), | 175 | connect( Local_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), |
190 | this,SLOT( ListPressed(int, QListViewItem *, const QPoint&, int)) ); | 176 | this,SLOT( ListPressed(int, QListViewItem *, const QPoint&, int)) ); |
191 | 177 | ||
192 | TabWidget->insertTab( tab, tr( "Local" ) ); | 178 | TabWidget->insertTab( tab, tr( "Local" ) ); |
193 | 179 | ||
194 | tab_2 = new QWidget( TabWidget, "tab_2" ); | 180 | tab_2 = new QWidget( TabWidget, "tab_2" ); |
195 | tabLayout_2 = new QGridLayout( tab_2 ); | 181 | tabLayout_2 = new QGridLayout( tab_2 ); |
196 | tabLayout_2->setSpacing( 2); | 182 | tabLayout_2->setSpacing( 2); |
197 | tabLayout_2->setMargin( 2); | 183 | tabLayout_2->setMargin( 2); |
198 | 184 | ||
199 | Remote_View = new QListView( tab_2, "Remote_View" ); | 185 | Remote_View = new QListView( tab_2, "Remote_View" ); |
200 | Remote_View->addColumn( tr("File"),150); | 186 | Remote_View->addColumn( tr("File"),150); |
201 | Remote_View->addColumn( tr("Date"),-1); | 187 | Remote_View->addColumn( tr("Date"),-1); |
202 | // Remote_View->setColumnAlignment(1,QListView::AlignRight); | 188 | // Remote_View->setColumnAlignment(1,QListView::AlignRight); |
203 | Remote_View->addColumn( tr("Size"),-1); | 189 | Remote_View->addColumn( tr("Size"),-1); |
204 | Remote_View->setColumnAlignment(2,QListView::AlignRight); | 190 | Remote_View->setColumnAlignment(2,QListView::AlignRight); |
205 | Remote_View->setColumnAlignment(3,QListView::AlignCenter); | 191 | Remote_View->setColumnAlignment(3,QListView::AlignCenter); |
206 | Remote_View->addColumn( tr("Dir"),-1); | 192 | Remote_View->addColumn( tr("Dir"),-1); |
207 | Remote_View->setColumnAlignment(4,QListView::AlignRight); | 193 | Remote_View->setColumnAlignment(4,QListView::AlignRight); |
208 | Remote_View->setAllColumnsShowFocus(TRUE); | 194 | Remote_View->setAllColumnsShowFocus(TRUE); |
209 | 195 | ||
210 | Remote_View->setMultiSelection( FALSE); | 196 | Remote_View->setMultiSelection( FALSE); |
211 | Remote_View->setSelectionMode(QListView::Extended); | 197 | Remote_View->setSelectionMode(QListView::Extended); |
212 | Remote_View->setFocusPolicy(QWidget::ClickFocus); | 198 | Remote_View->setFocusPolicy(QWidget::ClickFocus); |
213 | 199 | ||
214 | QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold); | 200 | QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold); |
215 | 201 | ||
216 | connect( Remote_View, SIGNAL( clicked( QListViewItem*)), | 202 | connect( Remote_View, SIGNAL( clicked( QListViewItem*)), |
217 | this,SLOT( remoteListClicked(QListViewItem *)) ); | 203 | this,SLOT( remoteListClicked(QListViewItem *)) ); |
218 | connect( Remote_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), | 204 | connect( Remote_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), |
219 | this,SLOT( RemoteListPressed(int, QListViewItem *, const QPoint&, int)) ); | 205 | this,SLOT( RemoteListPressed(int, QListViewItem *, const QPoint&, int)) ); |
220 | 206 | ||
221 | tabLayout_2->addWidget( Remote_View, 0, 0 ); | 207 | tabLayout_2->addWidget( Remote_View, 0, 0 ); |
222 | 208 | ||
223 | TabWidget->insertTab( tab_2, tr( "Remote" ) ); | 209 | TabWidget->insertTab( tab_2, tr( "Remote" ) ); |
224 | 210 | ||
225 | tab_3 = new QWidget( TabWidget, "tab_3" ); | 211 | tab_3 = new QWidget( TabWidget, "tab_3" ); |
226 | tabLayout_3 = new QGridLayout( tab_3 ); | 212 | tabLayout_3 = new QGridLayout( tab_3 ); |
227 | tabLayout_3->setSpacing( 2); | 213 | tabLayout_3->setSpacing( 2); |
228 | tabLayout_3->setMargin( 2); | 214 | tabLayout_3->setMargin( 2); |
229 | 215 | ||
230 | TextLabel1 = new QLabel( tab_3, "TextLabel1" ); | 216 | TextLabel1 = new QLabel( tab_3, "TextLabel1" ); |
231 | TextLabel1->setText( tr( "Username" ) ); | 217 | TextLabel1->setText( tr( "Username" ) ); |
232 | tabLayout_3->addMultiCellWidget( TextLabel1, 0, 0, 0, 1 ); | 218 | tabLayout_3->addMultiCellWidget( TextLabel1, 0, 0, 0, 1 ); |
233 | 219 | ||
234 | UsernameComboBox = new QComboBox( FALSE, tab_3, "UsernameComboBox" ); | 220 | UsernameComboBox = new QComboBox( FALSE, tab_3, "UsernameComboBox" ); |
235 | UsernameComboBox->setEditable(TRUE); | 221 | UsernameComboBox->setEditable(TRUE); |
236 | tabLayout_3->addMultiCellWidget( UsernameComboBox, 1, 1, 0, 1 ); | 222 | tabLayout_3->addMultiCellWidget( UsernameComboBox, 1, 1, 0, 1 ); |
237 | 223 | ||
238 | connect( UsernameComboBox,SIGNAL(textChanged(const QString &)),this, | 224 | connect( UsernameComboBox,SIGNAL(textChanged(const QString &)),this, |
239 | SLOT( UsernameComboBoxEdited(const QString & ) )); | 225 | SLOT( UsernameComboBoxEdited(const QString & ) )); |
240 | 226 | ||
241 | TextLabel2 = new QLabel( tab_3, "TextLabel2" ); | 227 | TextLabel2 = new QLabel( tab_3, "TextLabel2" ); |
242 | TextLabel2->setText( tr( "Password" ) ); | 228 | TextLabel2->setText( tr( "Password" ) ); |
243 | tabLayout_3->addMultiCellWidget( TextLabel2, 0, 0, 2, 3 ); | 229 | tabLayout_3->addMultiCellWidget( TextLabel2, 0, 0, 2, 3 ); |
244 | 230 | ||
245 | PasswordEdit = new QLineEdit( "", tab_3, "PasswordComboBox" ); | 231 | PasswordEdit = new QLineEdit( "", tab_3, "PasswordComboBox" ); |