Diffstat (limited to 'noncore/apps/zsafe/scqtfiledlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/zsafe/scqtfiledlg.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/noncore/apps/zsafe/scqtfiledlg.cpp b/noncore/apps/zsafe/scqtfiledlg.cpp index dd72fdf..52b8d0d 100644 --- a/noncore/apps/zsafe/scqtfiledlg.cpp +++ b/noncore/apps/zsafe/scqtfiledlg.cpp | |||
@@ -102,155 +102,155 @@ ScQtFileDlg::ScQtFileDlg( QWidget* parent, const char* name, bool modal, WFlags | |||
102 | resize( 196, 279 ); | 102 | resize( 196, 279 ); |
103 | if (!name) | 103 | if (!name) |
104 | setCaption( tr( "FileDlg" ) ); | 104 | setCaption( tr( "FileDlg" ) ); |
105 | else | 105 | else |
106 | setCaption(name); | 106 | setCaption(name); |
107 | ScQtFileDlgLayout = new QVBoxLayout( this ); | 107 | ScQtFileDlgLayout = new QVBoxLayout( this ); |
108 | ScQtFileDlgLayout->setSpacing( 6 ); | 108 | ScQtFileDlgLayout->setSpacing( 6 ); |
109 | ScQtFileDlgLayout->setMargin( 11 ); | 109 | ScQtFileDlgLayout->setMargin( 11 ); |
110 | 110 | ||
111 | Layout5 = new QVBoxLayout; | 111 | Layout5 = new QVBoxLayout; |
112 | Layout5->setSpacing( 6 ); | 112 | Layout5->setSpacing( 6 ); |
113 | Layout5->setMargin( 0 ); | 113 | Layout5->setMargin( 0 ); |
114 | 114 | ||
115 | Layout4 = new QVBoxLayout; | 115 | Layout4 = new QVBoxLayout; |
116 | Layout4->setSpacing( 6 ); | 116 | Layout4->setSpacing( 6 ); |
117 | Layout4->setMargin( 0 ); | 117 | Layout4->setMargin( 0 ); |
118 | 118 | ||
119 | Layout3 = new QHBoxLayout; | 119 | Layout3 = new QHBoxLayout; |
120 | Layout3->setSpacing( 6 ); | 120 | Layout3->setSpacing( 6 ); |
121 | Layout3->setMargin( 0 ); | 121 | Layout3->setMargin( 0 ); |
122 | 122 | ||
123 | TypeComboBox = new QComboBox( FALSE, this, "TypeComboBox" ); | 123 | TypeComboBox = new QComboBox( FALSE, this, "TypeComboBox" ); |
124 | TypeComboBox->setEditable( TRUE ); | 124 | TypeComboBox->setEditable( TRUE ); |
125 | TypeComboBox->setInsertionPolicy( QComboBox::AtBottom ); | 125 | TypeComboBox->setInsertionPolicy( QComboBox::AtBottom ); |
126 | TypeComboBox->setAutoCompletion( FALSE ); | 126 | TypeComboBox->setAutoCompletion( FALSE ); |
127 | TypeComboBox->setDuplicatesEnabled( FALSE ); | 127 | TypeComboBox->setDuplicatesEnabled( FALSE ); |
128 | QToolTip::add( TypeComboBox, tr( "file type filter" ) ); | 128 | QToolTip::add( TypeComboBox, tr( "file type filter" ) ); |
129 | QWhatsThis::add( TypeComboBox, tr( "ComboBox FileTypeFilter\n" | 129 | QWhatsThis::add( TypeComboBox, tr( "ComboBox FileTypeFilter\n" |
130 | "\n" | 130 | "\n" |
131 | "edit or select the filter" ) ); | 131 | "edit or select the filter" ) ); |
132 | Layout3->addWidget( TypeComboBox ); | 132 | Layout3->addWidget( TypeComboBox ); |
133 | QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); | 133 | QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); |
134 | Layout3->addItem( spacer ); | 134 | Layout3->addItem( spacer ); |
135 | 135 | ||
136 | OkButton = new QToolButton( this, "OkButton" ); | 136 | OkButton = new QToolButton( this, "OkButton" ); |
137 | OkButton->setText( tr( "" ) ); | 137 | OkButton->setText( tr( "" ) ); |
138 | OkButton->setPixmap( image0 ); | 138 | OkButton->setPixmap( image0 ); |
139 | OkButton->setUsesBigPixmap( FALSE ); | 139 | OkButton->setUsesBigPixmap( FALSE ); |
140 | QToolTip::add( OkButton, tr( "confirms the selection and closes the form" ) ); | 140 | QToolTip::add( OkButton, tr( "confirms the selection and closes the form" ) ); |
141 | QWhatsThis::add( OkButton, tr( "OKButton" ) ); | 141 | QWhatsThis::add( OkButton, tr( "OKButton" ) ); |
142 | Layout3->addWidget( OkButton ); | 142 | Layout3->addWidget( OkButton ); |
143 | 143 | ||
144 | CancelButton = new QToolButton( this, "CancelButton" ); | 144 | CancelButton = new QToolButton( this, "CancelButton" ); |
145 | CancelButton->setText( tr( "" ) ); | 145 | CancelButton->setText( tr( "" ) ); |
146 | CancelButton->setPixmap( image1 ); | 146 | CancelButton->setPixmap( image1 ); |
147 | CancelButton->setUsesBigPixmap( FALSE ); | 147 | CancelButton->setUsesBigPixmap( FALSE ); |
148 | QToolTip::add( CancelButton, tr( "cancels the selection and closes the form" ) ); | 148 | QToolTip::add( CancelButton, tr( "cancels the selection and closes the form" ) ); |
149 | QWhatsThis::add( CancelButton, tr( "CancelButton" ) ); | 149 | QWhatsThis::add( CancelButton, tr( "CancelButton" ) ); |
150 | Layout3->addWidget( CancelButton ); | 150 | Layout3->addWidget( CancelButton ); |
151 | Layout4->addLayout( Layout3 ); | 151 | Layout4->addLayout( Layout3 ); |
152 | 152 | ||
153 | Layout3_2 = new QHBoxLayout; | 153 | Layout3_2 = new QHBoxLayout; |
154 | Layout3_2->setSpacing( 6 ); | 154 | Layout3_2->setSpacing( 6 ); |
155 | Layout3_2->setMargin( 0 ); | 155 | Layout3_2->setMargin( 0 ); |
156 | 156 | ||
157 | FNameLineEdit = new QLineEdit( this, "FNameLineEdit" ); | 157 | FNameLineEdit = new QLineEdit( this, "FNameLineEdit" ); |
158 | QToolTip::add( FNameLineEdit, tr( "shows the selected filename" ) ); | 158 | QToolTip::add( FNameLineEdit, tr( "shows the selected filename" ) ); |
159 | QWhatsThis::add( FNameLineEdit, tr( "Filename LineEdit\n" | 159 | QWhatsThis::add( FNameLineEdit, tr( "Filename LineEdit\n" |
160 | "\n" | 160 | "\n" |
161 | "shows the selected file\n" | 161 | "shows the selected file\n" |
162 | "and allows the direct filename\n" | 162 | "and allows the direct filename\n" |
163 | "edit" ) ); | 163 | "edit" ) ); |
164 | Layout3_2->addWidget( FNameLineEdit ); | 164 | Layout3_2->addWidget( FNameLineEdit ); |
165 | 165 | ||
166 | MkDirButton = new QToolButton( this, "MkDirButton" ); | 166 | MkDirButton = new QToolButton( this, "MkDirButton" ); |
167 | MkDirButton->setText( tr( "" ) ); | 167 | MkDirButton->setText( tr( "" ) ); |
168 | MkDirButton->setPixmap( image2 ); | 168 | MkDirButton->setPixmap( image2 ); |
169 | MkDirButton->setUsesBigPixmap( FALSE ); | 169 | MkDirButton->setUsesBigPixmap( FALSE ); |
170 | QToolTip::add( MkDirButton, tr( "confirms the selection and closes the form" ) ); | 170 | QToolTip::add( MkDirButton, tr( "confirms the selection and closes the form" ) ); |
171 | QWhatsThis::add( MkDirButton, tr( "OKButton" ) ); | 171 | QWhatsThis::add( MkDirButton, tr( "OKButton" ) ); |
172 | Layout3_2->addWidget( MkDirButton ); | 172 | Layout3_2->addWidget( MkDirButton ); |
173 | Layout4->addLayout( Layout3_2 ); | 173 | Layout4->addLayout( Layout3_2 ); |
174 | 174 | ||
175 | DirComboBox = new QComboBox( FALSE, this, "DirComboBox" ); | 175 | DirComboBox = new QComboBox( FALSE, this, "DirComboBox" ); |
176 | DirComboBox->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, DirComboBox->sizePolicy().hasHeightForWidth() ) ); | 176 | DirComboBox->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, DirComboBox->sizePolicy().hasHeightForWidth() ) ); |
177 | DirComboBox->setEditable( TRUE ); | 177 | DirComboBox->setEditable( TRUE ); |
178 | DirComboBox->setDuplicatesEnabled( FALSE ); | 178 | DirComboBox->setDuplicatesEnabled( FALSE ); |
179 | QWhatsThis::add( DirComboBox, tr( "ComboBox Directory \n" | 179 | QWhatsThis::add( DirComboBox, tr( "ComboBox Directory \n" |
180 | "edit or select the directories name" ) ); | 180 | "edit or select the directories name" ) ); |
181 | Layout4->addWidget( DirComboBox ); | 181 | Layout4->addWidget( DirComboBox ); |
182 | Layout5->addLayout( Layout4 ); | 182 | Layout5->addLayout( Layout4 ); |
183 | 183 | ||
184 | ListView = new QListView( this, "ListView" ); | 184 | ListView = new QListView( this, "ListView" ); |
185 | ListView->addColumn( tr( "Name" ) ); | 185 | ListView->addColumn( tr( "Name" ) ); |
186 | ListView->addColumn( tr( "size" ) ); | 186 | ListView->addColumn( tr( "size" ) ); |
187 | ListView->addColumn( tr( "type" ) ); | 187 | ListView->addColumn( tr( "type" ) ); |
188 | ListView->setRootIsDecorated( TRUE ); | 188 | ListView->setRootIsDecorated( TRUE ); |
189 | QToolTip::add( ListView, tr( "directory listview" ) ); | 189 | QToolTip::add( ListView, tr( "directory listview" ) ); |
190 | QWhatsThis::add( ListView, tr( "Directory ListView\n" | 190 | QWhatsThis::add( ListView, tr( "Directory ListView\n" |
191 | "\n" | 191 | "\n" |
192 | "shows the list of dirs and files" ) ); | 192 | "shows the list of dirs and files" ) ); |
193 | Layout5->addWidget( ListView ); | 193 | Layout5->addWidget( ListView ); |
194 | ScQtFileDlgLayout->addLayout( Layout5 ); | 194 | ScQtFileDlgLayout->addLayout( Layout5 ); |
195 | 195 | ||
196 | // signals and slots connections | 196 | // signals and slots connections |
197 | connect( OkButton, SIGNAL( clicked() ), this, SLOT( slotOK() ) ); | 197 | connect( OkButton, SIGNAL( clicked() ), this, SLOT( slotOK() ) ); |
198 | connect( DirComboBox, SIGNAL( activated(int) ), this, SLOT( slotDirComboBoxChanged( int ) ) ); | 198 | connect( DirComboBox, SIGNAL( activated(int) ), this, SLOT( slotDirComboBoxChanged(int) ) ); |
199 | connect( TypeComboBox, SIGNAL( activated(int) ), this, SLOT( slotTypeComboBoxChanged( int ) ) ); | 199 | connect( TypeComboBox, SIGNAL( activated(int) ), this, SLOT( slotTypeComboBoxChanged(int) ) ); |
200 | connect( CancelButton, SIGNAL( clicked() ), this, SLOT( slotCancel() ) ); | 200 | connect( CancelButton, SIGNAL( clicked() ), this, SLOT( slotCancel() ) ); |
201 | connect( ListView, SIGNAL( returnPressed(QListViewItem*) ), this, SLOT( slotSelectionChanged(QListViewItem *) ) ); | 201 | connect( ListView, SIGNAL( returnPressed(QListViewItem*) ), this, SLOT( slotSelectionChanged(QListViewItem*) ) ); |
202 | connect( ListView, SIGNAL( selectionChanged(QListViewItem*) ), this, SLOT( slotSelectionChanged(QListViewItem *) ) ); | 202 | connect( ListView, SIGNAL( selectionChanged(QListViewItem*) ), this, SLOT( slotSelectionChanged(QListViewItem*) ) ); |
203 | connect( ListView, SIGNAL( doubleClicked(QListViewItem*) ), this, SLOT( slotDoubleClicked(QListViewItem *) ) ); | 203 | connect( ListView, SIGNAL( doubleClicked(QListViewItem*) ), this, SLOT( slotDoubleClicked(QListViewItem*) ) ); |
204 | connect( FNameLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( slotFileTextChanged( const QString & ) ) ); | 204 | connect( FNameLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( slotFileTextChanged(const QString&) ) ); |
205 | connect( FNameLineEdit, SIGNAL( returnPressed() ), this, SLOT( slotOK() ) ); | 205 | connect( FNameLineEdit, SIGNAL( returnPressed() ), this, SLOT( slotOK() ) ); |
206 | connect( MkDirButton, SIGNAL( clicked() ), this, SLOT( slotMkDir() ) ); | 206 | connect( MkDirButton, SIGNAL( clicked() ), this, SLOT( slotMkDir() ) ); |
207 | } | 207 | } |
208 | 208 | ||
209 | /* | 209 | /* |
210 | * Destroys the object and frees any allocated resources | 210 | * Destroys the object and frees any allocated resources |
211 | */ | 211 | */ |
212 | ScQtFileDlg::~ScQtFileDlg() | 212 | ScQtFileDlg::~ScQtFileDlg() |
213 | { | 213 | { |
214 | // no need to delete child widgets, Qt does it all for us | 214 | // no need to delete child widgets, Qt does it all for us |
215 | } | 215 | } |
216 | 216 | ||
217 | void ScQtFileDlg::slotCancel() | 217 | void ScQtFileDlg::slotCancel() |
218 | { | 218 | { |
219 | qWarning( "ScQtFileDlg::slotCancel(): Not implemented yet!" ); | 219 | qWarning( "ScQtFileDlg::slotCancel(): Not implemented yet!" ); |
220 | } | 220 | } |
221 | 221 | ||
222 | void ScQtFileDlg::slotDirComboBoxChanged( int ) | 222 | void ScQtFileDlg::slotDirComboBoxChanged( int ) |
223 | { | 223 | { |
224 | qWarning( "ScQtFileDlg::slotDirComboBoxChanged( int ): Not implemented yet!" ); | 224 | qWarning( "ScQtFileDlg::slotDirComboBoxChanged( int ): Not implemented yet!" ); |
225 | } | 225 | } |
226 | 226 | ||
227 | void ScQtFileDlg::slotDoubleClicked(QListViewItem *) | 227 | void ScQtFileDlg::slotDoubleClicked(QListViewItem *) |
228 | { | 228 | { |
229 | qWarning( "ScQtFileDlg::slotDoubleClicked(QListViewItem *): Not implemented yet!" ); | 229 | qWarning( "ScQtFileDlg::slotDoubleClicked(QListViewItem *): Not implemented yet!" ); |
230 | } | 230 | } |
231 | 231 | ||
232 | void ScQtFileDlg::slotFileTextChanged( const QString & ) | 232 | void ScQtFileDlg::slotFileTextChanged( const QString & ) |
233 | { | 233 | { |
234 | qWarning( "ScQtFileDlg::slotFileTextChanged( const QString & ): Not implemented yet!" ); | 234 | qWarning( "ScQtFileDlg::slotFileTextChanged( const QString & ): Not implemented yet!" ); |
235 | } | 235 | } |
236 | 236 | ||
237 | void ScQtFileDlg::slotMkDir() | 237 | void ScQtFileDlg::slotMkDir() |
238 | { | 238 | { |
239 | qWarning( "ScQtFileDlg::slotMkDir(): Not implemented yet!" ); | 239 | qWarning( "ScQtFileDlg::slotMkDir(): Not implemented yet!" ); |
240 | } | 240 | } |
241 | 241 | ||
242 | void ScQtFileDlg::slotOK() | 242 | void ScQtFileDlg::slotOK() |
243 | { | 243 | { |
244 | qWarning( "ScQtFileDlg::slotOK(): Not implemented yet!" ); | 244 | qWarning( "ScQtFileDlg::slotOK(): Not implemented yet!" ); |
245 | } | 245 | } |
246 | 246 | ||
247 | void ScQtFileDlg::slotSelectionChanged(QListViewItem *) | 247 | void ScQtFileDlg::slotSelectionChanged(QListViewItem *) |
248 | { | 248 | { |
249 | qWarning( "ScQtFileDlg::slotSelectionChanged(QListViewItem *): Not implemented yet!" ); | 249 | qWarning( "ScQtFileDlg::slotSelectionChanged(QListViewItem *): Not implemented yet!" ); |
250 | } | 250 | } |
251 | 251 | ||
252 | void ScQtFileDlg::slotTypeComboBoxChanged( int ) | 252 | void ScQtFileDlg::slotTypeComboBoxChanged( int ) |
253 | { | 253 | { |
254 | qWarning( "ScQtFileDlg::slotTypeComboBoxChanged( int ): Not implemented yet!" ); | 254 | qWarning( "ScQtFileDlg::slotTypeComboBoxChanged( int ): Not implemented yet!" ); |
255 | } | 255 | } |
256 | 256 | ||