命名规范
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
#include "Base_Info.h"
|
||||
#include "Renderive/Generate_Mock_Data.h"
|
||||
#include "Renderive/architecture/global.h"
|
||||
namespace Psc {
|
||||
Base_Info::Base_Info(int len, QString content) : len(len), content(std::move(content)) {
|
||||
renderive::Range r{155, 255};
|
||||
QColor random_color(renderive::get_data(r), renderive::get_data(r), renderive::get_data(r));
|
||||
background_color = random_color;
|
||||
}
|
||||
void Base_Info::paint(QPainter* painter, QRect rect) {
|
||||
painter->fillRect(rect, background_color);
|
||||
painter->drawText(rect, Qt::AlignCenter, content);
|
||||
}
|
||||
} // namespace Psc
|
||||
Reference in New Issue
Block a user