Added custom icons (QFileIconProvider)

This commit is contained in:
stojce 2014-01-07 00:41:11 +01:00
parent f6927bae10
commit cc543f4313
13 changed files with 287 additions and 13 deletions

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<g>
<path fill="#666666" d="M18.223,11.845c0,0.835-0.683,1.519-1.519,1.519h-5.163c0,0.807,0.607,1.49,0.607,1.822
s-0.275,0.607-0.607,0.607H6.682c-0.332,0-0.607-0.275-0.607-0.607c0-0.351,0.607-0.997,0.607-1.822H1.519
C0.683,13.363,0,12.68,0,11.845V1.519C0,0.684,0.683,0,1.519,0h15.186c0.835,0,1.519,0.684,1.519,1.519V11.845z M17.008,1.519
c0-0.161-0.143-0.304-0.304-0.304H1.519c-0.161,0-0.304,0.143-0.304,0.304v7.896c0,0.161,0.143,0.304,0.304,0.304h15.186
c0.161,0,0.304-0.143,0.304-0.304V1.519z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 983 B

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<g>
<g>
<rect fill="#666666" width="17" height="1"/>
</g>
<g>
<rect y="2" fill="#666666" width="17" height="11"/>
</g>
<rect x="1" y="4" fill="#989898" width="1" height="1"/>
<rect x="1" y="6" fill="#989898" width="1" height="1"/>
<rect x="4" y="4" fill="#989898" width="1" height="1"/>
<rect x="4" y="6" fill="#989898" width="1" height="1"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 831 B

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<g>
<g>
<path fill="#666666" d="M17.615,4.556v11.541c0,0.503-0.408,0.911-0.911,0.911H7.593c-0.503,0-0.911-0.408-0.911-0.911v-2.733
H1.519c-0.503,0-0.911-0.408-0.911-0.911V6.074c0-0.503,0.295-1.206,0.646-1.557l3.872-3.872C5.477,0.294,6.179,0,6.682,0h3.948
c0.503,0,0.911,0.408,0.911,0.911v3.113c0.37-0.219,0.845-0.38,1.215-0.38h3.948C17.207,3.645,17.615,4.053,17.615,4.556z
M10.326,5.163V1.215H6.682v3.948c0,0.503-0.408,0.911-0.911,0.911H1.822v6.074h4.859v-2.43c0-0.503,0.295-1.206,0.646-1.557
L10.326,5.163z M2.629,4.859h2.838V2.021L2.629,4.859z M16.4,4.859h-3.645v3.948c0,0.503-0.408,0.911-0.911,0.911H7.896v6.074
H16.4V4.859z M8.703,8.504h2.838V5.666L8.703,8.504z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<g>
<path fill="#666666" d="M12.148,13.667c0,0.503-0.408,0.911-0.911,0.911H0.911C0.408,14.578,0,14.17,0,13.667V0.911
C0,0.408,0.408,0,0.911,0h6.074c0.503,0,1.206,0.294,1.557,0.646l2.961,2.961c0.351,0.351,0.646,1.054,0.646,1.557V13.667z
M10.934,13.363V6.074H6.985c-0.503,0-0.911-0.408-0.911-0.911V1.215H1.215v12.148H10.934z M9.719,8.2
c0,0.171-0.133,0.304-0.304,0.304H2.733C2.562,8.504,2.43,8.371,2.43,8.2V7.593c0-0.171,0.133-0.304,0.304-0.304h6.682
c0.171,0,0.304,0.133,0.304,0.304V8.2z M9.719,10.63c0,0.171-0.133,0.304-0.304,0.304H2.733c-0.171,0-0.304-0.133-0.304-0.304
v-0.607c0-0.171,0.133-0.304,0.304-0.304h6.682c0.171,0,0.304,0.133,0.304,0.304V10.63z M10.857,4.859
c-0.057-0.161-0.142-0.323-0.208-0.389L7.678,1.5C7.612,1.433,7.45,1.348,7.289,1.291v3.568H10.857z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<g>
<path fill="#666666" d="M14.854,10.569c0,1.098-0.901,2-2,2H2c-1.098,0-2-0.901-2-2V2c0-1.098,0.901-2,2-2h2.856
c1.098,0,2,0.901,2,2v0.286h5.999c1.098,0,2,0.901,2,2V10.569z M13.711,4.285c0-0.473-0.384-0.857-0.857-0.857H6.57
c-0.473,0-0.857-0.384-0.857-0.857V2c0-0.473-0.384-0.857-0.857-0.857H2C1.526,1.143,1.143,1.526,1.143,2v8.569
c0,0.473,0.384,0.857,0.857,0.857h10.854c0.473,0,0.857-0.384,0.857-0.857V4.285z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 899 B

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<g>
<g>
<path fill="#666666" d="M16.191,7.893c-0.054,0.063-0.139,0.106-0.223,0.116c-0.011,0-0.021,0-0.032,0
c-0.085,0-0.159-0.021-0.223-0.074L8.375,1.816L1.037,7.935C0.963,7.988,0.878,8.02,0.782,8.009
c-0.085-0.01-0.17-0.053-0.223-0.116l-0.657-0.785c-0.117-0.138-0.096-0.36,0.042-0.477l7.625-6.352
c0.445-0.372,1.166-0.372,1.612,0l2.587,2.163V0.374c0-0.191,0.148-0.339,0.34-0.339h2.036c0.19,0,0.339,0.148,0.339,0.339v4.327
l2.322,1.93c0.139,0.117,0.159,0.339,0.043,0.477L16.191,7.893z M14.483,12.93c0,0.371-0.308,0.679-0.679,0.679H9.732V9.536H7.018
v4.072H2.945c-0.371,0-0.679-0.308-0.679-0.679V7.84c0-0.021,0.011-0.042,0.011-0.063l6.098-5.027l6.098,5.027
c0.011,0.021,0.011,0.042,0.011,0.063V12.93z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<g>
<path fill="#666666" d="M15.049,10.75c0,0.688-0.562,1.25-1.25,1.25h-12.5c-0.688,0-1.25-0.562-1.25-1.25v-9.5
C0.049,0.562,0.611,0,1.299,0h12.5c0.688,0,1.25,0.562,1.25,1.25V10.75z M1.299,1c-0.133,0-0.25,0.117-0.25,0.25v9.5
c0,0.133,0.117,0.25,0.25,0.25h12.5c0.133,0,0.25-0.117,0.25-0.25v-9.5c0-0.133-0.117-0.25-0.25-0.25H1.299z M3.549,5
c-0.828,0-1.5-0.672-1.5-1.5S2.72,2,3.549,2s1.5,0.672,1.5,1.5S4.377,5,3.549,5z M13.049,10h-11V8.5l2.5-2.5l1.25,1.25l4-4
l3.25,3.25V10z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 961 B

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<g>
<path fill="#666666" d="M15.049,10.75c0,0.688-0.562,1.25-1.25,1.25h-12.5c-0.688,0-1.25-0.562-1.25-1.25v-9.5
C0.049,0.562,0.611,0,1.299,0h12.5c0.688,0,1.25,0.562,1.25,1.25V10.75z M1.299,1c-0.133,0-0.25,0.117-0.25,0.25v9.5
c0,0.133,0.117,0.25,0.25,0.25h12.5c0.133,0,0.25-0.117,0.25-0.25v-9.5c0-0.133-0.117-0.25-0.25-0.25H1.299z M3.549,5
c-0.828,0-1.5-0.672-1.5-1.5S2.72,2,3.549,2s1.5,0.672,1.5,1.5S4.377,5,3.549,5z M13.049,10h-11V8.5l2.5-2.5l1.25,1.25l4-4
l3.25,3.25V10z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 961 B

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<g>
<g>
<path fill="#666666" d="M13.402,4.612c0-0.098-0.052-0.188-0.137-0.237c-0.085-0.049-0.189-0.049-0.274,0L7.704,7.428
C7.423,7.59,7.25,7.89,7.25,8.215v6.105c0,0.098,0.052,0.188,0.137,0.237c0.085,0.049,0.189,0.049,0.274,0l5.085-2.936
c0.407-0.235,0.657-0.668,0.657-1.138V4.612z"/>
<path fill="#666666" d="M0.41,4.375c-0.085-0.049-0.189-0.049-0.274,0C0.052,4.424,0,4.514,0,4.612c0,0,0,0,0,0v5.872
c0,0.469,0.25,0.903,0.657,1.138l5.085,2.936c0,0,0,0,0,0c0.085,0.049,0.189,0.049,0.274,0c0.085-0.049,0.136-0.139,0.136-0.237
V8.215c0-0.325-0.173-0.625-0.455-0.787L0.41,4.375z"/>
</g>
<path fill="#666666" d="M12.443,3.586c0.085-0.049,0.137-0.139,0.137-0.237c0-0.098-0.052-0.188-0.137-0.237c0,0,0,0,0,0
L7.358,0.176c-0.407-0.235-0.907-0.235-1.313,0L0.959,3.112c0,0,0,0,0,0C0.874,3.161,0.822,3.251,0.822,3.349
c0,0.098,0.052,0.188,0.137,0.237l5.287,3.053c0.281,0.162,0.628,0.162,0.909,0L12.443,3.586z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<g>
<g>
<path fill="#666666" d="M13.402,4.612c0-0.098-0.052-0.188-0.137-0.237c-0.085-0.049-0.189-0.049-0.274,0L7.704,7.428
C7.423,7.59,7.25,7.89,7.25,8.215v6.105c0,0.098,0.052,0.188,0.137,0.237c0.085,0.049,0.189,0.049,0.274,0l5.085-2.936
c0.407-0.235,0.657-0.668,0.657-1.138V4.612z"/>
<path fill="#666666" d="M0.41,4.375c-0.085-0.049-0.189-0.049-0.274,0C0.052,4.424,0,4.514,0,4.612c0,0,0,0,0,0v5.872
c0,0.469,0.25,0.903,0.657,1.138l5.085,2.936c0,0,0,0,0,0c0.085,0.049,0.189,0.049,0.274,0c0.085-0.049,0.136-0.139,0.136-0.237
V8.215c0-0.325-0.173-0.625-0.455-0.787L0.41,4.375z"/>
</g>
<path fill="#666666" d="M12.443,3.586c0.085-0.049,0.137-0.139,0.137-0.237c0-0.098-0.052-0.188-0.137-0.237c0,0,0,0,0,0
L7.358,0.176c-0.407-0.235-0.907-0.235-1.313,0L0.959,3.112c0,0,0,0,0,0C0.874,3.161,0.822,3.251,0.822,3.349
c0,0.098,0.052,0.188,0.137,0.237l5.287,3.053c0.281,0.162,0.628,0.162,0.909,0L12.443,3.586z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -6,14 +6,29 @@
* Copyright (c) 2014 High Fidelity, Inc. All rights reserved.
*/
* {
font-family: Helvetica, Arial, sans-serif;
}
QLabel {
font-size: 16px;
}
QSidebar, QTreeView {
border: 1px solid #E5E5E5;
font-size: 14px;
}
QTreeView {
border-left: none;
}
QSidebar::item {
margin-top: 10px;
padding-top: 5px;
padding-bottom: 0;
}
QSplitter::handle, QDialog {
background-color: white;
}
@ -36,4 +51,26 @@ QPushButton#cancelButton {
background: #FFFFFF;
}
QTreeView QHeaderView:section {
border-left: none;
border-top: none;
border-bottom: 1px solid #E5E5E5;
border-right: 1px solid #E5E5E5;
background: white;
color: #666666;
padding: 10px 20px;
font-size: 22px;
font-weight: bold;
}
QTreeView::item {
padding: 5px 0;
}
QListView::item:selected,
QListView::item:selected:active,
QTreeView::item:selected,
QTreeView::item:selected:active {
background: #BDE4E3;
color: #333333;
}

View file

@ -10,9 +10,18 @@
#include <QStandardPaths>
#include <QGridLayout>
#include <QSplitter>
#include <QFile>
#include <QFileInfo>
#include <QMetaEnum>
#include <QDir>
#include <QApplication>
#include <QStyle>
const QString WINDOW_NAME = QObject::tr("Import Voxels");
const QString IMPORT_BUTTON_NAME = QObject::tr("Import");
const QString IMPORT_INFO = QObject::tr("<b>Import</b> .svo, .schematic, or .png as voxels");
const QString CANCEL_BUTTON_NAME = QObject::tr("Cancel");
const QString IMPORT_FILE_TYPES = QObject::tr("Sparse Voxel Octree Files, "
"Square PNG, "
@ -23,10 +32,76 @@ const QString INFO_LABEL_TEXT = QObject::tr("This will load selected file into H
const QString DESKTOP_LOCATION = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation);
QIcon HiFiIconProvider::icon(QFileIconProvider::IconType type) const {
switchToResourcesParentIfRequired();
// types
// Computer, Desktop, Trashcan, Network, Drive, Folder, File
QString typeString;
switch (type) {
case QFileIconProvider::Computer:
typeString = "computer";
break;
case QFileIconProvider::Desktop:
typeString = "desktop";
break;
case QFileIconProvider::Trashcan:
typeString = "folder";
break;
case QFileIconProvider::Network:
typeString = "folder";
break;
case QFileIconProvider::Drive:
typeString = "folder";
break;
case QFileIconProvider::Folder:
typeString = "folder";
break;
default:
typeString = "file";
break;
}
QIcon ico = QIcon("resources/icons/" + typeString + ".svg");
ico.pixmap(QSize(50, 50));
return ico;
}
QIcon HiFiIconProvider::icon(const QFileInfo &info) const {
switchToResourcesParentIfRequired();
const QString ext = info.suffix().toLower();
if (info.isDir()) {
if (info.absoluteFilePath() == QDir::homePath()) {
return QIcon("resources/icons/home.svg");
} else if (info.absoluteFilePath() == DESKTOP_LOCATION) {
return QIcon("resources/icons/desktop.svg");
} else if (info.absoluteFilePath() == QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation)) {
return QIcon("resources/icons/documents.svg");
}
return QIcon("resources/icons/folder.svg");
}
QFileInfo iconFile = QFileInfo("resources/icons/" + ext + ".svg");
qDebug() << "Icon type: " << iconFile.filePath();
if (iconFile.exists()) {
return QIcon(iconFile.filePath());
}
return QIcon("resources/icons/file.svg");
}
ImportDialog::ImportDialog(QWidget *parent) : QFileDialog(parent, WINDOW_NAME, DESKTOP_LOCATION, IMPORT_FILE_TYPES),
_importButton(IMPORT_BUTTON_NAME, this),
_cancelButton(CANCEL_BUTTON_NAME, this),
_importLabel(IMPORT_BUTTON_NAME),
_infoLabel(INFO_LABEL_TEXT) {
setOption(QFileDialog::DontUseNativeDialog, true);
@ -34,12 +109,13 @@ _infoLabel(INFO_LABEL_TEXT) {
setViewMode(QFileDialog::Detail);
setLayout();
QLabel* _importLabel = findChild<QLabel*>("lookInLabel");
_importLabel->setText(IMPORT_INFO);
QGridLayout* gridLayout = (QGridLayout*) layout();
gridLayout->addWidget(&_importLabel, 0, 0);
gridLayout->addWidget(&_infoLabel, 2, 0);
gridLayout->addWidget(&_cancelButton, 2, 1);
gridLayout->addWidget(&_importButton, 2, 2);
gridLayout->setColumnStretch(3, 1);
gridLayout->addWidget(&_infoLabel, 2, 0, Qt::AlignLeft);
gridLayout->addWidget(&_cancelButton, 2, 1, Qt::AlignRight);
gridLayout->addWidget(&_importButton, 2, 2, Qt::AlignRight);
connect(&_importButton, SIGNAL(pressed()), SLOT(import()));
connect(this, SIGNAL(currentChanged(QString)), SLOT(saveCurrentFile(QString)));
@ -84,10 +160,7 @@ void ImportDialog::setLayout() {
_cancelButton.setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
// hide unused embeded widgets in QFileDialog
QWidget* widget = findChild<QWidget*>("lookInLabel");
widget->hide();
widget = findChild<QWidget*>("lookInCombo");
QWidget* widget = findChild<QWidget*>("lookInCombo");
widget->hide();
widget = findChild<QWidget*>("backButton");
@ -122,22 +195,24 @@ void ImportDialog::setLayout() {
widget = findChild<QWidget*>("buttonBox");
widget->hide();
QSplitter *splitter = findChild<QSplitter*>("splitter");
splitter->setHandleWidth(0);
// remove blue outline on Mac
widget = findChild<QWidget*>("sidebar");
widget->setAttribute(Qt::WA_MacShowFocusRect, false);
widget = findChild<QWidget*>("treeView");
widget->setAttribute(Qt::WA_MacShowFocusRect, false);
// set custom file icons
// setIconProvider(new HiFiIconProvider());
setIconProvider(new HiFiIconProvider());
switchToResourcesParentIfRequired();
QFile styleSheet("resources/styles/import_dialog.qss");
if (styleSheet.open(QIODevice::ReadOnly)) {
setStyleSheet(styleSheet.readAll());
}
}

View file

@ -12,8 +12,16 @@
#include <QFileDialog>
#include <QPushButton>
#include <QLabel>
#include <QFileIconProvider>
#include <SharedUtil.h>
class HiFiIconProvider : public QFileIconProvider {
public:
virtual QIcon icon(IconType type) const;
virtual QIcon icon(const QFileInfo &info) const;
};
class ImportDialog : public QFileDialog {
Q_OBJECT
@ -41,7 +49,6 @@ private:
QString _currentFile;
QPushButton _importButton;
QPushButton _cancelButton;
QLabel _importLabel;
QLabel _infoLabel;
void setLayout();