00001 /* 00002 * File Name: render_settings_impl.h 00003 */ 00004 00005 /* 00006 * This file is part of uds-plugin-images. 00007 * 00008 * uds-plugin-images is free software: you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation, either version 2 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * uds-plugin-images is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00020 */ 00021 00022 /** 00023 * Copyright (C) 2008 iRex Technologies B.V. 00024 * All rights reserved. 00025 */ 00026 00027 #ifndef IMAGES_PLUGIN_RENDER_SETTINGS_IMPL_H_ 00028 #define IMAGES_PLUGIN_RENDER_SETTINGS_IMPL_H_ 00029 00030 #include <vector> 00031 #include "plugin_inc.h" 00032 #include "signal_slot.h" 00033 #include "interfaces_utils.h" 00034 00035 using namespace utils; 00036 00037 namespace images 00038 { 00039 00040 class PluginRenderSettingsImpl : public IPluginUnknown 00041 , public IPluginClone 00042 , public IPluginRenderSettings 00043 , public IPluginZoom 00044 , public IPluginRotation 00045 { 00046 public: 00047 PluginRenderSettingsImpl(void); 00048 PluginRenderSettingsImpl(const PluginRenderSettingsImpl &ref); 00049 ~PluginRenderSettingsImpl(void); 00050 00051 float zoom() const { return zoom_; } //TODO Alexis: check with Yehong whether this must be float or int 00052 PluginRotationDegree rotation() const { return rotation_; } 00053 00054 static PluginRenderSettingsImpl * query_instance(IPluginUnknown * thiz); 00055 00056 public: 00057 Signal<PluginRenderSettingsImpl *> release_signal; 00058 00059 private: 00060 static PluginStatus query_interface_impl( 00061 IPluginUnknown *thiz, 00062 const UDSString *id, 00063 void **ptr); 00064 00065 static int release_impl( 00066 IPluginUnknown *thiz); 00067 00068 static IPluginUnknown* create_clone_object_impl( 00069 IPluginUnknown *thiz); 00070 00071 static PluginStatus set_zoom_factor_impl( 00072 IPluginUnknown* thiz, 00073 const float zoom_factor ); 00074 00075 static float get_zoom_factor_impl( 00076 IPluginUnknown* thiz ); 00077 00078 static PluginStatus set_rotation_impl( 00079 IPluginUnknown *thiz, 00080 const PluginRotationDegree rotation); 00081 00082 static PluginRotationDegree get_rotation_impl( 00083 IPluginUnknown *thiz ); 00084 00085 private: 00086 static utils::ObjectTable<PluginRenderSettingsImpl> g_instances_table; 00087 00088 private: 00089 float zoom_; 00090 PluginRotationDegree rotation_; 00091 }; 00092 00093 }; // namespace images 00094 00095 #endif 00096