Definition at line 926 of file SurveillanceApp.cpp. References Impala::Application::SDash::SurveillanceMap::CreateButton(), mSurveillanceMap, Impala::Application::SDash::NR_OF_CAMERAS, OglGui::Window::ScaleChildren(), Impala::Application::SDash::SurveillanceMap::SelectButton(), OglGui::Window::SetAllowChildScaling(), and OglGui::OglWindow::Start(). Referenced by SurveillanceApp(). 00927 { 00928 OGLIMAGE* im = TryReadPNG("map.png"); 00929 float imW = (float) im->w, imH = (float) im->h; 00930 00931 mSurveillanceMap = new SurveillanceMap(1280, 0, 1272, 990, im); 00932 oglSys.ReleaseOglImage(im); 00933 00934 // Google map coordinates. 00935 int Xs[] = {230, 271, 384, 294, 743, 682, 576, 556, 566, 682, 791, 623, 551, 571, 591}; 00936 int Ys[] = {23, 49, 122, 274, 460, 342, 725, 832, 812, 935, 826, 592, 763, 769, 775}; 00937 00938 char buf[10]; 00939 for (int i=0; i<NR_OF_CAMERAS; i++) 00940 { 00941 float x = Xs[i]; 00942 float y = Ys[i]; 00943 sprintf(buf,"%d",i+1); 00944 mSurveillanceMap->CreateButton(x, y, buf); 00945 } 00946 00947 mSurveillanceMap->SelectButton(3); 00948 mSurveillanceMap->ScaleChildren(); 00949 00950 // Prevent others from scaling the children of the map. 00951 // That is, suppose this class becomes part of a much larger app, 00952 // and the larger app programmer is a lazy bastard and he 00953 // just calls ScaleChildren(0,1), 0: no restrictions, 1:recursively 00954 // on its top level window. We don't mind the map being scaled, 00955 // but prevent the children of being scaled twice 00956 // as we do scaling our-selves in the statement above. 00957 mSurveillanceMap->SetAllowChildScaling(false); 00958 mSurveillanceMap->Start(); 00959 }
Here is the call graph for this function:
|