Skip to content

Commit

Permalink
connect download
Browse files Browse the repository at this point in the history
one need to put tombll.db in .local/share/TombRaiderLinuxLauncher to make it work
  • Loading branch information
noisecode3 committed Feb 9, 2024
1 parent f5b75bb commit c0fddbe
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/Controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ bool Controller::setupOg(int id)
return model.setUpOg(id);
}

bool Controller::setupLevel(int id)
{
return model.getGame(id);
}

void Controller::getList(QVector<ListItemData>& list)
{
return model.getList(list);
Expand Down
1 change: 1 addition & 0 deletions src/Controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class Controller : public QObject
void stopWorkerThread();
bool setupCamp(const QString& level, const QString& game);
bool setupOg(int id);
bool setupLevel(int id);
void getList(QVector<ListItemData>& list);
bool link(int id);
bool link(const QString& levelDir);
Expand Down
4 changes: 2 additions & 2 deletions src/TombRaiderLinuxLauncher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ void TombRaiderLinuxLauncher::onListItemSelected()
else if (state == 0)
{
ui->pushButtonLink->setEnabled(false);
ui->pushButtonInfo->setEnabled(false);
ui->pushButtonInfo->setEnabled(true);
ui->pushButtonDownload->setEnabled(true);
}
else if (state == -1)
Expand Down Expand Up @@ -242,6 +242,7 @@ void TombRaiderLinuxLauncher::downloadClicked()
int id = selectedItem->data(Qt::UserRole).toInt();
if (id)
{
controller.setupLevel(id);
if (ui->listWidgetModds->currentItem() == selectedItem)
{
ui->pushButtonLink->setEnabled(true);
Expand All @@ -258,7 +259,6 @@ void TombRaiderLinuxLauncher::infoClicked()
{
InfoData info = controller.getInfo(id);
ui->infoWebEngineView->setHtml(info.body);
//ui->infoWebEngineView->
ui->infoListWidget->setViewMode(QListView::IconMode);
ui->infoListWidget->setIconSize(QSize(502, 377));
ui->infoListWidget->clear();
Expand Down

0 comments on commit c0fddbe

Please sign in to comment.