forked from teamnwah/openmw-tes3coop
Rename Main class to MainWindow
This commit is contained in:
parent
610ba1d867
commit
3c9eaad5ce
4 changed files with 17 additions and 17 deletions
|
@ -6,7 +6,7 @@ set(NETLAUNCHER_UI
|
|||
)
|
||||
set(NETLAUNCHER
|
||||
main.cpp
|
||||
Main.cpp
|
||||
MainWindow.cpp
|
||||
ServerModel.cpp
|
||||
NetController.cpp
|
||||
ServerInfoDialog.cpp
|
||||
|
@ -16,7 +16,7 @@ set(NETLAUNCHER
|
|||
)
|
||||
|
||||
set(NETLAUNCHER_HEADER_MOC
|
||||
Main.hpp
|
||||
MainWindow.hpp
|
||||
ServerModel.hpp
|
||||
ServerInfoDialog.hpp
|
||||
)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// Created by koncord on 06.01.17.
|
||||
//
|
||||
|
||||
#include "Main.hpp"
|
||||
#include "MainWindow.hpp"
|
||||
#include "NetController.hpp"
|
||||
#include "ServerInfoDialog.hpp"
|
||||
#include <qdebug.h>
|
||||
|
@ -10,7 +10,7 @@
|
|||
|
||||
using namespace Process;
|
||||
|
||||
Main::Main(QWidget *parent)
|
||||
MainWindow::MainWindow(QWidget *parent)
|
||||
{
|
||||
setupUi(this);
|
||||
|
||||
|
@ -36,12 +36,12 @@ Main::Main(QWidget *parent)
|
|||
connect(tblFavorites, SIGNAL(clicked(QModelIndex)), this, SLOT(serverSelected()));
|
||||
}
|
||||
|
||||
Main::~Main()
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
delete mGameInvoker;
|
||||
}
|
||||
|
||||
void Main::addServer()
|
||||
void MainWindow::addServer()
|
||||
{
|
||||
int id = tblServerBrowser->selectionModel()->currentIndex().row();
|
||||
|
||||
|
@ -52,7 +52,7 @@ void Main::addServer()
|
|||
}
|
||||
}
|
||||
|
||||
void Main::addServerByIP()
|
||||
void MainWindow::addServerByIP()
|
||||
{
|
||||
bool ok;
|
||||
QString text = QInputDialog::getText(this, tr("Add Server by address"), tr("Address:"), QLineEdit::Normal, "", &ok);
|
||||
|
@ -65,7 +65,7 @@ void Main::addServerByIP()
|
|||
}
|
||||
}
|
||||
|
||||
void Main::deleteServer()
|
||||
void MainWindow::deleteServer()
|
||||
{
|
||||
if(tabWidget->currentIndex() != 1)
|
||||
return;
|
||||
|
@ -79,7 +79,7 @@ void Main::deleteServer()
|
|||
}
|
||||
}
|
||||
|
||||
bool Main::refresh()
|
||||
bool MainWindow::refresh()
|
||||
{
|
||||
return NetController::get()->updateInfo(proxyModel->sourceModel());
|
||||
/*tblServerBrowser->resizeColumnToContents(ServerData::HOSTNAME);
|
||||
|
@ -88,7 +88,7 @@ bool Main::refresh()
|
|||
tblFavorites->resizeColumnToContents(ServerData::MODNAME);*/
|
||||
}
|
||||
|
||||
void Main::play()
|
||||
void MainWindow::play()
|
||||
{
|
||||
QTableView *curTable = tabWidget->currentIndex() ? tblFavorites : tblServerBrowser;
|
||||
int id = curTable->selectionModel()->currentIndex().row();
|
||||
|
@ -111,7 +111,7 @@ void Main::play()
|
|||
return qApp->quit();
|
||||
}
|
||||
|
||||
void Main::tabSwitched(int index)
|
||||
void MainWindow::tabSwitched(int index)
|
||||
{
|
||||
if(index == 0)
|
||||
{
|
||||
|
@ -127,7 +127,7 @@ void Main::tabSwitched(int index)
|
|||
actionAdd->setEnabled(false);
|
||||
}
|
||||
|
||||
void Main::serverSelected()
|
||||
void MainWindow::serverSelected()
|
||||
{
|
||||
actionPlay->setEnabled(true);
|
||||
if(tabWidget->currentIndex() == 0)
|
|
@ -11,12 +11,12 @@
|
|||
#include <QSortFilterProxyModel>
|
||||
#include <components/process/processinvoker.hpp>
|
||||
|
||||
class Main : public QMainWindow, private Ui::MainWindow
|
||||
class MainWindow : public QMainWindow, private Ui::MainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit Main(QWidget *parent = 0);
|
||||
virtual ~Main();
|
||||
explicit MainWindow(QWidget *parent = 0);
|
||||
virtual ~MainWindow();
|
||||
protected:
|
||||
public slots:
|
||||
bool refresh();
|
|
@ -1,7 +1,7 @@
|
|||
#include <QApplication>
|
||||
#include <components/settings/settings.hpp>
|
||||
#include <components/files/configurationmanager.hpp>
|
||||
#include "Main.hpp"
|
||||
#include "MainWindow.hpp"
|
||||
#include "NetController.hpp"
|
||||
|
||||
std::string loadSettings (Settings::Manager & settings)
|
||||
|
@ -43,7 +43,7 @@ int main(int argc, char *argv[])
|
|||
NetController::Create(addr, port);
|
||||
atexit(NetController::Destroy);
|
||||
QApplication app(argc, argv);
|
||||
Main d;
|
||||
MainWindow d;
|
||||
if (d.refresh())
|
||||
{
|
||||
d.show();
|
||||
|
|
Loading…
Reference in a new issue