mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-26 00:23:55 -07:00
* move message_log_widget to game * move files * update headers * fix cmakelists * oracle fixes * split implementation out to cpp * fix recursive import * fix main file * format
This commit is contained in:
parent
f484c98152
commit
17dcaf9afa
337 changed files with 728 additions and 721 deletions
|
|
@ -1,70 +0,0 @@
|
|||
#ifndef TAB_H
|
||||
#define TAB_H
|
||||
|
||||
#include "card_ref.h"
|
||||
|
||||
#include <QMainWindow>
|
||||
|
||||
class QMenu;
|
||||
class TabSupervisor;
|
||||
class CardInfoDisplayWidget;
|
||||
|
||||
class Tab : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
signals:
|
||||
void userEvent(bool globalEvent = true);
|
||||
void tabTextChanged(Tab *tab, const QString &newTabText);
|
||||
|
||||
protected:
|
||||
TabSupervisor *tabSupervisor;
|
||||
void addTabMenu(QMenu *menu)
|
||||
{
|
||||
tabMenus.append(menu);
|
||||
}
|
||||
protected slots:
|
||||
void showCardInfoPopup(const QPoint &pos, const CardRef &cardRef);
|
||||
void deleteCardInfoPopup(const QString &cardName);
|
||||
|
||||
private:
|
||||
CardRef currentCard;
|
||||
bool contentsChanged;
|
||||
CardInfoDisplayWidget *infoPopup;
|
||||
QList<QMenu *> tabMenus;
|
||||
|
||||
public:
|
||||
explicit Tab(TabSupervisor *_tabSupervisor);
|
||||
const QList<QMenu *> &getTabMenus() const
|
||||
{
|
||||
return tabMenus;
|
||||
}
|
||||
TabSupervisor *getTabSupervisor() const
|
||||
{
|
||||
return tabSupervisor;
|
||||
}
|
||||
bool getContentsChanged() const
|
||||
{
|
||||
return contentsChanged;
|
||||
}
|
||||
void setContentsChanged(bool _contentsChanged)
|
||||
{
|
||||
contentsChanged = _contentsChanged;
|
||||
}
|
||||
virtual QString getTabText() const = 0;
|
||||
virtual void retranslateUi() = 0;
|
||||
|
||||
/**
|
||||
* Nicely asks to close the tab.
|
||||
* Override this method to do checks or ask for confirmation before closing the tab.
|
||||
* If you need to force close the tab, just call close() instead.
|
||||
*
|
||||
* @return True if the tab is successfully closed.
|
||||
*/
|
||||
virtual bool closeRequest();
|
||||
|
||||
virtual void tabActivated()
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue