forked from MrBesen/lolautoaccept
38 lines
710 B
C
38 lines
710 B
C
|
#pragma once
|
||
|
|
||
|
#include <vector>
|
||
|
|
||
|
#include <QListWidget>
|
||
|
|
||
|
#include "clientapi.h"
|
||
|
|
||
|
namespace Ui {
|
||
|
class RunePageList;
|
||
|
}
|
||
|
|
||
|
class DropEvent;
|
||
|
|
||
|
class RunePageList : public QListWidget {
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
|
static const uint32_t RoleId = Qt::UserRole;
|
||
|
static const uint32_t RolePointer = Qt::UserRole + 1;
|
||
|
|
||
|
explicit RunePageList(QWidget* parent = nullptr);
|
||
|
~RunePageList();
|
||
|
|
||
|
constexpr void setClient(bool b) { isClient = b; }
|
||
|
constexpr void setOther(QListWidget* other) { this->other = other; }
|
||
|
|
||
|
void loadRunePages(const std::vector<ClientAPI::RunePage>& pages);
|
||
|
|
||
|
protected:
|
||
|
virtual void dropEvent(QDropEvent* event) override;
|
||
|
|
||
|
private:
|
||
|
Ui::RunePageList* ui;
|
||
|
QListWidget* other = nullptr;
|
||
|
bool isClient;
|
||
|
};
|