commit d6d5c86a736537828a59ddc6389d5d0490942f8c Author: Andrew Date: Wed Jan 9 12:22:22 2013 -0600 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..085e8baf0 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +Thumbs.db diff --git a/MultiMC.pro b/MultiMC.pro new file mode 100644 index 000000000..6115627cf --- /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 000000000..c72c06aab --- /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 000000000..2e0a65df2 --- /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 000000000..df23b1b0f --- /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 000000000..875cc2563 --- /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 000000000..6d9a0216d --- /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 000000000..0ef98d0ea --- /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 000000000..0d429c8dd --- /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 000000000..1e32170da --- /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 000000000..ec14ab68d --- /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 000000000..a71c6b353 --- /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 000000000..3ce6ad5c1 --- /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 000000000..2a2e39b6b --- /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 000000000..ac9378f53 --- /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 000000000..be78c78ed --- /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 000000000..8cf735673 --- /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 000000000..c0169aec2 --- /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 000000000..7392ba36e --- /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 000000000..c6dd6bc0f --- /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 000000000..69a20073d --- /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 000000000..4046e4ecf --- /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 000000000..b2da5a469 --- /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 000000000..a1b0f4d15 --- /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 000000000..2233272ce --- /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 000000000..178509ac0 --- /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 000000000..57775e25a 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 000000000..0534cbef5 --- /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 000000000..a10f9a2b9 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 000000000..badb200cf 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 000000000..da79b3e3f 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 000000000..c707fbbfb 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 000000000..67a370dfd --- /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 000000000..734729bf8 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 000000000..daf56aad3 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 000000000..b645167fc 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 000000000..809dd6f26 --- /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 000000000..bfd11bea4 --- /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