Merge branch 'fix-deck-shuffle-check'
This commit is contained in:
commit
b608d81037
3 changed files with 3 additions and 17 deletions
|
@ -49,7 +49,6 @@ SettingsCache::SettingsCache()
|
||||||
zoneViewSortByName = settings->value("zoneview/sortbyname", true).toBool();
|
zoneViewSortByName = settings->value("zoneview/sortbyname", true).toBool();
|
||||||
zoneViewSortByType = settings->value("zoneview/sortbytype", true).toBool();
|
zoneViewSortByType = settings->value("zoneview/sortbytype", true).toBool();
|
||||||
zoneViewPileView = settings->value("zoneview/pileview", true).toBool();
|
zoneViewPileView = settings->value("zoneview/pileview", true).toBool();
|
||||||
zoneViewShuffle = settings->value("zoneview/shuffle", true).toBool();
|
|
||||||
|
|
||||||
soundEnabled = settings->value("sound/enabled", false).toBool();
|
soundEnabled = settings->value("sound/enabled", false).toBool();
|
||||||
soundPath = settings->value("sound/path").toString();
|
soundPath = settings->value("sound/path").toString();
|
||||||
|
@ -261,11 +260,6 @@ void SettingsCache::setZoneViewPileView(int _zoneViewPileView){
|
||||||
settings->setValue("zoneview/pileview", zoneViewPileView);
|
settings->setValue("zoneview/pileview", zoneViewPileView);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsCache::setZoneViewShuffle(int _zoneViewShuffle) {
|
|
||||||
zoneViewShuffle = _zoneViewShuffle;
|
|
||||||
settings->setValue("zoneview/shuffle", zoneViewShuffle);
|
|
||||||
}
|
|
||||||
|
|
||||||
void SettingsCache::setSoundEnabled(int _soundEnabled)
|
void SettingsCache::setSoundEnabled(int _soundEnabled)
|
||||||
{
|
{
|
||||||
soundEnabled = _soundEnabled;
|
soundEnabled = _soundEnabled;
|
||||||
|
|
|
@ -57,7 +57,7 @@ private:
|
||||||
int minPlayersForMultiColumnLayout;
|
int minPlayersForMultiColumnLayout;
|
||||||
bool tapAnimation;
|
bool tapAnimation;
|
||||||
bool chatMention;
|
bool chatMention;
|
||||||
bool zoneViewSortByName, zoneViewSortByType, zoneViewPileView, zoneViewShuffle;
|
bool zoneViewSortByName, zoneViewSortByType, zoneViewPileView;
|
||||||
bool soundEnabled;
|
bool soundEnabled;
|
||||||
QString soundPath;
|
QString soundPath;
|
||||||
bool priceTagFeature;
|
bool priceTagFeature;
|
||||||
|
@ -103,11 +103,6 @@ public:
|
||||||
@return zoneViewPileView if the view should be sorted into pile view.
|
@return zoneViewPileView if the view should be sorted into pile view.
|
||||||
*/
|
*/
|
||||||
bool getZoneViewPileView() const { return zoneViewPileView; }
|
bool getZoneViewPileView() const { return zoneViewPileView; }
|
||||||
/**
|
|
||||||
Returns if the view should be shuffled on closing.
|
|
||||||
@return zoneViewShuffle if the view should be shuffled on closing.
|
|
||||||
*/
|
|
||||||
bool getZoneViewShuffle() const { return zoneViewShuffle; }
|
|
||||||
bool getSoundEnabled() const { return soundEnabled; }
|
bool getSoundEnabled() const { return soundEnabled; }
|
||||||
QString getSoundPath() const { return soundPath; }
|
QString getSoundPath() const { return soundPath; }
|
||||||
bool getPriceTagFeature() const { return priceTagFeature; }
|
bool getPriceTagFeature() const { return priceTagFeature; }
|
||||||
|
@ -149,7 +144,6 @@ public slots:
|
||||||
void setZoneViewSortByName(int _zoneViewSortByName);
|
void setZoneViewSortByName(int _zoneViewSortByName);
|
||||||
void setZoneViewSortByType(int _zoneViewSortByType);
|
void setZoneViewSortByType(int _zoneViewSortByType);
|
||||||
void setZoneViewPileView(int _zoneViewPileView);
|
void setZoneViewPileView(int _zoneViewPileView);
|
||||||
void setZoneViewShuffle(int _zoneViewShuffle);
|
|
||||||
void setSoundEnabled(int _soundEnabled);
|
void setSoundEnabled(int _soundEnabled);
|
||||||
void setSoundPath(const QString &_soundPath);
|
void setSoundPath(const QString &_soundPath);
|
||||||
void setPriceTagFeature(int _priceTagFeature);
|
void setPriceTagFeature(int _priceTagFeature);
|
||||||
|
|
|
@ -101,7 +101,7 @@ ZoneViewWidget::ZoneViewWidget(Player *_player, CardZone *_origZone, int numberC
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_origZone->getIsShufflable() && (numberCards == -1)) {
|
if (_origZone->getIsShufflable() && (numberCards == -1)) {
|
||||||
shuffleCheckBox.setChecked(settingsCache->getZoneViewShuffle());
|
shuffleCheckBox.setChecked(true);
|
||||||
QGraphicsProxyWidget *shuffleProxy = new QGraphicsProxyWidget;
|
QGraphicsProxyWidget *shuffleProxy = new QGraphicsProxyWidget;
|
||||||
shuffleProxy->setWidget(&shuffleCheckBox);
|
shuffleProxy->setWidget(&shuffleCheckBox);
|
||||||
vbox->addItem(shuffleProxy);
|
vbox->addItem(shuffleProxy);
|
||||||
|
@ -227,8 +227,6 @@ void ZoneViewWidget::closeEvent(QCloseEvent *event)
|
||||||
}
|
}
|
||||||
if (shuffleCheckBox.isChecked())
|
if (shuffleCheckBox.isChecked())
|
||||||
player->sendGameCommand(Command_Shuffle());
|
player->sendGameCommand(Command_Shuffle());
|
||||||
if (canBeShuffled)
|
|
||||||
settingsCache->setZoneViewShuffle(shuffleCheckBox.isChecked());
|
|
||||||
emit closePressed(this);
|
emit closePressed(this);
|
||||||
deleteLater();
|
deleteLater();
|
||||||
event->accept();
|
event->accept();
|
||||||
|
|
Loading…
Reference in a new issue