Esempio n. 1
0
ZoneViewZone::~ZoneViewZone()
{
    emit beingDeleted();
    qDebug("ZoneViewZone destructor");
    if (!(revealZone && !writeableRevealZone))
        origZone->setView(NULL);
}
Esempio n. 2
0
WRasterImage::~WRasterImage()
{
  beingDeleted();
  delete impl_->canvas_;
  delete impl_->device_;
  delete impl_->bitmap_;
  delete impl_;
}
Esempio n. 3
0
WPdfImage::~WPdfImage()
{
  beingDeleted();

  if (myPdf_)
    HPDF_Free(pdf_);

  delete trueTypeFonts_;
}
Esempio n. 4
0
OAuthTokenEndpoint::~OAuthTokenEndpoint()
{
  beingDeleted();
#ifndef WT_TARGET_JAVA
#ifdef WT_WITH_SSL
  if (privateKey)
    RSA_free(privateKey);
#endif // WT_WITH_SSL
#endif // WT_TARGET_JAVA
}
Esempio n. 5
0
ZoneViewWidget::ZoneViewWidget(Player *_player, CardZone *_origZone, int numberCards, bool _revealZone, const QList<ServerInfo_Card *> &cardList)
	: QGraphicsWidget(0, Qt::Tool | Qt::CustomizeWindowHint | Qt::WindowSystemMenuHint | Qt::WindowTitleHint/* | Qt::WindowCloseButtonHint*/), player(_player)
{
	setAttribute(Qt::WA_DeleteOnClose);
	setZValue(2000000006);
	
	QFont font;
	font.setPixelSize(10);
	setFont(font);

	QGraphicsLinearLayout *vbox = new QGraphicsLinearLayout(Qt::Vertical);
	
	if (numberCards < 0) {
		sortByNameCheckBox = new QCheckBox;
		QGraphicsProxyWidget *sortByNameProxy = new QGraphicsProxyWidget;
		sortByNameProxy->setWidget(sortByNameCheckBox);
		vbox->addItem(sortByNameProxy);

		sortByTypeCheckBox = new QCheckBox;
		QGraphicsProxyWidget *sortByTypeProxy = new QGraphicsProxyWidget;
		sortByTypeProxy->setWidget(sortByTypeCheckBox);
		vbox->addItem(sortByTypeProxy);
	} else {
		sortByNameCheckBox = 0;
		sortByTypeCheckBox = 0;
	}
	
	if (_origZone->getIsShufflable() && (numberCards == -1)) {
		shuffleCheckBox = new QCheckBox;
		shuffleCheckBox->setChecked(true);
		QGraphicsProxyWidget *shuffleProxy = new QGraphicsProxyWidget;
		shuffleProxy->setWidget(shuffleCheckBox);
		vbox->addItem(shuffleProxy);
	} else
		shuffleCheckBox = 0;
	
	extraHeight = vbox->sizeHint(Qt::PreferredSize).height();
	resize(150, 150);

	zone = new ZoneViewZone(player, _origZone, numberCards, _revealZone, this);
	connect(zone, SIGNAL(optimumRectChanged()), this, SLOT(resizeToZoneContents()));
	connect(zone, SIGNAL(beingDeleted()), this, SLOT(zoneDeleted()));
	vbox->addItem(zone);
	zone->initializeCards(cardList);
	
	if (sortByNameCheckBox) {
		connect(sortByNameCheckBox, SIGNAL(stateChanged(int)), zone, SLOT(setSortByName(int)));
		connect(sortByTypeCheckBox, SIGNAL(stateChanged(int)), zone, SLOT(setSortByType(int)));
		sortByNameCheckBox->setChecked(settingsCache->getZoneViewSortByName());
		sortByTypeCheckBox->setChecked(settingsCache->getZoneViewSortByType());
	}

	setLayout(vbox);
	retranslateUi();
}
Esempio n. 6
0
File: WResource.C Progetto: bend/wt
WResource::~WResource()
{
  beingDeleted();

  WApplication *app = WApplication::instance();
  if (app) {
    app->removeExposedResource(this);
    if (trackUploadProgress_)
      WebSession::instance()->controller()->removeUploadProgressUrl(url());
  }
}
Esempio n. 7
0
void ZoneViewWidget::closeEvent(QCloseEvent *event)
{
	disconnect(zone, SIGNAL(beingDeleted()), this, 0);
	if (zone->getNumberCards() != -2)
		player->sendGameCommand(new Command_StopDumpZone(-1, player->getId(), zone->getName()));
	if (shuffleCheckBox)
		if (shuffleCheckBox->isChecked())
			player->sendGameCommand(new Command_Shuffle);
	emit closePressed(this);
	deleteLater();
	event->accept();
}
Esempio n. 8
0
WPdfImage::~WPdfImage()
{
  beingDeleted();

  if (myPdf_) {
    // clear graphics state stack to avoid leaking memory in libharu
    // see bug #3979
    HPDF_Page page = HPDF_GetCurrentPage(pdf_);
    if (page)
      while (HPDF_Page_GetGStateDepth(page) > 1)
        HPDF_Page_GRestore(page);
    HPDF_Free(pdf_);
  }

  delete trueTypeFonts_;
}
Esempio n. 9
0
void ZoneViewWidget::closeEvent(QCloseEvent *event)
{
    disconnect(zone, SIGNAL(beingDeleted()), this, 0);
    if (zone->getNumberCards() != -2) {
        Command_StopDumpZone cmd;
        cmd.set_player_id(player->getId());
        cmd.set_zone_name(zone->getName().toStdString());
        player->sendGameCommand(cmd);
    }
    if (shuffleCheckBox)
        if (shuffleCheckBox->isChecked())
            player->sendGameCommand(Command_Shuffle());
    emit closePressed(this);
    deleteLater();
    event->accept();
}
Esempio n. 10
0
WRestResource::~WRestResource()
{
  beingDeleted();
}
Esempio n. 11
0
DataStore::~DataStore()
{
  beingDeleted();
}
Esempio n. 12
0
 virtual ~CornerResource()
 {
   beingDeleted();
 }
    if (numberCards < 0) {
        connect(&sortByNameCheckBox, SIGNAL(stateChanged(int)), this, SLOT(processSortByName(int)));
        connect(&sortByTypeCheckBox, SIGNAL(stateChanged(int)), this, SLOT(processSortByType(int)));
        connect(&pileViewCheckBox, SIGNAL(stateChanged(int)), this, SLOT(processSetPileView(int)));
        sortByNameCheckBox.setChecked(settingsCache->getZoneViewSortByName());
        sortByTypeCheckBox.setChecked(settingsCache->getZoneViewSortByType());
        pileViewCheckBox.setChecked(settingsCache->getZoneViewPileView());
        if (!settingsCache->getZoneViewSortByType())
            pileViewCheckBox.setEnabled(false);
    }

    retranslateUi();
    setLayout(vbox);

    connect(zone, SIGNAL(optimumRectChanged()), this, SLOT(resizeToZoneContents()));
    connect(zone, SIGNAL(beingDeleted()), this, SLOT(zoneDeleted()));
    zone->initializeCards(cardList);
}

void ZoneViewWidget::processSortByType(int value) {
    pileViewCheckBox.setEnabled(value);
    settingsCache->setZoneViewSortByType(value);
    zone->setPileView(pileViewCheckBox.isChecked());
    zone->setSortByType(value);
}

void ZoneViewWidget::processSortByName(int value) {
    settingsCache->setZoneViewSortByName(value);
    zone->setSortByName(value);
}
Esempio n. 14
0
 ~MapResource() {
     beingDeleted();
 }
Esempio n. 15
0
    ~MyResource() {
	beingDeleted();
    }
Esempio n. 16
0
PrintResource::~PrintResource()
{
    beingDeleted(); // see "Concurrency issues" below.
}
Esempio n. 17
0
ZoneViewWidget::ZoneViewWidget(Player *_player, CardZone *_origZone, int numberCards, bool _revealZone, const QList<ServerInfo_Card *> &cardList)
	: QGraphicsWidget(0, Qt::Tool | Qt::FramelessWindowHint), player(_player)
{
	setAcceptHoverEvents(true);
	setAttribute(Qt::WA_DeleteOnClose);
	setZValue(2000000006);
	setFlag(ItemIgnoresTransformations);
	
	QGraphicsLinearLayout *hbox = new QGraphicsLinearLayout(Qt::Horizontal);
	titleLabel = new TitleLabel;
	connect(titleLabel, SIGNAL(mouseMoved(QPointF)), this, SLOT(moveWidget(QPointF)));
	closeButton = new QPushButton("X");
	connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));
	closeButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
	QGraphicsProxyWidget *closeButtonProxy = new QGraphicsProxyWidget;
	closeButtonProxy->setWidget(closeButton);
	
	hbox->addItem(titleLabel);
	hbox->addItem(closeButtonProxy);
	QGraphicsLinearLayout *vbox = new QGraphicsLinearLayout(Qt::Vertical);
	
	vbox->addItem(hbox);
	
	if (numberCards < 0) {
		sortByNameCheckBox = new QCheckBox;
		QGraphicsProxyWidget *sortByNameProxy = new QGraphicsProxyWidget;
		sortByNameProxy->setWidget(sortByNameCheckBox);
		vbox->addItem(sortByNameProxy);

		sortByTypeCheckBox = new QCheckBox;
		QGraphicsProxyWidget *sortByTypeProxy = new QGraphicsProxyWidget;
		sortByTypeProxy->setWidget(sortByTypeCheckBox);
		vbox->addItem(sortByTypeProxy);
	} else {
		sortByNameCheckBox = 0;
		sortByTypeCheckBox = 0;
	}
	
	if (_origZone->getIsShufflable() && (numberCards == -1)) {
		shuffleCheckBox = new QCheckBox;
		shuffleCheckBox->setChecked(true);
		QGraphicsProxyWidget *shuffleProxy = new QGraphicsProxyWidget;
		shuffleProxy->setWidget(shuffleCheckBox);
		vbox->addItem(shuffleProxy);
	} else
		shuffleCheckBox = 0;
	
	extraHeight = vbox->sizeHint(Qt::PreferredSize).height();
	resize(150, 150);

	zone = new ZoneViewZone(player, _origZone, numberCards, _revealZone, this);
	vbox->addItem(zone);
	
	if (sortByNameCheckBox) {
		connect(sortByNameCheckBox, SIGNAL(stateChanged(int)), zone, SLOT(setSortByName(int)));
		connect(sortByTypeCheckBox, SIGNAL(stateChanged(int)), zone, SLOT(setSortByType(int)));
		sortByNameCheckBox->setChecked(settingsCache->getZoneViewSortByName());
		sortByTypeCheckBox->setChecked(settingsCache->getZoneViewSortByType());
	}

	retranslateUi();
	setLayout(vbox);
	
	connect(zone, SIGNAL(optimumRectChanged()), this, SLOT(resizeToZoneContents()));
	connect(zone, SIGNAL(beingDeleted()), this, SLOT(zoneDeleted()));
	zone->initializeCards(cardList);
}