mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-19 00:42:14 -07:00
always set tab parent to tabSupervisor
This commit is contained in:
parent
2a62b8c6ef
commit
a7aa1c160b
12 changed files with 16 additions and 24 deletions
|
|
@ -1,13 +1,14 @@
|
||||||
#include "tab.h"
|
#include "tab.h"
|
||||||
|
|
||||||
#include "../ui/widgets/cards/card_info_display_widget.h"
|
#include "../ui/widgets/cards/card_info_display_widget.h"
|
||||||
|
#include "./tab_supervisor.h"
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QScreen>
|
#include <QScreen>
|
||||||
|
|
||||||
Tab::Tab(TabSupervisor *_tabSupervisor, QWidget *parent)
|
Tab::Tab(TabSupervisor *_tabSupervisor)
|
||||||
: QMainWindow(parent), tabSupervisor(_tabSupervisor), contentsChanged(false), infoPopup(0)
|
: QMainWindow(_tabSupervisor), tabSupervisor(_tabSupervisor), contentsChanged(false), infoPopup(0)
|
||||||
{
|
{
|
||||||
setAttribute(Qt::WA_DeleteOnClose);
|
setAttribute(Qt::WA_DeleteOnClose);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ private:
|
||||||
QList<QMenu *> tabMenus;
|
QList<QMenu *> tabMenus;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit Tab(TabSupervisor *_tabSupervisor, QWidget *parent = nullptr);
|
explicit Tab(TabSupervisor *_tabSupervisor);
|
||||||
const QList<QMenu *> &getTabMenus() const
|
const QList<QMenu *> &getTabMenus() const
|
||||||
{
|
{
|
||||||
return tabMenus;
|
return tabMenus;
|
||||||
|
|
|
||||||
|
|
@ -18,11 +18,8 @@
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
|
|
||||||
TabUserLists::TabUserLists(TabSupervisor *_tabSupervisor,
|
TabUserLists::TabUserLists(TabSupervisor *_tabSupervisor, AbstractClient *_client, const ServerInfo_User &userInfo)
|
||||||
AbstractClient *_client,
|
: Tab(_tabSupervisor), client(_client)
|
||||||
const ServerInfo_User &userInfo,
|
|
||||||
QWidget *parent)
|
|
||||||
: Tab(_tabSupervisor, parent), client(_client)
|
|
||||||
{
|
{
|
||||||
allUsersList = new UserList(_tabSupervisor, client, UserList::AllUsersList);
|
allUsersList = new UserList(_tabSupervisor, client, UserList::AllUsersList);
|
||||||
buddyList = new UserList(_tabSupervisor, client, UserList::BuddyList);
|
buddyList = new UserList(_tabSupervisor, client, UserList::BuddyList);
|
||||||
|
|
|
||||||
|
|
@ -46,10 +46,7 @@ private:
|
||||||
void addToList(const std::string &listName, const QString &userName);
|
void addToList(const std::string &listName, const QString &userName);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TabUserLists(TabSupervisor *_tabSupervisor,
|
TabUserLists(TabSupervisor *_tabSupervisor, AbstractClient *_client, const ServerInfo_User &userInfo);
|
||||||
AbstractClient *_client,
|
|
||||||
const ServerInfo_User &userInfo,
|
|
||||||
QWidget *parent = nullptr);
|
|
||||||
void retranslateUi() override;
|
void retranslateUi() override;
|
||||||
QString getTabText() const override
|
QString getTabText() const override
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -54,8 +54,8 @@ int ShutdownDialog::getMinutes() const
|
||||||
return minutesEdit->value();
|
return minutesEdit->value();
|
||||||
}
|
}
|
||||||
|
|
||||||
TabAdmin::TabAdmin(TabSupervisor *_tabSupervisor, AbstractClient *_client, bool _fullAdmin, QWidget *parent)
|
TabAdmin::TabAdmin(TabSupervisor *_tabSupervisor, AbstractClient *_client, bool _fullAdmin)
|
||||||
: Tab(_tabSupervisor, parent), locked(true), client(_client), fullAdmin(_fullAdmin)
|
: Tab(_tabSupervisor), locked(true), client(_client), fullAdmin(_fullAdmin)
|
||||||
{
|
{
|
||||||
updateServerMessageButton = new QPushButton;
|
updateServerMessageButton = new QPushButton;
|
||||||
connect(updateServerMessageButton, &QPushButton::clicked, this, &TabAdmin::actUpdateServerMessage);
|
connect(updateServerMessageButton, &QPushButton::clicked, this, &TabAdmin::actUpdateServerMessage);
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ private slots:
|
||||||
void actLock();
|
void actLock();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TabAdmin(TabSupervisor *_tabSupervisor, AbstractClient *_client, bool _fullAdmin, QWidget *parent = nullptr);
|
TabAdmin(TabSupervisor *_tabSupervisor, AbstractClient *_client, bool _fullAdmin);
|
||||||
void retranslateUi() override;
|
void retranslateUi() override;
|
||||||
QString getTabText() const override
|
QString getTabText() const override
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -698,8 +698,7 @@ void TabDeckEditor::loadLayout()
|
||||||
QTimer::singleShot(100, this, SLOT(freeDocksSize()));
|
QTimer::singleShot(100, this, SLOT(freeDocksSize()));
|
||||||
}
|
}
|
||||||
|
|
||||||
TabDeckEditor::TabDeckEditor(TabSupervisor *_tabSupervisor, QWidget *parent)
|
TabDeckEditor::TabDeckEditor(TabSupervisor *_tabSupervisor) : Tab(_tabSupervisor), modified(false)
|
||||||
: Tab(_tabSupervisor, parent), modified(false)
|
|
||||||
{
|
{
|
||||||
setObjectName("TabDeckEditor");
|
setObjectName("TabDeckEditor");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -163,7 +163,7 @@ private:
|
||||||
QWidget *centralWidget;
|
QWidget *centralWidget;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit TabDeckEditor(TabSupervisor *_tabSupervisor, QWidget *parent = nullptr);
|
explicit TabDeckEditor(TabSupervisor *_tabSupervisor);
|
||||||
void retranslateUi() override;
|
void retranslateUi() override;
|
||||||
QString getTabText() const override;
|
QString getTabText() const override;
|
||||||
void setDeck(DeckLoader *_deckLoader);
|
void setDeck(DeckLoader *_deckLoader);
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,7 @@
|
||||||
#include <QtGui>
|
#include <QtGui>
|
||||||
#include <QtWidgets>
|
#include <QtWidgets>
|
||||||
|
|
||||||
TabLog::TabLog(TabSupervisor *_tabSupervisor, AbstractClient *_client, QWidget *parent)
|
TabLog::TabLog(TabSupervisor *_tabSupervisor, AbstractClient *_client) : Tab(_tabSupervisor), client(_client)
|
||||||
: Tab(_tabSupervisor, parent), client(_client)
|
|
||||||
{
|
{
|
||||||
roomTable = new QTableWidget();
|
roomTable = new QTableWidget();
|
||||||
roomTable->setColumnCount(6);
|
roomTable->setColumnCount(6);
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ private slots:
|
||||||
void restartLayout();
|
void restartLayout();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TabLog(TabSupervisor *_tabSupervisor, AbstractClient *_client, QWidget *parent = nullptr);
|
TabLog(TabSupervisor *_tabSupervisor, AbstractClient *_client);
|
||||||
~TabLog() override;
|
~TabLog() override;
|
||||||
void retranslateUi() override;
|
void retranslateUi() override;
|
||||||
QString getTabText() const override
|
QString getTabText() const override
|
||||||
|
|
|
||||||
|
|
@ -138,8 +138,7 @@ void RoomSelector::joinClicked()
|
||||||
emit joinRoomRequest(id, true);
|
emit joinRoomRequest(id, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
TabServer::TabServer(TabSupervisor *_tabSupervisor, AbstractClient *_client, QWidget *parent)
|
TabServer::TabServer(TabSupervisor *_tabSupervisor, AbstractClient *_client) : Tab(_tabSupervisor), client(_client)
|
||||||
: Tab(_tabSupervisor, parent), client(_client)
|
|
||||||
{
|
{
|
||||||
roomSelector = new RoomSelector(client);
|
roomSelector = new RoomSelector(client);
|
||||||
serverInfoBox = new QTextBrowser;
|
serverInfoBox = new QTextBrowser;
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ private:
|
||||||
bool shouldEmitUpdate = false;
|
bool shouldEmitUpdate = false;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TabServer(TabSupervisor *_tabSupervisor, AbstractClient *_client, QWidget *parent = nullptr);
|
TabServer(TabSupervisor *_tabSupervisor, AbstractClient *_client);
|
||||||
void retranslateUi() override;
|
void retranslateUi() override;
|
||||||
QString getTabText() const override
|
QString getTabText() const override
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue