split the selection panel into one card per kind of selection
This commit is contained in:
31
src/ui/selection/DebrisContent.h
Normal file
31
src/ui/selection/DebrisContent.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "entt/entity/entity.hpp"
|
||||
|
||||
#include "SelectionContent.h"
|
||||
#include "SelectionContentFactory.h"
|
||||
|
||||
class QLabel;
|
||||
|
||||
// The card for selected debris (REQ-UI-DEBRIS-PANEL): the scrap still left in it.
|
||||
//
|
||||
// It is the field category's aggregating content (REQ-UI-SELECTION-AGGREGATE): several
|
||||
// pieces of debris show this same card with the count in the header and their scrap
|
||||
// summed, because that is the one value the card holds and it adds up.
|
||||
class DebrisContent : public SelectionContent
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DebrisContent(const SelectionContext& context, const SelectionRequest& request,
|
||||
QWidget* parent = nullptr);
|
||||
|
||||
protected:
|
||||
void refreshRuntime() override;
|
||||
|
||||
private:
|
||||
std::vector<entt::entity> m_debris;
|
||||
QLabel* m_scrapLabel;
|
||||
};
|
||||
Reference in New Issue
Block a user