9 #ifndef UI_PQFILEDIALOG_H 10 #define UI_PQFILEDIALOG_H 12 #include <QtCore/QVariant> 13 #include <QtGui/QIcon> 14 #include <QtWidgets/QApplication> 15 #include <QtWidgets/QComboBox> 16 #include <QtWidgets/QGridLayout> 17 #include <QtWidgets/QHBoxLayout> 18 #include <QtWidgets/QHeaderView> 19 #include <QtWidgets/QLabel> 20 #include <QtWidgets/QLineEdit> 21 #include <QtWidgets/QListView> 22 #include <QtWidgets/QPushButton> 23 #include <QtWidgets/QSpacerItem> 24 #include <QtWidgets/QSplitter> 25 #include <QtWidgets/QToolButton> 26 #include <QtWidgets/QTreeView> 27 #include <QtWidgets/QVBoxLayout> 28 #include <QtWidgets/QWidget> 82 if (pqFileDialog->objectName().isEmpty())
83 pqFileDialog->setObjectName(QString::fromUtf8(
"pqFileDialog"));
84 pqFileDialog->resize(683, 402);
85 mainGridLayout =
new QGridLayout(pqFileDialog);
86 mainGridLayout->setObjectName(QString::fromUtf8(
"mainGridLayout"));
87 mainWidget =
new QWidget(pqFileDialog);
88 mainWidget->setObjectName(QString::fromUtf8(
"mainWidget"));
89 mainWidget->setGeometry(QRect(0, 0, 683, 402));
90 gridLayout =
new QGridLayout(mainWidget);
91 gridLayout->setObjectName(QString::fromUtf8(
"gridLayout"));
92 gridLayout->setContentsMargins(0, 0, 0, 0);
93 hboxLayout =
new QHBoxLayout();
94 hboxLayout->setSpacing(6);
95 hboxLayout->setObjectName(QString::fromUtf8(
"hboxLayout"));
96 hboxLayout->setContentsMargins(0, 0, 0, 0);
97 label_3 =
new QLabel(mainWidget);
98 label_3->setObjectName(QString::fromUtf8(
"label_3"));
100 hboxLayout->addWidget(label_3);
102 Parents =
new QComboBox(mainWidget);
103 Parents->setObjectName(QString::fromUtf8(
"Parents"));
104 QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
105 sizePolicy.setHorizontalStretch(0);
106 sizePolicy.setVerticalStretch(0);
107 sizePolicy.setHeightForWidth(Parents->sizePolicy().hasHeightForWidth());
108 Parents->setSizePolicy(sizePolicy);
109 Parents->setEditable(
true);
111 hboxLayout->addWidget(Parents);
113 NavigateBack =
new QToolButton(mainWidget);
114 NavigateBack->setObjectName(QString::fromUtf8(
"NavigateBack"));
115 NavigateBack->setAutoRaise(
true);
117 hboxLayout->addWidget(NavigateBack);
119 NavigateForward =
new QToolButton(mainWidget);
120 NavigateForward->setObjectName(QString::fromUtf8(
"NavigateForward"));
121 NavigateForward->setAutoRaise(
true);
123 hboxLayout->addWidget(NavigateForward);
125 NavigateUp =
new QToolButton(mainWidget);
126 NavigateUp->setObjectName(QString::fromUtf8(
"NavigateUp"));
127 NavigateUp->setAutoRaise(
true);
129 hboxLayout->addWidget(NavigateUp);
131 CreateFolder =
new QToolButton(mainWidget);
132 CreateFolder->setObjectName(QString::fromUtf8(
"CreateFolder"));
133 CreateFolder->setAutoRaise(
true);
135 hboxLayout->addWidget(CreateFolder);
137 ShowDetail =
new QToolButton(mainWidget);
138 ShowDetail->setObjectName(QString::fromUtf8(
"ShowDetail"));
139 ShowDetail->setCheckable(
true);
141 hboxLayout->addWidget(ShowDetail);
143 GroupFiles =
new QToolButton(mainWidget);
144 GroupFiles->setObjectName(QString::fromUtf8(
"GroupFiles"));
145 GroupFiles->setCheckable(
true);
147 icon.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqGroupFiles.svg"), QSize(), QIcon::Normal, QIcon::Off);
148 GroupFiles->setIcon(icon);
150 hboxLayout->addWidget(GroupFiles);
152 hboxLayout->setStretch(1, 1);
154 gridLayout->addLayout(hboxLayout, 0, 0, 1, 1);
156 mainSplitter =
new QSplitter(mainWidget);
157 mainSplitter->setObjectName(QString::fromUtf8(
"mainSplitter"));
158 mainSplitter->setOrientation(Qt::Horizontal);
159 splitter =
new QSplitter(mainSplitter);
160 splitter->setObjectName(QString::fromUtf8(
"splitter"));
161 QSizePolicy sizePolicy1(QSizePolicy::Preferred, QSizePolicy::Expanding);
162 sizePolicy1.setHorizontalStretch(0);
163 sizePolicy1.setVerticalStretch(0);
164 sizePolicy1.setHeightForWidth(splitter->sizePolicy().hasHeightForWidth());
165 splitter->setSizePolicy(sizePolicy1);
166 splitter->setOrientation(Qt::Vertical);
167 favoritesLayoutWidget =
new QWidget(splitter);
168 favoritesLayoutWidget->setObjectName(QString::fromUtf8(
"favoritesLayoutWidget"));
169 QSizePolicy sizePolicy2(QSizePolicy::Expanding, QSizePolicy::Expanding);
170 sizePolicy2.setHorizontalStretch(1);
171 sizePolicy2.setVerticalStretch(1);
172 sizePolicy2.setHeightForWidth(favoritesLayoutWidget->sizePolicy().hasHeightForWidth());
173 favoritesLayoutWidget->setSizePolicy(sizePolicy2);
174 favoritesVerticalLayout =
new QVBoxLayout(favoritesLayoutWidget);
175 favoritesVerticalLayout->setSpacing(0);
176 favoritesVerticalLayout->setObjectName(QString::fromUtf8(
"favoritesVerticalLayout"));
177 favoritesVerticalLayout->setContentsMargins(0, 0, 0, 0);
178 favoritesHorizontalLayout =
new QHBoxLayout();
179 favoritesHorizontalLayout->setSpacing(5);
180 favoritesHorizontalLayout->setObjectName(QString::fromUtf8(
"favoritesHorizontalLayout"));
181 favoritesLabel =
new QLabel(favoritesLayoutWidget);
182 favoritesLabel->setObjectName(QString::fromUtf8(
"favoritesLabel"));
184 favoritesHorizontalLayout->addWidget(favoritesLabel);
186 AddCurrentDirectoryToFavorites =
new QPushButton(favoritesLayoutWidget);
187 AddCurrentDirectoryToFavorites->setObjectName(QString::fromUtf8(
"AddCurrentDirectoryToFavorites"));
188 QSizePolicy sizePolicy3(QSizePolicy::Fixed, QSizePolicy::Fixed);
189 sizePolicy3.setHorizontalStretch(0);
190 sizePolicy3.setVerticalStretch(0);
191 sizePolicy3.setHeightForWidth(AddCurrentDirectoryToFavorites->sizePolicy().hasHeightForWidth());
192 AddCurrentDirectoryToFavorites->setSizePolicy(sizePolicy3);
194 QString iconThemeName = QString::fromUtf8(
"list-add");
195 if (QIcon::hasThemeIcon(iconThemeName)) {
196 icon1 = QIcon::fromTheme(iconThemeName);
198 icon1.addFile(QString::fromUtf8(
"."), QSize(), QIcon::Normal, QIcon::Off);
200 AddCurrentDirectoryToFavorites->setIcon(icon1);
202 favoritesHorizontalLayout->addWidget(AddCurrentDirectoryToFavorites);
204 ResetFavortiesToSystemDefault =
new QPushButton(favoritesLayoutWidget);
205 ResetFavortiesToSystemDefault->setObjectName(QString::fromUtf8(
"ResetFavortiesToSystemDefault"));
206 sizePolicy3.setHeightForWidth(ResetFavortiesToSystemDefault->sizePolicy().hasHeightForWidth());
207 ResetFavortiesToSystemDefault->setSizePolicy(sizePolicy3);
209 iconThemeName = QString::fromUtf8(
"view-refresh");
210 if (QIcon::hasThemeIcon(iconThemeName)) {
211 icon2 = QIcon::fromTheme(iconThemeName);
213 icon2.addFile(QString::fromUtf8(
"."), QSize(), QIcon::Normal, QIcon::Off);
215 ResetFavortiesToSystemDefault->setIcon(icon2);
217 favoritesHorizontalLayout->addWidget(ResetFavortiesToSystemDefault);
220 favoritesVerticalLayout->addLayout(favoritesHorizontalLayout);
222 verticalSpacer =
new QSpacerItem(20, 6, QSizePolicy::Minimum, QSizePolicy::Minimum);
224 favoritesVerticalLayout->addItem(verticalSpacer);
226 favoritesSearchBar =
new QLineEdit(favoritesLayoutWidget);
227 favoritesSearchBar->setObjectName(QString::fromUtf8(
"favoritesSearchBar"));
228 favoritesSearchBar->setMaximumSize(QSize(16777215, 18));
230 font.setPointSize(8);
231 favoritesSearchBar->setFont(font);
232 favoritesSearchBar->setClearButtonEnabled(
true);
234 favoritesVerticalLayout->addWidget(favoritesSearchBar);
236 Favorites =
new QListView(favoritesLayoutWidget);
237 Favorites->setObjectName(QString::fromUtf8(
"Favorites"));
238 QSizePolicy sizePolicy4(QSizePolicy::Preferred, QSizePolicy::Expanding);
239 sizePolicy4.setHorizontalStretch(1);
240 sizePolicy4.setVerticalStretch(0);
241 sizePolicy4.setHeightForWidth(Favorites->sizePolicy().hasHeightForWidth());
242 Favorites->setSizePolicy(sizePolicy4);
243 Favorites->setMinimumSize(QSize(100, 0));
244 Favorites->setSelectionMode(QAbstractItemView::NoSelection);
245 Favorites->setSelectionBehavior(QAbstractItemView::SelectRows);
247 favoritesVerticalLayout->addWidget(Favorites);
249 splitter->addWidget(favoritesLayoutWidget);
250 locationsLayoutWidget =
new QWidget(splitter);
251 locationsLayoutWidget->setObjectName(QString::fromUtf8(
"locationsLayoutWidget"));
252 QSizePolicy sizePolicy5(QSizePolicy::Expanding, QSizePolicy::Expanding);
253 sizePolicy5.setHorizontalStretch(1);
254 sizePolicy5.setVerticalStretch(2);
255 sizePolicy5.setHeightForWidth(locationsLayoutWidget->sizePolicy().hasHeightForWidth());
256 locationsLayoutWidget->setSizePolicy(sizePolicy5);
257 locationsVerticalLayout =
new QVBoxLayout(locationsLayoutWidget);
258 locationsVerticalLayout->setObjectName(QString::fromUtf8(
"locationsVerticalLayout"));
259 locationsVerticalLayout->setContentsMargins(0, 0, 0, 0);
260 locationsLabel =
new QLabel(locationsLayoutWidget);
261 locationsLabel->setObjectName(QString::fromUtf8(
"locationsLabel"));
262 QSizePolicy sizePolicy6(QSizePolicy::Preferred, QSizePolicy::Minimum);
263 sizePolicy6.setHorizontalStretch(0);
264 sizePolicy6.setVerticalStretch(0);
265 sizePolicy6.setHeightForWidth(locationsLabel->sizePolicy().hasHeightForWidth());
266 locationsLabel->setSizePolicy(sizePolicy6);
268 locationsVerticalLayout->addWidget(locationsLabel);
270 Locations =
new QListView(locationsLayoutWidget);
271 Locations->setObjectName(QString::fromUtf8(
"Locations"));
272 QSizePolicy sizePolicy7(QSizePolicy::Preferred, QSizePolicy::Expanding);
273 sizePolicy7.setHorizontalStretch(1);
274 sizePolicy7.setVerticalStretch(1);
275 sizePolicy7.setHeightForWidth(Locations->sizePolicy().hasHeightForWidth());
276 Locations->setSizePolicy(sizePolicy7);
277 Locations->setMinimumSize(QSize(100, 0));
278 Locations->setSelectionMode(QAbstractItemView::NoSelection);
279 Locations->setSelectionBehavior(QAbstractItemView::SelectRows);
281 locationsVerticalLayout->addWidget(Locations);
283 splitter->addWidget(locationsLayoutWidget);
284 recentLayoutWidget =
new QWidget(splitter);
285 recentLayoutWidget->setObjectName(QString::fromUtf8(
"recentLayoutWidget"));
286 sizePolicy5.setHeightForWidth(recentLayoutWidget->sizePolicy().hasHeightForWidth());
287 recentLayoutWidget->setSizePolicy(sizePolicy5);
288 recentVerticalLayout =
new QVBoxLayout(recentLayoutWidget);
289 recentVerticalLayout->setObjectName(QString::fromUtf8(
"recentVerticalLayout"));
290 recentVerticalLayout->setContentsMargins(0, 0, 0, 0);
291 recentHorizontalLayout =
new QHBoxLayout();
292 recentHorizontalLayout->setObjectName(QString::fromUtf8(
"recentHorizontalLayout"));
293 recentLabel =
new QLabel(recentLayoutWidget);
294 recentLabel->setObjectName(QString::fromUtf8(
"recentLabel"));
296 recentHorizontalLayout->addWidget(recentLabel);
299 recentVerticalLayout->addLayout(recentHorizontalLayout);
301 Recent =
new QListView(recentLayoutWidget);
302 Recent->setObjectName(QString::fromUtf8(
"Recent"));
303 sizePolicy7.setHeightForWidth(Recent->sizePolicy().hasHeightForWidth());
304 Recent->setSizePolicy(sizePolicy7);
305 Recent->setMinimumSize(QSize(100, 0));
306 Recent->setSelectionMode(QAbstractItemView::NoSelection);
307 Recent->setSelectionBehavior(QAbstractItemView::SelectRows);
309 recentVerticalLayout->addWidget(Recent);
311 splitter->addWidget(recentLayoutWidget);
312 mainSplitter->addWidget(splitter);
313 layoutWidget =
new QWidget(mainSplitter);
314 layoutWidget->setObjectName(QString::fromUtf8(
"layoutWidget"));
315 verticalLayout =
new QVBoxLayout(layoutWidget);
316 verticalLayout->setObjectName(QString::fromUtf8(
"verticalLayout"));
317 verticalLayout->setContentsMargins(0, 0, 0, 0);
318 Files =
new QTreeView(layoutWidget);
319 Files->setObjectName(QString::fromUtf8(
"Files"));
320 QSizePolicy sizePolicy8(QSizePolicy::Expanding, QSizePolicy::Expanding);
321 sizePolicy8.setHorizontalStretch(2);
322 sizePolicy8.setVerticalStretch(0);
323 sizePolicy8.setHeightForWidth(Files->sizePolicy().hasHeightForWidth());
324 Files->setSizePolicy(sizePolicy8);
326 verticalLayout->addWidget(Files);
328 gridLayout1 =
new QGridLayout();
329 gridLayout1->setSpacing(6);
330 gridLayout1->setObjectName(QString::fromUtf8(
"gridLayout1"));
331 gridLayout1->setContentsMargins(0, 0, 0, 0);
332 EntityNameLabel =
new QLabel(layoutWidget);
333 EntityNameLabel->setObjectName(QString::fromUtf8(
"EntityNameLabel"));
335 gridLayout1->addWidget(EntityNameLabel, 0, 0, 1, 1);
337 EntityName =
new QLineEdit(layoutWidget);
338 EntityName->setObjectName(QString::fromUtf8(
"EntityName"));
340 gridLayout1->addWidget(EntityName, 0, 1, 1, 1);
342 EntityTypeLabel =
new QLabel(layoutWidget);
343 EntityTypeLabel->setObjectName(QString::fromUtf8(
"EntityTypeLabel"));
345 gridLayout1->addWidget(EntityTypeLabel, 1, 0, 1, 1);
347 OK =
new QPushButton(layoutWidget);
348 OK->setObjectName(QString::fromUtf8(
"OK"));
350 gridLayout1->addWidget(OK, 0, 3, 1, 1);
352 Cancel =
new QPushButton(layoutWidget);
353 Cancel->setObjectName(QString::fromUtf8(
"Cancel"));
355 gridLayout1->addWidget(Cancel, 1, 3, 1, 1);
357 Navigate =
new QPushButton(layoutWidget);
358 Navigate->setObjectName(QString::fromUtf8(
"Navigate"));
360 gridLayout1->addWidget(Navigate, 0, 2, 1, 1);
362 EntityType =
new pqFileComboBox(layoutWidget);
363 EntityType->setObjectName(QString::fromUtf8(
"EntityType"));
364 EntityType->setSizeAdjustPolicy(QComboBox::AdjustToContentsOnFirstShow);
366 gridLayout1->addWidget(EntityType, 1, 1, 1, 2);
369 verticalLayout->addLayout(gridLayout1);
371 mainSplitter->addWidget(layoutWidget);
373 gridLayout->addWidget(mainSplitter, 1, 0, 1, 1);
376 mainGridLayout->addWidget(mainWidget, 0, 0, 1, 1);
378 QWidget::setTabOrder(EntityName, EntityType);
379 QWidget::setTabOrder(EntityType, OK);
380 QWidget::setTabOrder(OK, Cancel);
381 QWidget::setTabOrder(Cancel, Parents);
382 QWidget::setTabOrder(Parents, NavigateBack);
383 QWidget::setTabOrder(NavigateBack, NavigateForward);
384 QWidget::setTabOrder(NavigateForward, NavigateUp);
385 QWidget::setTabOrder(NavigateUp, CreateFolder);
386 QWidget::setTabOrder(CreateFolder, Favorites);
387 QWidget::setTabOrder(Favorites, Files);
391 OK->setDefault(
true);
394 QMetaObject::connectSlotsByName(pqFileDialog);
399 pqFileDialog->setWindowTitle(QCoreApplication::translate(
"pqFileDialog",
"Dialog",
nullptr));
400 label_3->setText(QCoreApplication::translate(
"pqFileDialog",
"Look in:",
nullptr));
401 NavigateBack->setText(QString());
402 NavigateForward->setText(QString());
403 NavigateUp->setText(QString());
404 CreateFolder->setText(QString());
405 #if QT_CONFIG(tooltip) 406 ShowDetail->setToolTip(QCoreApplication::translate(
"pqFileDialog",
"Toggle file details. This may affect performance for large directories on certain file systems.",
nullptr));
407 #endif // QT_CONFIG(tooltip) 408 ShowDetail->setText(QString());
409 #if QT_CONFIG(tooltip) 410 GroupFiles->setToolTip(QCoreApplication::translate(
"pqFileDialog",
"Toggle file sequence grouping.",
nullptr));
411 #endif // QT_CONFIG(tooltip) 412 GroupFiles->setText(QString());
413 favoritesLabel->setText(QCoreApplication::translate(
"pqFileDialog",
"Favorites",
nullptr));
414 #if QT_CONFIG(tooltip) 415 AddCurrentDirectoryToFavorites->setToolTip(QCoreApplication::translate(
"pqFileDialog",
"Add current directory to favorites",
nullptr));
416 #endif // QT_CONFIG(tooltip) 417 AddCurrentDirectoryToFavorites->setText(QString());
418 #if QT_CONFIG(tooltip) 419 ResetFavortiesToSystemDefault->setToolTip(QCoreApplication::translate(
"pqFileDialog",
"Clear favorites",
nullptr));
420 #endif // QT_CONFIG(tooltip) 421 ResetFavortiesToSystemDefault->setText(QString());
422 #if QT_CONFIG(tooltip) 423 favoritesSearchBar->setToolTip(QCoreApplication::translate(
"pqFileDialog",
"Filter favorites panel",
nullptr));
424 #endif // QT_CONFIG(tooltip) 425 favoritesSearchBar->setPlaceholderText(QCoreApplication::translate(
"pqFileDialog",
"Filter favorites",
nullptr));
426 locationsLabel->setText(QCoreApplication::translate(
"pqFileDialog",
"Locations",
nullptr));
427 recentLabel->setText(QCoreApplication::translate(
"pqFileDialog",
"Recent",
nullptr));
428 EntityNameLabel->setText(QCoreApplication::translate(
"pqFileDialog",
"File name:",
nullptr));
429 EntityTypeLabel->setText(QCoreApplication::translate(
"pqFileDialog",
"Files of type:",
nullptr));
430 OK->setText(QCoreApplication::translate(
"pqFileDialog",
"OK",
nullptr));
431 Cancel->setText(QCoreApplication::translate(
"pqFileDialog",
"Cancel",
nullptr));
432 #if QT_CONFIG(tooltip) 433 Navigate->setToolTip(QCoreApplication::translate(
"pqFileDialog",
"Go to the selected directory, instead of opening it",
nullptr));
434 #endif // QT_CONFIG(tooltip) 435 Navigate->setText(QCoreApplication::translate(
"pqFileDialog",
"Navigate",
nullptr));
446 #endif // UI_PQFILEDIALOG_H
QSpacerItem * verticalSpacer
QWidget * recentLayoutWidget
QVBoxLayout * locationsVerticalLayout
QLineEdit * favoritesSearchBar
QToolButton * NavigateForward
QHBoxLayout * favoritesHorizontalLayout
QVBoxLayout * favoritesVerticalLayout
QPushButton * AddCurrentDirectoryToFavorites
Provides a standard file dialog "front-end" for the pqFileDialogModel "back-end", i...
QWidget * locationsLayoutWidget
void retranslateUi(QWidget *pqFileDialog)
QToolButton * NavigateBack
QToolButton * CreateFolder
QPushButton * ResetFavortiesToSystemDefault
void setupUi(QWidget *pqFileDialog)
QVBoxLayout * recentVerticalLayout
QHBoxLayout * recentHorizontalLayout
pqFileComboBox * EntityType
QVBoxLayout * verticalLayout
QGridLayout * gridLayout1
QWidget * favoritesLayoutWidget
QGridLayout * mainGridLayout