mirror of
https://github.com/edisionnano/QDiskInfo.git
synced 2026-03-26 06:30:54 +03:00
Move source to src folder
This commit is contained in:
29
src/custombutton.h
Normal file
29
src/custombutton.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#ifndef CUSTOMBUTTON_H
|
||||
#define CUSTOMBUTTON_H
|
||||
|
||||
#include <QPushButton>
|
||||
#include <QPainter>
|
||||
|
||||
class CustomButton : public QPushButton {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CustomButton(const QString &text1, const QString &text2, const QString &text3, const QColor &lineColor, QWidget *parent = nullptr);
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
void setText1(const QString &newText1);
|
||||
void setText2(const QString &newText2);
|
||||
void setText3(const QString &newText3);
|
||||
void adjustWidthToFitText();
|
||||
|
||||
|
||||
private:
|
||||
QString text1;
|
||||
QString text2;
|
||||
QString text3;
|
||||
QColor lineColor;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user