Comment changes and general cleanup
This commit is contained in:
parent
583e5946f4
commit
83434a9be5
@ -1,6 +1,17 @@
|
|||||||
//
|
/* Copyright 2013-2015 MultiMC Contributors
|
||||||
// Created by robotbrain on 8/18/15.
|
*
|
||||||
//
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "WorldListPage.h"
|
#include "WorldListPage.h"
|
||||||
#include "ui_WorldListPage.h"
|
#include "ui_WorldListPage.h"
|
||||||
@ -12,21 +23,12 @@
|
|||||||
WorldListPage::WorldListPage(BaseInstance *inst, std::shared_ptr<WorldList> worlds, QString id,
|
WorldListPage::WorldListPage(BaseInstance *inst, std::shared_ptr<WorldList> worlds, QString id,
|
||||||
QString iconName, QString displayName, QString helpPage,
|
QString iconName, QString displayName, QString helpPage,
|
||||||
QWidget *parent)
|
QWidget *parent)
|
||||||
: QWidget(parent), ui(new Ui::WorldListPage)
|
: QWidget(parent), ui(new Ui::WorldListPage), m_worlds(worlds), m_inst(inst), m_id(id), m_displayName(displayName), m_iconName(iconName), m_helpName(helpPage)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->tabWidget->tabBar()->hide();
|
ui->tabWidget->tabBar()->hide();
|
||||||
m_inst = inst;
|
|
||||||
m_worlds = worlds;
|
|
||||||
m_id = id;
|
|
||||||
m_displayName = displayName;
|
|
||||||
m_iconName = iconName;
|
|
||||||
m_helpName = helpPage;
|
|
||||||
ui->worldTreeView->setModel(m_worlds.get());
|
ui->worldTreeView->setModel(m_worlds.get());
|
||||||
ui->worldTreeView->installEventFilter(this);
|
ui->worldTreeView->installEventFilter(this);
|
||||||
auto smodel = ui->worldTreeView->selectionModel();
|
|
||||||
connect(smodel, SIGNAL(currentChanged(QModelIndex, QModelIndex)),
|
|
||||||
SLOT(modCurrent(QModelIndex, QModelIndex)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldListPage::opened()
|
void WorldListPage::opened()
|
||||||
|
@ -1,6 +1,17 @@
|
|||||||
//
|
/* Copyright 2013-2015 MultiMC Contributors
|
||||||
// Created by robotbrain on 8/18/15.
|
*
|
||||||
//
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
@ -28,14 +28,14 @@ public:
|
|||||||
{
|
{
|
||||||
return is_valid;
|
return is_valid;
|
||||||
}
|
}
|
||||||
// delete all the files of this mod
|
// // delete all the files of this world
|
||||||
bool destroy();
|
bool destroy();
|
||||||
// replace this mod with a copy of the other
|
// replace this world with a copy of the other
|
||||||
bool replace(World &with);
|
bool replace(World &with);
|
||||||
// change the mod's filesystem path (used by mod lists for *MAGIC* purposes)
|
// change the world's filesystem path (used by world lists for *MAGIC* purposes)
|
||||||
void repath(const QFileInfo &file);
|
void repath(const QFileInfo &file);
|
||||||
|
|
||||||
// WEAK compare operator - used for replacing mods
|
// WEAK compare operator - used for replacing worlds
|
||||||
bool operator==(const World &other) const;
|
bool operator==(const World &other) const;
|
||||||
bool strongCompare(const World &other) const;
|
bool strongCompare(const World &other) const;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user