コード例 #1
0
ファイル: mind_map_window.cpp プロジェクト: housemeow/POSD
void MindMapWindow::createUI()
{
    createCentralWidget();
    createMenuBar();
    createToolBar();
    updateUIState();
}
コード例 #2
0
BOOL CDlgRosenFileProp_Diagram::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// --------------------------------
	updateUIState() ;
	
	return TRUE;  // コントロールにフォーカスを設定しないとき、戻り値は TRUE となります
	              // 例外: OCX プロパティ ページの戻り値は FALSE となります
}
void CDlgOccupiedSelectIntersection::OnCbnSelchangeTaxiwayB()
{
	updateUIState();

	// TODO: Add your control notification handler code here
	//int nIndex = m_wndTaxiwayB.GetCurSel();
	//m_nIntersectionTaxiway2ID = m_wndTaxiwayB.GetItemData(nIndex);
	//m_wndTaxiwayB.GetLBText(nIndex,m_strIntersectionTaxiway2Name);
	//m_ComboIntersectionIndex.ResetContent();
	//GetIntersectionIndexAndIDByTaxiway2ID(m_nIntersectionTaxiway2ID);
}
コード例 #4
0
ファイル: mind_map_window.cpp プロジェクト: housemeow/POSD
void MindMapWindow::openMindMap()
{
    QString fileName = QFileDialog::getOpenFileName(this,
                       tr("Open mind map"), ".", tr("Image Files (*.mm)"));
    try {
        _mindMapPresentationModel->loadMindMap(fileName.toUtf8().constData());
    } catch (exception exception) {
        showMessageBox("Exception", exception.what());
    }
    _mindMapView->refresh();
    updateUIState();
}
コード例 #5
0
UBIntranetPodcastPublishingDialog::UBIntranetPodcastPublishingDialog(const QString& videoFilePath, QWidget *parent)
    : QDialog(parent)
{
    Q_UNUSED(videoFilePath);

    Ui::IntranetPodcastPublishingDialog::setupUi(this);

    connect(dialogButtons, SIGNAL(accepted()), this, SLOT(accept()));
    connect(dialogButtons, SIGNAL(rejected()), this, SLOT(reject()));

    connect(title, SIGNAL(textChanged(const QString&)), this, SLOT(updateUIState(const QString&)));
    connect(description, SIGNAL(textChanged()), this, SLOT(updateUIState()));
    connect(author, SIGNAL(textChanged(const QString&)), this, SLOT(updateUIState(const QString&)));

    dialogButtons->button(QDialogButtonBox::Ok)->setEnabled(false);
    dialogButtons->button(QDialogButtonBox::Ok)->setText(tr("Publish"));
}
コード例 #6
0
void GPSCorrelatorWidget::readSettingsFromGroup(const KConfigGroup* const group)
{
    d->maxGapInput->setValue(group->readEntry("Max Gap Time", 30));
    const int timeZoneGroupIndex = qMax(1, qMin(2, group->readEntry("Time Zone Mode", 1)));
    d->timeZoneGroup->button(timeZoneGroupIndex)->setChecked(true);
    d->timeZoneCB->setCurrentIndex(group->readEntry("Time Zone", 16));  // GMT+00:00
    d->interpolateBox->setChecked(group->readEntry("Interpolate", false));
    d->maxTimeInput->setValue(group->readEntry("Max Inter Dist Time", 15));
    d->offsetEnabled->setChecked(group->readEntry("Offset Enabled", false));
    d->offsetSign->setCurrentIndex(group->readEntry("Offset Sign", 0));
    d->offsetMin->setValue(group->readEntry("Offset Min", 0));
    d->offsetSec->setValue(group->readEntry("Offset Sec", 0));
    d->gpxFileOpenLastDirectory = group->readEntry("GPX File Open Last Directory", KGlobalSettings::documentPath());
    d->maxTimeLabel->setEnabled(d->interpolateBox->isChecked());
    d->maxTimeInput->setEnabled(d->interpolateBox->isChecked());

    updateUIState();
}
コード例 #7
0
ファイル: RefFreeFrame.cpp プロジェクト: dmakoto/visionblocks
void
RefFreeFrame::render( )
{
    // ** Get the image tracker
    QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance();
    QCAR::ImageTracker* imageTracker =
            static_cast<QCAR::ImageTracker*> (trackerManager.getTracker(
                    QCAR::Tracker::IMAGE_TRACKER));

    // Get the frame quality from the target builder
    QCAR::ImageTargetBuilder* targetBuilder =
            imageTracker->getImageTargetBuilder();
    QCAR::ImageTargetBuilder::FRAME_QUALITY frameQuality =
            targetBuilder->getFrameQuality();

    // Update the UI internal state variables
    updateUIState(targetBuilder, frameQuality);

    if (curStatus == STATUS_SUCCESS)
    {
        curStatus = STATUS_IDLE;

        LOG("Built target, reactivating dataset with new target");
        RefFreeFrameNative::restartTracker();
    }

    // ** Renders the hints
    switch (curStatus)
    {
    case STATUS_SCANNING:
        renderScanningViewfinder(frameQuality);
        break;

    }

    SampleUtils::checkGlError("RefFreeFrame render");
}
コード例 #8
0
ファイル: mind_map_window.cpp プロジェクト: housemeow/POSD
void MindMapWindow::createMindMap()
{
    _mindMapPresentationModel->createMindMap("");
    _mindMapView->refresh();
    updateUIState();
}
コード例 #9
0
void GPSCorrelatorWidget::setUIEnabledExternal(const bool state)
{
    d->uiEnabledExternal = state;
    updateUIState();
}
BOOL CDlgOccupiedSelectIntersection::OnInitDialog()
{
	CDialog::OnInitDialog();

	ASSERT( m_pAltNetwork != NULL );

	if(m_nIntersectionID!=-1)
	{
		IntersectionNode intersectNode;
		intersectNode.ReadData(m_nIntersectionID);

		//CString strIntersectionTaxiway1Name,strIntersectionTaxiway2Name;
		int taxiwayAID,taxiwayBID;
		taxiwayAID=taxiwayBID=-1;		
		int nFlag = 0;
		AltObjectVectorMapIter iter = m_pTaxiwayVectorMap->begin();
		for(; iter != m_pTaxiwayVectorMap->end(); iter++)
		{
			AltObjectVector& vec = iter->second;
			for(AltObjectVectorIter it = vec.begin();it != vec.end(); it++)
			{
				if( intersectNode.HasObject(it->second) )
				{
					nFlag++;
					if (nFlag==1)
					{
						//strIntersectionTaxiway1Name = it->first;
						taxiwayAID=it->second;
					}else
					{
						//strIntersectionTaxiway2Name = it->first;
						taxiwayBID=it->second;
					}

					if(nFlag == 2)
						break;
				}				
			}
			if(nFlag == 2)
				break;
		}

		
		size_t nCount = m_vectTaxiway.size();
		for(size_t i =0; i < nCount; i++)
		{
			Taxiway& aTaxiway = m_vectTaxiway.at(i);
			
			int nIndex = m_wndTaxiwayA.AddString(aTaxiway.GetMarking().c_str());

			m_wndTaxiwayA.SetItemData( nIndex, (DWORD_PTR)&aTaxiway);
		}

		int taxiwayAIndex,taxiwayBIndex;
		Taxiway* pTmpTaxiwayA;
		for (taxiwayAIndex=0;taxiwayAIndex<m_wndTaxiwayA.GetCount();taxiwayAIndex++)
		{
			pTmpTaxiwayA = (Taxiway*)m_wndTaxiwayA.GetItemData( taxiwayAIndex );
			if (pTmpTaxiwayA->getID()==taxiwayAID)
			{
				break;
			}
		}
		if(taxiwayAIndex> 0)
		{
			m_wndTaxiwayA.SetCurSel( taxiwayAIndex );
		}else
		{
			m_wndTaxiwayA.SetCurSel( 0 );
		}

		{
			int nIndex = m_wndTaxiwayA.GetCurSel();
			if(nIndex == LB_ERR)
				return true;

			Taxiway* pTaxiwayA = (Taxiway*)m_wndTaxiwayA.GetItemData( nIndex );
			ASSERT( pTaxiwayA != NULL );

			m_wndTaxiwayB.ResetContent();

			std::set<ALTObject*> vTaxiways;
			std::set<ALTObject *> vRunways;
			m_pAltNetwork->GetIntersectedTaxiwayRunway((ALTObject*)pTaxiwayA,
				vTaxiways, vRunways);

			
			for (std::set<ALTObject*>::iterator iterTaxiway = vTaxiways.begin(); 
				iterTaxiway != vTaxiways.end(); ++iterTaxiway)
			{
				ALTObject* pObj = (*iterTaxiway);
				if (pObj->GetType() != ALT_TAXIWAY)
					continue;
				Taxiway* pTaxiway = (Taxiway*)pObj;

				IntersectionNodeList twINodeList;
				m_pAltNetwork->GetTaxiwayTaxiwayIntersectNodeList(pTaxiwayA,
					(Taxiway*)(*iterTaxiway) , twINodeList);

				if (twINodeList.empty())
					continue;

				if(twINodeList.size() == 1)
				{
					TaxiwayBData* pNewData = new TaxiwayBData;
					pNewData->bJustOneIntersection = true;
					pNewData->pTaxiway = pTaxiway;
					pNewData->nNodeIndex = twINodeList[0].GetIndex();
					
					m_vectTaxiwayData.push_back( pNewData );
					int nIndex = m_wndTaxiwayB.AddString( pTaxiway->GetMarking().c_str());

					m_wndTaxiwayB.SetItemData( nIndex, (DWORD_PTR)pNewData);
					continue;

				}
				else
				{
					for (int i=0; i<(int)twINodeList.size(); i++)
					{
						TaxiwayBData* pNewData = new TaxiwayBData;
						pNewData->bJustOneIntersection = false;
						pNewData->pTaxiway = pTaxiway;
						pNewData->nNodeIndex = twINodeList[i].GetIndex();
						CString strObjMarkTemp = pTaxiway->GetMarking().c_str();
						CString strObjMark;
						strObjMark.Format("%s(%s&%d)",strObjMarkTemp,
							pTaxiwayA->GetMarking().c_str(),pNewData->nNodeIndex);
						int nIndex = m_wndTaxiwayB.AddString( strObjMark);
// 						if (pTaxiway->getID()==taxiwayBID && intersectNode.GetIndex()==pNewData->nNodeIndex)
// 						{
// 							taxiwayBIndex=nIndex;
// 						}
						m_wndTaxiwayB.SetItemData( nIndex, (DWORD_PTR)pNewData);
					}
				}

			}

			TaxiwayBData* pTmpData;
			for (taxiwayBIndex=0;taxiwayBIndex<m_wndTaxiwayB.GetCount();taxiwayBIndex++)
			{
				pTmpData = (TaxiwayBData*)m_wndTaxiwayB.GetItemData( taxiwayBIndex );
				if (pTmpData->pTaxiway->getID()==taxiwayBID && intersectNode.GetIndex()==pTmpData->nNodeIndex)
				{
					break;
				}
			}


			if(taxiwayBIndex>0)
			{
				m_wndTaxiwayB.SetCurSel( taxiwayBIndex);
			}else
			{
				m_wndTaxiwayB.SetCurSel( 0);
			}			
		}

	}else
	{
		size_t nCount = m_vectTaxiway.size();
		for(size_t i =0; i < nCount; i++)
		{
			Taxiway& aTaxiway = m_vectTaxiway.at(i);
			int nIndex = m_wndTaxiwayA.AddString(aTaxiway.GetMarking().c_str());
			m_wndTaxiwayA.SetItemData( nIndex, (DWORD_PTR)&aTaxiway);
		}


		if(nCount > 0)
		{
			m_wndTaxiwayA.SetCurSel( 0 );
		}

	}

	

	updateUIState();

//	AltObjectVectorMapIter iter = m_pTaxiwayVectorMap->begin();
//	for(; iter != m_pTaxiwayVectorMap->end(); iter++)
//	{
////		CString strAirportName = iter->first;
//
//		AltObjectVector& vec = iter->second;
//		for(AltObjectVectorIter it = vec.begin();it != vec.end(); it++)
//		{
//			CString strIntersectionTaxiway1Name = it->first;
//			int nIntersectionTaxiway1ID = it->second;
//			int nIndex = m_wndTaxiwayA.AddString(strIntersectionTaxiway1Name);
//			m_wndTaxiwayA.SetItemData(nIndex,nIntersectionTaxiway1ID);
//		}
//	}
	return TRUE;
}
void CDlgOccupiedSelectIntersection::OnCbnSelchangeTaxiwayA()
{
	int nIndex = m_wndTaxiwayA.GetCurSel();
	if(nIndex == LB_ERR)
		return;

	Taxiway* pTaxiwayA = (Taxiway*)m_wndTaxiwayA.GetItemData( nIndex );
	ASSERT( pTaxiwayA != NULL );

	m_wndTaxiwayB.ResetContent();

	std::set<ALTObject*> vTaxiways;
	std::set<ALTObject *> vRunways;
	m_pAltNetwork->GetIntersectedTaxiwayRunway((ALTObject*)pTaxiwayA,
		vTaxiways, vRunways);

	for (std::set<ALTObject*>::iterator iterTaxiway = vTaxiways.begin(); 
		iterTaxiway != vTaxiways.end(); ++iterTaxiway)
	{
		ALTObject* pObj = (*iterTaxiway);
		if (pObj->GetType() != ALT_TAXIWAY)
			continue;
		Taxiway* pTaxiway = (Taxiway*)pObj;

		IntersectionNodeList twINodeList;
		m_pAltNetwork->GetTaxiwayTaxiwayIntersectNodeList(pTaxiwayA,
			(Taxiway*)(*iterTaxiway) , twINodeList);

		if (twINodeList.empty())
			continue;

		if(twINodeList.size() == 1)
		{
			TaxiwayBData* pNewData = new TaxiwayBData;
			pNewData->bJustOneIntersection = true;
			pNewData->pTaxiway = pTaxiway;
			pNewData->nNodeIndex = twINodeList[0].GetIndex();
			m_vectTaxiwayData.push_back( pNewData );
			int nIndex = m_wndTaxiwayB.AddString( pTaxiway->GetMarking().c_str());
			m_wndTaxiwayB.SetItemData( nIndex, (DWORD_PTR)pNewData);
			continue;

		}
		else
		{
			for (int i=0; i<(int)twINodeList.size(); i++)
			{
				TaxiwayBData* pNewData = new TaxiwayBData;
				pNewData->bJustOneIntersection = false;
				pNewData->pTaxiway = pTaxiway;
				pNewData->nNodeIndex = twINodeList[i].GetIndex();
				CString strObjMarkTemp = pTaxiway->GetMarking().c_str();
				CString strObjMark;
				strObjMark.Format("%s(%s&%d)",strObjMarkTemp,
					pTaxiwayA->GetMarking().c_str(),pNewData->nNodeIndex);
				int nIndex = m_wndTaxiwayB.AddString( strObjMark);
				m_wndTaxiwayB.SetItemData( nIndex, (DWORD_PTR)pNewData);
			}
		}

	}

	m_wndTaxiwayB.SetCurSel( 0);

	updateUIState();

	



	//m_nIntersectionTaxiway1ID = m_wndTaxiwayA.GetItemData(nIndex);
 //   m_wndTaxiwayA.GetLBText(nIndex,m_strIntersectionTaxiway1Name);
	//m_wndTaxiwayB.ResetContent();
	//m_ComboIntersectionIndex.ResetContent();
	//GetTaxiway2AndIndexByTaxiway1ID(m_nIntersectionTaxiway1ID);
}
コード例 #12
0
ファイル: gpsimagedetails.cpp プロジェクト: KDE/digikam
void GPSImageDetails::displayGPSDataContainer(const GPSDataContainer* const gpsData)
{
    d->cbAltitude->setChecked(false);
    d->cbSpeed->setChecked(false);
    d->leLatitude->clear();
    d->leLongitude->clear();
    d->leAltitude->clear();
    d->leSpeed->clear();
    d->leNSatellites->clear();
    d->leDop->clear();
    d->cbCoordinates->setChecked(gpsData->hasCoordinates());

    if (gpsData->hasCoordinates())
    {
        d->leLatitude->setText(QString::number(gpsData->getCoordinates().lat(), 'f', 12));
        d->leLongitude->setText(QString::number(gpsData->getCoordinates().lon(), 'f', 12));

        const bool haveAltitude = gpsData->hasAltitude();
        d->cbAltitude->setChecked(haveAltitude);

        if (haveAltitude)
        {
            d->leAltitude->setText(QString::number(gpsData->getCoordinates().alt(), 'f', 12));
        }

        const bool haveSpeed = gpsData->hasSpeed();
        d->cbSpeed->setChecked(haveSpeed);

        if (haveSpeed)
        {
            d->leSpeed->setText(QString::number(gpsData->getSpeed(), 'f', 12));
        }

        const bool haveNSatellites = gpsData->hasNSatellites();
        d->cbNSatellites->setChecked(haveNSatellites);

        if (haveNSatellites)
        {
            /// @todo Is this enough for simple integers or do we have to use KLocale?
            d->leNSatellites->setText(QString::number(gpsData->getNSatellites()));
        }

        const int haveFixType = gpsData->hasFixType();
        d->cbFixType->setChecked(haveFixType);

        if (haveFixType)
        {
            const int fixType      = gpsData->getFixType();
            const int fixTypeIndex = d->comboFixType->findData(QVariant(fixType));

            if (fixTypeIndex<0)
            {
                d->cbFixType->setChecked(false);
            }
            else
            {
                d->comboFixType->setCurrentIndex(fixTypeIndex);
            }
        }

        const bool haveDop = gpsData->hasDop();
        d->cbDop->setChecked(haveDop);

        if (haveDop)
        {
            d->leDop->setText(QString::fromLatin1("%1").arg(gpsData->getDop(), 0, 'f', 2));
        }
    }

    updateUIState();
}