Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

void Impala::Application::WindowShowImSet::BuildGUI ( int  wndWidth,
int  wndHeight 
) [inline, private]

Definition at line 120 of file mainShowImSet.cpp.

References Impala::Visualization::ImageSetIdxGrid::AddImageSetIdxs(), OglGui::OglWindow::ConnectTo(), OglGui::Tabs::CreateTab(), OglGui::OglWindow::GetBorderBackground(), Impala::CmdOptions::GetInstance(), Impala::CmdOptions::GetInt(), Impala::CmdOptions::GetString(), OglGui::OglWindow::H(), Impala::Visualization::ImageSetIdxGridScroller::ImSetIdxGrid(), Impala::Visualization::AppController::Instance(), mAnnotation, mConceptRanking, mGuiMain, mImSetIdxGridScroller, mIxsDoc, mSimSetRank, mSimSetRankSim, mSimSetRankTruth, mTabs, mThumbHeight, mThumbWidth, mViewScale, OglGui::Tabs::SetActiveTab(), OglGui::OglWindow::SetBorderBackground(), OglGui::OglWindow::SetBorderType(), OglGui::Tabs::SetTabsListener(), Impala::Visualization::DataDocumentGui< DataDocT >::StringSelectionEvent(), TAB_ALL, TAB_ANNOTATIONS, TAB_CONCEPTS, TAB_CONCEPTSSIM, TAB_CONCEPTSTRUTH, TAB_MAIN, Impala::Visualization::ImageSetIdxGrid::UpdateLayout(), and OglGui::OglWindow::W().

Referenced by WindowShowImSet().

00121     {
00122         CmdOptions& options = CmdOptions::GetInstance();
00123 
00124         SetBorderType(-1);
00125         if (!GetBorderBackground())
00126             SetBorderBackground(oglGUI_BG);
00127 
00128         mTabs = new OglGui::Tabs(this, wndWidth, wndHeight);
00129         mTabs->SetTabsListener(this);
00130 
00131         OglGui::Window* tab = mTabs->CreateTab("Main", -1, TAB_MAIN);
00132         //int nrImOnRow = wndWidth / (mThumbWidth + 3);
00133         mThumbWidth = 176;
00134         mThumbHeight = 176;
00135         int nrImOnRow = options.GetInt("NrImOnRow", 5);
00136         int height = wndHeight;
00137         mGuiMain = new ShowImSetGuiMain(tab, tab->W(), tab->H(), nrImOnRow,
00138                                         true, mIxsDoc, TAB_MAIN);
00139         AppController& ctr = AppController::Instance();
00140         ctr.AddControl((AppControlDoc*) mGuiMain);
00141 
00142         tab = mTabs->CreateTab("All", 60, TAB_ALL);
00143         mImSetIdxGridScroller =
00144             new ImageSetIdxGridScroller(tab,0,0,tab->W(),tab->H());
00145         //mImSetIdxGridScroller->PageUpDownExtra(-2);
00146         mImSetIdxGridScroller->ConnectTo(tab);
00147         ImageSetIdxGrid* idxGrid = mImSetIdxGridScroller->ImSetIdxGrid();
00148         idxGrid->AddImageSetIdxs(mIxsDoc->GetImageSet());
00149         idxGrid->UpdateLayout(true);
00150 
00151         String conceptAnnotations = options.GetString("conceptAnnotations");
00152         if (!conceptAnnotations.empty())
00153         {
00154             tab = mTabs->CreateTab("Annotations", 100, TAB_ANNOTATIONS);
00155             mAnnotation = new AnnotationTableGui
00156                 (tab, tab->W(), tab->H(), nrImOnRow, mThumbWidth, mThumbHeight,
00157                  mViewScale, mIxsDoc, conceptAnnotations, TAB_ANNOTATIONS);
00158             ctr.AddControl((AppControlDoc*) mAnnotation);
00159         }
00160 
00161         if (mConceptRanking)
00162         {
00163             tab = mTabs->CreateTab("Concepts", 82, TAB_CONCEPTS);
00164             mSimSetRank = new SimilarityTableSetRank
00165                 (tab, tab->W(), tab->H(), nrImOnRow, mThumbWidth, mThumbHeight,
00166                  mViewScale, mIxsDoc, mConceptRanking, false,
00167                  conceptAnnotations, false, TAB_CONCEPTS);
00168             ctr.AddControl((AppControlDoc*) mSimSetRank);
00169 
00170             tab = mTabs->CreateTab("ConceptsSim", -1, TAB_CONCEPTSSIM);
00171             mSimSetRankSim = new SimilarityTableSetRank
00172                 (tab, tab->W(), tab->H(), nrImOnRow, mThumbWidth, mThumbHeight,
00173                  mViewScale, mIxsDoc, mConceptRanking, true,
00174                  conceptAnnotations, false, TAB_CONCEPTSSIM);
00175             ctr.AddControl((AppControlDoc*) mSimSetRankSim);
00176 
00177             if (!conceptAnnotations.empty())
00178             {
00179                 tab = mTabs->CreateTab("ConceptsTruth", 120, TAB_CONCEPTSTRUTH);
00180                 mSimSetRankTruth = new SimilarityTableSetRank
00181                     (tab, tab->W(), tab->H(), nrImOnRow, mThumbWidth,
00182                      mThumbHeight, mViewScale, mIxsDoc, mConceptRanking, false,
00183                      conceptAnnotations, true, TAB_CONCEPTSTRUTH);
00184                 ctr.AddControl((AppControlDoc*) mSimSetRankTruth);
00185             }
00186         }
00187 
00188         // RvB: To start with the directory selected
00189         mGuiMain->StringSelectionEvent(NULL,0,(void*)1);
00190 
00191         mTabs->SetActiveTab(0);
00192     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:14:30 2011 for ImpalaSrc by  doxygen 1.5.1