示例#1
0
BOOL LLFloaterMap::handleDoubleClick(S32 x, S32 y, MASK mask)
{
	// If floater is minimized, minimap should be shown on doubleclick (STORM-299)
	if (isMinimized())
	{
		setMinimized(FALSE);
		return TRUE;
	}

	LLVector3d pos_global = mMap->viewPosToGlobal(x, y);
	
	// <FS:Ansariel> Synchronize double click handling throughout instances
	//// If we're not tracking a beacon already, double-click will set one 
	//if (!LLTracker::isTracking(NULL))
	//{
	//	LLFloaterWorldMap* world_map = LLFloaterWorldMap::getInstance();
	//	if (world_map)
	//	{
	//		world_map->trackLocation(pos_global);
	//	}
	//}
	//
	//if (gSavedSettings.getBOOL("DoubleClickTeleport"))
	//{
	//	// If DoubleClickTeleport is on, double clicking the minimap will teleport there
	//	gAgent.teleportViaLocationLookAt(pos_global);
	//}
	//else if (gSavedSettings.getBOOL("DoubleClickShowWorldMap"))
	//{
	//	LLFloaterReg::showInstance("world_map");
	//}
	mMap->performDoubleClickAction(pos_global);
	// </FS:Ansariel> Synchronize double click handling throughout instances
    return TRUE;
}
示例#2
0
// virtual
void LLFloaterTools::onClose(bool app_quitting)
{
	setMinimized(FALSE);
	setVisible(FALSE);
	mTab->setVisible(FALSE);

	LLViewerJoystick::getInstance()->moveAvatar(false);

    // Different from handle_reset_view in that it doesn't actually 
	//   move the camera if EditCameraMovement is not set.
	gAgent.resetView(gSavedSettings.getBOOL("EditCameraMovement"));
	
	// exit component selection mode
	LLSelectMgr::getInstance()->promoteSelectionToRoot();
	gSavedSettings.setBOOL("EditLinkedParts", FALSE);

	gViewerWindow->showCursor();

	resetToolState();

	mParcelSelection = NULL;
	mObjectSelection = NULL;

	// Switch back to basic toolset
	LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset);
	// we were already in basic toolset, using build tools
	// so manually reset tool to default (pie menu tool)
	LLToolMgr::getInstance()->getCurrentToolset()->selectFirstTool();

	// gMenuBarView->setItemVisible(std::string("Tools"), FALSE);
	// gMenuBarView->arrange();
}
void QSkinDialog::changeEvent(QEvent* e)
{
	QDialog::changeEvent(e);
	switch(e->type())
	{
		case QEvent::LanguageChange:
		{
			QIcon m_windowIcon = windowIcon();
			QString m_windowTitle = windowTitle();
			ui->retranslateUi(this);
			setWindowIcon(m_windowIcon);
			setWindowTitle(m_windowTitle);
			break;
		}
		case QEvent::ActivationChange:
			if(minimized && qApp->activeWindow())
			{
				setMinimized(false);
			}
			repaint();
			break;
		default:
			break;
	}
}
示例#4
0
void LLMultiFloater::onClose(bool app_quitting)
{
	if(isMinimized())
	{
		setMinimized(FALSE);
	}
	LLFloater::onClose(app_quitting);
}
示例#5
0
void LLFloaterIMPanel::closeIfNotPinned()
{
	if (gSavedSettings.getBOOL("PinTalkViewOpen")) return;

	if (getParent() == gFloaterView) // Just minimize, if popped out
		setMinimized(true);
	else
		gIMMgr->toggle();
}
void QSkinDialog::onMinimize()
{
	if(isMainDialog && quazaaSettings.System.MinimizeToTray)
	{
		hide();
	}
	else
	{
		setMinimized(!minimized);
	}
}
示例#7
0
// virtual
void LLFloaterTools::onClose(bool app_quitting)
{
	setMinimized(FALSE);
	setVisible(FALSE);
	mTab->setVisible(FALSE);

	LLViewerJoystick::getInstance()->moveAvatar(false);

    // Different from handle_reset_view in that it doesn't actually 
	//   move the camera if EditCameraMovement is not set.
	gAgent.resetView(gSavedSettings.getBOOL("EditCameraMovement"));
	
	// exit component selection mode
	LLSelectMgr::getInstance()->promoteSelectionToRoot();
	gSavedSettings.setBOOL("EditLinkedParts", FALSE);
	//Banana:KC - restore show highlight state
	gSavedSettings.setBOOL("PhoenixRenderHighlightSelections", mShowHighlight);
	LLSelectMgr::getInstance()->enableSilhouette(mShowHighlight);
	
	gViewerWindow->showCursor();

	resetToolState();

	if (!LLFloaterLand::isOpen())
	{
	mParcelSelection = NULL;
	}
	mObjectSelection = NULL;

	if (!gAgent.cameraMouselook())
	{
		// Switch back to basic toolset
		LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset);
		// we were already in basic toolset, using build tools
		// so manually reset tool to default (pie menu tool)
		LLToolMgr::getInstance()->getCurrentToolset()->selectFirstTool();
	}
	else 
	{
		// Switch back to mouselook toolset
		LLToolMgr::getInstance()->setCurrentToolset(gMouselookToolset);

		gViewerWindow->hideCursor();
		gViewerWindow->moveCursorToCenter();
	}

	// gMenuBarView->setItemVisible(std::string("Tools"), FALSE);
	// gMenuBarView->arrange();
}
void QSkinDialog::restore()
{
	if(minimized)
	{
		setMinimized(false);
		emit needToShow();
	}
	else if(isHidden())
	{
		show();
	}
	else
	{
		emit needToShow();
	}
}
LLFloaterDirectory::~LLFloaterDirectory()
{
	sInstance = NULL;

	//Note: this function is defined in the class LLFloater.
	//however, it causes crash if this line is postponed to ~LLFloater(). 
	//because it uses some pointers deleted below. That is, those pointers are used again after deleting.
	setMinimized( FALSE );

	delete mPanelAvatarp; mPanelAvatarp = NULL;
	delete mPanelEventp; mPanelEventp = NULL;
	delete mPanelGroupp; mPanelGroupp = NULL;
	delete mPanelGroupHolderp; mPanelGroupHolderp = NULL;
	delete mPanelPlacep; mPanelPlacep = NULL;
	delete mPanelPlaceSmallp; mPanelPlaceSmallp = NULL;
	delete mPanelClassifiedp; mPanelClassifiedp = NULL;
	gSavedSettings.setBOOL("ShowDirectory", FALSE);
}
void LLFloaterPathfindingObjects::showFloaterWithSelectionObjects()
{
	mObjectsToBeSelected.clear();

	LLObjectSelectionHandle selectedObjectsHandle = LLSelectMgr::getInstance()->getSelection();
	if (selectedObjectsHandle.notNull())
	{
		LLObjectSelection *selectedObjects = selectedObjectsHandle.get();
		if (!selectedObjects->isEmpty())
		{
			for (LLObjectSelection::valid_iterator objectIter = selectedObjects->valid_begin();
				objectIter != selectedObjects->valid_end(); ++objectIter)
			{
				LLSelectNode *object = *objectIter;
				LLViewerObject *viewerObject = object->getObject();
				mObjectsToBeSelected.push_back(viewerObject->getID());
			}
		}
	}
	mHasObjectsToBeSelected = true;

	if (!getVisible())
	{
		open();
		setVisibleAndFrontmost();
	}
	else
	{
		rebuildObjectsScrollList();
		if (isMinimized())
		{
			setMinimized(FALSE);
		}
		setVisibleAndFrontmost();
	}
	setFocus(TRUE);
}
示例#11
0
void CardInfoWidget::minimizeClicked(int newMinimized)
{
	// Set new status, and store it in the settings cache.
	setMinimized(newMinimized);
	settingsCache->setCardInfoMinimized(newMinimized);
}
示例#12
0
CardInfoWidget::CardInfoWidget(ResizeMode _mode, const QString &cardName, QWidget *parent, Qt::WindowFlags flags)
	: QFrame(parent, flags)
	, pixmapWidth(0)
	, aspectRatio((qreal) CARD_HEIGHT / (qreal) CARD_WIDTH)
	, minimized(settingsCache->getCardInfoMinimized()) // Initialize the cardinfo view status from cache.
	, mode(_mode)
	, info(0)
{
	if (mode == ModeGameTab) {
		// Create indexed list of status views for card.
		const QStringList cardInfoStatus = QStringList() << tr("Show card only") << tr("Show text only") << tr("Show full info");
		
		// Create droplist for cardinfo view selection, and set right current index.
		dropList = new QComboBox();
		dropList->addItems(cardInfoStatus);
		dropList->setCurrentIndex(minimized);
		connect(dropList, SIGNAL(currentIndexChanged(int)), this, SLOT(minimizeClicked(int)));
	}

	cardPicture = new QLabel;
	cardPicture->setAlignment(Qt::AlignCenter);

	nameLabel1 = new QLabel;
	nameLabel2 = new QLabel;
	nameLabel2->setWordWrap(true);
	manacostLabel1 = new QLabel;
	manacostLabel2 = new QLabel;
	manacostLabel2->setWordWrap(true);
	cardtypeLabel1 = new QLabel;
	cardtypeLabel2 = new QLabel;
	cardtypeLabel2->setWordWrap(true);
	powtoughLabel1 = new QLabel;
	powtoughLabel2 = new QLabel;
	loyaltyLabel1 = new QLabel;
	loyaltyLabel2 = new QLabel;

	textLabel = new QTextEdit();
	textLabel->setReadOnly(true);

	QGridLayout *grid = new QGridLayout(this);
	int row = 0;
	if (mode == ModeGameTab)
		grid->addWidget(dropList, row++, 1, 1, 1, Qt::AlignRight);
	grid->addWidget(cardPicture, row++, 0, 1, 2);
	grid->addWidget(nameLabel1, row, 0);
	grid->addWidget(nameLabel2, row++, 1);
	grid->addWidget(manacostLabel1, row, 0);
	grid->addWidget(manacostLabel2, row++, 1);
	grid->addWidget(cardtypeLabel1, row, 0);
	grid->addWidget(cardtypeLabel2, row++, 1);
	grid->addWidget(powtoughLabel1, row, 0);
	grid->addWidget(powtoughLabel2, row++, 1);
	grid->addWidget(loyaltyLabel1, row, 0);
	grid->addWidget(loyaltyLabel2, row++, 1);
	grid->addWidget(textLabel, row, 0, -1, 2);
	grid->setRowStretch(row, 1);
	grid->setColumnStretch(1, 1);

	retranslateUi();
	setFrameStyle(QFrame::Panel | QFrame::Raised);
	if (mode == ModeGameTab) {
		textLabel->setMinimumHeight(100);
		setFixedWidth(sizeHint().width());
	} else if (mode == ModePopUp) {
		QDesktopWidget desktopWidget;
		pixmapWidth = desktopWidget.screenGeometry().height() / 3 / aspectRatio;
		setFixedWidth(pixmapWidth + 150);
	} else
		setFixedWidth(250);
	
	setCard(db->getCard(cardName));
	setMinimized(settingsCache->getCardInfoMinimized());
}