19#ifndef HEADER_VOTE_DIALOG_HPP
20#define HEADER_VOTE_DIALOG_HPP
23#include "guiengine/modaldialog.hpp"
24#include "guiengine/widgets.hpp"
70 GUIEngine::EventPropagation
processEvent(
const std::string& eventSource);
Abstract base class representing a modal dialog.
Definition: modaldialog.hpp:56
Dialog that allows a user to sign in.
Definition: vote_dialog.hpp:37
void updateFetchVote()
Updates a potentiall still outstanding fetch vote request.
Definition: vote_dialog.cpp:161
~VoteDialog()
Destructor, frees the various requests.
Definition: vote_dialog.cpp:73
std::shared_ptr< Online::XMLRequest > m_fetch_vote_request
The request to fetch the current vote, which is submitted immediately when this dialog is opened.
Definition: vote_dialog.hpp:48
void sendVote()
A request to the server, to perform a vote on an addon.
Definition: vote_dialog.cpp:91
bool m_self_destroy
True if the dialog should be removed (which needs to be done in the update call each frame).
Definition: vote_dialog.hpp:44
virtual void onUpdate(float dt)
Called every frame.
Definition: vote_dialog.cpp:216
GUIEngine::IconButtonWidget * m_cancel_widget
Pointer to the cancel button.
Definition: vote_dialog.hpp:63
const std::string m_addon_id
Stores the id of the addon being voted on.
Definition: vote_dialog.hpp:40
std::shared_ptr< Online::XMLRequest > m_perform_vote_request
The request to perform a vote.
Definition: vote_dialog.hpp:51
GUIEngine::EventPropagation processEvent(const std::string &eventSource)
Callback when a user event is triggered.
Definition: vote_dialog.cpp:133
virtual bool onEscapePressed()
When escape is pressed, trigger a self destroy.
Definition: vote_dialog.cpp:80
GUIEngine::RibbonWidget * m_options_widget
Pointer to the options widget, which contains the canel button.
Definition: vote_dialog.hpp:60
GUIEngine::RatingBarWidget * m_rating_widget
Pointer to the rating widget of this dialog.
Definition: vote_dialog.hpp:57
GUIEngine::LabelWidget * m_info_widget
Pointer to the info widget of this dialog.
Definition: vote_dialog.hpp:54