mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
[VDE] Deck Analytics Widgets overhaul (#6463)
* [VDE] Deck Analytics Widgets overhaul Took 2 minutes Took 3 minutes Took 3 minutes * Qt5 version guards. Took 33 minutes Took 3 seconds * Include QtMath Took 3 minutes Took 8 seconds * Use getCards() Took 4 minutes * Non pointer stuff Took 52 seconds * Add a newline to the tooltip Took 2 minutes Took 27 seconds * Fix build failure on macOS 15 * Rename some things. Took 17 minutes Took 11 seconds Took 18 seconds * Address overloads, fix default configuration. Took 1 hour 9 minutes Took 8 seconds * Fix mana curve default config. Took 4 minutes * Namespace to Qt libs Took 5 minutes * Selection overlay is transparent for mouse events. Took 2 minutes * Brace initialize. Took 8 minutes * Debian 11. Took 5 minutes --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de> Co-authored-by: RickyRister <ricky.rister.wang@gmail.com>
This commit is contained in:
parent
36d8280765
commit
df9a8b2272
81 changed files with 4372 additions and 394 deletions
|
|
@ -3,12 +3,16 @@
|
|||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../deck_loader/deck_loader.h"
|
||||
#include "../cards/card_info_picture_widget.h"
|
||||
#include "../deck_analytics/analyzer_modules/draw_probability/draw_probability_widget.h"
|
||||
#include "../deck_analytics/deck_list_statistics_analyzer.h"
|
||||
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <random>
|
||||
|
||||
VisualDeckEditorSampleHandWidget::VisualDeckEditorSampleHandWidget(QWidget *parent, DeckListModel *_deckListModel)
|
||||
: QWidget(parent), deckListModel(_deckListModel)
|
||||
VisualDeckEditorSampleHandWidget::VisualDeckEditorSampleHandWidget(QWidget *parent,
|
||||
DeckListModel *_deckListModel,
|
||||
DeckListStatisticsAnalyzer *_statsAnalyzer)
|
||||
: QWidget(parent), deckListModel(_deckListModel), statsAnalyzer(_statsAnalyzer)
|
||||
{
|
||||
layout = new QVBoxLayout(this);
|
||||
setLayout(layout);
|
||||
|
|
@ -35,6 +39,9 @@ VisualDeckEditorSampleHandWidget::VisualDeckEditorSampleHandWidget(QWidget *pare
|
|||
flowWidget = new FlowWidget(this, Qt::Horizontal, Qt::ScrollBarAlwaysOff, Qt::ScrollBarAsNeeded);
|
||||
layout->addWidget(flowWidget);
|
||||
|
||||
drawProbabilityWidget = new DrawProbabilityWidget(this, statsAnalyzer);
|
||||
layout->addWidget(drawProbabilityWidget);
|
||||
|
||||
cardSizeWidget = new CardSizeWidget(this, flowWidget);
|
||||
layout->addWidget(cardSizeWidget);
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
#define VISUAL_DECK_EDITOR_SAMPLE_HAND_WIDGET_H
|
||||
|
||||
#include "../cards/card_size_widget.h"
|
||||
#include "../deck_analytics/deck_list_statistics_analyzer.h"
|
||||
#include "../general/layout_containers/flow_widget.h"
|
||||
|
||||
#include <QPushButton>
|
||||
|
|
@ -15,11 +16,14 @@
|
|||
#include <QWidget>
|
||||
#include <libcockatrice/models/deck_list/deck_list_model.h>
|
||||
|
||||
class DrawProbabilityWidget;
|
||||
class VisualDeckEditorSampleHandWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
VisualDeckEditorSampleHandWidget(QWidget *parent, DeckListModel *deckListModel);
|
||||
VisualDeckEditorSampleHandWidget(QWidget *parent,
|
||||
DeckListModel *deckListModel,
|
||||
DeckListStatisticsAnalyzer *statsAnalyzer);
|
||||
QList<ExactCard> getRandomCards(int amountToGet);
|
||||
|
||||
public slots:
|
||||
|
|
@ -29,12 +33,14 @@ public slots:
|
|||
|
||||
private:
|
||||
DeckListModel *deckListModel;
|
||||
DeckListStatisticsAnalyzer *statsAnalyzer;
|
||||
QVBoxLayout *layout;
|
||||
QWidget *resetAndHandSizeContainerWidget;
|
||||
QHBoxLayout *resetAndHandSizeLayout;
|
||||
QPushButton *resetButton;
|
||||
QSpinBox *handSizeSpinBox;
|
||||
FlowWidget *flowWidget;
|
||||
DrawProbabilityWidget *drawProbabilityWidget;
|
||||
CardSizeWidget *cardSizeWidget;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue