From d6d5c86a736537828a59ddc6389d5d0490942f8c Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 9 Jan 2013 12:22:22 -0600 Subject: Initial commit --- .gitignore | 1 + MultiMC.pro | 27 + MultiMC.pro.user | 239 ++++ data/instancebase.cpp | 45 + data/instancebase.h | 43 + gui/mainwindow.cpp | 77 ++ gui/mainwindow.h | 56 + gui/mainwindow.ui | 163 +++ main.cpp | 28 + multimc.qrc | 29 + resources/icons/console.svg | 228 +++ resources/icons/console_error.svg | 247 ++++ resources/icons/instances/clucker.svg | 404 ++++++ resources/icons/instances/creeper.svg | 775 +++++++++++ resources/icons/instances/enderpearl.svg | 271 ++++ resources/icons/instances/ftb-glow.svg | 606 ++++++++ resources/icons/instances/ftb-logo.svg | 257 ++++ resources/icons/instances/gear.svg | 434 ++++++ resources/icons/instances/herobrine.svg | 583 ++++++++ resources/icons/instances/magitech.svg | 886 ++++++++++++ resources/icons/instances/meat.svg | 371 +++++ resources/icons/instances/netherstar.svg | 342 +++++ resources/icons/instances/skeleton.svg | 636 +++++++++ resources/icons/instances/squarecreeper.svg | 828 +++++++++++ resources/icons/instances/steve.svg | 534 +++++++ resources/icons/multimc.svg | 1993 +++++++++++++++++++++++++++ resources/icons/toolbar/about.png | Bin 0 -> 1693 bytes resources/icons/toolbar/bug.svg | 387 ++++++ resources/icons/toolbar/centralmods.png | Bin 0 -> 1561 bytes resources/icons/toolbar/checkupdate.png | Bin 0 -> 1635 bytes resources/icons/toolbar/help.png | Bin 0 -> 1735 bytes resources/icons/toolbar/new.png | Bin 0 -> 1440 bytes resources/icons/toolbar/news.svg | 296 ++++ resources/icons/toolbar/refresh.png | Bin 0 -> 1843 bytes resources/icons/toolbar/settings.png | Bin 0 -> 1964 bytes resources/icons/toolbar/viewfolder.png | Bin 0 -> 1006 bytes util/pathutils.cpp | 32 + util/pathutils.h | 25 + 38 files changed, 10843 insertions(+) create mode 100644 .gitignore create mode 100644 MultiMC.pro create mode 100644 MultiMC.pro.user create mode 100644 data/instancebase.cpp create mode 100644 data/instancebase.h create mode 100644 gui/mainwindow.cpp create mode 100644 gui/mainwindow.h create mode 100644 gui/mainwindow.ui create mode 100644 main.cpp create mode 100644 multimc.qrc create mode 100644 resources/icons/console.svg create mode 100644 resources/icons/console_error.svg create mode 100644 resources/icons/instances/clucker.svg create mode 100644 resources/icons/instances/creeper.svg create mode 100644 resources/icons/instances/enderpearl.svg create mode 100644 resources/icons/instances/ftb-glow.svg create mode 100644 resources/icons/instances/ftb-logo.svg create mode 100644 resources/icons/instances/gear.svg create mode 100644 resources/icons/instances/herobrine.svg create mode 100644 resources/icons/instances/magitech.svg create mode 100644 resources/icons/instances/meat.svg create mode 100644 resources/icons/instances/netherstar.svg create mode 100644 resources/icons/instances/skeleton.svg create mode 100644 resources/icons/instances/squarecreeper.svg create mode 100644 resources/icons/instances/steve.svg create mode 100644 resources/icons/multimc.svg create mode 100644 resources/icons/toolbar/about.png create mode 100644 resources/icons/toolbar/bug.svg create mode 100644 resources/icons/toolbar/centralmods.png create mode 100644 resources/icons/toolbar/checkupdate.png create mode 100644 resources/icons/toolbar/help.png create mode 100644 resources/icons/toolbar/new.png create mode 100644 resources/icons/toolbar/news.svg create mode 100644 resources/icons/toolbar/refresh.png create mode 100644 resources/icons/toolbar/settings.png create mode 100644 resources/icons/toolbar/viewfolder.png create mode 100644 util/pathutils.cpp create mode 100644 util/pathutils.h diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..085e8baf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +Thumbs.db diff --git a/MultiMC.pro b/MultiMC.pro new file mode 100644 index 00000000..6115627c --- /dev/null +++ b/MultiMC.pro @@ -0,0 +1,27 @@ +#------------------------------------------------- +# +# Project created by QtCreator 2013-01-08T14:14:58 +# +#------------------------------------------------- + +QT += core gui + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +TARGET = MultiMC +TEMPLATE = app + + +SOURCES += main.cpp\ + gui/mainwindow.cpp \ + data/instancebase.cpp \ + util/pathutils.cpp + +HEADERS += gui/mainwindow.h \ + data/instancebase.h \ + util/pathutils.h \ + +FORMS += gui/mainwindow.ui + +RESOURCES += \ + multimc.qrc diff --git a/MultiMC.pro.user b/MultiMC.pro.user new file mode 100644 index 00000000..c72c06aa --- /dev/null +++ b/MultiMC.pro.user @@ -0,0 +1,239 @@ + + + + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + true + 1 + true + 2 + true + 1 + 8 + true + 1 + true + false + false + true + + + + ProjectExplorer.Project.PluginSettings + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.0.0 MSVC2010 32bit (SDK) + Desktop Qt 5.0.0 MSVC2010 32bit (SDK) + qt.500.win32_msvc2010.essentials_kit + 0 + 0 + 0 + + + + true + qmake + + QtProjectManager.QMakeBuildStep + false + true + + false + + + true + Make + + Qt4ProjectManager.MakeStep + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + + Qt4ProjectManager.Qt4BuildConfiguration + 2 + C:/Users/Andrew/Projects/MultiMC5/MultiMC-build-Desktop_Qt_5_0_0_MSVC2010_32bit_SDK-Debug + true + + + + + true + qmake + + QtProjectManager.QMakeBuildStep + false + true + + false + + + true + Make + + Qt4ProjectManager.MakeStep + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + + Qt4ProjectManager.Qt4BuildConfiguration + 0 + C:/Users/Andrew/Projects/MultiMC5/MultiMC-build-Desktop_Qt_5_0_0_MSVC2010_32bit_SDK-Release + true + + 2 + + + 0 + Deploy + + ProjectExplorer.BuildSteps.Deploy + + 1 + Deploy locally + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + true + + false + false + false + false + true + 0.01 + 10 + true + 25 + + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + MultiMC + + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/Andrew/Projects/MultiMC5/MultiMC/MultiMC.pro + 2 + + MultiMC.pro + false + false + + + 3768 + true + false + false + true + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.EnvironmentId + {d833f846-3a8b-4e2a-9d77-5f93cddd0a0f} + + + ProjectExplorer.Project.Updater.FileVersion + 12 + + diff --git a/data/instancebase.cpp b/data/instancebase.cpp new file mode 100644 index 00000000..2e0a65df --- /dev/null +++ b/data/instancebase.cpp @@ -0,0 +1,45 @@ +/* Copyright 2013 MultiMC Contributors + * + * 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 "instancebase.h" + +#include "../util/pathutils.h" + +InstanceBase::InstanceBase(QString rootDir, QObject *parent) : + QObject(parent), + m_rootDir(rootDir), + m_config(PathCombine(rootDir, "instance.cfg"), QSettings::IniFormat) +{ + +} + +QString InstanceBase::GetRootDir() const +{ + return m_rootDir; +} + + +///////////// Config Values ///////////// + +// Name +QString InstanceBase::GetInstName() const +{ + return m_config.value("name", "Unnamed").toString(); +} + +void InstanceBase::SetInstName(QString name) +{ + m_config.setValue("name", name); +} diff --git a/data/instancebase.h b/data/instancebase.h new file mode 100644 index 00000000..df23b1b0 --- /dev/null +++ b/data/instancebase.h @@ -0,0 +1,43 @@ +/* Copyright 2013 MultiMC Contributors + * + * 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. + */ + +#ifndef INSTANCEBASE_H +#define INSTANCEBASE_H + +#include +#include +#include + +class InstanceBase : public QObject +{ + Q_OBJECT +public: + explicit InstanceBase(QString rootDir, QObject *parent = 0); + + QString GetRootDir() const; + + QString GetInstName() const; + void SetInstName(QString name); + +protected: + + +private: + QString m_rootDir; + + QSettings m_config; +}; + +#endif // INSTANCEBASE_H diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp new file mode 100644 index 00000000..875cc256 --- /dev/null +++ b/gui/mainwindow.cpp @@ -0,0 +1,77 @@ +/* Copyright 2013 MultiMC Contributors + * + * 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 "mainwindow.h" +#include "ui_mainwindow.h" + +#include +#include + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} + +void MainWindow::on_actionAddInstance_triggered() +{ + +} + +void MainWindow::on_actionViewInstanceFolder_triggered() +{ + +} + +void MainWindow::on_actionRefresh_triggered() +{ + +} + +void MainWindow::on_actionViewCentralModsFolder_triggered() +{ + +} + +void MainWindow::on_actionCheckUpdate_triggered() +{ + +} + +void MainWindow::on_actionSettings_triggered() +{ + +} + +void MainWindow::on_actionReportBug_triggered() +{ + +} + +void MainWindow::on_actionNews_triggered() +{ + +} + +void MainWindow::on_actionAbout_triggered() +{ + +} diff --git a/gui/mainwindow.h b/gui/mainwindow.h new file mode 100644 index 00000000..6d9a0216 --- /dev/null +++ b/gui/mainwindow.h @@ -0,0 +1,56 @@ +/* Copyright 2013 MultiMC Contributors + * + * 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. + */ + +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = 0); + ~MainWindow(); + +private slots: + void on_actionAbout_triggered(); + + void on_actionAddInstance_triggered(); + + void on_actionViewInstanceFolder_triggered(); + + void on_actionRefresh_triggered(); + + void on_actionViewCentralModsFolder_triggered(); + + void on_actionCheckUpdate_triggered(); + + void on_actionSettings_triggered(); + + void on_actionReportBug_triggered(); + + void on_actionNews_triggered(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/gui/mainwindow.ui b/gui/mainwindow.ui new file mode 100644 index 00000000..0ef98d0e --- /dev/null +++ b/gui/mainwindow.ui @@ -0,0 +1,163 @@ + + + MainWindow + + + + 0 + 0 + 600 + 400 + + + + MultiMC 5 + + + + + false + + + Qt::TopToolBarArea + + + TopToolBarArea + + + false + + + + + + + + + + + + + + + + + + :/icons/toolbar/new:/icons/toolbar/new + + + Add Instance + + + Add a new instance. + + + + + + :/icons/toolbar/viewfolder:/icons/toolbar/viewfolder + + + View Instance Folder + + + Open the instance folder in a file browser. + + + + + + :/icons/toolbar/refresh:/icons/toolbar/refresh + + + Refresh + + + Reload the instance list. + + + + + + :/icons/toolbar/centralmods:/icons/toolbar/centralmods + + + View Central Mods Folder + + + Open the central mods folder in a file browser. + + + + + + :/icons/toolbar/checkupdate:/icons/toolbar/checkupdate + + + Check for Updates + + + Check for new updates for MultiMC + + + + + + :/icons/toolbar/settings:/icons/toolbar/settings + + + Settings + + + Change settings. + + + QAction::PreferencesRole + + + + + + :/icons/toolbar/bug:/icons/toolbar/bug + + + Report a Bug + + + Open the bug tracker to report a bug with MultiMC. + + + + + + :/icons/toolbar/news:/icons/toolbar/news + + + News + + + Open the MultiMC dev blog to read news about MultiMC. + + + + + + :/icons/toolbar/about:/icons/toolbar/about + + + About MultiMC + + + View information about MultiMC. + + + QAction::AboutRole + + + + + + + + + diff --git a/main.cpp b/main.cpp new file mode 100644 index 00000000..0d429c8d --- /dev/null +++ b/main.cpp @@ -0,0 +1,28 @@ +/* Copyright 2013 MultiMC Contributors + * + * 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 "gui/mainwindow.h" +#include + + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + + MainWindow mainWin; + mainWin.show(); + + return app.exec(); +} diff --git a/multimc.qrc b/multimc.qrc new file mode 100644 index 00000000..1e32170d --- /dev/null +++ b/multimc.qrc @@ -0,0 +1,29 @@ + + + resources/icons/toolbar/about.png + resources/icons/toolbar/bug.svg + resources/icons/toolbar/centralmods.png + resources/icons/toolbar/checkupdate.png + resources/icons/toolbar/help.png + resources/icons/toolbar/new.png + resources/icons/toolbar/news.svg + resources/icons/toolbar/refresh.png + resources/icons/toolbar/settings.png + resources/icons/toolbar/viewfolder.png + + + resources/icons/instances/clucker.svg + resources/icons/instances/creeper.svg + resources/icons/instances/enderpearl.svg + resources/icons/instances/ftb-glow.svg + resources/icons/instances/ftb-logo.svg + resources/icons/instances/gear.svg + resources/icons/instances/herobrine.svg + resources/icons/instances/magitech.svg + resources/icons/instances/meat.svg + resources/icons/instances/netherstar.svg + resources/icons/instances/skeleton.svg + resources/icons/instances/squarecreeper.svg + resources/icons/instances/steve.svg + + diff --git a/resources/icons/console.svg b/resources/icons/console.svg new file mode 100644 index 00000000..ec14ab68 --- /dev/null +++ b/resources/icons/console.svg @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + MC + + + diff --git a/resources/icons/console_error.svg b/resources/icons/console_error.svg new file mode 100644 index 00000000..a71c6b35 --- /dev/null +++ b/resources/icons/console_error.svg @@ -0,0 +1,247 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/instances/clucker.svg b/resources/icons/instances/clucker.svg new file mode 100644 index 00000000..3ce6ad5c --- /dev/null +++ b/resources/icons/instances/clucker.svg @@ -0,0 +1,404 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/instances/creeper.svg b/resources/icons/instances/creeper.svg new file mode 100644 index 00000000..2a2e39b6 --- /dev/null +++ b/resources/icons/instances/creeper.svg @@ -0,0 +1,775 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/instances/enderpearl.svg b/resources/icons/instances/enderpearl.svg new file mode 100644 index 00000000..ac9378f5 --- /dev/null +++ b/resources/icons/instances/enderpearl.svg @@ -0,0 +1,271 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/instances/ftb-glow.svg b/resources/icons/instances/ftb-glow.svg new file mode 100644 index 00000000..be78c78e --- /dev/null +++ b/resources/icons/instances/ftb-glow.svg @@ -0,0 +1,606 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/instances/ftb-logo.svg b/resources/icons/instances/ftb-logo.svg new file mode 100644 index 00000000..8cf73567 --- /dev/null +++ b/resources/icons/instances/ftb-logo.svg @@ -0,0 +1,257 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/instances/gear.svg b/resources/icons/instances/gear.svg new file mode 100644 index 00000000..c0169aec --- /dev/null +++ b/resources/icons/instances/gear.svg @@ -0,0 +1,434 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + diff --git a/resources/icons/instances/herobrine.svg b/resources/icons/instances/herobrine.svg new file mode 100644 index 00000000..7392ba36 --- /dev/null +++ b/resources/icons/instances/herobrine.svg @@ -0,0 +1,583 @@ + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/instances/magitech.svg b/resources/icons/instances/magitech.svg new file mode 100644 index 00000000..c6dd6bc0 --- /dev/null +++ b/resources/icons/instances/magitech.svg @@ -0,0 +1,886 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/instances/meat.svg b/resources/icons/instances/meat.svg new file mode 100644 index 00000000..69a20073 --- /dev/null +++ b/resources/icons/instances/meat.svg @@ -0,0 +1,371 @@ + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/instances/netherstar.svg b/resources/icons/instances/netherstar.svg new file mode 100644 index 00000000..4046e4ec --- /dev/null +++ b/resources/icons/instances/netherstar.svg @@ -0,0 +1,342 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/instances/skeleton.svg b/resources/icons/instances/skeleton.svg new file mode 100644 index 00000000..b2da5a46 --- /dev/null +++ b/resources/icons/instances/skeleton.svg @@ -0,0 +1,636 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/instances/squarecreeper.svg b/resources/icons/instances/squarecreeper.svg new file mode 100644 index 00000000..a1b0f4d1 --- /dev/null +++ b/resources/icons/instances/squarecreeper.svg @@ -0,0 +1,828 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/instances/steve.svg b/resources/icons/instances/steve.svg new file mode 100644 index 00000000..2233272c --- /dev/null +++ b/resources/icons/instances/steve.svg @@ -0,0 +1,534 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/multimc.svg b/resources/icons/multimc.svg new file mode 100644 index 00000000..178509ac --- /dev/null +++ b/resources/icons/multimc.svg @@ -0,0 +1,1993 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/toolbar/about.png b/resources/icons/toolbar/about.png new file mode 100644 index 00000000..57775e25 Binary files /dev/null and b/resources/icons/toolbar/about.png differ diff --git a/resources/icons/toolbar/bug.svg b/resources/icons/toolbar/bug.svg new file mode 100644 index 00000000..0534cbef --- /dev/null +++ b/resources/icons/toolbar/bug.svg @@ -0,0 +1,387 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/toolbar/centralmods.png b/resources/icons/toolbar/centralmods.png new file mode 100644 index 00000000..a10f9a2b Binary files /dev/null and b/resources/icons/toolbar/centralmods.png differ diff --git a/resources/icons/toolbar/checkupdate.png b/resources/icons/toolbar/checkupdate.png new file mode 100644 index 00000000..badb200c Binary files /dev/null and b/resources/icons/toolbar/checkupdate.png differ diff --git a/resources/icons/toolbar/help.png b/resources/icons/toolbar/help.png new file mode 100644 index 00000000..da79b3e3 Binary files /dev/null and b/resources/icons/toolbar/help.png differ diff --git a/resources/icons/toolbar/new.png b/resources/icons/toolbar/new.png new file mode 100644 index 00000000..c707fbbf Binary files /dev/null and b/resources/icons/toolbar/new.png differ diff --git a/resources/icons/toolbar/news.svg b/resources/icons/toolbar/news.svg new file mode 100644 index 00000000..67a370df --- /dev/null +++ b/resources/icons/toolbar/news.svg @@ -0,0 +1,296 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce convallis mauris ullamcorper mauris viverra molestie. Donec ultricies faucibus laoreet. Donec convallis congue neque consequat vehicula. Morbi condimentum tempor nulla et rhoncus. Etiam auctor, augue eu pharetra congue, elit justo lacinia risus, non lacinia est justo sed erat. Ut risus urna, viverra id interdum in, molestie non sem. Morbi leo orci, gravida auctor tempor vel, varius et enim. Nulla sem enim, ultricies vel laoreet ac, semper vel mauris. Ut adipiscing sapien sed leo pretium id vulputate erat gravida. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Cras tempor leo sit amet velit molestie commodo eget tincidunt leo. Cras dictum metus non ante pulvinar pellentesque. Morbi id elit ullamcorper mi vulputate lobortis. Cras ac vehicula felis. Phasellus dictum, tellus at molestie pellentesque, purus purus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce convallis mauris ullamcorper mauris viverra molestie. Donec ultricies faucibus laoreet. Donec convallis congue neque consequat vehicula. Morbi condimentum tempor nulla et rhoncus. Etiam auctor, augue eu pharetra congue, elit justo lacinia risus, non lacinia est justo sed erat. Ut risus urna, + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/toolbar/refresh.png b/resources/icons/toolbar/refresh.png new file mode 100644 index 00000000..734729bf Binary files /dev/null and b/resources/icons/toolbar/refresh.png differ diff --git a/resources/icons/toolbar/settings.png b/resources/icons/toolbar/settings.png new file mode 100644 index 00000000..daf56aad Binary files /dev/null and b/resources/icons/toolbar/settings.png differ diff --git a/resources/icons/toolbar/viewfolder.png b/resources/icons/toolbar/viewfolder.png new file mode 100644 index 00000000..b645167f Binary files /dev/null and b/resources/icons/toolbar/viewfolder.png differ diff --git a/util/pathutils.cpp b/util/pathutils.cpp new file mode 100644 index 00000000..809dd6f2 --- /dev/null +++ b/util/pathutils.cpp @@ -0,0 +1,32 @@ +/* Copyright 2013 MultiMC Contributors + * + * 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 "pathutils.h" + +#include +#include + +QString PathCombine(QString path1, QString path2) +{ + if (!path1.endsWith('/')) + return path1.append('/').append(path2); + else + return path1.append(path2); +} + +QString AbsolutePath(QString path) +{ + return QFileInfo(path).absolutePath(); +} diff --git a/util/pathutils.h b/util/pathutils.h new file mode 100644 index 00000000..bfd11bea --- /dev/null +++ b/util/pathutils.h @@ -0,0 +1,25 @@ +/* Copyright 2013 MultiMC Contributors + * + * 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. + */ + +#ifndef PATHUTILS_H +#define PATHUTILS_H + +#include + +QString PathCombine(QString path1, QString path2); + +QString AbsolutePath(QString path); + +#endif // PATHUTILS_H -- cgit v1.2.3