refactor: put resource downloading classes in common namespace
Puts them all inside the 'ResourceDownload' namespace, so that it's a bit clearer from the outside that those belong to the same 'module'. Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
@ -24,6 +24,8 @@
|
||||
#include "ui/pages/modplatform/flame/FlameResourcePages.h"
|
||||
#include "ui/pages/modplatform/modrinth/ModrinthResourcePages.h"
|
||||
|
||||
namespace ResourceDownload {
|
||||
|
||||
ModDownloadDialog::ModDownloadDialog(QWidget* parent, const std::shared_ptr<ModFolderModel>& mods, BaseInstance* instance)
|
||||
: ResourceDownloadDialog(parent, mods), m_instance(instance)
|
||||
{
|
||||
@ -57,3 +59,5 @@ QList<BasePage*> ModDownloadDialog::getPages()
|
||||
|
||||
return pages;
|
||||
}
|
||||
|
||||
} // namespace ResourceDownload
|
||||
|
@ -25,8 +25,9 @@
|
||||
|
||||
class QDialogButtonBox;
|
||||
|
||||
class ModDownloadDialog final : public ResourceDownloadDialog
|
||||
{
|
||||
namespace ResourceDownload {
|
||||
|
||||
class ModDownloadDialog final : public ResourceDownloadDialog {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
@ -45,3 +46,5 @@ class ModDownloadDialog final : public ResourceDownloadDialog
|
||||
private:
|
||||
BaseInstance* m_instance;
|
||||
};
|
||||
|
||||
} // namespace ResourceDownload
|
||||
|
@ -9,6 +9,8 @@
|
||||
#include "ui/pages/modplatform/ResourcePage.h"
|
||||
#include "ui/widgets/PageContainer.h"
|
||||
|
||||
namespace ResourceDownload {
|
||||
|
||||
ResourceDownloadDialog::ResourceDownloadDialog(QWidget* parent, const std::shared_ptr<ResourceFolderModel> base_model)
|
||||
: QDialog(parent), m_base_model(base_model), m_buttons(QDialogButtonBox::Help | QDialogButtonBox::Ok | QDialogButtonBox::Cancel), m_vertical_layout(this)
|
||||
{
|
||||
@ -150,3 +152,5 @@ void ResourceDownloadDialog::selectedPageChanged(BasePage* previous, BasePage* s
|
||||
// Same effect as having a global search bar
|
||||
m_selectedPage->setSearchTerm(prev_page->getSearchTerm());
|
||||
}
|
||||
|
||||
} // namespace ResourceDownload
|
||||
|
@ -7,12 +7,15 @@
|
||||
#include "ui/pages/BasePageProvider.h"
|
||||
|
||||
class ResourceDownloadTask;
|
||||
class ResourcePage;
|
||||
class ResourceFolderModel;
|
||||
class PageContainer;
|
||||
class QVBoxLayout;
|
||||
class QDialogButtonBox;
|
||||
|
||||
namespace ResourceDownload {
|
||||
|
||||
class ResourcePage;
|
||||
|
||||
class ResourceDownloadDialog : public QDialog, public BasePageProvider {
|
||||
Q_OBJECT
|
||||
|
||||
@ -53,3 +56,5 @@ class ResourceDownloadDialog : public QDialog, public BasePageProvider {
|
||||
|
||||
QHash<QString, ResourceDownloadTask*> m_selected;
|
||||
};
|
||||
|
||||
} // namespace ResourceDownload
|
||||
|
Reference in New Issue
Block a user