Skip to content

Commit

Permalink
[#932 fixed] Report view icons are invisible
Browse files Browse the repository at this point in the history
  • Loading branch information
Fanda Vacek committed Aug 2, 2023
1 parent 1482562 commit b6794f4
Show file tree
Hide file tree
Showing 20 changed files with 156 additions and 206 deletions.
11 changes: 0 additions & 11 deletions libqf/libqfcore/images/images.qrc

This file was deleted.

65 changes: 0 additions & 65 deletions libqf/libqfcore/libqfcore.pro

This file was deleted.

14 changes: 7 additions & 7 deletions libqf/libqfcore/src/model/tablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ QVariant TableModel::data(const QModelIndex &index, int role) const

QVariant TableModel::headerData(int section, Qt::Orientation orientation, int role) const
{
static QIcon ico_dirty(QPixmap(":/qf/core/images/pencil.png"));
//static QIcon ico_dirty(QPixmap(":/qf/core/images/pencil.png"));
//static QIcon ico_filter(QPixmap(":/libqfgui/images/filter.png"));
QVariant ret;
if(orientation == Qt::Horizontal) {
Expand Down Expand Up @@ -281,12 +281,12 @@ QVariant TableModel::headerData(int section, Qt::Orientation orientation, int ro
ret = QVariant(section + 1);
}
}
else if(role == Qt::DecorationRole) {
qfu::TableRow r = m_table.row(section);
if(!r.isNull() && r.isDirty()) {
return QVariant::fromValue(ico_dirty);
}
}
//else if(role == Qt::DecorationRole) {
// qfu::TableRow r = m_table.row(section);
// if(!r.isNull() && r.isDirty()) {
// return QVariant::fromValue(ico_dirty);
// }
//}
}
else {
ret = QAbstractTableModel::headerData(section, orientation, role);
Expand Down
6 changes: 3 additions & 3 deletions libqf/libqfqmlwidgets/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ add_library(libqfqmlwidgets SHARED
src/texteditwidget.cpp
src/timeedit.cpp
src/toolbar.cpp
style/style.qrc
images/images.qrc
images/flat/flat.qrc
style/qf_qmlwidgets_style.qrc
images/qf_qmlwidgets_images.qrc
images/flat/qf_qmlwidgets_images_flat.qrc
)

if(USE_QT6)
Expand Down
File renamed without changes.
51 changes: 0 additions & 51 deletions libqf/libqfqmlwidgets/images/images.qrc

This file was deleted.

File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
53 changes: 53 additions & 0 deletions libqf/libqfqmlwidgets/images/qf_qmlwidgets_images.qrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<RCC>
<qresource prefix="/qf/qmlwidgets/images">
<file>under-construction.png</file>
<file>alert.png</file>
<file>wordwrap.png</file>
<file>clone.png</file>
<file>copy.png</file>
<file>delete.png</file>
<file>edit.png</file>
<file>new.png</file>
<file>paste.png</file>
<file>reload.png</file>
<file>revert.png</file>
<file>sort-asc.png</file>
<file>sort-desc.png</file>
<file>find.png</file>
<file>print.png</file>
<file>print-preview.png</file>
<file>acrobat.png</file>
<file>network.png</file>
<file>save.png</file>
<file>view.png</file>
<file>plus.png</file>
<file>minus.png</file>
<file>insert-row.png</file>
<file>clone-row.png</file>
<file>delete-row.png</file>
<file>settings.svg</file>
<file>left.svg</file>
<file>right.svg</file>
<file>up.svg</file>
<file>down.svg</file>
<file>close.svg</file>
<file>fwd.png</file>
<file>ffwd.png</file>
<file>rev.png</file>
<file>frev.png</file>
<file>zoom_fitall.png</file>
<file>zoom_fitheight.png</file>
<file>zoom_fitwidth.png</file>
<file>zoom_in.png</file>
<file>zoom_out.png</file>
<file>zoomin_cursor_bitmap.png</file>
<file>zoomin_cursor_mask.png</file>
<file>copy.svg</file>
<file>light-blind.png</file>
<file>light-cyan.png</file>
<file>light-green.png</file>
<file>light-red.png</file>
<file>light-yellow.png</file>
<file>pencil.png</file>
</qresource>
</RCC>
43 changes: 21 additions & 22 deletions libqf/libqfqmlwidgets/src/reports/widgets/reportviewwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -571,81 +571,80 @@ qf::qmlwidgets::framework::DialogWidget::ActionMap ReportViewWidget::createActio
}
{
qf::qmlwidgets::Action *a;
QIcon ico(":/qf/qmlwidgets/images/rev");
a = new qf::qmlwidgets::Action(ico, tr("Prev page"), this);
a = new qf::qmlwidgets::Action(tr("Prev page"), this);
a->setIcon(style->icon("rev"));
ret[QStringLiteral("view.prevPage")] = a;
connect(a, &QAction::triggered, this, [this]() { view_prevPage(); });
}
{
qf::qmlwidgets::Action *a;
QIcon ico(":/qf/qmlwidgets/images/fwd");
a = new qf::qmlwidgets::Action(ico, tr("Next page"), this);
a = new qf::qmlwidgets::Action(tr("Next page"), this);
a->setIcon(style->icon("fwd"));
ret[QStringLiteral("view.nextPage")] = a;
connect(a, &QAction::triggered, this, [this]() { view_nextPage(); });
}
{
qf::qmlwidgets::Action *a;
QIcon ico(":/qf/qmlwidgets/images/ffwd");
a = new qf::qmlwidgets::Action(ico, tr("Last page"), this);
a = new qf::qmlwidgets::Action(tr("Last page"), this);
a->setIcon(style->icon("ffwd"));
ret[QStringLiteral("view.lastPage")] = a;
connect(a, &QAction::triggered, this, &ReportViewWidget::view_lastPage);
}
{
qf::qmlwidgets::Action *a;
QIcon ico(":/qf/qmlwidgets/images/zoom_in");
a = new qf::qmlwidgets::Action(ico, tr("Zoom in"), this);
a = new qf::qmlwidgets::Action(tr("Zoom in"), this);
a->setIcon(style->icon("zoom_in"));
ret[QStringLiteral("view.zoomIn")] = a;
connect(a, &QAction::triggered, this, [this]() { view_zoomIn(); });
}
{
qf::qmlwidgets::Action *a;
QIcon ico(":/qf/qmlwidgets/images/zoom_out");
a = new qf::qmlwidgets::Action(ico, tr("Zoom out"), this);
a = new qf::qmlwidgets::Action(tr("Zoom out"), this);
a->setIcon(style->icon("zoom_out"));
ret[QStringLiteral("view.zoomOut")] = a;
connect(a, &QAction::triggered, this, [this]() { view_zoomOut(); });
}
{
qf::qmlwidgets::Action *a;
QIcon ico(":/qf/qmlwidgets/images/zoom_fitwidth");
a = new qf::qmlwidgets::Action(ico, tr("Zoom to fit width"), this);
a = new qf::qmlwidgets::Action(tr("Zoom to fit width"), this);
a->setIcon(style->icon("zoom_fitwidth"));
ret[QStringLiteral("view.zoomFitWidth")] = a;
connect(a, &QAction::triggered, this, &ReportViewWidget::view_zoomToFitWidth);
}
{
qf::qmlwidgets::Action *a;
QIcon ico(":/qf/qmlwidgets/images/zoom_fitheight");
a = new qf::qmlwidgets::Action(ico, tr("Zoom to fit height"), this);
a = new qf::qmlwidgets::Action(tr("Zoom to fit height"), this);
a->setIcon(style->icon("zoom_fitheight"));
ret[QStringLiteral("view.zoomFitHeight")] = a;
connect(a, &QAction::triggered, this, &ReportViewWidget::view_zoomToFitHeight);
}
{
qf::qmlwidgets::Action *a;
a = new qf::qmlwidgets::Action(tr("&Print"), this);
a->setIcon(style->icon("prnter"));
a->setIcon(style->icon("printer"));
//a->setTooltip(tr("Tisk"));
ret[QStringLiteral("file.print")] = a;
connect(a, &QAction::triggered, this, &ReportViewWidget::file_print);
}
{
qf::qmlwidgets::Action *a;
QIcon ico(":/qf/qmlwidgets/images/print-preview");
a = new qf::qmlwidgets::Action(ico, tr("Print pre&view"), this);
//a->setToolTip(tr("Náhled tisku"));
a = new qf::qmlwidgets::Action(tr("Print pre&view"), this);
a->setIcon(style->icon("print-preview"));
ret[QStringLiteral("file.printPreview")] = a;
connect(a, &QAction::triggered, this, &ReportViewWidget::file_printPreview);
}
{
qf::qmlwidgets::Action *a;
QIcon ico(":/qf/qmlwidgets/images/acrobat");
a = new qf::qmlwidgets::Action(ico, tr("Export PD&F"), this);
a = new qf::qmlwidgets::Action(tr("Export PD&F"), this);
a->setIcon(style->icon("acrobat"));
a->setToolTip(tr("Export in the Adobe Acrobat PDF format"));
ret[QStringLiteral("file.export.pdf")] = a;
connect(a, &QAction::triggered, this, &ReportViewWidget::file_export_pdf);
}
{
qf::qmlwidgets::Action *a;
QIcon ico(":/qf/qmlwidgets/images/network");
a = new qf::qmlwidgets::Action(ico, tr("Export &HTML"), this);
a = new qf::qmlwidgets::Action(tr("Export &HTML"), this);
a->setIcon(style->icon("network"));
a->setToolTip(tr("Export data in HTML"));
ret[QStringLiteral("file.export.html")] = a;
connect(a, &QAction::triggered, this, &ReportViewWidget::file_export_html);
Expand Down
Loading

0 comments on commit b6794f4

Please sign in to comment.