File indexing completed on 2024-04-28 15:40:12
0001 // SPDX-FileCopyrightText: 2003-2018 Jesper K. Pedersen <blackie@kde.org> 0002 // SPDX-FileCopyrightText: 2022 Johannes Zarl-Zierl <johannes@zarl-zierl.at> 0003 // 0004 // SPDX-License-Identifier: GPL-2.0-or-later 0005 0006 #include "ImageCounter.h" 0007 0008 #include <KLocalizedString> 0009 #include <QLabel> 0010 0011 MainWindow::ImageCounter::ImageCounter(QWidget *parent) 0012 : QLabel(parent) 0013 { 0014 setText(QString::fromLatin1("---")); 0015 setMargin(5); 0016 } 0017 0018 void MainWindow::ImageCounter::setMatchCount(int matches) 0019 { 0020 setText(i18np("Showing 1 thumbnail", "Showing %1 thumbnails", matches)); 0021 } 0022 0023 void MainWindow::ImageCounter::setSelectionCount(int selected) 0024 { 0025 if (selected > 0) 0026 setText(i18n("(%1 selected)", selected)); 0027 else 0028 setText(QString()); 0029 } 0030 0031 void MainWindow::ImageCounter::setTotal(int c) 0032 { 0033 setText(i18n("Total: %1", c)); 0034 } 0035 0036 void MainWindow::ImageCounter::showBrowserMatches(int matches) 0037 { 0038 setText(i18np("1 match", "%1 matches", matches)); 0039 } 0040 0041 #include "moc_ImageCounter.cpp" 0042 // vi:expandtab:tabstop=4 shiftwidth=4: