Skip to content

Commit 0a7c614

Browse files
committed
fix filter
1 parent 67d90ce commit 0a7c614

File tree

4 files changed

+140
-69
lines changed

4 files changed

+140
-69
lines changed

README.md

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ This project is my passion for Tomb Raider classics combined with learning C++,
1818
## Installation
1919

2020
### Dependencies
21+
2122
On Arch this should be enough, you get the rest probably when you install the base, curl + openssl
2223
Ensure the following are installed on your Linux desktop:
24+
2325
- `curl` (7.71.0 or newer)
2426
- `Boost`
2527
- `OpenSSL`
@@ -30,6 +32,7 @@ sudo pacman -S qt5-wayland qt5-webengine qt5-imageformats boost
3032
```
3133

3234
### Build
35+
3336
```shell
3437
mkdir build
3538
cd build
@@ -41,6 +44,7 @@ make install -j$(nproc)
4144
## Use database
4245

4346
### pip
47+
4448
Never use sudo with pip, you can use a virtual environment or keep updating them in home.
4549
If a required module isn't available in the system's package manager, fall back to pip.
4650

@@ -49,11 +53,15 @@ python3 -m venv myenv
4953
source myenv/bin/activate
5054
pip install pycurl tqdm cryptography beautifulsoup4 pillow
5155
```
56+
5257
or just
58+
5359
```shell
5460
pip install pycurl tqdm cryptography beautifulsoup4 pillow
5561
```
62+
5663
how to update
64+
5765
```shell
5866
#!/bin/bash
5967
pimp_my_pip() {
@@ -63,43 +71,48 @@ pimp_my_pip
6371
```
6472

6573
### Arch Linux
74+
6675
```shell
6776
sudo pacman -S python-pycurl python-tqdm python-cryptography python-beautifulsoup4 python-pillow
6877
```
6978

7079
### Ubuntu/Debian
80+
7181
```shell
7282
sudo apt update
7383
sudo apt install python3-pycurl python3-tqdm python3-cryptography python3-bs4 python3-pil
7484
```
7585

7686
### Fedora
87+
7788
```shell
7889
sudo dnf install python3-pycurl python3-tqdm python3-cryptography python3-beautifulsoup4 python3-pillow
7990
```
8091

8192
### openSUSE
93+
8294
```shell
8395
sudo zypper install python3-pycurl python3-tqdm python3-cryptography python3-beautifulsoup4 python3-Pillow
8496
```
8597

8698
### Alpine Linux
99+
87100
```shell
88101
sudo apk add py3-pycurl py3-tqdm py3-cryptography py3-beautifulsoup4 py3-pillow
89102
```
90103

91104
Some levels wont be added because they use external or different download URL's
92105
You can add levels to the database if you cd into where you installed you're database.
93-
From you're browser copy the number from level page https://www.trle.net/sc/levelfeatures.php?lid=3684
106+
From you're browser copy the number from level page <https://www.trle.net/sc/levelfeatures.php?lid=3684>
94107

95108
If you did just follow the command above you can use:
96109

97-
98110
```shell
99111
python tombll_manage_data.py -h
100112
python3 tombll_manage_data.py -a 3684
101113

102114
```
115+
103116
Now that you have an data.json file you get a chance to edit it.
104117
Sometimes you need or want to edit those but right now I allow only trle.net
105118
You can add you're own local file with its md5sum and it should not try to download it.
@@ -119,14 +132,15 @@ python3 tombll_manage_data.py -af data.json
119132
For testing widescreen patch
120133
it could work with only tr4 and tr5
121134
compile with cmake -DTEST=on
135+
122136
```shell
123137
./TombRaiderLinuxLauncherTest -w tomb4.exe
124138
```
125139

126140
I was going to mix trle.net with trcustoms.org data, I have not made contacted with the site owner
127141
to ask if I can use the site for scraping for non commercial use. As this task turned out to be
128142
harder than I thought, to match data without creating doubles, I'm gonna wait until the basics
129-
and trle.net part is implemented.
143+
and trle.net part is implemented.
130144

131145
## Screenshots
132146

@@ -141,28 +155,35 @@ It depends on drivers quality, but with proton you can try `PROTON_USE_WINED3D=1
141155
or using [dgvoodoo2] with `PROTON_USE_WINED3D=0` usually you get the best performance with (DXVK/dgvoodoo2).
142156
The easiest way to get this setup it using Lutris. Some levels can be lagging even on
143157
a computer with a strong video card.
144-
[dgvoodoo2]: https://github.com/lutris/dgvoodoo2/releases
158+
[dgvoodoo2]: <https://github.com/lutris/dgvoodoo2/releases>
145159

146160
### TR1
147-
* <https://github.com/LostArtefacts/TRX>
161+
162+
- <https://github.com/LostArtefacts/TRX>
148163

149164
### TR2
150-
* <https://github.com/Arsunt/TR2Main>
165+
166+
- <https://github.com/Arsunt/TR2Main>
151167

152168
### TR3
153-
* <https://github.com/Trxyebeep/tomb3>
169+
170+
- <https://github.com/Trxyebeep/tomb3>
154171

155172
### TR4
156-
* <https://github.com/Trxyebeep/TOMB4>
173+
174+
- <https://github.com/Trxyebeep/TOMB4>
157175

158176
### TR5
159-
* <https://github.com/Trxyebeep/TOMB5>
177+
178+
- <https://github.com/Trxyebeep/TOMB5>
160179

161180
## Targets
181+
162182
I program mostly on Slackware-current and Arch, I gonna try target and test SteamOS for second release.
163183
I don't use Windows but it should build on both Windows and Linux with MinGw. I will test with Wine/VM.
164184
It's recommended as a standard to use Arch Linux or MSYS2 on Windows, with qt-creator.
165185
Its possible to set it up with neovim or vscode or any other but its more work.
166186

167187
## License
188+
168189
This project is licensed under GPLv3. Art assets are under Creative Commons Attribution-NonCommercial-ShareAlike 4.0. Tomb Raider is a trademark of Embracer Group AB.

src/TombRaiderLinuxLauncher.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,14 @@ TombRaiderLinuxLauncher::TombRaiderLinuxLauncher(QWidget *parent)
112112
connect(ui->radioButtonReleaseDate, &QRadioButton::clicked,
113113
this, &TombRaiderLinuxLauncher::sortByReleaseDate);
114114

115+
connect(ui->comboBoxClass, &QComboBox::currentTextChanged,
116+
this, &TombRaiderLinuxLauncher::filterByClass);
115117
connect(ui->comboBoxType, &QComboBox::currentTextChanged,
116118
this, &TombRaiderLinuxLauncher::filterByType);
119+
connect(ui->comboBoxDifficulty, &QComboBox::currentTextChanged,
120+
this, &TombRaiderLinuxLauncher::filterByDifficulty);
121+
connect(ui->comboBoxDuration, &QComboBox::currentTextChanged,
122+
this, &TombRaiderLinuxLauncher::filterByDuration);
117123

118124
model = new LevelListModel(this);
119125
ui->listViewLevels->setModel(model);
@@ -163,10 +169,22 @@ void TombRaiderLinuxLauncher::sortByReleaseDate() {
163169
model->sortItems(model->compareReleaseDates);
164170
}
165171

172+
void TombRaiderLinuxLauncher::filterByClass(const QString& class_) {
173+
model->filterClass(class_);
174+
}
175+
166176
void TombRaiderLinuxLauncher::filterByType(const QString& type) {
167177
model->filterType(type);
168178
}
169179

180+
void TombRaiderLinuxLauncher::filterByDifficulty(const QString& difficulty) {
181+
model->filterDifficulty(difficulty);
182+
}
183+
184+
void TombRaiderLinuxLauncher::filterByDuration(const QString& duration) {
185+
model->filterDuration(duration);
186+
}
187+
170188
void TombRaiderLinuxLauncher::readSavedSettings() {
171189
const QString gamePathValue = m_settings.value("gamePath").toString();
172190
ui->tableWidgetSetup->item(0, 0)->setText(gamePathValue);

src/TombRaiderLinuxLauncher.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,10 @@ class TombRaiderLinuxLauncher : public QMainWindow {
127127
*/
128128
void sortByReleaseDate();
129129

130+
void filterByClass(const QString& class_);
130131
void filterByType(const QString& type);
132+
void filterByDifficulty(const QString& difficulty);
133+
void filterByDuration(const QString& duration);
131134
void GlobalSaveClicked();
132135
void GlobalResetClicked();
133136
void LevelSaveClicked();

0 commit comments

Comments
 (0)