Skip to content

Commit 5cb0863

Browse files
committed
New file name.
1 parent e983ad9 commit 5cb0863

12 files changed

+42
-57
lines changed

Icons/icons.qrc

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
<RCC>
22
<qresource prefix="/">
3-
<file>book.png</file>
4-
<file>no_image.png</file>
5-
<file>16x16/add.png</file>
6-
<file>16x16/cancel.png</file>
3+
<file>16x16/add.png</file>
4+
<file>16x16/cancel.png</file>
75
<file>16x16/connected.png</file>
86
<file>16x16/convert.png</file>
97
<file>16x16/details.png</file>
@@ -70,5 +68,7 @@
7068
<file>32x32/save.png</file>
7169
<file>32x32/settings.png</file>
7270
<file>32x32/stamp.png</file>
71+
<file>book.png</file>
72+
<file>missing_image.png</file>
7373
</qresource>
7474
</RCC>
File renamed without changes.

Source/biblioteq_a.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -6229,7 +6229,7 @@ void biblioteq::updateSceneItem(const QString &oid,
62296229
item->setPixmap(pixmap);
62306230
else
62316231
{
6232-
QImage l_image(":/no_image.png");
6232+
QImage l_image(":/missing_image.png");
62336233

62346234
if(!l_image.isNull())
62356235
l_image = l_image.scaled

Source/biblioteq_b.cc

+6-6
Original file line numberDiff line numberDiff line change
@@ -3925,13 +3925,13 @@ int biblioteq::populateTable(const int search_type_arg,
39253925
image = images.value(QByteArray());
39263926
else
39273927
{
3928-
image = QImage(":/no_image.png");
3928+
image = QImage(":/missing_image.png");
39293929
images[QByteArray()] = image;
39303930
}
39313931
}
39323932

39333933
/*
3934-
** The size of no_image.png is AxB.
3934+
** The size of missing_image.png is AxB.
39353935
*/
39363936

39373937
if(!image.isNull())
@@ -3999,7 +3999,7 @@ int biblioteq::populateTable(const int search_type_arg,
39993999
if(pixmapItem)
40004000
first->setIcon(pixmapItem->pixmap());
40014001
else
4002-
first->setIcon(QIcon(":/no_image.png"));
4002+
first->setIcon(QIcon(":/missing_image.png"));
40034003

40044004
ui.table->setRowHeight
40054005
(i, qMax(fontMetrics.height() + 10,
@@ -4304,14 +4304,14 @@ void biblioteq::setSummaryImages(const QImage &back, const QImage &front)
43044304
}
43054305

43064306
/*
4307-
** The size of no_image.png is AxB.
4307+
** The size of missing_image.png is AxB.
43084308
*/
43094309

43104310
auto b(back);
43114311
auto f(front);
43124312

43134313
if(b.isNull())
4314-
b = QImage(":/no_image.png");
4314+
b = QImage(":/missing_image.png");
43154315

43164316
if(!b.isNull())
43174317
b = b.scaled
@@ -4326,7 +4326,7 @@ void biblioteq::setSummaryImages(const QImage &back, const QImage &front)
43264326
ui.backImage->clear();
43274327

43284328
if(f.isNull())
4329-
f = QImage(":/no_image.png");
4329+
f = QImage(":/missing_image.png");
43304330

43314331
if(!f.isNull())
43324332
f = f.scaled

Source/biblioteq_book.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -3877,7 +3877,7 @@ void biblioteq_book::slotGo(void)
38773877
else
38783878
qmain->getUI().table->item
38793879
(m_index->row(), imageColumn)->setIcon
3880-
(QIcon(":/no_image.png"));
3880+
(QIcon(":/missing_image.png"));
38813881
}
38823882

38833883
qmain->getUI().table->setSortingEnabled(true);

Source/biblioteq_c.cc

+6-6
Original file line numberDiff line numberDiff line change
@@ -1011,13 +1011,13 @@ int biblioteq::populateTable(QSqlQuery *query,
10111011
image = images.value(QByteArray());
10121012
else
10131013
{
1014-
image = QImage(":/no_image.png");
1014+
image = QImage(":/missing_image.png");
10151015
images[QByteArray()] = image;
10161016
}
10171017
}
10181018

10191019
/*
1020-
** The size of no_image.png is AxB.
1020+
** The size of missing_image.png is AxB.
10211021
*/
10221022

10231023
if(!image.isNull())
@@ -1086,7 +1086,7 @@ int biblioteq::populateTable(QSqlQuery *query,
10861086
if(pixmapItem)
10871087
first->setIcon(pixmapItem->pixmap());
10881088
else
1089-
first->setIcon(QIcon(":/no_image.png"));
1089+
first->setIcon(QIcon(":/missing_image.png"));
10901090

10911091
ui.table->setRowHeight
10921092
(i,
@@ -3941,11 +3941,11 @@ void biblioteq::slotDisplaySummary(void)
39413941
QApplication::restoreOverrideCursor();
39423942

39433943
/*
3944-
** The size of no_image.png is AxB.
3944+
** The size of missing_image.png is AxB.
39453945
*/
39463946

39473947
if(frontImage.isNull())
3948-
frontImage = QImage(":/no_image.png");
3948+
frontImage = QImage(":/missing_image.png");
39493949

39503950
if(!frontImage.isNull())
39513951
frontImage = frontImage.scaled
@@ -3955,7 +3955,7 @@ void biblioteq::slotDisplaySummary(void)
39553955
type != "Photograph Collection")
39563956
{
39573957
if(backImage.isNull())
3958-
backImage = QImage(":/no_image.png");
3958+
backImage = QImage(":/missing_image.png");
39593959

39603960
if(!backImage.isNull())
39613961
backImage = backImage.scaled

Source/biblioteq_cd.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1505,7 +1505,7 @@ void biblioteq_cd::slotGo(void)
15051505
setIcon(pixmap);
15061506
else
15071507
qmain->getUI().table->item(m_index->row(), i)->
1508-
setIcon(QIcon(":/no_image.png"));
1508+
setIcon(QIcon(":/missing_image.png"));
15091509
}
15101510

15111511
if(names.at(i) == "Accession Number")

Source/biblioteq_dvd.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1515,7 +1515,7 @@ void biblioteq_dvd::slotGo(void)
15151515
setIcon(pixmap);
15161516
else
15171517
qmain->getUI().table->item(m_index->row(), i)->
1518-
setIcon(QIcon(":/no_image.png"));
1518+
setIcon(QIcon(":/missing_image.png"));
15191519
}
15201520

15211521
if(names.at(i) == "Accession Number")

Source/biblioteq_image_drop_site.cc

+16-31
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ biblioteq_image_drop_site::biblioteq_image_drop_site(QWidget *parent):
4444
m_doubleClickResizeEnabled = true;
4545
m_doubleClicked = false;
4646
m_image = QImage();
47-
m_imageFormat = "";
47+
m_imageFormat.clear();
4848
m_readOnly = false;
4949
setAcceptDrops(true);
5050
}
@@ -203,7 +203,7 @@ void biblioteq_image_drop_site::dropEvent(QDropEvent *event)
203203
#else
204204
if(event)
205205
{
206-
QUrl url(event->mimeData()->text());
206+
QUrl const url(event->mimeData()->text());
207207

208208
filename = url.toLocalFile().trimmed();
209209
}
@@ -238,9 +238,9 @@ void biblioteq_image_drop_site::dropEvent(QDropEvent *event)
238238

239239
if(pixmap.isNull())
240240
{
241-
m_image = QImage(":/no_image.png");
241+
m_image = QImage(":/missing_image.png");
242242
m_imageFormat = "PNG";
243-
pixmap = QPixmap(":/no_image.png");
243+
pixmap = QPixmap(":/missing_image.png");
244244
}
245245

246246
scene()->addPixmap(pixmap);
@@ -260,27 +260,12 @@ void biblioteq_image_drop_site::enableDoubleClickResize(const bool state)
260260

261261
void biblioteq_image_drop_site::keyPressEvent(QKeyEvent *event)
262262
{
263-
if(acceptDrops())
264-
if(event)
265-
{
266-
if((QGuiApplication::keyboardModifiers() & Qt::ControlModifier) &&
267-
event->key() == Qt::Key_V)
268-
{
269-
if(!m_readOnly)
270-
{
271-
auto clipboard = QApplication::clipboard();
272-
273-
if(clipboard)
274-
setImage(clipboard->image());
275-
}
276-
}
277-
else if(event->key() == Qt::Key_Backspace ||
278-
event->key() == Qt::Key_Delete)
279-
{
280-
if(!m_readOnly && !scene()->selectedItems().isEmpty())
281-
clear();
282-
}
283-
}
263+
if(event && m_readOnly == false)
264+
if(event->key() == Qt::Key_Backspace || event->key() == Qt::Key_Delete)
265+
if(scene()->selectedItems().isEmpty() == false)
266+
clear();
267+
268+
QGraphicsView::keyPressEvent(event);
284269
}
285270

286271
void biblioteq_image_drop_site::loadFromData(const QByteArray &bytes)
@@ -306,9 +291,9 @@ void biblioteq_image_drop_site::loadFromData(const QByteArray &bytes)
306291

307292
if(pixmap.isNull())
308293
{
309-
m_image = QImage(":/no_image.png");
294+
m_image = QImage(":/missing_image.png");
310295
m_imageFormat = "PNG";
311-
pixmap = QPixmap(":/no_image.png");
296+
pixmap = QPixmap(":/missing_image.png");
312297
}
313298

314299
scene()->addPixmap(pixmap);
@@ -334,7 +319,7 @@ void biblioteq_image_drop_site::mouseDoubleClickEvent(QMouseEvent *event)
334319
auto pixmap(QPixmap::fromImage(m_image));
335320

336321
if(pixmap.isNull())
337-
pixmap = QPixmap(":/no_image.png");
322+
pixmap = QPixmap(":/missing_image.png");
338323

339324
scene()->addPixmap(pixmap);
340325
}
@@ -347,7 +332,7 @@ void biblioteq_image_drop_site::mouseDoubleClickEvent(QMouseEvent *event)
347332
(size(), Qt::KeepAspectRatio, Qt::SmoothTransformation);
348333

349334
if(pixmap.isNull())
350-
pixmap = QPixmap(":/no_image.png");
335+
pixmap = QPixmap(":/missing_image.png");
351336

352337
scene()->addPixmap(pixmap);
353338
}
@@ -387,9 +372,9 @@ void biblioteq_image_drop_site::setImage(const QImage &image)
387372

388373
if(pixmap.isNull())
389374
{
390-
m_image = QImage(":/no_image.png");
375+
m_image = QImage(":/missing_image.png");
391376
m_imageFormat = "PNG";
392-
pixmap = QPixmap(":/no_image.png");
377+
pixmap = QPixmap(":/missing_image.png");
393378
}
394379

395380
scene()->addPixmap(pixmap);

Source/biblioteq_magazine.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -2959,7 +2959,7 @@ void biblioteq_magazine::slotGo(void)
29592959
setIcon(pixmap);
29602960
else
29612961
qmain->getUI().table->item(m_index->row(), i)->
2962-
setIcon(QIcon(":/no_image.png"));
2962+
setIcon(QIcon(":/missing_image.png"));
29632963
}
29642964

29652965
if(names.at(i) == "Accession Number")

Source/biblioteq_photographcollection.cc

+4-4
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ void biblioteq_photographcollection::loadPhotographFromItem
498498
}
499499

500500
if(image.isNull())
501-
image = QImage(":/no_image.png");
501+
image = QImage(":/missing_image.png");
502502

503503
QSize size;
504504

@@ -1013,10 +1013,10 @@ void biblioteq_photographcollection::showPhotographs(const int page)
10131013
image.loadFromData(query.value(0).toByteArray());
10141014

10151015
if(image.isNull())
1016-
image = QImage(":/no_image.png");
1016+
image = QImage(":/missing_image.png");
10171017

10181018
/*
1019-
** The size of no_image.png is AxB.
1019+
** The size of missing_image.png is AxB.
10201020
*/
10211021

10221022
if(!image.isNull())
@@ -1616,7 +1616,7 @@ void biblioteq_photographcollection::slotGo(void)
16161616
setIcon(pixmap);
16171617
else
16181618
qmain->getUI().table->item(m_index->row(), i)->
1619-
setIcon(QIcon(":/no_image.png"));
1619+
setIcon(QIcon(":/missing_image.png"));
16201620
}
16211621

16221622
if(names.at(i) == "About")

Source/biblioteq_videogame.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1367,7 +1367,7 @@ void biblioteq_videogame::slotGo(void)
13671367
setIcon(pixmap);
13681368
else
13691369
qmain->getUI().table->item(m_index->row(), i)->
1370-
setIcon(QIcon(":/no_image.png"));
1370+
setIcon(QIcon(":/missing_image.png"));
13711371
}
13721372

13731373
if(names.at(i) == "Accession Number")

0 commit comments

Comments
 (0)