delete files

This commit is contained in:
kangshuning 2021-11-11 19:16:21 +08:00
parent 22deec1b67
commit f4ebf15410
4 changed files with 1 additions and 76 deletions

View File

@ -2,10 +2,8 @@
SOURCES += \
$$PWD/DrownLabel/drownlabel.cpp \
$$PWD/DrownLabel/drownlabel.cpp \
HEADERS += \
$$PWD/DrownLabel/drownlabel.h \
$$PWD/DrownLabel/drownlabel.h \

View File

@ -6,7 +6,7 @@
#include <QHBoxLayout>
#include <QLabel>
#include <QDebug>
#include "drownlabel.h"
#include "../component/DrownLabel/drownlabel.h"
class DeviceFrame : public QFrame
{

View File

@ -1,43 +0,0 @@
#include "drownlabel.h"
#include "deviceframe.h"
#define ICONSIZE 12,12
DrownLabel::DrownLabel(QString devName, QWidget * parent) : QLabel(parent)
{
m_devName = devName;
setFixedSize(36,36);
loadPixmap(isChecked);
this->setProperty("useIconHighlightEffect", 0x2);
}
DrownLabel::~DrownLabel()
{
}
void DrownLabel::setDropDownStatus(bool status)
{
isChecked = status;
loadPixmap(isChecked);
}
void DrownLabel::loadPixmap(bool isChecked)
{
if (isChecked) {
if (QIcon::fromTheme("ukui-up-symbolic").isNull()) {
qDebug() << "ukui-up-symbolic is missing";
}
setPixmap(QIcon::fromTheme("ukui-up-symbolic").pixmap(ICONSIZE));
} else {
if (QIcon::fromTheme("ukui-down-symbolic").isNull()) {
qDebug() << "ukui-down-symbolic is missing";
}
setPixmap(QIcon::fromTheme("ukui-down-symbolic").pixmap(ICONSIZE));
}
}
void DrownLabel::mouseReleaseEvent(QMouseEvent *event)
{
emit labelClicked();
QWidget::mouseReleaseEvent(event);
}

View File

@ -1,30 +0,0 @@
#ifndef DROWNLABEL_H
#define DROWNLABEL_H
#include <QObject>
#include <QLabel>
#include <QWidget>
#include <QMouseEvent>
#include <QPushButton>
class DrownLabel : public QLabel
{
Q_OBJECT
public:
explicit DrownLabel(QString devName, QWidget * parent = nullptr);
~DrownLabel();
void setDropDownStatus(bool status);
QString m_devName;
bool isChecked = true;
private:
void loadPixmap(bool isChecked);
protected:
virtual void mouseReleaseEvent(QMouseEvent * event);
Q_SIGNALS:
void labelClicked();
};
#endif // DROWNLABEL_H