Commit 224a4969 authored by Max-Wilhelm Bruker's avatar Max-Wilhelm Bruker
Browse files

some zone view changes going on

parent aed30708
......@@ -86,3 +86,4 @@ SOURCES += src/counter.cpp \
src/chatwidget.cpp \
src/gamescene.cpp
TRANSLATIONS += translations/cockatrice_de.ts translations/cockatrice_en.ts
CONFIG += qt debug
......@@ -30,3 +30,17 @@ CardItem *CardList::findCard(const int id, const bool remove, int *position)
}
return 0;
}
class CardList::compareFunctor {
public:
inline bool operator()(CardItem *a, CardItem *b) const
{
return a->getName() < b->getName();
}
};
void CardList::sort()
{
compareFunctor cf;
qSort(begin(), end(), cf);
}
......@@ -6,12 +6,15 @@
class CardItem;
class CardList : public QList<CardItem *> {
private:
class compareFunctor;
protected:
bool contentsKnown;
public:
CardList(bool _contentsKnown);
CardItem *findCard(const int id, const bool remove, int *position = NULL);
bool getContentsKnown() const { return contentsKnown; }
void sort();
};
#endif
......@@ -26,6 +26,42 @@ void CardZone::clearContents()
cards.clear();
}
QString CardZone::getTranslatedName(bool hisOwn, GrammaticalCase gc) const
{
QString ownerName = player->getName();
if (name == "hand")
switch (gc) {
case CaseNominative: return hisOwn ? tr("his hand") : tr("%1's hand").arg(ownerName);
case CaseGenitive: return hisOwn ? tr("of his hand") : tr("of %1's hand").arg(ownerName);
case CaseAccusative: return hisOwn ? tr("his hand") : tr("%1's hand").arg(ownerName);
}
else if (name == "deck")
switch (gc) {
case CaseNominative: return hisOwn ? tr("his library") : tr("%1's library").arg(ownerName);
case CaseGenitive: return hisOwn ? tr("of his library") : tr("of %1's library").arg(ownerName);
case CaseAccusative: return hisOwn ? tr("his library") : tr("%1's library").arg(ownerName);
}
else if (name == "grave")
switch (gc) {
case CaseNominative: return hisOwn ? tr("his graveyard") : tr("%1's graveyard").arg(ownerName);
case CaseGenitive: return hisOwn ? tr("of his graveyard") : tr("of %1's graveyard").arg(ownerName);
case CaseAccusative: return hisOwn ? tr("his graveyard") : tr("%1's graveyard").arg(ownerName);
}
else if (name == "rfg")
switch (gc) {
case CaseNominative: return hisOwn ? tr("his exile") : tr("%1's exile").arg(ownerName);
case CaseGenitive: return hisOwn ? tr("of his exile") : tr("of %1's exile").arg(ownerName);
case CaseAccusative: return hisOwn ? tr("his exile") : tr("%1's exile").arg(ownerName);
}
else if (name == "sb")
switch (gc) {
case CaseNominative: return hisOwn ? tr("his sideboard") : tr("%1's sideboard").arg(ownerName);
case CaseGenitive: return hisOwn ? tr("of his sideboard") : tr("of %1's sideboard").arg(ownerName);
case CaseAccusative: return hisOwn ? tr("his sideboard") : tr("%1's sideboard").arg(ownerName);
}
return QString();
}
void CardZone::mouseDoubleClickEvent(QGraphicsSceneMouseEvent */*event*/)
{
if (doubleClickAction)
......@@ -52,8 +88,12 @@ void CardZone::addCard(CardItem *card, bool reorganize, int x, int y)
addCardImpl(card, x, y);
if (reorganize)
if (reorganize) {
qDebug("------------ emitting");
dumpObjectInfo();
emit contentsChanged();
reorganizeCards();
}
}
CardItem *CardZone::getCard(int cardId, const QString &cardName)
......@@ -81,6 +121,7 @@ CardItem *CardZone::takeCard(int position, int cardId, const QString &cardName,
c->setId(cardId);
c->setName(cardName);
emit contentsChanged();
reorganizeCards();
return c;
}
......
......@@ -5,6 +5,7 @@
#include "cardlist.h"
#include "carditem.h"
#include "abstractgraphicsitem.h"
#include "translation.h"
class Player;
class ZoneViewZone;
......@@ -12,7 +13,8 @@ class QMenu;
class QAction;
class QPainter;
class CardZone : public AbstractGraphicsItem {
class CardZone : public QObject, public AbstractGraphicsItem {
Q_OBJECT
protected:
Player *player;
QString name;
......@@ -25,6 +27,8 @@ protected:
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
void mousePressEvent(QGraphicsSceneMouseEvent *event);
virtual void addCardImpl(CardItem *card, int x, int y) = 0;
signals:
void contentsChanged();
public:
enum { Type = typeZone };
int type() const { return Type; }
......@@ -37,6 +41,7 @@ public:
QMenu *getMenu() const { return menu; }
void setMenu(QMenu *_menu, QAction *_doubleClickAction = 0) { menu = _menu; doubleClickAction = _doubleClickAction; }
QString getName() const { return name; }
QString getTranslatedName(bool hisOwn, GrammaticalCase gc) const;
Player *getPlayer() const { return player; }
bool contentsKnown() const { return cards.getContentsKnown(); }
const CardList &getCards() const { return cards; }
......
......@@ -234,15 +234,32 @@ AppearanceSettingsPage::AppearanceSettingsPage()
economicGridCheckBox = new QCheckBox;
economicGridCheckBox->setChecked(settings.value("economic", 1).toInt());
connect(economicGridCheckBox, SIGNAL(stateChanged(int)), this, SLOT(economicGridCheckBoxChanged(int)));
settings.endGroup();
QGridLayout *tableGrid = new QGridLayout;
tableGrid->addWidget(economicGridCheckBox, 0, 0, 1, 2);
tableGroupBox->setLayout(tableGrid);
zoneViewGroupBox = new QGroupBox;
settings.beginGroup("zoneview");
zoneViewSortingCheckBox = new QCheckBox;
zoneViewSortingCheckBox->setChecked(settings.value("sorting").toInt());
connect(zoneViewSortingCheckBox, SIGNAL(stateChanged(int)), this, SLOT(zoneViewSortingCheckBoxChanged(int)));
settings.endGroup();
QGridLayout *zoneViewGrid = new QGridLayout;
zoneViewGrid->addWidget(zoneViewSortingCheckBox, 0, 0, 1, 2);
zoneViewGroupBox->setLayout(zoneViewGrid);
QVBoxLayout *mainLayout = new QVBoxLayout;
mainLayout->addWidget(zoneBgGroupBox);
mainLayout->addWidget(tableGroupBox);
mainLayout->addWidget(zoneViewGroupBox);
setLayout(mainLayout);
......@@ -257,6 +274,9 @@ void AppearanceSettingsPage::retranslateUi()
tableGroupBox->setTitle(tr("Table grid layout"));
economicGridCheckBox->setText(tr("Economic layout"));
zoneViewGroupBox->setTitle(tr("Zone view layout"));
zoneViewSortingCheckBox->setText(tr("Sort alphabetically by default"));
}
void AppearanceSettingsPage::handBgButtonClicked()
......@@ -307,6 +327,15 @@ void AppearanceSettingsPage::economicGridCheckBoxChanged(int state)
emit economicGridChanged(state);
}
void AppearanceSettingsPage::zoneViewSortingCheckBoxChanged(int state)
{
QSettings settings;
settings.beginGroup("zoneview");
settings.setValue("sorting", state);
emit zoneViewSortingChanged(state);
}
MessagesSettingsPage::MessagesSettingsPage()
{
aAdd = new QAction(this);
......
......@@ -55,16 +55,18 @@ private slots:
void tableBgButtonClicked();
void playerAreaBgButtonClicked();
void economicGridCheckBoxChanged(int state);
void zoneViewSortingCheckBoxChanged(int state);
signals:
void handBgChanged(const QString &path);
void tableBgChanged(const QString &path);
void playerAreaBgChanged(const QString &path);
void economicGridChanged(int state);
void zoneViewSortingChanged(int state);
private:
QLabel *handBgLabel, *tableBgLabel, *playerAreaBgLabel;
QLineEdit *handBgEdit, *tableBgEdit, *playerAreaBgEdit;
QCheckBox *economicGridCheckBox;
QGroupBox *zoneBgGroupBox, *tableGroupBox;
QCheckBox *economicGridCheckBox, *zoneViewSortingCheckBox;
QGroupBox *zoneBgGroupBox, *tableGroupBox, *zoneViewGroupBox;
public:
AppearanceSettingsPage();
void retranslateUi();
......
......@@ -152,6 +152,7 @@ void Game::retranslateUi()
aMoveToTopLibrary->setText(tr("&top of library"));
aMoveToBottomLibrary->setText(tr("&bottom of library"));
aMoveToGraveyard->setText(tr("&graveyard"));
aMoveToGraveyard->setShortcut(tr("Ctrl+Del"));
aMoveToExile->setText(tr("&exile"));
moveMenu->setTitle(tr("&Move to"));
......@@ -319,7 +320,7 @@ void Game::gameEvent(const ServerEventData &msg)
CardZone *zone = zoneOwner->getZones()->findZone(data[1]);
if (!zone)
break;
emit logDumpZone(p, zone, zoneOwner, data[2].toInt());
emit logDumpZone(p, zone, data[2].toInt());
break;
}
case eventStopDumpZone: {
......@@ -330,7 +331,7 @@ void Game::gameEvent(const ServerEventData &msg)
CardZone *zone = zoneOwner->getZones()->findZone(data[1]);
if (!zone)
break;
emit logStopDumpZone(p, zone, zoneOwner);
emit logStopDumpZone(p, zone);
break;
}
case eventMoveCard: {
......
......@@ -88,8 +88,8 @@ signals:
void logSetTapped(Player *player, QString cardName, bool tapped);
void logSetCounter(Player *player, QString counterName, int value, int oldValue);
void logSetDoesntUntap(Player *player, QString cardName, bool doesntUntap);
void logDumpZone(Player *player, CardZone *zone, Player *zoneOwner, int numberCards);
void logStopDumpZone(Player *player, CardZone *zone, Player *zoneOwner);
void logDumpZone(Player *player, CardZone *zone, int numberCards);
void logStopDumpZone(Player *player, CardZone *zone);
void logSetActivePlayer(Player *player);
void setActivePhase(int phase);
public:
......
......@@ -53,8 +53,12 @@ void GameScene::rearrange()
if (localPlayer)
PlayerProcessor::processPlayer(localPlayer, sceneWidth, sceneHeight, base);
playersRect = QRectF(0, 0, sceneWidth, sceneHeight);
zvLayout->setPos(QPointF(sceneWidth, 0));
sceneWidth += zvLayout->size().width();
if (zvLayout->size().height() > sceneHeight)
sceneHeight = zvLayout->size().height();
setSceneRect(sceneRect().x(), sceneRect().y(), sceneWidth, sceneHeight);
qDebug(QString("rearrange(): w=%1 h=%2").arg(sceneWidth).arg(sceneHeight).toLatin1());
......
......@@ -14,8 +14,10 @@ private:
QList<Player *> players;
ZoneViewLayout *zvLayout;
QRectF playersRect;
public:
GameScene(ZoneViewLayout *_zvLayout, QObject *parent = 0);
const QRectF &getPlayersRect() const { return playersRect; }
public slots:
void addPlayer(Player *player);
void removePlayer(Player *player);
......
......@@ -69,6 +69,9 @@ void GamesModel::updateGameList(ServerGame *game)
void GamesModel::cleanList()
{
if (gameList.isEmpty())
return;
beginRemoveRows(QModelIndex(), 0, gameList.size() - 1);
QListIterator<ServerGame *> i(gameList);
while (i.hasNext())
......
......@@ -12,29 +12,6 @@ QString MessageLogWidget::sanitizeHtml(QString dirty) const
.replace(">", "&gt;");
}
QString MessageLogWidget::trZoneName(CardZone *zone, Player *owner, bool hisOwn, GrammaticalCase gc) const
{
if (zone->getName() == "hand")
switch (gc) {
// case CaseNominative: return hisOwn ? tr("his hand") : tr("%1's hand").arg(owner->getName());
case CaseGenitive: return hisOwn ? tr("of his hand") : tr("of %1's hand").arg(owner->getName());
case CaseAccusative: return hisOwn ? tr("his hand") : tr("%1's hand").arg(owner->getName());
}
else if (zone->getName() == "deck")
switch (gc) {
// case CaseNominative: return hisOwn ? tr("his library") : tr("%1's library").arg(owner->getName());
case CaseGenitive: return hisOwn ? tr("of his library") : tr("of %1's library").arg(owner->getName());
case CaseAccusative: return hisOwn ? tr("his library") : tr("%1's library").arg(owner->getName());
}
else if (zone->getName() == "sb")
switch (gc) {
// case CaseNominative: return hisOwn ? tr("his sideboard") : tr("%1's sideboard").arg(owner->getName());
case CaseGenitive: return hisOwn ? tr("of his sideboard") : tr("of %1's sideboard").arg(owner->getName());
case CaseAccusative: return hisOwn ? tr("his sideboard") : tr("%1's sideboard").arg(owner->getName());
}
return QString();
}
void MessageLogWidget::logConnecting(QString hostname)
{
append(tr("Connecting to %1...").arg(sanitizeHtml(hostname)));
......@@ -226,17 +203,17 @@ void MessageLogWidget::logSetDoesntUntap(Player *player, QString cardName, bool
append(finalStr.arg(sanitizeHtml(player->getName())).arg(QString("<font color=\"blue\">%1</font>").arg(sanitizeHtml(cardName))));
}
void MessageLogWidget::logDumpZone(Player *player, CardZone *zone, Player *zoneOwner, int numberCards)
void MessageLogWidget::logDumpZone(Player *player, CardZone *zone, int numberCards)
{
if (numberCards != -1)
append(tr("%1 is looking at the top %2 cards %3.").arg(sanitizeHtml(player->getName())).arg(numberCards).arg(trZoneName(zone, zoneOwner, zoneOwner == player, CaseGenitive)));
append(tr("%1 is looking at the top %2 cards %3.").arg(sanitizeHtml(player->getName())).arg(numberCards).arg(zone->getTranslatedName(zone->getPlayer() == player, CaseGenitive)));
else
append(tr("%1 is looking at %2.").arg(sanitizeHtml(player->getName())).arg(trZoneName(zone, zoneOwner, zoneOwner == player, CaseAccusative)));
append(tr("%1 is looking at %2.").arg(sanitizeHtml(player->getName())).arg(zone->getTranslatedName(zone->getPlayer() == player, CaseAccusative)));
}
void MessageLogWidget::logStopDumpZone(Player *player, CardZone *zone, Player *zoneOwner)
void MessageLogWidget::logStopDumpZone(Player *player, CardZone *zone)
{
QString zoneName = trZoneName(zone, zoneOwner, zoneOwner == player, CaseAccusative);
QString zoneName = zone->getTranslatedName(zone->getPlayer() == player, CaseAccusative);
append(tr("%1 stops looking at %2.").arg(sanitizeHtml(player->getName())).arg(zoneName));
}
......@@ -283,8 +260,8 @@ void MessageLogWidget::connectToGame(Game *game)
connect(game, SIGNAL(logSetTapped(Player *, QString, bool)), this, SLOT(logSetTapped(Player *, QString, bool)));
connect(game, SIGNAL(logSetCounter(Player *, QString, int, int)), this, SLOT(logSetCounter(Player *, QString, int, int)));
connect(game, SIGNAL(logSetDoesntUntap(Player *, QString, bool)), this, SLOT(logSetDoesntUntap(Player *, QString, bool)));
connect(game, SIGNAL(logDumpZone(Player *, CardZone *, Player *, int)), this, SLOT(logDumpZone(Player *, CardZone *, Player *, int)));
connect(game, SIGNAL(logStopDumpZone(Player *, CardZone *, Player *)), this, SLOT(logStopDumpZone(Player *, CardZone *, Player *)));
connect(game, SIGNAL(logDumpZone(Player *, CardZone *, int)), this, SLOT(logDumpZone(Player *, CardZone *, int)));
connect(game, SIGNAL(logStopDumpZone(Player *, CardZone *)), this, SLOT(logStopDumpZone(Player *, CardZone *)));
connect(game, SIGNAL(logSetActivePlayer(Player *)), this, SLOT(logSetActivePlayer(Player *)));
connect(game, SIGNAL(setActivePhase(int)), this, SLOT(logSetActivePhase(int)));
......
......@@ -4,6 +4,7 @@
#include <QPlainTextEdit>
#include <QAbstractSocket>
#include "client.h"
#include "translation.h"
class Game;
class Player;
......@@ -12,7 +13,6 @@ class CardZone;
class MessageLogWidget : public QTextEdit {
Q_OBJECT
private:
enum GrammaticalCase { /*CaseNominative, */CaseGenitive, CaseAccusative };
QString sanitizeHtml(QString dirty) const;
QString trZoneName(CardZone *zone, Player *player, bool hisOwn, GrammaticalCase gc) const;
public slots:
......@@ -37,8 +37,8 @@ private slots:
void logSetTapped(Player *player, QString cardName, bool tapped);
void logSetCounter(Player *player, QString counterName, int value, int oldValue);
void logSetDoesntUntap(Player *player, QString cardName, bool doesntUntap);
void logDumpZone(Player *player, CardZone *zone, Player *zoneOwner, int numberCards);
void logStopDumpZone(Player *player, CardZone *zone, Player *zoneOwner);
void logDumpZone(Player *player, CardZone *zone, int numberCards);
void logStopDumpZone(Player *player, CardZone *zone);
void logSetActivePlayer(Player *player);
void logSetActivePhase(int phase);
void msgAlert();
......
......@@ -3,7 +3,7 @@
#include "cardzone.h"
class TableZone : public QObject, public CardZone {
class TableZone : public CardZone {
Q_OBJECT
signals:
void sizeChanged();
......
#ifndef TRANSLATION_H
#define TRANSLATION_H
enum GrammaticalCase { CaseNominative, CaseGenitive, CaseAccusative };
#endif
......@@ -215,6 +215,7 @@ void MainWindow::retranslateUi()
gameSelector->retranslateUi();
if (game)
game->retranslateUi();
zoneLayout->retranslateUi();
}
void MainWindow::createActions()
......
......@@ -20,14 +20,17 @@ void ZoneViewLayout::reorganize()
qreal x, y;
views.at(0)->getWindowFrameMargins(&x, &y, 0, 0);
qreal totalWidth = x;
qreal totalHeight = 0;
for (int i = 0; i < views.size(); i++) {
QRectF viewSize = views.at(i)->windowFrameRect();
qreal w = viewSize.right() - viewSize.left();
// qreal h = viewSize.bottom() - viewSize.top();
qreal h = viewSize.bottom() - viewSize.top();
views.at(i)->setPos(totalWidth, y);
totalWidth += w;
if (h > totalHeight)
totalHeight = h;
}
resize(totalWidth, scene()->sceneRect().height());
resize(totalWidth, totalHeight);
emit sizeChanged();
}
......@@ -45,6 +48,7 @@ void ZoneViewLayout::toggleZoneView(Player *player, const QString &zoneName, int
ZoneViewWidget *item = new ZoneViewWidget(db, player, player->getZones()->findZone(zoneName), numberCards, this);
views.append(item);
connect(item, SIGNAL(closePressed(ZoneViewWidget *)), this, SLOT(removeItem(ZoneViewWidget *)));
connect(item, SIGNAL(sizeChanged()), this, SLOT(reorganize()));
reorganize();
}
......@@ -69,6 +73,12 @@ void ZoneViewLayout::closeMostRecentZoneView()
void ZoneViewLayout::clear()
{
for (int i = views.size() - 1; i >= 0; i--)
for (int i = views.size() - 1; i >= 0; --i)
views.at(i)->close();
}
void ZoneViewLayout::retranslateUi()
{
for (int i = views.size() - 1; i >= 0; --i)
views.at(i)->retranslateUi();
}
......@@ -17,12 +17,13 @@ private:
CardDatabase *db;
public:
ZoneViewLayout(CardDatabase *_db, QGraphicsItem *parent = 0);
void reorganize();
void retranslateUi();
public slots:
void toggleZoneView(Player *player, const QString &zoneName, int numberCards = 0);
void removeItem(ZoneViewWidget *item);
void removeItem(ZoneViewZone *item);
void closeMostRecentZoneView();
void reorganize();
void clear();
};
......
......@@ -5,62 +5,82 @@
#include "zoneviewzone.h"
#include "player.h"
#include "client.h"
#include "gamescene.h"
ZoneViewWidget::ZoneViewWidget(CardDatabase *_db, Player *_player, CardZone *_origZone, int numberCards, QGraphicsItem *parent)
: QGraphicsWidget(parent, Qt::Tool | Qt::CustomizeWindowHint | Qt::WindowSystemMenuHint | Qt::WindowTitleHint/* | Qt::WindowCloseButtonHint*/), db(_db), player(_player)
{
setWindowTitle(QString("%1's %2").arg(player->getName()).arg(_origZone->getName()));
setAttribute(Qt::WA_DeleteOnClose);
QFont font;
font.setPixelSize(8);
setFont(font);
qreal y = 10;
QGraphicsLinearLayout *vbox = new QGraphicsLinearLayout(Qt::Vertical);
setLayout(vbox);
sortCheckBox = new QCheckBox;
QGraphicsProxyWidget *sortProxy = new QGraphicsProxyWidget;
sortProxy->setWidget(sortCheckBox);
vbox->addItem(sortProxy);
if (_origZone->getIsShufflable() && (numberCards == -1)) {
shuffleCheckBox = new QCheckBox("shuffle when closing");
shuffleCheckBox = new QCheckBox;
shuffleCheckBox->setChecked(true);
QGraphicsProxyWidget *shuffleProxy = new QGraphicsProxyWidget(this);
QGraphicsProxyWidget *shuffleProxy = new QGraphicsProxyWidget;
shuffleProxy->setWidget(shuffleCheckBox);
y += shuffleProxy->y() + shuffleProxy->size().height();
vbox->addItem(shuffleProxy);
} else
shuffleCheckBox = 0;
qreal left, top, right, bottom;
getWindowFrameMargins(&left, &top, &right, &bottom);
qreal h = scene()->sceneRect().height() - (top + bottom);
scrollBar = new QScrollBar(Qt::Vertical);
/* scrollBar = new QScrollBar(Qt::Vertical);
QGraphicsProxyWidget *scrollProxy = new QGraphicsProxyWidget(this);
scrollProxy->setWidget(scrollBar);
scrollProxy->setPos(138, y);
scrollProxy->resize(scrollProxy->size().width(), h - y);
qreal w = 138 + scrollProxy->size().width();
*/qreal w = 138;
resize(w, h);
setMinimumSize(w, h);
setMaximumSize(w, h);
zone = new ZoneViewZone(player, _origZone, numberCards, this);
zone->setPos(3, y);
zone->setHeight((int) (h - y));
if (!zone->initializeCards()) {
connect(player->client, SIGNAL(zoneDumpReceived(int, QList<ServerZoneCard *>)), this, SLOT(zoneDumpReceived(int, QList<ServerZoneCard *>)));
PendingCommand *dumpZoneCommand = player->client->dumpZone(player->getId(), _origZone->getName(), numberCards);
cmdId = dumpZoneCommand->getMsgId();
}
connect(sortCheckBox, SIGNAL(stateChanged(int)), zone, SLOT(setSortingEnabled(int)));
connect(zone, SIGNAL(contentsChanged()), this, SLOT(resizeToZoneContents()));
zone->dumpObjectInfo();
vbox->addItem(zone);
zone->initializeCards();
QSettings settings;
sortCheckBox->setChecked(settings.value("zoneview/sorting").toInt());
retranslateUi();
}
void ZoneViewWidget::zoneDumpReceived(int commandId, QList<ServerZoneCard *> cards)
void ZoneViewWidget::retranslateUi()
{
if (commandId != cmdId)
return;
for (int i = 0; i < cards.size(); i++) {
ServerZoneCard *temp = cards[i];
CardItem *card = new CardItem(db, temp->getName(), i, zone);
zone->addCard(card, false, i);
setWindowTitle(zone->getTranslatedName(false, CaseNominative));
sortCheckBox->setText(tr("sort alphabetically"));
if (shuffleCheckBox)
shuffleCheckBox->setText(tr("shuffle when closing"));
}
delete temp;
}
zone->reorganizeCards();
void ZoneViewWidget::resizeToZoneContents()
{
qDebug("+++++++ bla");
int cardCount = zone->getCards().size();
const QRectF &playersRect = static_cast<GameScene *>(scene())->getPlayersRect();
int h = 0;
if (cardCount * CARD_HEIGHT / 5 < playersRect.height() * 1.5)
h = cardCount * CARD_HEIGHT / 5;
else
h = playersRect.height() * 1.5;
qDebug(QString("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx resizing to %1").arg(h).toLatin1());
resize(size().width(), h);
emit sizeChanged();
}
void ZoneViewWidget::closeEvent(QCloseEvent *event)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment