Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save window size, current load order to the settings file and more changes #25

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
d1c8279
Made the Doom subprocess forward its standard output and standard err…
Aug 23, 2016
a0ae7a2
Fix to properly save the picture when the GZdoom logo is selected as …
FinalStaticFox Oct 16, 2018
4f7e674
Add files via upload
paynworth Nov 8, 2018
e6a2e25
Add files via upload
paynworth Nov 8, 2018
181fdcd
Merge pull request #1 from FinalStaticFox/master
paynworth Nov 8, 2018
02d373a
Merge pull request #2 from v322v322/master
paynworth Nov 8, 2018
e5476cc
Deprecate 'Common Resources' listbox
paynworth Nov 9, 2018
11d98c8
Add double click for favourites
paynworth Nov 9, 2018
9da2faf
fix app icon
paynworth Nov 9, 2018
dd838d4
Fix crash on missing file check
paynworth Nov 10, 2018
125a37a
Fix engine name change bug
paynworth Nov 10, 2018
88a0fe8
Fix favourites list bug
paynworth Nov 10, 2018
3dd635e
Get engine name from filepath
paynworth Nov 10, 2018
6671a99
Fix another crash
paynworth Nov 10, 2018
c441c91
Yet another fix
paynworth Nov 10, 2018
61e1705
UI Changes
paynworth Nov 11, 2018
882dc29
New Screenshot
paynworth Nov 11, 2018
b1caf72
New screenshot
paynworth Nov 11, 2018
02ee37c
Update README.md
paynworth Nov 11, 2018
3989e2e
Add files via upload
paynworth Nov 11, 2018
f59381e
Delete LaunchDrop.png
paynworth Nov 11, 2018
389d732
Add files via upload
paynworth Nov 11, 2018
5c1509e
pwad filter
paynworth Nov 11, 2018
7b4b967
New command line dialog
paynworth Nov 12, 2018
5333fc1
Update README.md
paynworth Nov 12, 2018
682de38
Update README.md
paynworth Nov 15, 2018
4b690e7
Update README.md
paynworth Nov 16, 2018
4264a7d
Update README.md
paynworth Nov 16, 2018
4d20aac
Update README.md
paynworth Nov 16, 2018
0931c89
Update README.md
paynworth Nov 16, 2018
5913c1f
Add tooltip
paynworth Nov 16, 2018
8055f30
new zdoom logo
paynworth Feb 3, 2019
1bc8563
Keyboard commands
paynworth Feb 3, 2019
287de4d
Update Engines Tab
paynworth Dec 17, 2019
e50fefc
Add Context Menu
paynworth Jan 13, 2020
97624a6
Add LZDoom Logo
paynworth Jan 13, 2020
4998e99
Fix File Extension Bug
paynworth Jan 13, 2020
3c60561
Fix crash when no engine
paynworth Jan 14, 2020
9cfc701
Update README.md
paynworth Jan 14, 2020
0473598
bug fixes
paynworth Jun 8, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added LaunchDrop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,18 @@ Rocket Launcher 2.0 also features a new tab allowing you to configure each engin

### Qt Framework

This allows for this project to be cross platform, including support for Linux and OSX. For windows I provide a static build, which means it's provided as a single executable with no additional DLL's required or frameworks to install.
This allows for this project to be cross platform, including support for Linux and Windows.

### Installation

#### Windows
#### Windows (7 or later)

Download executable here: https://github.com/Hypnotoad90/RocketLauncher2/releases/download/0.1.0.1/RocketLauncher2_v0101.zip
Download executable here: https://github.com/paynworth/RocketLauncher2/releases/download/v1.1/RocketLauncherPW_v1.1.zip

#### Linux

No binaries available as of yet. To compile, simply grab Qt5-default package, then run qmake, followed by make, on the source code.

#### Mac

Coming soon.

### Thanks to:
<br>
Blzut3: for helping me with some Qt queries.<br>
Expand Down
Binary file modified RLPics/LaunchDrop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 6 additions & 3 deletions RocketLauncher2.pro
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,18 @@ SOURCES += main.cpp\
dndfilesystemlistview.cpp \
hyp_commonfunc.cpp \
configs.cpp \
enginesetup.cpp
enginesetup.cpp \
commandlinedialog.cpp

HEADERS += rocketlauncher2.h \
abstractmodels.h \
dndfilesystemlistview.h \
hyp_commonfunc.h \
configs.h
configs.h \
commandlinedialog.h

FORMS += rocketlauncher2.ui
FORMS += rocketlauncher2.ui \
commandlinedialog.ui

RESOURCES += \
resources.qrc
Expand Down
30 changes: 27 additions & 3 deletions abstractmodels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@ int EngineListModel::SearchEngines(const QString name)
return -1;
}

bool EngineListModel::isEmpty(){
return Engines_.isEmpty();
}

void EngineListModel::LoadEngineData()
{
int size = EngineSettings.beginReadArray("Engines");
Expand All @@ -242,7 +246,9 @@ void EngineListModel::LoadEngineData()

void EngineListModel::SaveEngineData()
{

EngineSettings.beginWriteArray("Engines");
EngineSettings.clear();
for (int i = 0; i < Engines_.count(); i++)
{
EngineSettings.setArrayIndex(i);
Expand Down Expand Up @@ -338,6 +344,24 @@ void EngineListModel::removeRow(int row, const QModelIndex &parent)
QAbstractListModel::removeRow(row, parent);
}

void EngineListModel::moveRowDown(int row, const QModelIndex &parent)
{
if (!Engines_.isEmpty() && (row < Engines_.size()-1)){
Engines_.move(row, row+1);
QModelIndex sibling = parent.sibling(row+1, parent.column());
QAbstractListModel::moveRow(parent, row, sibling, row+1);
}
}

void EngineListModel::moveRowUp(int row, const QModelIndex &parent)
{
if (!Engines_.isEmpty() && (row > 0)){
Engines_.move(row, row-1);
QModelIndex sibling = parent.sibling(row-1, parent.column());
QAbstractListModel::moveRow(parent, row, sibling, row-1);
}
}

void EngineListModel::addDefaultEngine(QString path)
{
QFileInfo tempfile(path);
Expand All @@ -346,11 +370,11 @@ void EngineListModel::addDefaultEngine(QString path)
QMessageBox::information(NULL,"Error",QString("Failed to add executable."));
return;
}

EngineInfo newengine = {path, "Custom engine", Engine_Default, Pic_Default};
QString fileName(tempfile.fileName());
EngineInfo newengine = {path, fileName, Engine_Default, Pic_Default};
Engines_ << newengine;
QMessageBox::information(NULL,"Executable Added",QString("Custom engine added!"));
emit updateCombo("Custom engine");
emit updateCombo(fileName);
emit dataChanged(QModelIndex(),QModelIndex());
SaveEngineData();
}
Expand Down
6 changes: 5 additions & 1 deletion abstractmodels.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ enum EnginePic
Pic_Retro,
Pic_Vavoom,
Pic_Doomsday,
Pic_Edge
Pic_Edge,
Pic_LZdoom
};

struct EngineInfo
Expand Down Expand Up @@ -90,9 +91,12 @@ class EngineListModel : public QAbstractListModel {
QString updateEngine(QString engine, QString path, EngineType type, EnginePic pic, bool known);
bool EngineSet;
void LoadEngineData();
bool isEmpty();
EngineType getEngineType();
QString DoomExePath;
void removeRow(int row, const QModelIndex &parent = QModelIndex());
void moveRowDown(int row, const QModelIndex &parent = QModelIndex());
void moveRowUp(int row, const QModelIndex &parent = QModelIndex());
QSettings EngineSettings;
void SaveEngineData();
EngineType getEngineTypeFromIndex(const QModelIndex &index);
Expand Down
22 changes: 22 additions & 0 deletions commandlinedialog.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#include "commandlinedialog.h"
#include "ui_commandlinedialog.h"

CommandLineDialog::CommandLineDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::CommandLineDialog)
{
ui->setupUi(this);

connect(ui->button_copycmd, SIGNAL(pressed()), this, SLOT(copyText()));

}

void CommandLineDialog::setTextBox(QString cmdargs){
ui->text_cmd->setPlainText(cmdargs);
ui->text_cmd->setReadOnly(true);
}
void CommandLineDialog::copyText(){
ui->text_cmd->selectAll();
ui->text_cmd->copy();

}
26 changes: 26 additions & 0 deletions commandlinedialog.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#ifndef COMMANDLINEDIALOG_H
#define COMMANDLINEDIALOG_H

#include <QDialog>

namespace Ui {
class CommandLineDialog;
}

class CommandLineDialog : public QDialog
{
Q_OBJECT
public:
explicit CommandLineDialog(QWidget *parent = 0);

private:
Ui::CommandLineDialog *ui;

signals:

public slots:
void setTextBox(const QString cmdargs);
void copyText();
};

#endif // COMMANDLINEDIALOG_H
85 changes: 85 additions & 0 deletions commandlinedialog.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CommandLineDialog</class>
<widget class="QDialog" name="CommandLineDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Doomseeker - Copy Text</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="lblDescription">
<property name="text">
<string>Text to copy:</string>
</property>
</widget>
</item>
<item>
<widget class="QPlainTextEdit" name="text_cmd"/>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="button_copycmd">
<property name="text">
<string>Copy to clipboard</string>
</property>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Close</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>CommandLineDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>CommandLineDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>
Loading