Esempio n. 1
0
void miniQmp::Show( bool nearTray )
{
	if ( fs.ui.naf1Box->isChecked() && dockVis )
		setQVisIcon();
	else
		setStandardIcon();

	if ( nearTray )
		W = 0;

	setParent(NULL);

	setWindowFlags( Qt::ToolTip );
#ifdef Q_OS_MAC
	if ( nearTray )
		setWindowFlags( Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint );
#endif

	move( qdw.width(), qdw.height() );
	show();
	resize( W, 0 );

	Size = ui.mPS->size();
	if ( dockVis )
		showSlider();

	if ( nearTray )
	{
#ifndef Q_OS_MAC
		ObjectPos oPos = (ObjectPos)getTrayPos();
		if ( oPos == None )
			move( qdw.width() / 2 - width() / 2, qdw.height() / 2 - height() / 2 );
		else if ( oPos == Bottom )
			move( tray.geometry().x() - width() / 2, qdw.availableGeometry().height() - height() );
		else if ( oPos == Top )
			move( tray.geometry().x() - width() / 2, qdw.height() - qdw.availableGeometry().height() );
		else if ( oPos == Left )
			move( qdw.width() - qdw.availableGeometry().width(), tray.geometry().y() - height() / 2 );
		else if ( oPos == Right )
			move( qdw.availableGeometry().width() - width(), tray.geometry().y() - height() / 2 );
#else
		move( tray.geometry().x() - width() / 2, 22 );
#endif

		if ( x() < 0 )
			move( 0, y() );
		else if ( x() + width() > qdw.availableGeometry().width() )
			move( qdw.availableGeometry().width() - width(), y() );
	}
	else
		move( pos );
}
Esempio n. 2
0
//-----------------------------------------------------------------------------
void setStandardIcons(QDialogButtonBox* buttons)
{
  setStandardIcon(buttons, QDialogButtonBox::Ok, "okay");
  setStandardIcon(buttons, QDialogButtonBox::Cancel, "cancel");
  setStandardIcon(buttons, QDialogButtonBox::Apply, "apply");
  setStandardIcon(buttons, QDialogButtonBox::Reset, "reset");
  setStandardIcon(buttons, QDialogButtonBox::RestoreDefaults, "reset");
  setStandardIcon(buttons, QDialogButtonBox::Close, "close");
}
Esempio n. 3
0
void miniQmp::hideEvent(QHideEvent*)
{
	setStandardIcon();
	showSliderInF1();
	standardIcon = false;
}