swift
labelandicon.cpp
1 // SPDX-FileCopyrightText: Copyright (C) 2015 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
4 #include "gui/labelandicon.h"
5 
6 #include <QLabel>
7 
8 #include "ui_labelandicon.h"
9 
10 namespace swift::gui
11 {
12  CLabelAndIcon::CLabelAndIcon(QWidget *parent) : QFrame(parent), ui(new Ui::CLabelAndIcon) { ui->setupUi(this); }
13 
15 
16  void CLabelAndIcon::set(const QPixmap &pixmap, const QString &text)
17  {
18  ui->lbl_Left->setPixmap(pixmap);
19  ui->lbl_Right->setText(text);
20  }
21 
22  void CLabelAndIcon::set(const QString &text, const QPixmap &pixmap)
23  {
24  ui->lbl_Right->setPixmap(pixmap);
25  ui->lbl_Left->setText(text);
26  }
27 
28 } // namespace swift::gui
Label and icon frame.
Definition: labelandicon.h:28
CLabelAndIcon(QWidget *parent=nullptr)
Constructor.
void set(const QPixmap &pixmap, const QString &text)
Set values (left to right)
GUI related classes.