Exemple #1
0
/*!
 */
void pAcquisitionWindow::setupConnections()
{
  connect(m_transportBar, SIGNAL(start()), this, SLOT(startRun()));    
  connect(m_transportBar, SIGNAL(stop()), this, SLOT(stopRun()));

  connect(m_runController, SIGNAL(runStarted()),
          this, SLOT(disableTabs()));
  connect(m_runController, SIGNAL(runStopped()),
          this, SLOT(enableTabs()));          
  connect(m_runController, SIGNAL(runStopped()), this, SLOT(stop()));
  connect(m_runController, SIGNAL(stationIdSet(int)), m_daqDisplay,
	  SLOT(updateStationId(int)));
  connect(m_runController, SIGNAL(runIdChanged(int)), m_daqDisplay,
	  SLOT(updateRunId(int)));
  connect(m_runController, SIGNAL(statusChanged(QString)), m_daqDisplay,
	  SLOT(updateStatus(QString)));
  connect(m_runController, SIGNAL(numDataBlocksChanged(int)),
	  m_daqDisplay, SLOT(updateNumDataBlocks(int)));
  connect(m_runController, SIGNAL(numEventsChanged(int)),
	  m_daqDisplay, SLOT(updateNumEvents(int)));
  connect(m_runController, SIGNAL(elapsedSecondsChanged(int)),
	  m_daqDisplay, SLOT(updateElapsedSeconds(int)));
  connect(m_runController, SIGNAL(averageEventRateChanged(double)),
	  m_daqDisplay, SLOT(updateAverageDaqRate(double)));
  //connect(m_runController, SIGNAL(instantEventRateChanged(double)),
  //m_daqDisplay, SLOT(updateInstantDaqRate(double)));
  connect(m_runController->xpolFpga(),
	  SIGNAL(vrefRead(unsigned short, double)),
	  this, SLOT(displayReference(unsigned short, double)));
  connect(m_thresholdSettingTab->getRefreshRefButton(), SIGNAL(clicked()),
  	  m_runController->xpolFpga(), SLOT(readVrefDac()));
  connect(m_userPreferencesTab, SIGNAL(visualizetionModeChanged(int)),
	  this, SLOT(changeVisualizationMode(int)));
}
Exemple #2
0
void TaskbarWnd::cacheIconicRepresentation()
{
	if ( hbm_cached_ && !::IsZoomed(doc) ) {
		return;
	}

	RECT r;
	::GetWindowRect( mol::win::mdiClient(), &r );

	RECT cr;
	::GetClientRect(  doc, &cr );
	POINT p = {cr.right,cr.bottom};
	::ClientToScreen( doc, &p );

	if ( p.y > r.bottom ) 
	{
		p.y = r.bottom;
	}
	if ( p.x > r.right ) 
	{
		p.x = r.right;
	}

	::ScreenToClient( doc, &p );

	// snap
	Gdiplus::Bitmap src(p.x, p.y, PixelFormat32bppPARGB );
	{
		Gdiplus::Graphics gsnap( &src );
		gsnap.Clear( 0x00ffffff );

		HDC mem = gsnap.GetHDC();
		BOOL bret = PrintWindow2( doc, mem, 1 );
		gsnap.Flush();
		gsnap.ReleaseHDC(mem);
	}

	if ( hbm_cached_ ) 
	{
		::DeleteObject( (HGDIOBJ)hbm_cached_);
	}
	src.GetHBITMAP(Gdiplus::Color::Black, &hbm_cached_);

	enableTabs(true);
	DwmInvalidateIconicBitmaps(*this);

}
Exemple #3
0
LRESULT TaskbarWnd::wndProc( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam )
{
    LRESULT lResult = 0;

    switch (message)
    {
        case WM_CREATE:
        {
			enableTabs(false);
			tbl_->RegisterTab(*this,tb_->parent());
            break;
        }

        case WM_ACTIVATE:
		{
			if (LOWORD(wParam) == WA_ACTIVE)
            {
				tbl_->ActivateTab(*this);
				tbl_->SetTabActive( *this, tb_->parent(), 0 );
				::SetForegroundWindow(tb_->parent());

				::ShowWindow(tb_->parent(),SW_RESTORE);
				::PostMessage( mol::win::mdiClient(), WM_MDIACTIVATE, (WPARAM)(HWND)(doc), 0);
            }
            break;
		}

        case WM_SYSCOMMAND:
		{
            if (wParam != SC_CLOSE)
            {
                lResult = SendMessage( tb_->parent(), WM_SYSCOMMAND, wParam, lParam);
            }
            else
            {
                lResult = ::DefWindowProc(hWnd, message, wParam, lParam);
            }
            break;
		}
        case WM_CLOSE:
		{

			LRESULT lr = ::SendMessage(doc,WM_CLOSE,0,0);
			if ( lr == 0 )
			{
				::DestroyWindow(hWnd_);	
			}
			break;
		}

        case WM_DWMSENDICONICTHUMBNAIL:
		{
			HBITMAP bmp = GetIconicRepresentation( HIWORD(lParam), LOWORD(lParam), 2 );
			DwmSetIconicThumbnail( *this, bmp, 0);
			break;
		}

        case WM_DWMSENDICONICLIVEPREVIEWBITMAP:
		{
			sendLivePreviewBitmap();
			break;
		}
        default:
		{
            lResult = ::DefWindowProc( hWnd, message, wParam, lParam );
            break;
		}
    }

    return lResult;
}