Mana
Loading...
Searching...
No Matches
questswindow.h
Go to the documentation of this file.
1/*
2 * The Mana Client
3 * Copyright (C) 2025 The Mana Developers
4 *
5 * This file is part of The Mana Client.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#pragma once
22
23#include "eventlistener.h"
24
25#include "gui/widgets/window.h"
26
27#include <guichan/actionlistener.hpp>
28#include <guichan/keylistener.hpp>
29#include <guichan/selectionlistener.hpp>
30
31class BrowserBox;
32class CheckBox;
33class LinkHandler;
34class QuestsListBox;
35class QuestsModel;
36class ScrollArea;
37
43class QuestsWindow final : public Window,
44 public gcn::ActionListener,
45 public gcn::SelectionListener,
46 public EventListener
47{
48public:
51
52 void action(const gcn::ActionEvent &event) override;
53
54 void valueChanged(const gcn::SelectionEvent &event) override;
55
56 void event(Event::Channel channel, const Event &event) override;
57
58private:
59 void refreshQuestList();
60 void updateQuestDetails();
61
63 std::unique_ptr<QuestsModel> mQuestsModel;
68 std::unique_ptr<LinkHandler> mLinkHandler;
69};
70
A simple browser box able to handle links and forward events to the parent conteiner.
Definition browserbox.h:74
Check box widget.
Definition checkbox.h:32
Definition event.h:42
Channel
Definition event.h:45
A simple interface to windows that need to handle links from BrowserBox widget.
Definition linkhandler.h:31
Quests window.
void valueChanged(const gcn::SelectionEvent &event) override
void refreshQuestList()
CheckBox * mHideCompletedCheckBox
BrowserBox * mQuestDetails
void action(const gcn::ActionEvent &event) override
std::unique_ptr< QuestsModel > mQuestsModel
QuestsListBox * mQuestsListBox
void updateQuestDetails()
void event(Event::Channel channel, const Event &event) override
std::unique_ptr< LinkHandler > mLinkHandler
ScrollArea * mQuestDetailsScrollArea
int mSelectedQuestIndex
A scroll area.
Definition scrollarea.h:38
A window.
Definition window.h:59
QuestsWindow * questsWindow
Definition game.cpp:98