Skip to content
This repository has been archived by the owner on May 5, 2024. It is now read-only.

Commit

Permalink
v3.0.0
Browse files Browse the repository at this point in the history
新增自動存檔 / 載入存檔功能
  • Loading branch information
WhatTheBlock committed Jun 27, 2023
1 parent 025f963 commit 87f26b0
Show file tree
Hide file tree
Showing 16 changed files with 366 additions and 85 deletions.
1 change: 1 addition & 0 deletions MapleStory_ARC_Calculator.pro
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ SOURCES += \
src/checkUpdate.cpp \
src/main.cpp \
src/mainui.cpp \
src/settings.cpp \
src/triggerEvent.cpp \
src/utils.cpp

Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
### Changelog:
----

#### v3.0.0
- 新增自動存檔 / 載入存檔功能
- 一鍵多選按鈕改為圖示按鈕樣式
- 修正內部版本號設定錯誤

#### v2.9.5
- 重寫秘法觸媒功能
- 修正ARC/AUT經驗無法增加的錯誤
Expand Down
2 changes: 2 additions & 0 deletions src/images.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,7 @@
<file>images/AUT3.png</file>
<file>images/maplestory.png</file>
<file>images/lightbulb.gif</file>
<file>images/restore.png</file>
<file>images/select.png</file>
</qresource>
</RCC>
Binary file added src/images/restore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/select.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 9 additions & 6 deletions src/mainui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ MainUI::MainUI(QWidget *parent) : QWidget(parent), ui(new Ui::MainUI) {
ArcMode = ui->ArcMode;
AutMode = ui->AutMode;

//極限屬性
hyperStats = 0;

//公會技能
guildSkill = 0;

//設定數據範圍
ui->ArcLV_to->setMaximum(ARCMAXLV);
ui->ArcLV_from->setMaximum(ARCMAXLV - 1);
Expand All @@ -75,12 +81,6 @@ MainUI::MainUI(QWidget *parent) : QWidget(parent), ui(new Ui::MainUI) {
autUpgradeList[0] = 0;
for(int i = 1; i < AUTMAXLV; i++) autUpgradeList[i] = 9 * i * i + 20 * i + autUpgradeList[i - 1];

//極限屬性
hyperStats = 0;

//公會技能
guildSkill = 0;

//設定符文升級費用
for(int i = 0; i < ARCMAXLV - 1; i++) {
ARC200_COST[i] = ARC200_COST_BASE + ARC200_COST_INCREASE * i;
Expand Down Expand Up @@ -114,6 +114,9 @@ MainUI::MainUI(QWidget *parent) : QWidget(parent), ui(new Ui::MainUI) {
ui->mob265->setToolTip(QStringLiteral("每日可獲得%1個").arg(D265_MOB));
ui->mob270->setToolTip(QStringLiteral("每日可獲得%1個").arg(D270_MOB));
ui->mob275->setToolTip(QStringLiteral("每日可獲得%1個").arg(D275_MOB));

//載入存檔
importSettings();
}

MainUI::~MainUI() { delete ui; }
53 changes: 31 additions & 22 deletions src/mainui.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,42 +14,46 @@
#include <QJsonObject>
#include <QDesktopServices>
#include <QMovie>
#include <QSettings>
#include <QSharedPointer>
#include <cmath>
#include "ui_mainui.h"
#include "static_value.h"

namespace Ui {class MainUI;}
namespace Ui { class MainUI; }

class MainUI : public QWidget{
class MainUI : public QWidget {
Q_OBJECT

public:
explicit MainUI(QWidget *parent = nullptr);
~MainUI();

QSharedPointer<QSettings> settings;

private slots:
void on_Arc1LV_valueChanged();
void on_Arc2LV_valueChanged();
void on_Arc3LV_valueChanged();
void on_Arc4LV_valueChanged();
void on_Arc5LV_valueChanged();
void on_Arc6LV_valueChanged();
void on_Aut1LV_valueChanged();
void on_Aut2LV_valueChanged();
void on_Aut3LV_valueChanged();
void on_Arc1LV_valueChanged(int);
void on_Arc2LV_valueChanged(int);
void on_Arc3LV_valueChanged(int);
void on_Arc4LV_valueChanged(int);
void on_Arc5LV_valueChanged(int);
void on_Arc6LV_valueChanged(int);
void on_Aut1LV_valueChanged(int);
void on_Aut2LV_valueChanged(int);
void on_Aut3LV_valueChanged(int);

void on_ArcMode_currentIndexChanged(int);
void on_AutMode_currentIndexChanged(int);

void on_Arc1current_valueChanged();
void on_Arc2current_valueChanged();
void on_Arc3current_valueChanged();
void on_Arc4current_valueChanged();
void on_Arc5current_valueChanged();
void on_Arc6current_valueChanged();
void on_Aut1current_valueChanged();
void on_Aut2current_valueChanged();
void on_Aut3current_valueChanged();
void on_Arc1current_valueChanged(int);
void on_Arc2current_valueChanged(int);
void on_Arc3current_valueChanged(int);
void on_Arc4current_valueChanged(int);
void on_Arc5current_valueChanged(int);
void on_Arc6current_valueChanged(int);
void on_Aut1current_valueChanged(int);
void on_Aut2current_valueChanged(int);
void on_Aut3current_valueChanged(int);

void on_startDate_userDateChanged(const QDate&);
void on_startDate_aut_userDateChanged(const QDate&);
Expand All @@ -61,8 +65,8 @@ private slots:
void on_AutLV_from_valueChanged();
void on_AutLV_to_valueChanged();

void on_targetArc_valueChanged();
void on_targetAut_valueChanged();
void on_targetArc_valueChanged(int);
void on_targetAut_valueChanged(int);

void on_ArcDamage_x_valueChanged(int);
void on_ArcDamage_y_valueChanged(int);
Expand Down Expand Up @@ -104,6 +108,8 @@ private slots:
void on_mob260_clicked();
void on_mob265_clicked();

void on_clearSettings_clicked();

private:
Ui::MainUI *ui;

Expand Down Expand Up @@ -173,6 +179,9 @@ private slots:

void checkUpdate();
void onResult(QNetworkReply*);

void settingsInit();
void importSettings();
};

#endif // MAINUI_H
59 changes: 55 additions & 4 deletions src/mainui.ui
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</font>
</property>
<property name="windowTitle">
<string>新楓之谷 ARC / AUT 計算機 v2.9.5</string>
<string>新楓之谷 ARC / AUT 計算機 v3.0.0</string>
</property>
<property name="windowIcon">
<iconset resource="images.qrc">
Expand Down Expand Up @@ -74,8 +74,8 @@
<rect>
<x>-10</x>
<y>0</y>
<width>731</width>
<height>771</height>
<width>700</width>
<height>700</height>
</rect>
</property>
<property name="toolTip">
Expand Down Expand Up @@ -2240,6 +2240,9 @@
<property name="shortcut">
<string>D</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
<widget class="QPushButton" name="weeklyAll">
<property name="geometry">
Expand Down Expand Up @@ -2269,6 +2272,9 @@
<property name="shortcut">
<string>Q</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
<widget class="QPushButton" name="selectAll">
<property name="geometry">
Expand All @@ -2279,12 +2285,28 @@
<height>41</height>
</rect>
</property>
<property name="text">
<property name="toolTip">
<string>全選</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/images/select.png</normaloff>:/images/select.png</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="shortcut">
<string>A</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
<widget class="QCheckBox" name="daily200">
<property name="geometry">
Expand Down Expand Up @@ -6558,6 +6580,35 @@
</widget>
</widget>
</widget>
<widget class="QPushButton" name="clearSettings">
<property name="geometry">
<rect>
<x>656</x>
<y>0</y>
<width>31</width>
<height>31</height>
</rect>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/images/restore.png</normaloff>:/images/restore.png</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources>
Expand Down
59 changes: 59 additions & 0 deletions src/settings.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#include "mainui.h"

void MainUI::settingsInit() {
settings = QSharedPointer<QSettings>(new QSettings("HKEY_CURRENT_USER\\Software\\MapleStory ARC Calculator", QSettings::NativeFormat));
}

void MainUI::importSettings() {
settingsInit();

ui->tabWidget->setCurrentIndex(settings->value("mainPage").toInt());
ui->toolBox->setCurrentIndex(settings->value("othersPage").toInt());

ui->daily200->setChecked(settings->value("ARC/daily200").toBool());
ui->weekly200->setChecked(settings->value("ARC/weekly200").toBool());
ui->daily210->setChecked(settings->value("ARC/daily210").toBool());
ui->weekly210->setChecked(settings->value("ARC/weekly210").toBool());
ui->daily220->setChecked(settings->value("ARC/daily220").toBool());
ui->weekly220->setChecked(settings->value("ARC/weekly220").toBool());
ui->daily225->setChecked(settings->value("ARC/daily225").toBool());
ui->weekly225->setChecked(settings->value("ARC/weekly225").toBool());
ui->daily230->setChecked(settings->value("ARC/daily230").toBool());
ui->weekly230->setChecked(settings->value("ARC/weekly230").toBool());
ui->daily235->setChecked(settings->value("ARC/daily235").toBool());
ui->weekly235->setChecked(settings->value("ARC/weekly235").toBool());
ui->daily260->setChecked(settings->value("AUT/daily260").toBool());
ui->mob260->setChecked(settings->value("AUT/mob260", true).toBool());
ui->mob265->setChecked(settings->value("AUT/mob265").toBool());
ui->daily270->setChecked(settings->value("AUT/daily270").toBool());
ui->daily275->setChecked(settings->value("AUT/daily275").toBool());

ArcLV[0]->setValue(settings->value("ARC/Arc1LV").toInt());
ArcLV[1]->setValue(settings->value("ARC/Arc2LV").toInt());
ArcLV[2]->setValue(settings->value("ARC/Arc3LV").toInt());
ArcLV[3]->setValue(settings->value("ARC/Arc4LV").toInt());
ArcLV[4]->setValue(settings->value("ARC/Arc5LV").toInt());
ArcLV[5]->setValue(settings->value("ARC/Arc6LV").toInt());
AutLV[0]->setValue(settings->value("AUT/Aut1LV").toInt());
AutLV[1]->setValue(settings->value("AUT/Aut2LV").toInt());
AutLV[2]->setValue(settings->value("AUT/Aut3LV").toInt());

ArcCurrent[0]->setValue(settings->value("ARC/Arc1current").toInt());
ArcCurrent[1]->setValue(settings->value("ARC/Arc2current").toInt());
ArcCurrent[2]->setValue(settings->value("ARC/Arc3current").toInt());
ArcCurrent[3]->setValue(settings->value("ARC/Arc4current").toInt());
ArcCurrent[4]->setValue(settings->value("ARC/Arc5current").toInt());
ArcCurrent[5]->setValue(settings->value("ARC/Arc6current").toInt());
AutCurrent[0]->setValue(settings->value("AUT/Aut1current").toInt());
AutCurrent[1]->setValue(settings->value("AUT/Aut2current").toInt());
AutCurrent[2]->setValue(settings->value("AUT/Aut3current").toInt());

ArcMode->setCurrentIndex(settings->value("ARC/ArcMode").toInt());
AutMode->setCurrentIndex(settings->value("AUT/AutMode").toInt());

ui->HyperStats->setValue(settings->value("ARC/HyperStats").toInt());
ui->GuildSkillLV->setValue(settings->value("ARC/GuildSkillLV").toInt());

ui->targetArc->setValue(settings->value("ARC/targetArc").toInt());
ui->targetAut->setValue(settings->value("AUT/targetAut").toInt());
}
2 changes: 1 addition & 1 deletion src/static_value.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define STATIC_VALUE_H

//版本
#define VERCODE 295
#define VERCODE 300

#define ARCMAXLV 20 //ARC等級上限
#define ARCTYPE 6 //ARC種類
Expand Down
Loading

0 comments on commit 87f26b0

Please sign in to comment.