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

FlowModule.h

Go to the documentation of this file.
00001 /*
00002  * MapModule.h
00003  *
00004  *  Created on: 26-aug-2009
00005  *      Author: dodijk
00006  */
00007 
00008 #ifndef FLOWMODULE_H_
00009 #define FLOWMODULE_H_
00010 
00011 #include "OglGui/GroupBox.h"
00012 #include "OglGui/WindowView2D.h"
00013 #include "OglGui/ZoomPanControl.h"
00014 
00015 #include "../TableDataStore.h"
00016 #include "../TableDataView.h"
00017 
00018 //#include "../OglImageCacheStore.h"
00019 
00020 namespace Impala { namespace Application { namespace MediaTable {
00021 
00022 class FlowModule : public VisualizationModule {
00023 public:
00024         FlowModule() : VisualizationModule("Flow") {}
00025 
00026     void ButtonSelectionEvent(OglGui::Button *src, void *userData) {
00027                 if(src->GetLabel() == "New " + GetName())
00028                 {
00029                         StoreConfigWindowValues();
00030                         DoHandleNewWindow("Flow", mConfigWindow);
00031                         delete mConfigWindow;
00032                         DoReleaseConfigWindow();
00033                 }
00034                 else
00035                         VisualizationModule::ButtonSelectionEvent(src, userData);
00036     }
00037 
00038         void ModuleSelected() {
00039                 VisualizationModule::DrawConfigWindow();
00040                 OglGui::GroupBox* grp = new OglGui::GroupBox(mConfigWindow, mConfigWindow->W()-2, 362, "");
00041 
00042                 AddSelectorWithColumnsOfType(grp, "Image", TableDataSource::TYPE_FLAG_IMAGE, true);
00043                 (new OglGui::Button(grp, grp->W()-4, 26, "New "+GetName(), BEV_ETCHED))
00044                         ->SetButtonListener(this);
00045 
00046                 grp->RepositionViewports();
00047                 grp->ScaleChildren();
00048         }
00049 
00050         void NewWindow(OglGui::Window* mFlowWnd) {
00051                 mFlowWnd->SetBackground(oglBLACK);
00052         }
00053 
00054     float map(float v, float vmin, float vmax, float min, float max) {
00055         float r = (v-vmin)/(vmax-vmin);
00056         r *= (max-min);
00057         r += min;
00058         return r;
00059     }
00060 
00061 };
00062 
00063 } } }  /* Namespace Impala::Application::MediaTable */
00064 
00065 #endif /* FlowModule_H_ */

Generated on Fri Mar 19 09:30:32 2010 for ImpalaSrc by  doxygen 1.5.1