changing variable names
This commit is contained in:
@@ -28,54 +28,54 @@ namespace Noggit::Ui::Widget
|
|||||||
if (data.ExpansionId == 8)
|
if (data.ExpansionId == 8)
|
||||||
icon = QIcon(":/icon-shadow");
|
icon = QIcon(":/icon-shadow");
|
||||||
|
|
||||||
project_version_icon = new QLabel("", parent);
|
map_icon = new QLabel("", parent);
|
||||||
project_version_icon->setPixmap(icon.pixmap(QSize(32, 32)));
|
map_icon->setPixmap(icon.pixmap(QSize(32, 32)));
|
||||||
project_version_icon->setGeometry(0, 0, 32, 32);
|
map_icon->setGeometry(0, 0, 32, 32);
|
||||||
project_version_icon->setObjectName("project-icon-label");
|
map_icon->setObjectName("project-icon-label");
|
||||||
project_version_icon->setStyleSheet("QLabel#project-icon-label { font-size: 12px; padding: 0px;}");
|
map_icon->setStyleSheet("QLabel#project-icon-label { font-size: 12px; padding: 0px;}");
|
||||||
|
|
||||||
auto projectName = toCamelCase(QString(data.MapName));
|
auto projectName = toCamelCase(QString(data.MapName));
|
||||||
project_name_label = new QLabel(projectName, parent);
|
map_name = new QLabel(projectName, parent);
|
||||||
project_name_label->setGeometry(32, 0, 300, 20);
|
map_name->setGeometry(32, 0, 300, 20);
|
||||||
project_name_label->setObjectName("project-title-label");
|
map_name->setObjectName("project-title-label");
|
||||||
project_name_label->setStyleSheet("QLabel#project-title-label { font-size: 12px; }");
|
map_name->setStyleSheet("QLabel#project-title-label { font-size: 12px; }");
|
||||||
|
|
||||||
project_directory_label = new QLabel(QString::number(data.MapId), parent);
|
map_id = new QLabel(QString::number(data.MapId), parent);
|
||||||
project_directory_label->setGeometry(32, 15, 300, 20);
|
map_id->setGeometry(32, 15, 300, 20);
|
||||||
project_directory_label->setObjectName("project-information");
|
map_id->setObjectName("project-information");
|
||||||
project_directory_label->setStyleSheet("QLabel#project-information { font-size: 10px; }");
|
map_id->setStyleSheet("QLabel#project-information { font-size: 10px; }");
|
||||||
|
|
||||||
auto directoryEffect = new QGraphicsOpacityEffect(this);
|
auto directoryEffect = new QGraphicsOpacityEffect(this);
|
||||||
directoryEffect->setOpacity(0.5);
|
directoryEffect->setOpacity(0.5);
|
||||||
|
|
||||||
auto instanceType = QString("Unknown");
|
map_id->setGraphicsEffect(directoryEffect);
|
||||||
if(data.MapTypeId == 0)
|
map_id->setAutoFillBackground(true);
|
||||||
instanceType = QString("Continent");
|
|
||||||
if(data.MapTypeId == 1)
|
|
||||||
instanceType = QString("Dungeon");
|
|
||||||
if(data.MapTypeId == 2)
|
|
||||||
instanceType = QString("Raid");
|
|
||||||
if(data.MapTypeId == 3)
|
|
||||||
instanceType = QString("Battleground");
|
|
||||||
if(data.MapTypeId == 4)
|
|
||||||
instanceType = QString("Arena");
|
|
||||||
if(data.MapTypeId == 5)
|
|
||||||
instanceType = QString("Scenario");
|
|
||||||
|
|
||||||
project_directory_label->setGraphicsEffect(directoryEffect);
|
auto instanceType = QString("Unknown");
|
||||||
project_directory_label->setAutoFillBackground(true);
|
if (data.MapTypeId == 0)
|
||||||
|
instanceType = QString("Continent");
|
||||||
|
if (data.MapTypeId == 1)
|
||||||
|
instanceType = QString("Dungeon");
|
||||||
|
if (data.MapTypeId == 2)
|
||||||
|
instanceType = QString("Raid");
|
||||||
|
if (data.MapTypeId == 3)
|
||||||
|
instanceType = QString("Battleground");
|
||||||
|
if (data.MapTypeId == 4)
|
||||||
|
instanceType = QString("Arena");
|
||||||
|
if (data.MapTypeId == 5)
|
||||||
|
instanceType = QString("Scenario");
|
||||||
|
|
||||||
project_last_edited_label = new QLabel( instanceType,this);
|
map_instance_type = new QLabel( instanceType,this);
|
||||||
project_last_edited_label->setGeometry(150, 15, 125, 20);
|
map_instance_type->setGeometry(150, 15, 125, 20);
|
||||||
project_last_edited_label->setAlignment(Qt::AlignRight | Qt::AlignTrailing | Qt::AlignVCenter);
|
map_instance_type->setAlignment(Qt::AlignRight | Qt::AlignTrailing | Qt::AlignVCenter);
|
||||||
project_last_edited_label->setObjectName("project-information");
|
map_instance_type->setObjectName("project-information");
|
||||||
project_last_edited_label->setStyleSheet("QLabel#project-information { font-size: 10px; }");
|
map_instance_type->setStyleSheet("QLabel#project-information { font-size: 10px; }");
|
||||||
|
|
||||||
auto lastEditedEffect = new QGraphicsOpacityEffect(this);
|
auto lastEditedEffect = new QGraphicsOpacityEffect(this);
|
||||||
lastEditedEffect->setOpacity(0.5);
|
lastEditedEffect->setOpacity(0.5);
|
||||||
|
|
||||||
project_last_edited_label->setGraphicsEffect(lastEditedEffect);
|
map_instance_type->setGraphicsEffect(lastEditedEffect);
|
||||||
project_last_edited_label->setAutoFillBackground(true);
|
map_instance_type->setAutoFillBackground(true);
|
||||||
|
|
||||||
if(data.Pinned)
|
if(data.Pinned)
|
||||||
{
|
{
|
||||||
@@ -98,10 +98,10 @@ namespace Noggit::Ui::Widget
|
|||||||
|
|
||||||
setContextMenuPolicy(Qt::CustomContextMenu);
|
setContextMenuPolicy(Qt::CustomContextMenu);
|
||||||
|
|
||||||
layout.addWidget(project_version_icon);
|
layout.addWidget(map_icon);
|
||||||
layout.addWidget(project_name_label);
|
layout.addWidget(map_name);
|
||||||
layout.addWidget(project_directory_label);
|
layout.addWidget(map_id);
|
||||||
layout.addWidget(project_last_edited_label);
|
layout.addWidget(map_instance_type);
|
||||||
setLayout(layout.layout());
|
setLayout(layout.layout());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,11 +24,10 @@ namespace Noggit::Ui::Widget
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
private:
|
private:
|
||||||
QLabel* project_version_icon;
|
QLabel* map_icon;
|
||||||
QLabel* project_name_label;
|
QLabel* map_name;
|
||||||
QLabel* project_directory_label;
|
QLabel* map_id;
|
||||||
QLabel* project_version_label;
|
QLabel* map_instance_type;
|
||||||
QLabel* project_last_edited_label;
|
|
||||||
QLabel* map_pinned_label;
|
QLabel* map_pinned_label;
|
||||||
int _maxWidth;
|
int _maxWidth;
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ namespace Noggit::Ui::Windows
|
|||||||
QMessageBox prompt;
|
QMessageBox prompt;
|
||||||
prompt.setWindowIcon(QIcon(":/icon"));
|
prompt.setWindowIcon(QIcon(":/icon"));
|
||||||
prompt.setWindowTitle("Delete Project");
|
prompt.setWindowTitle("Delete Project");
|
||||||
prompt.setIcon(QMessageBox::Critical);
|
prompt.setIcon(QMessageBox::Warning);
|
||||||
prompt.setWindowFlags(Qt::WindowStaysOnTopHint);
|
prompt.setWindowFlags(Qt::WindowStaysOnTopHint);
|
||||||
prompt.setText("Deleting project will remove all saved data.");
|
prompt.setText("Deleting project will remove all saved data.");
|
||||||
prompt.addButton("Accept", QMessageBox::AcceptRole);
|
prompt.addButton("Accept", QMessageBox::AcceptRole);
|
||||||
|
|||||||
Reference in New Issue
Block a user