[ossim-planet-qt] 01/03: Imported Upstream version 1.8.20.3+ds

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Sat Jun 4 16:06:19 UTC 2016


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository ossim-planet-qt.

commit 7826aca4e89ce4094397cd0613bebf224859ee41
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sat Jun 4 15:24:11 2016 +0200

    Imported Upstream version 1.8.20.3+ds
---
 ossimPlanetQt/.gdb_history                         |   20 +
 ossimPlanetQt/CMakeLists.txt                       |   82 +
 ossimPlanetQt/LICENSE.txt                          |  141 +
 ossimPlanetQt/apps/apps.pro                        |    5 +
 ossimPlanetQt/apps/ossimPlanetQt.qrc               |    9 +
 ossimPlanetQt/apps/ossimplanet/main.cpp            |   51 +
 ossimPlanetQt/apps/ossimplanet/ossimplanet.pro     |  100 +
 ossimPlanetQt/images/error.png                     |  Bin 0 -> 63272 bytes
 ossimPlanetQt/images/info.png                      |  Bin 0 -> 82710 bytes
 ossimPlanetQt/images/ossimPlanetSplash.png         |  Bin 0 -> 175226 bytes
 ossimPlanetQt/images/warning.png                   |  Bin 0 -> 41016 bytes
 .../ossimPlanetQt/ossimPlanetQtAboutDialog.h       |   13 +
 .../ossimPlanetQt/ossimPlanetQtActionAdapter.h     |   98 +
 .../ossimPlanetQt/ossimPlanetQtActivityItem.h      |  157 +
 .../ossimPlanetQt/ossimPlanetQtActivityThread.h    |   21 +
 .../ossimPlanetQtActivityThreadQueueItem.h         |   41 +
 .../ossimPlanetQt/ossimPlanetQtActivityWidget.h    |  128 +
 .../ossimPlanetQt/ossimPlanetQtActivityWindow.h    |   16 +
 .../ossimPlanetQt/ossimPlanetQtAlertLayer.h        |   99 +
 .../ossimPlanetQt/ossimPlanetQtApplication.h       |  557 +++
 .../ossimPlanetQt/ossimPlanetQtDropDownDelegate.h  |   30 +
 .../include/ossimPlanetQt/ossimPlanetQtEvent.h     |  389 ++
 .../include/ossimPlanetQt/ossimPlanetQtExport.h    |   52 +
 .../include/ossimPlanetQt/ossimPlanetQtGlWidget.h  |  266 ++
 .../include/ossimPlanetQt/ossimPlanetQtImage.h     |   21 +
 .../ossimPlanetQt/ossimPlanetQtLayerOperation.h    |   29 +
 .../include/ossimPlanetQt/ossimPlanetQtLegend.h    |  142 +
 .../ossimPlanetQtLegendAnimationPathItem.h         |   36 +
 .../ossimPlanetQt/ossimPlanetQtLegendItem.h        |   48 +
 .../ossimPlanetQt/ossimPlanetQtLegendKmlItem.h     |   28 +
 .../ossimPlanetQt/ossimPlanetQtLegendLocatioInfo.h |   41 +
 .../ossimPlanetQtLegendLocationInfo.h              |   51 +
 .../ossimPlanetQt/ossimPlanetQtLegendNodeItem.h    |   59 +
 .../ossimPlanetQt/ossimPlanetQtLegendTextureItem.h |   87 +
 .../ossimPlanetQt/ossimPlanetQtLegendVideoItem.h   |   36 +
 .../ossimPlanetQt/ossimPlanetQtMainWindow.h        |  329 ++
 .../ossimPlanetQt/ossimPlanetQtMessageLog.h        |   34 +
 .../ossimPlanetQt/ossimPlanetQtNewHttpConnection.h |   22 +
 .../include/ossimPlanetQt/ossimPlanetQtOperation.h |  113 +
 .../ossimPlanetQt/ossimPlanetQtPreferences.h       |   16 +
 .../include/ossimPlanetQt/ossimPlanetQtRuler.h     |   44 +
 .../include/ossimPlanetQt/ossimPlanetQtVersion.h   |   11 +
 .../ossimPlanetQtVideoControlWidget.h              |   59 +
 .../include/ossimPlanetQt/ossimPlanetQtWmsDialog.h |   88 +
 ossimPlanetQt/ossimPlanetQt.pro                    |   11 +
 ossimPlanetQt/src/README                           |    9 +
 ossimPlanetQt/src/core/ossimPlanetQtImage.cpp      |   60 +
 ossimPlanetQt/src/gui/ossimPlanetQtAboutDialog.cpp |    7 +
 .../src/gui/ossimPlanetQtActivityItem.cpp          |  702 ++++
 .../src/gui/ossimPlanetQtActivityThread.cpp        |   28 +
 .../gui/ossimPlanetQtActivityThreadQueueItem.cpp   |  152 +
 .../src/gui/ossimPlanetQtActivityWidget.cpp        |  199 +
 .../src/gui/ossimPlanetQtActivityWindow.cpp        |    7 +
 ossimPlanetQt/src/gui/ossimPlanetQtAlertLayer.cpp  |  164 +
 ossimPlanetQt/src/gui/ossimPlanetQtApplication.cpp |  889 +++++
 .../src/gui/ossimPlanetQtDropDownDelegate.cpp      |   44 +
 ossimPlanetQt/src/gui/ossimPlanetQtGlWidget.cpp    |  454 +++
 .../src/gui/ossimPlanetQtLayerOperation.cpp        |  290 ++
 ossimPlanetQt/src/gui/ossimPlanetQtLegend.cpp      | 2095 +++++++++++
 .../gui/ossimPlanetQtLegendAnimationPathItem.cpp   |  120 +
 ossimPlanetQt/src/gui/ossimPlanetQtLegendItem.cpp  |   63 +
 .../src/gui/ossimPlanetQtLegendKmlItem.cpp         |  163 +
 .../src/gui/ossimPlanetQtLegendNodeItem.cpp        |  192 +
 .../src/gui/ossimPlanetQtLegendTextureItem.cpp     |  716 ++++
 .../src/gui/ossimPlanetQtLegendVideoItem.cpp       |  147 +
 ossimPlanetQt/src/gui/ossimPlanetQtMainWindow.cpp  | 3916 ++++++++++++++++++++
 ossimPlanetQt/src/gui/ossimPlanetQtMessageLog.cpp  |   73 +
 .../src/gui/ossimPlanetQtNewHttpConnection.cpp     |   43 +
 ossimPlanetQt/src/gui/ossimPlanetQtOperation.cpp   |  421 +++
 ossimPlanetQt/src/gui/ossimPlanetQtPreferences.cpp |   12 +
 ossimPlanetQt/src/gui/ossimPlanetQtRuler.cpp       |  437 +++
 .../src/gui/ossimPlanetQtVideoControlWidget.cpp    |  113 +
 ossimPlanetQt/src/gui/ossimPlanetQtWmsDialog.cpp   |  545 +++
 .../src/gui/ui/ossimPlanetQtAboutDialog.ui         |   39 +
 .../src/gui/ui/ossimPlanetQtActivityWindow.ui      |   95 +
 .../src/gui/ui/ossimPlanetQtLayerOperation.ui      |  147 +
 .../src/gui/ui/ossimPlanetQtMainWindow.ui          |  485 +++
 .../src/gui/ui/ossimPlanetQtMessageLog.ui          |   79 +
 .../src/gui/ui/ossimPlanetQtNewHttpConnection.ui   |  265 ++
 .../src/gui/ui/ossimPlanetQtPreferences.ui         | 1057 ++++++
 ossimPlanetQt/src/gui/ui/ossimPlanetQtRuler.ui     |  123 +
 .../src/gui/ui/ossimPlanetQtVideoControlWidget.ui  |  109 +
 ossimPlanetQt/src/gui/ui/ossimPlanetQtWmsDialog.ui |  253 ++
 ossimPlanetQt/src/src.pro                          |  216 ++
 .../ossimPlanetQt/English.lproj/InfoPlist.strings  |  Bin 0 -> 156 bytes
 ossimPlanetQt/xcode/ossimPlanetQt/Info.plist       |   26 +
 .../Resources/ossimPlanetQtApp-Info.plist          |   28 +
 .../xcode/ossimPlanetQt/icons/ImageLinker.icns     |  Bin 0 -> 54428 bytes
 ossimPlanetQt/xcode/ossimPlanetQt/main.c           |    3 +
 .../ossimPlanetQt.xcodeproj/project.pbxproj        | 2365 ++++++++++++
 .../xcode/ossimPlanetQt/ossimPlanetQt_Prefix.pch   |    5 +
 91 files changed, 20936 insertions(+)

diff --git a/ossimPlanetQt/.gdb_history b/ossimPlanetQt/.gdb_history
new file mode 100644
index 0000000..d253a94
--- /dev/null
+++ b/ossimPlanetQt/.gdb_history
@@ -0,0 +1,20 @@
+run
+where
+quit
+run
+where
+quit
+run
+where
+quit
+run
+quit
+run
+quit
+run
+where
+quit
+run
+where
+quit
+quit
diff --git a/ossimPlanetQt/CMakeLists.txt b/ossimPlanetQt/CMakeLists.txt
new file mode 100644
index 0000000..61092aa
--- /dev/null
+++ b/ossimPlanetQt/CMakeLists.txt
@@ -0,0 +1,82 @@
+PROJECT(ossimPlanetQt)
+MESSAGE("**********************Setting up ossimPlanetQt********************")
+INCLUDE(OssimVersion)
+INCLUDE(OssimUtilities)
+INCLUDE(OssimCommonVariables)
+INCLUDE(OssimQt4Macros)
+IF(NOT APPLE)
+  cmake_minimum_required(VERSION 2.6)
+ELSE(NOT APPLE)
+  cmake_minimum_required(VERSION 2.8)
+ENDIF(NOT APPLE)
+
+SET (QT_MIN_VERSION "4.2.2")
+FIND_PACKAGE(Qt4 REQUIRED) # find and setup Qt4 for this project
+INCLUDE(${QT_USE_FILE})
+SET(QT_USE_QTOPENGL ON)
+find_package(Qt4)
+
+find_package(OpenThreads)
+find_package(ossim)
+find_package(ossimPlanet)
+find_package(WMS)
+find_package(OpenGL)
+find_package(OSG)
+find_package(GPSTK)
+
+ADD_DEFINITIONS(${QT_DEFINITIONS}
+	-DQT_CORE_LIB
+	-DQT_GUI_LIB
+	-DQT_THREAD_SUPPORT
+)
+INCLUDE_DIRECTORIES(${${PROJECT_NAME}_SOURCE_DIR}/include)
+INCLUDE_DIRECTORIES(${OSSIM_INCLUDE_DIR})
+INCLUDE_DIRECTORIES(${WMS_INCLUDE_DIR})
+INCLUDE_DIRECTORIES(${OSSIMPLANET_INCLUDE_DIR})
+INCLUDE_DIRECTORIES(${QT_INCLUDES})
+INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIR})
+
+IF(GPSTK_FOUND AND OSSIMPLANET_ENABLE_EPHEMERIS)
+   MESSAGE(STATUS "GPSTK_LIBRARY               = ${GPSTK_LIBRARY}")
+   MESSAGE(STATUS "GPSTK_INCLUDE_DIR           = ${GPSTK_INCLUDE_DIR}")
+   ADD_DEFINITIONS("-DOSSIMPLANET_ENABLE_EPHEMERIS")
+   INCLUDE_DIRECTORIES(${GPSTK_INCLUDE_DIR})
+ELSE()
+   SET(GPSTK_LIBRARY "")
+ENDIF()
+
+IF(NOT OSSIMPREDATOR_LIBRARY)
+  set(OSSIMPREDATOR_LIBRARY "")
+ENDIF()
+
+
+############################################## BUILD THE LIBRARY ############################################
+SET(LIB_NAME ossimPlanetQt)
+FILE(GLOB OSSIMPLANETQT_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/include/ossimPlanetQt/ossimPlanet*.h")
+FILE(GLOB OSSIMPLANETQT_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/src/gui/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/src/core/*.cpp" )
+FILE(GLOB OSSIMPLANETQT_UIS  "${CMAKE_CURRENT_SOURCE_DIR}/src/gui/ui/*.ui")
+
+MESSAGE("QT4_LIBRARIES === ${QT_LIBRARIES}")
+QT4_WRAP_CPP(OSSIMPLANETQT_MOC_SRCS ${OSSIMPLANETQT_INCLUDES} )
+
+SET(UI_DESTINATION_DIR ${${PROJECT_NAME}_SOURCE_DIR}/include/ossimPlanetQt)
+OSSIM_QT4_WRAP_UI(OSSIMPLANETQT_UI_SRC ${OSSIMPLANETQT_UIS} )
+
+SET(INCLUDE_DIR "include/ossimPlanetQt")
+OSSIM_LINK_LIBRARY(${LIB_NAME} COMPONENT_NAME ossim TYPE "${OSSIM_USER_DEFINED_DYNAMIC_OR_STATIC}" HEADERS ${OSSIMPLANETQT_INCLUDES} ${OSSIMPLANETQT_UI_SRC} SOURCE_FILES ${OSSIMPLANETQT_SRCS}  ${OSSIMPLANETQT_MOC_SRCS}
+                   LIBRARIES ${OSSIM_LIBRARY} ${OSGVIEWER_LIBRARY} ${OSGDB_LIBRARY} ${OSGGA_LIBRARY}  ${OSGTEXT_LIBRARY} ${OSGUTIL_LIBRARY}  ${OSG_LIBRARY}  ${OPENTHREADS_LIBRARY} ${JPEG_LIBRARY} ${WMS_LIBRARY} ${GPSTK_LIBRARY} ${OSSIMPREDATOR_LIBRARY} ${ZLIB_LIBRARY} ${OPENGL_LIBRARIES} ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY} ${WMS_LIBRARY} ${OSSIMPLANET_LIBRARY} 
+                   INSTALL_LIB VERSION_SYMLINKS ADDITIONAL_COMPILE_FLAGS "-DOSSIMPLANETQT_LIBRARY")
+
+############################################# BUILD THE APPLICATIONS #################################################
+
+REMOVE_DEFINITIONS(-DOSSIMPLANETQT_LIBRARY)
+QT4_ADD_RESOURCES(OSSIMPLANETQT_RC "${PROJECT_SOURCE_DIR}/apps/ossimPlanetQt.qrc")
+set(TARGET_COMMON_LIBRARIES ossimPlanetQt)
+FILE(GLOB SOURCE_FILES "${PROJECT_SOURCE_DIR}/apps/ossimplanet/main.cpp")
+SET(OSSIM_BUILD_APPLICATION_BUNDLES ON)
+OSSIM_SETUP_APPLICATION(ossimplanetGui REQUIRE_WINMAIN_FLAG INSTALL COMPONENT_NAME ossim SOURCE_FILES ${SOURCE_FILES} ${OSSIMPLANETQT_RC})
+SET_TARGET_PROPERTIES(ossimplanetGui PROPERTIES RUNTIME_OUTPUT_NAME ossimplanet)
+
+
+########################### SETUP UNINSTALL ############################
+OSSIM_ADD_COMMON_MAKE_UNINSTALL()
diff --git a/ossimPlanetQt/LICENSE.txt b/ossimPlanetQt/LICENSE.txt
new file mode 100644
index 0000000..6e38660
--- /dev/null
+++ b/ossimPlanetQt/LICENSE.txt
@@ -0,0 +1,141 @@
+GNU LESSER GENERAL PUBLIC LICENSE 
+
+Version 2.1, February 1999 
+
+(The master copy of this license lives on the GNU website.) 
+
+Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+as the successor of the GNU Library Public License, version 2, hence
+the version number 2.1.]
+
+Preamble
+
+The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. 
+
+This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. 
+
+When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. 
+
+To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. 
+
+For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. 
+
+We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. 
+
+To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. 
+
+Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder.  Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. 
+
+Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. 
+
+When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. 
+
+We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. 
+
+For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. 
+
+In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. 
+
+Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of aprogram that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. 
+
+The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from thelibrary, whereas the latter must be combined with the library in order to run. 
+
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 
+
+0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". 
+
+A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. 
+
+The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) 
+
+"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. 
+
+Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 
+
+1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. 
+
+You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 
+
+2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, andcopy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all ofthese conditions: 
+
+a) The modified work must itself be a software library. 
+b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. 
+c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. 
+d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. 
+
+(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) 
+
+These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose p [...]
+
+Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. 
+
+In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 
+
+3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these  [...]
+
+Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. 
+
+This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 
+
+4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. 
+
+If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 
+
+5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. 
+
+However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library(because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. 
+
+When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. 
+
+If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) 
+
+Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 
+
+6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. 
+
+You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: 
+
+a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It i [...]
+
+For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler,kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. 
+
+It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 
+
+7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: 
+
+a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 
+
+8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 
+
+9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works ba [...]
+
+10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a licensefrom the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 
+
+11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not dis [...]
+
+If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. 
+
+It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor [...]
+
+This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 
+
+12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographicaldistribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 
+
+13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. 
+
+Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 
+
+14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two  goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software g [...]
+
+NO WARRANTY 
+
+15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU.  [...]
+
+16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO  [...]
+
+END OF TERMS AND CONDITIONS
diff --git a/ossimPlanetQt/apps/apps.pro b/ossimPlanetQt/apps/apps.pro
new file mode 100644
index 0000000..98488c5
--- /dev/null
+++ b/ossimPlanetQt/apps/apps.pro
@@ -0,0 +1,5 @@
+
+TEMPLATE	= subdirs
+LANGUAGE	= C++
+
+SUBDIRS = ossimplanet
diff --git a/ossimPlanetQt/apps/ossimPlanetQt.qrc b/ossimPlanetQt/apps/ossimPlanetQt.qrc
new file mode 100644
index 0000000..efb114f
--- /dev/null
+++ b/ossimPlanetQt/apps/ossimPlanetQt.qrc
@@ -0,0 +1,9 @@
+<!DOCTYPE RCC>
+<RCC version="1.0">
+ <qresource>
+     <file alias="ossimPlanetSplash">../images/ossimPlanetSplash.png</file>
+     <file alias="error">../images/error.png</file>
+     <file alias="warning">../images/warning.png</file>
+     <file alias="info">../images/info.png</file>
+ </qresource>
+</RCC>
diff --git a/ossimPlanetQt/apps/ossimplanet/main.cpp b/ossimPlanetQt/apps/ossimplanet/main.cpp
new file mode 100644
index 0000000..216b378
--- /dev/null
+++ b/ossimPlanetQt/apps/ossimplanet/main.cpp
@@ -0,0 +1,51 @@
+#include <ossimPlanetQt/ossimPlanetQtApplication.h>
+#include <ossimPlanetQt/ossimPlanetQtMainWindow.h>
+#include <ossimPlanet/ossimPlanet.h>
+#include <ossim/init/ossimInit.h>
+#include <ossimPlanet/ossimPlanet.h>
+#include <ossimPlanet/ossimPlanetLand.h>
+#include <ossimPlanet/ossimPlanetTextureLayerRegistry.h>
+// #include <osg/ArgumentParser>
+// #include <osg/ApplicationUsage>
+#include <osgDB/FileUtils>
+// #include <wms/wms.h>
+// #include <ossim/base/ossimArgumentParser.h>
+#include <osg/Texture>
+#include <QtGui/QSplashScreen>
+#include <QtGui/QPixmap>
+
+#ifdef WIN32
+int main(int argc, char *argv[]);
+#include <windows.h>
+#include <shellapi.h>
+int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
+    PSTR lpCmdLine, int nCmdShow)
+{
+	int argc = 1;
+	char *argv[] = {"ossimplanet"};
+    int ret = main( argc, argv );
+    return ret;
+}
+#endif
+int main(int argc, char *argv[])
+{
+   ossimPlanetQtApplication app(argc, argv);
+   Q_INIT_RESOURCE(ossimPlanetQt);
+   QSplashScreen splash(QPixmap(":/ossimPlanetSplash"));
+   splash.setWindowFlags(splash.windowFlags()|Qt::WindowStaysOnTopHint);
+   splash.show();
+//    app.processEvents();
+//     splash.showMessage("Initializing planet core");
+//    app.processEvents();
+   ossimPlanetQtApplication::initWithArgs(argc, argv);
+//    splash.showMessage("Starting Visualization system");
+//    app.processEvents();
+   ossimPlanetQtMainWindow*  mainWindow = new ossimPlanetQtMainWindow();
+   mainWindow->setAttribute(Qt::WA_DeleteOnClose);
+   mainWindow->show();
+   ossimPlanetQtApplication::initInputDevices();
+//    splash.showMessage("Finished initialization");
+   splash.finish(mainWindow);
+   int result = app.exec();
+   return result;
+}
diff --git a/ossimPlanetQt/apps/ossimplanet/ossimplanet.pro b/ossimPlanetQt/apps/ossimplanet/ossimplanet.pro
new file mode 100644
index 0000000..e94bfdf
--- /dev/null
+++ b/ossimPlanetQt/apps/ossimplanet/ossimplanet.pro
@@ -0,0 +1,100 @@
+###
+# $Id: ossimplanet.pro 16846 2010-03-09 12:18:40Z gpotts $
+#
+###
+target= ossimplanet
+TEMPLATE	= app
+LANGUAGE	= C++
+CONFIG	+= qt warn_on release 
+
+DEFINES	+= _FILE_OFFSET_BITS=64 _LARGE_FILES HAS_OPEN_THREADS=1 HAVE_CONFIG_H MPI_SETTING=0 GEOTIFF_ENABLED FREETYPE_SETTING=1
+
+INCLUDEPATH	+= ../../include 
+SOURCES	= main.cpp
+target.path = ../../bin
+RESOURCES = ../ossimPlanetQt.qrc
+
+win32 {
+INCLUDEPATH += ..\..\..\ossim\include ..\..\..\ossimPlanet\include ..\..\..\libwms\include ..\..\..\ossim_dependencies\include   
+TEMPLATE = vcapp
+  LIBS	=  -L..\..\lib -L$(OSSIM_HOME)\lib -L$(OSSIM_HOME)\projects\vs\release\lib
+LIBS += -L$(OSSIM_DEPENDENCIES)\lib  
+LIBS += -L..\..\..\ossim_dependencies\lib  
+LIBS += -lossimPlanetQt1 -losgText -losgGA -losgDB -losgUtil -losg -lossim -llibwms -lossimPlanet -lOpenThreads 
+CONFIG += embed_manifest_exe
+DEFINES +=  NOMINMAX
+#  QMAKE_CLEAN += ossimplanet.e* ossimplanet.l* ..\..\bin\ossimplanet.*  
+#  DEFINES += OSSIMUSINGDLL
+#  QMAKE_CXXFLAGS = -EHsc -GR
+
+#  LIBS = -L$(EARTH_PACKAGE)/earth_package_solution/lib -L$(EARTH_PACKAGE)/ossim_qt/lib ../../lib/ossim_qt.lib -lossim -lopengl32 -lglu32 -lopengl32 -lglu32
+
+#target.path = $(EARTH_PACKAGE)\earth_package_solution\bin
+#DEPENDPATH += $(EARTH_PACKAGE)\ossim_qt\src $(EARTH_PACKAGE)\ossim\include
+#INCLUDEPATH += $(EARTH_PACKAGE)\ossim\include
+}
+
+else:mac {
+  QMAKE_MAC_SDK = /Developer/SDKs/MacOSX10.5.sdk
+  QMAKE_LFLAGS += -F$(OSSIM_BUILD) -F/Library/Frameworks -F$(OSSIM_DEV_HOME)/ossimPlanetQt/src/build/Release
+  QMAKE_CFLAGS += -F$(OSSIM_BUILD) -mmacosx-version-min=10.5
+  QMAKE_CXXFLAGS += -F$(OSSIM_BUILD) -mmacosx-version-min=10.5
+  UI_DIR = .ui
+  MOC_DIR = .moc
+  OBJECTS_DIR = .obj
+  QMAKE_CLEAN += 
+  LIBS += -framework ossimPlanetQt -framework ossimPlanet -framework ossim -framework wms -framework osgDB -framework osgGA -framework osgUtil -framework osgText -framework osgViewer -framework osg  -framework OpenThreads
+  target.path = $(OSSIM_BUILD)
+}
+
+else:unix {
+
+  ###
+  # Relies upon OSSIM_DEV_HOME environment variable being set.  Also this uses
+  # OpenThreads.  Take out/edit as necessary.
+  ###
+
+  ###
+  # LOCAL_ROOT A place where your local compiled stuff is installed like
+  # libtiff, geotiff, OpenSceneGraph and so on...
+  ###
+#  LOCAL_ROOT=/usr/local
+
+  ###
+  # DESTDIR Where the executable goes when you type "make".
+  ###
+  DESTDIR = ../../bin
+
+  ###
+  # INSTALL_PREFIX Point to install location for libraries.
+  ### 
+ # INSTALL_PREFIX=/usr/local
+  isEmpty(INSTALL_PREFIX){
+      INSTALL_PREFIX=/usr/local
+  }
+
+  ###
+  # The make install target like "/usr/local"
+  ###
+  target.path = $$INSTALL_PREFIX/bin
+  INSTALLS += target
+
+  QMAKE_CLEAN += ossimplanet ../../bin/ossimplanet
+  UI_DIR = .ui
+  MOC_DIR = .moc
+  OBJECTS_DIR = .obj
+
+  INCLUDEPATH += $$(OSSIM_DEV_HOME)/ossimPlanetQt/src $$(OSSIM_DEV_HOME)/ossimPlanet/include $$(OSSIM_DEV_HOME)/ossim/include $$LOCAL_ROOT/include
+
+  ###
+  # LIBS with predator
+  ###
+  # LIBS = -L$$(OSSIM_DEV_HOME)/ossimPlanetQt/lib -L$$(OSSIM_DEV_HOME)/ossim/lib -L$$LOCAL_ROOT/lib -lossimPlanetQt -lossimPlanet -lossimPredator -lavformat -lavcodec -lavdevice -lavutil
+
+  ###
+  # LIBS without predator
+  ###
+  LIBS = -L$$(OSSIM_DEV_HOME)/ossimPlanetQt/lib -L$$(OSSIM_DEV_HOME)/ossimPlanet/lib/Linux64 -L$$(OSSIM_DEV_HOME)/libwms/lib/Linux64 -L$$(OSSIM_DEV_HOME)/OpenSceneGraph-2.8.2/lib -L$$(OSSIM_DEV_HOME)/ossim/lib -L$$LOCAL_ROOT/lib -lossimPlanetQt -lossimPlanet -lwms
+}
+
+# INSTALLS = target
diff --git a/ossimPlanetQt/images/error.png b/ossimPlanetQt/images/error.png
new file mode 100644
index 0000000..265ab04
Binary files /dev/null and b/ossimPlanetQt/images/error.png differ
diff --git a/ossimPlanetQt/images/info.png b/ossimPlanetQt/images/info.png
new file mode 100644
index 0000000..66be862
Binary files /dev/null and b/ossimPlanetQt/images/info.png differ
diff --git a/ossimPlanetQt/images/ossimPlanetSplash.png b/ossimPlanetQt/images/ossimPlanetSplash.png
new file mode 100644
index 0000000..c80cfc5
Binary files /dev/null and b/ossimPlanetQt/images/ossimPlanetSplash.png differ
diff --git a/ossimPlanetQt/images/warning.png b/ossimPlanetQt/images/warning.png
new file mode 100644
index 0000000..58df647
Binary files /dev/null and b/ossimPlanetQt/images/warning.png differ
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtAboutDialog.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtAboutDialog.h
new file mode 100644
index 0000000..9bd8e23
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtAboutDialog.h
@@ -0,0 +1,13 @@
+#ifndef ossimPlanetAboutDialog_HEADER
+#define ossimPlanetAboutDialog_HEADER
+#include <QtGui/QDialog>
+#include <ossimPlanetQt/ui_ossimPlanetQtAboutDialog.h>
+#include <ossimPlanetQt/ossimPlanetQtExport.h>
+
+class OSSIMPLANETQT_DLL ossimPlanetQtAboutDialog :  public QDialog, public Ui::ossimPlanetQtAboutDialog
+{
+public:
+   ossimPlanetQtAboutDialog(QWidget* parent);
+};
+
+#endif
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtActionAdapter.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtActionAdapter.h
new file mode 100644
index 0000000..d346e8a
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtActionAdapter.h
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2003  Neil Salter
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * (A full copy of the license has is available in the file COPYING in
+ * the top directory of this distribution.)
+ */
+
+#ifndef ossimPlanetQtActionAdapter_HEADER
+#define ossimPlanetQtActionAdapter_HEADER
+
+#include <osgGA/GUIActionAdapter>
+#include <ossimPlanetQt/ossimPlanetQtExport.h>
+
+/// QtActionAdapter allows window-system-agnostic osgGA classes to tell
+/// the window system what to do
+
+/**
+ * QtActionAdapter - a class to adapt osgGA-specified actions into feedback for our app.
+ */
+
+class  OSSIMPLANETQT_DLL ossimPlanetQtActionAdapter : public osgGA::GUIActionAdapter
+{
+    public:
+
+        ossimPlanetQtActionAdapter():theNeedRedraw(false),
+           theNeedContinuousUpdate(false),
+           theNeedWarpPointer(false),
+           theX(-1),theY(-1)
+        {};
+           void reset()
+           {
+              theNeedRedraw = false;
+              theNeedContinuousUpdate = false;
+              theNeedWarpPointer = false;
+              theX = -1;
+              theY = -1;
+           }
+        virtual ~ossimPlanetQtActionAdapter() {}
+
+	virtual void requestRedraw()
+           {
+              theNeedRedraw=true;
+           }
+
+	virtual void requestContinuousUpdate(bool needed=true)
+           {
+              theNeedContinuousUpdate=needed;
+           }
+
+	virtual void requestWarpPointer(float x,float y)
+           {
+              theNeedWarpPointer=true;
+              theX=x;
+              theY=y;
+           }
+
+	virtual void clearWarpRequest()
+           {
+              theNeedWarpPointer = false;
+           }
+        void setNeedRedraw(bool flag){ theNeedRedraw = flag;}
+        void setNeedContinuousUpdate(bool flag){ theNeedContinuousUpdate = flag;}
+	bool getNeedRedraw() const {return theNeedRedraw;}
+	bool getNeedContinuousUpdate() const {return theNeedContinuousUpdate;}
+	bool getNeedWarpPointer(float &x,float &y) const
+           {
+              if(theNeedWarpPointer)
+              {
+                 x=theX;
+                 y=theY;
+              }
+              
+              return theNeedWarpPointer;
+           }
+
+ private:
+
+	bool theNeedRedraw;
+	bool theNeedContinuousUpdate;
+	bool theNeedWarpPointer;
+	float theX,theY;
+};
+
+#endif
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtActivityItem.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtActivityItem.h
new file mode 100644
index 0000000..5a5e0bb
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtActivityItem.h
@@ -0,0 +1,157 @@
+#ifndef ossimPlanetQtActivityItem_HEADER
+#define ossimPlanetQtActivityItem_HEADER
+#include <QtGui/QTreeWidgetItem>
+#include <QtCore/Qt>
+#include <QtCore/QUrl>
+#include <QtCore/QStringList>
+#include <QtCore/QMutex>
+#include <QtCore/QMutexLocker>
+#include <QtCore/QList>
+#include <osg/ref_ptr>
+#include <ossimPlanet/ossimPlanetOssimImageLayer.h>
+#include <ossim/base/ossimProcessListener.h>
+#include <ossim/base/ossimReferenced.h>
+#include <ossimPlanet/ossimPlanetKml.h>
+#include <ossimPlanetQt/ossimPlanetQtExport.h>
+
+class ossimPlanetQtActivityWidget;
+class ossimPlanetOssimImageLayer;
+class ossimPlanetQtLegend;
+class ossimPlanetQtLegendTextureItem;
+class ossimImageHandler;
+
+class OSSIMPLANETQT_DLL ossimPlanetQtActivityItem : public QObject, public QTreeWidgetItem
+{
+public:
+   enum State
+   {
+      READY     = 0,
+      EXECUTING = 1,
+      FINISHED  = 2,
+      CANCELED  = 4
+   };
+   ossimPlanetQtActivityItem(QTreeWidget* parent, int type = Type);
+   ossimPlanetQtActivityItem(QTreeWidgetItem* parent, int type = Type);
+   ossimPlanetQtActivityItem(int type = Type);
+   virtual void execute()=0;
+   virtual void updateGui()=0;
+   void setThread(QThread* thread);
+   void setState(ossimPlanetQtActivityItem::State state);
+   ossimPlanetQtActivityItem::State state()const;
+   const ossimString& errorMessage()const;
+   
+public:
+   QThread*                         theThread;
+   mutable QMutex                   theMutex;
+   ossimPlanetQtActivityItem::State theState;
+   ossimString                      theErrorMessage;
+   bool                             theInitializeGuiFlag;
+};
+
+class OSSIMPLANETQT_DLL ossimPlanetQtOssimImageStagerActivity : public ossimPlanetQtActivityItem,
+                                                public ossimProcessListener
+{
+public:
+   ossimPlanetQtOssimImageStagerActivity(QTreeWidget * parent, ossimPlanetOssimImageLayer* layer, int type = Type);
+   ossimPlanetQtOssimImageStagerActivity(QTreeWidgetItem * parent, ossimPlanetOssimImageLayer* layer, int type = Type);
+   ossimPlanetQtOssimImageStagerActivity(ossimPlanetOssimImageLayer* layer, ossimPlanetQtLegend* legend, int type = Type);
+	
+   virtual void execute();
+   virtual void updateGui();
+
+   virtual void processProgressEvent(ossimProcessProgressEvent& event);
+   
+protected:
+	void adjustToWriteableLocation(ossimFilename& file)const;
+	void buildOverviews(ossimImageHandler* handler);
+	void buildHistograms(ossimImageHandler* handler);
+    osg::ref_ptr<ossimPlanetOssimImageLayer> theLayer;
+    ossimPlanetQtLegend* theLegend;
+    std::string          theStatus;
+    ossimFilename        theFilename;   
+  
+};
+
+class OSSIMPLANETQT_DLL ossimPlanetQtOpenImageFilesActivity : public ossimPlanetQtActivityItem
+{
+public:
+   ossimPlanetQtOpenImageFilesActivity(const QList<QUrl>& urls,
+                                       ossimPlanetQtLegend* legend);
+   ossimPlanetQtOpenImageFilesActivity(const QStringList& urls,
+                                       ossimPlanetQtLegend* legend);
+   virtual void execute();
+   virtual void updateGui();
+
+protected:
+   std::vector<ossimString>                            theFileList;
+   std::vector<ossimString>                            theFileStatus;
+   ossimPlanetQtLegend*                                theLegend;
+   osg::ref_ptr<ossimPlanetExtents>                    theExtents;
+   std::vector<osg::ref_ptr<ossimPlanetTextureLayer> > theLayers;
+   ossimString                                         theStatus;
+   bool                                                theInitializeGuiFlag;
+   ossim_uint32                                        theCurrentFileIdx;
+   ossim_uint32                                        theGuiFileItemIndex;
+};
+
+class OSSIMPLANETQT_DLL ossimPlanetQtOpenImageFileFromLayerActivity : public ossimPlanetQtActivityItem
+{
+public:
+   ossimPlanetQtOpenImageFileFromLayerActivity(osg::ref_ptr<ossimPlanetOssimImageLayer> layer,
+                                               const ossimFilename& name,
+                                               ossim_int32 entry,
+                                               ossimPlanetQtLegend* legend);
+   virtual void execute();
+   virtual void updateGui();
+   void setItem(ossimPlanetQtLegendTextureItem* item);
+protected:
+	osg::ref_ptr<ossimPlanetOssimImageLayer> theLayer;
+   osg::ref_ptr<ossimPlanetLookAt> theSavedLookAt;
+   ossimString          theName;
+   ossimString          theDescription;
+   ossimFilename        theFilename;
+   ossim_int32          theEntry;
+   ossimPlanetQtLegend* theLegend;
+   ossimPlanetQtLegendTextureItem* theItem;
+   bool                 theInitializeGuiFlag;
+   ossimString          theStatus;
+
+};
+
+class OSSIMPLANETQT_DLL ossimPlanetQtOpenImageFileFromLayerXmlActivity : public ossimPlanetQtActivityItem
+{
+public:
+   ossimPlanetQtOpenImageFileFromLayerXmlActivity(osg::ref_ptr<ossimPlanetOssimImageLayer> layer,
+                                                  ossimRefPtr<ossimXmlNode> node,
+                                                  ossimPlanetQtLegend* legend);
+   virtual void execute();
+   virtual void updateGui();
+   void setItem(ossimPlanetQtLegendTextureItem* item);
+protected:
+	osg::ref_ptr<ossimPlanetOssimImageLayer> theLayer;
+   ossimRefPtr<ossimXmlNode> theXmlNode;
+   ossimPlanetQtLegend* theLegend;
+   ossimPlanetQtLegendTextureItem* theItem;
+   bool                 theInitializeGuiFlag;
+   ossimString          theStatus;
+   ossimFilename        theFilename;
+   ossimString          theName;
+   ossimString          theDescription;
+
+};
+
+class OSSIMPLANETQT_DLL ossimPlanetQtMessageActivity : public ossimPlanetQtActivityItem
+{
+public:
+   ossimPlanetQtMessageActivity(const std::list<QString>& messageList,
+                                ossimPlanetQtLegend* legend);
+
+   virtual void execute();
+   virtual void updateGui();
+   
+protected:
+   std::list<QString> theMessageList;
+   ossimPlanetQtLegend* theLegend;
+   std::list<osg::ref_ptr<ossimPlanetKmlObject> > theResultList;
+};
+#endif
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtActivityThread.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtActivityThread.h
new file mode 100644
index 0000000..f7c4a38
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtActivityThread.h
@@ -0,0 +1,21 @@
+#ifndef ossimPlanetQtActivityThread_HEADER
+#define ossimPlanetQtActivityThread_HEADER
+#include <QtCore/QThread>
+#include <QtCore/QMutex>
+
+class ossimPlanetQtActivityItem;
+class ossimPlanetQtMessageActivity;
+class ossimPlanetQtActivityThread : public QThread
+{
+public:
+   ossimPlanetQtActivityThread(ossimPlanetQtActivityItem* item, QObject * parent = 0);
+   ossimPlanetQtActivityThread(QObject* parent = 0);
+   virtual void setActivityItem(ossimPlanetQtActivityItem* item);
+   
+   virtual void run();
+
+protected:
+   ossimPlanetQtActivityItem* theItem;
+};
+
+#endif
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtActivityThreadQueueItem.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtActivityThreadQueueItem.h
new file mode 100644
index 0000000..34330b0
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtActivityThreadQueueItem.h
@@ -0,0 +1,41 @@
+#ifndef ossimPlanetQtActivityThreadQueueItem_HEADER
+#define ossimPlanetQtActivityThreadQueueItem_HEADER
+#include <QtGui/QTreeWidgetItem>
+#include <ossimPlanetQt/ossimPlanetQtActivityItem.h>
+#include <QtCore/QThread>
+#include <QtCore/QMutex>
+#include <QtCore/QMutexLocker>
+#include <ossimPlanetQt/ossimPlanetQtExport.h>
+
+class ossimPlanetQtActivityThread;
+class OSSIMPLANETQT_DLL ossimPlanetQtActivityThreadQueueItem : public QObject, public QTreeWidgetItem
+{
+   Q_OBJECT
+public:
+   ossimPlanetQtActivityThreadQueueItem(QTreeWidget* parent,
+                                        const QString& queueName,
+                                        ossimPlanetQtActivityThread* thread=0,
+                                        int type = Type);
+
+
+   virtual void start();
+   virtual void updateGui();
+   bool deletableFlag()const;
+   void setDeletableFlag(bool flag);
+  
+   QThread* thread();
+   
+protected slots:
+   void finished();
+   void terminated();
+  
+protected:
+   int nextChildToProcess()const;
+
+   bool                         theDeletableFlag;
+   ossimPlanetQtActivityThread* theThread;
+   bool theStartFlag;
+   mutable QMutex theMutex;
+};
+
+#endif
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtActivityWidget.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtActivityWidget.h
new file mode 100644
index 0000000..a082505
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtActivityWidget.h
@@ -0,0 +1,128 @@
+#ifndef ossimPlanetQtActivityWidget_HEADER
+#define ossimPlanetQtActivityWidget_HEADER
+#include <QtGui/QTreeWidget>
+#include <QtGui/QKeyEvent>
+#include <QtGui/QMenu>
+#include <ossimPlanetQt/ossimPlanetQtOperation.h>
+#include <ossimPlanetQt/ossimPlanetQtActivityThreadQueueItem.h>
+#include <ossimPlanetQt/ossimPlanetQtExport.h>
+#include <OpenThreads/Mutex>
+#include <OpenThreads/ScopedLock>
+#include <map>
+class OSSIMPLANETQT_DLL ossimPlanetQtActivityWidget : public QTreeWidget
+{
+   Q_OBJECT
+	
+public:    
+   typedef std::map<ossimPlanetOperation*, QTreeWidgetItem*> OperationItemMapType;
+   enum EventId
+   {
+      STATUS_TYPE          = QEvent::User + 8000,
+      FINISHED_TYPE        = STATUS_TYPE + 1,
+      CANCELED_TYPE        = FINISHED_TYPE + 1,
+      STARTED_TYPE         = CANCELED_TYPE + 1
+	};
+	class ActivityItem : public QTreeWidgetItem
+		{
+		public:
+			ActivityItem(QTreeWidget* parent,
+							 ossimPlanetOperation* operation)
+			:QTreeWidgetItem(parent),
+			theOperation(operation)
+			{
+				
+			}
+			ActivityItem(QTreeWidgetItem* parent,
+							 ossimPlanetOperation* operation)
+			:QTreeWidgetItem(parent),
+			theOperation(operation)
+			{
+				
+			}
+			
+			osg::ref_ptr<ossimPlanetOperation> theOperation;
+		};
+   class Callback : public ossimPlanetOperationCallback
+      {
+      public:
+         Callback(ossimPlanetQtActivityWidget* w)
+         :theWidget(w)
+         {
+            
+         }
+         virtual void started(ossimPlanetOperation* operation);
+         virtual void finished(ossimPlanetOperation* operation);
+         virtual void canceled(ossimPlanetOperation* operation);
+         virtual void propertyChanged(const ossimString& name,
+                                      ossimPlanetOperation* operation);
+         
+      protected:
+         ossimPlanetQtActivityWidget* theWidget;
+      };
+   friend class ossimPlanetQtActivityWidget::Callback;
+   class QtOperationEvent : public QEvent
+      {
+      public:
+         QtOperationEvent(ossimPlanetOperation* operation,
+                          EventId id)
+         :QEvent((QEvent::Type)id),
+         theOperation(operation)
+         {
+            
+         }
+         ossimPlanetOperation* operation()
+         {
+            return theOperation.get();
+         }
+         const ossimPlanetOperation* operation()const
+         {
+            return theOperation.get();
+         }
+         ossimPlanetQtOperation* toQtOperation()
+         {
+            return dynamic_cast<ossimPlanetQtOperation*>(theOperation.get());
+         }
+         const ossimPlanetQtOperation* toQtOperation()const
+         {
+            return dynamic_cast<ossimPlanetQtOperation*>(theOperation.get());
+         }
+      protected:
+         osg::ref_ptr<ossimPlanetOperation> theOperation;
+      };
+	friend class ossimPlanetQtActivityWidgetOperationCallback;
+	
+   ossimPlanetQtActivityWidget(QWidget* parent = 0);
+   virtual ~ossimPlanetQtActivityWidget();
+	void addOperation(ossimPlanetOperation* operation);
+   //void addActivity(ossimPlanetQtActivityItem* activity);
+   virtual bool event(QEvent* e);
+   
+	void deleteSelectedActivities();
+	void deleteAllActivities();
+	
+protected:
+	void removeOperation(ossimPlanetOperation*);
+   //void addStagerActivity(ossimPlanetQtActivityItem* activity);
+   //void addOpenImageFileActivity(ossimPlanetQtActivityItem* activity);
+   //void addMessageActivity(ossimPlanetQtActivityItem* activity);
+   //void addMiscActivity(ossimPlanetQtActivityItem* activity);
+	//void sendUpdateGuiEvent();
+   //virtual void timerEvent(QTimerEvent *event);
+   
+   //int                                   theTimerId; 
+   //ossimPlanetQtActivityThreadQueueItem* theStagerQueue;
+   //ossimPlanetQtActivityThreadQueueItem* theOpenFileQueue;
+   //ossimPlanetQtActivityThreadQueueItem* theMessageQueue;
+   //ossimPlanetQtActivityThreadQueueItem* theMiscQueue;
+	
+	osg::ref_ptr<ossimPlanetOperationThreadQueue> theStagerQueue;
+	osg::ref_ptr<ossimPlanetOperationThreadQueue> theOpenFileQueue;
+	osg::ref_ptr<ossimPlanetOperationThreadQueue> theMiscQueue;
+   
+   OpenThreads::Mutex   theItemMapMutex;
+   OperationItemMapType theItemMap;
+  
+   osg::ref_ptr<ossimPlanetQtActivityWidget::Callback> theCallback;
+};
+
+#endif
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtActivityWindow.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtActivityWindow.h
new file mode 100644
index 0000000..3ac1d5e
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtActivityWindow.h
@@ -0,0 +1,16 @@
+#ifndef ossimPlanetQtActivityWindow_HEADER
+#define ossimPlanetQtActivityWindow_HEADER
+#include <ossimPlanetQt/ui_ossimPlanetQtActivityWindow.h>
+#include <QtGui/QDialog>
+#include <ossimPlanetQt/ossimPlanetQtExport.h>
+
+class OSSIMPLANETQT_DLL ossimPlanetQtActivityWindow : public QDialog, public Ui::ossimPlanetQtActivityWindow
+{
+   Q_OBJECT
+public:
+   ossimPlanetQtActivityWindow(QWidget* parent = 0);
+
+   
+};
+
+#endif
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtAlertLayer.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtAlertLayer.h
new file mode 100644
index 0000000..cdd7530
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtAlertLayer.h
@@ -0,0 +1,99 @@
+#ifndef ossimPlanetQtAlertLayer_HEADER
+#define ossimPlanetQtAlertLayer_HEADER
+
+#include <osg/Drawable>
+#include <osg/Geode>
+#include <osg/Vec3>
+#include <osg/Image>
+#include <ossimPlanet/ossimPlanetLayer.h>
+#include <ossimPlanet/ossimPlanetId.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimGeoid.h>
+#include <ossim/base/ossimGeoidManager.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <OpenThreads/Mutex>
+#include <ossimPlanetQt/ossimPlanetQtExport.h>
+
+class OSSIMPLANETQT_DLL ossimPlanetQtAlertIconCallout : public osg::Drawable
+{
+   
+public:   
+   struct AlertInfo
+   {
+      ossimPlanetId theId;
+      osg::Vec3d    theLandPosition;
+   };
+   ossimPlanetQtAlertIconCallout();
+   
+   /** Copy constructor using CopyOp to manage deep vs shallow copy.*/
+   ossimPlanetQtAlertIconCallout(const ossimPlanetQtAlertIconCallout& iconCallout,
+                                 const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
+            
+   virtual osg::Object* cloneType()const
+   {
+      return new ossimPlanetQtAlertIconCallout();
+   }
+
+   virtual Object* clone(const osg::CopyOp& copyop) const
+   {
+      return new ossimPlanetQtAlertIconCallout(*this, copyop);
+   }
+        
+   virtual bool isSameKindAs(const Object* obj)const
+   {
+      return dynamic_cast<const ossimPlanetQtAlertIconCallout*>(obj) != NULL;
+   }
+   
+   virtual const char* libraryName()const
+   {
+      return "ossimPlanetQt";
+   }
+   
+   virtual const char* className()const
+   {
+      return "ossimPlanetQtAlertIconCallout";
+   }
+   virtual void drawImplementation(osg::RenderInfo& state)const;
+
+   virtual osg::BoundingBox computeBound()const;
+   virtual void addOrUpdateAlert(const AlertInfo& info);
+protected:
+   
+   ossimPlanetQtAlertIconCallout& operator = (const ossimPlanetQtAlertIconCallout&)
+      {
+         return *this;
+      }
+   
+   virtual ~ossimPlanetQtAlertIconCallout();
+
+   osg::ref_ptr<osg::Image>           theImage;
+   unsigned short                     theStemHeight; 
+   std::map<ossimPlanetId, AlertInfo> theAlerts;
+   std::vector<unsigned char>         theLinePixelBuffer; 
+};
+
+class ossimPlanet;
+class ossimPlanetQtAlertLayer : public ossimPlanetLayer
+{
+public:
+   ossimPlanetQtAlertLayer();
+   virtual void execute(const ossimPlanetAction& action)
+   {
+      ossimPlanetLayer::execute(action);
+   }
+   
+   void removeAlert(const ossimPlanetId& id);
+   void updateAlert(const ossimPlanetId& id,
+                    const ossimGpt& gpt);
+   ossimPlanetId addAlert(const ossimGpt& gpt);
+   virtual void traverse(osg::NodeVisitor& nv);
+protected:
+   OpenThreads::Mutex                theMutex;
+   std::map<ossimPlanetId, ossimGpt> theAlertsToAddOrUpdate;
+   //ossimPlanetLand*                  theLand;
+   ossimPlanetQtAlertIconCallout*    theDrawable;
+   osg::ref_ptr<osg::Geode>          theGeode;
+   ossimPlanet*                      thePlanet;
+   ossimRefPtr<ossimGeoid >          theGeoid;
+};
+#endif
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtApplication.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtApplication.h
new file mode 100644
index 0000000..d8ddd28
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtApplication.h
@@ -0,0 +1,557 @@
+#ifndef ossimPlanetQtApplication_HEADER
+#define ossimPlanetQtApplication_HEADER
+#include <QtGui/QApplication>
+#include <osg/ArgumentParser>
+#include <osg/ApplicationUsage>
+#include <ossimPlanet/ossimPlanetConstants.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossimPlanet/ossimPlanetArchiveMapping.h>
+#include <deque>
+#include <ossimPlanet/ossimPlanetTextureLayerRegistry.h>
+#include <ossimPlanet/ossimPlanetTextureLayer.h>
+#include <ossimPlanetQt/ossimPlanetQtExport.h>
+#include <QtCore/QSettings>
+
+class OSSIMPLANETQT_DLL ossimPlanetQtApplication: public QApplication
+{
+public:
+   typedef std::deque<osg::ref_ptr<ossimPlanetTextureLayer> > ReferenceImageListType;
+   virtual ~ossimPlanetQtApplication();
+   ossimPlanetQtApplication(int & argc, char ** argv, bool guiEnabled=true);
+   
+   
+   static QString userSupportDirectory();
+   static QString userDirectory();
+   static QString sessionDirectory();
+   static QString defaultSession();
+   static QString defaultWmsCacheDir();
+   static QString currentOpenSessionDirectory()
+   {
+      return readPreferenceSetting("current-open-session-directory");
+   }
+   static void setCurrentOpenSessionDirectory(const QString& dir)
+   {
+      writePreferenceSetting("current-open-session-directory",
+                             dir);
+   }
+   static QString currentOpenImageDirectory()
+   {
+      return readPreferenceSetting("current-open-image-directory");
+   }
+   static void setCurrentOpenImageDirectory(const QString& dir)
+   {
+      writePreferenceSetting("current-open-image-directory",
+                             dir);
+   }
+   static QString currentOpenKmlDirectory()
+   {
+      return readPreferenceSetting("current-open-kml-directory");
+   }
+   static void setCurrentOpenKmlDirectory(const QString& dir)
+   {
+      writePreferenceSetting("current-open-kml-directory",
+                             dir);
+   }
+   static QString currentOpenVideoDirectory()
+   {
+      return readPreferenceSetting("current-open-video-directory");
+   }
+   static void setCurrentOpenVideoDirectory(const QString& dir)
+   {
+      writePreferenceSetting("current-open-video-directory",
+                             dir);
+   }
+   static void addCommandLineOptions(osg::ArgumentParser& args);
+   static bool initWithArgs(int& argc, char** argv);
+   static ossimFilename compassRing();
+  // static ossimFilename compassRose();
+   
+   static QString stagingCacheDirectory()
+   {
+      return readPreferenceSetting("staging-cache-directory");
+   }
+   static void setStagingCacheDirectory(const QString& dir)
+   {
+      writePreferenceSetting("staging-cache-directory",
+                             dir);
+   }
+   static bool autoGenerateOverviewFlag()
+   {
+      ossimString result = readPreferenceSetting("auto-generate-overviews-flag").toStdString();
+      if(result.empty())
+      {
+         return true;
+      }
+      
+      return result.toBool();
+   }
+   static void setAutoGenerateOverviewFlag(bool flag)
+   {
+      writePreferenceSetting("auto-generate-overviews-flag",
+                             ossimString::toString(flag).c_str());
+   }
+   static void setAutoHistogramStretchMode(const QString& setting)
+   {
+      writePreferenceSetting("auto-histogram-stretch-mode",
+                             setting);
+   }
+   static QString autoHistogramStretchMode()
+   {
+      return readPreferenceSetting("auto-histogram-stretch-mode");
+   }
+   static double wmsNetworkTimeoutInSeconds()
+   {
+      ossimString result = readPreferenceSetting("wms-network-timeout").toStdString();
+      if(!result.empty())
+      {
+         return result.toUInt32();
+      }
+      
+      return 10;
+   }
+   static void setWmsNetworkTimeoutInSeconds(double seconds)
+   {
+      writePreferenceSetting("wms-network-timeout",
+                             ossimString::toString(seconds).c_str());
+      
+   }
+   static bool autoViewSyncFlag()
+   {
+      ossimString result = readPreferenceSetting("auto-view-sync-flag").toStdString();
+      if(result.empty())
+      {
+         return true;
+      }
+      return result.toBool();       
+      
+   }
+   static void setAutoViewSyncFlag(bool flag)
+   {
+      writePreferenceSetting("auto-view-sync-flag",
+                             ossimString::toString(flag).c_str());
+   }
+   static double autoViewSyncRateInSeconds()
+   {
+      ossimString result = readPreferenceSetting("auto-view-sync-rate").toStdString();
+      if(result.empty())
+      {
+         return .05;
+      }
+      return result.toDouble();       
+   }
+   static void setAutoViewSyncRateInSeconds(double value)
+   {
+      writePreferenceSetting("auto-view-sync-rate",
+                             ossimString::toString(value).c_str());       
+   }
+   static bool autoHighlightLineOfSitFlag()
+   {
+      ossimString result = readPreferenceSetting("auto-highlight-line-of-site-flag").toStdString();
+      if(result.empty())
+      {
+         return false;
+      }
+      return result.toBool();       
+   }
+   static void setAutoHighlightLineOfSitFlag(bool flag)
+   {
+      writePreferenceSetting("auto-highlight-line-of-site-flag",
+                             ossimString::toString(flag).c_str());
+      
+   }
+   static void setElevFlag(bool flag)
+   {
+      writePreferenceSetting("elev-flag", ossimString::toString(flag).c_str());
+   }
+   static bool elevEnabled()
+   {
+      ossimString result = readPreferenceSetting("elev-flag").toStdString();
+      if(result.empty())
+      {
+         return true;
+      }
+      return result.toBool();
+      /*        return theElevEnabled; */
+   }
+   static std::string textureDetailType()
+   {
+      ossimString result = readPreferenceSetting("texture-detail-type").toStdString();
+      if(result.empty())
+      {
+         result = "medium";
+      }
+      return result;
+   }
+   static void setTextureDetailType(const std::string& type)
+   {
+      writePreferenceSetting("texture-detail-type", type.c_str());
+   }
+   static std::string elevationDetailType()
+   {
+      ossimString result = readPreferenceSetting("elevation-detail-type").toStdString();
+      if(result.empty())
+      {
+         result = "medium-low";
+      }
+      return result;
+   }
+   static void setElevationDetailType(const std::string& type)
+   {
+      writePreferenceSetting("elevation-detail-type", type.c_str());
+   }
+   static std::string cullAmountType()
+   {
+      ossimString result = readPreferenceSetting("cull-amount-type").toStdString();
+      if(result.empty())
+      {
+         result = "high";
+      }
+      return result;
+   }
+   static void setCullAmountType(const std::string& type)
+   {
+      writePreferenceSetting("cull-amount-type", type.c_str());
+   }
+   static void setElevExag(ossim_float32 value)
+   {
+      writePreferenceSetting("elev-exag", ossimString::toString(value).c_str());
+   }
+   
+   static ossim_float32 elevExag()
+   {
+      ossimString result = readPreferenceSetting("elev-exag").toStdString();
+      if(result.empty())
+      {
+         return 1.0;
+      }
+      
+      return result.toDouble();
+      /*        return theElevExag; */
+   }
+   static ossim_float32 splitMetricRatio()
+   {
+      ossimString result = readPreferenceSetting("split-metric").toStdString();
+      if(result.empty())
+      {
+         return 3.0;
+      }
+      
+      return result.toDouble();
+      /*        return theSplitMetricRatio; */
+   }
+   static ossim_uint32 elevEstimate()
+   {
+      ossimString result = readPreferenceSetting("elev-patchsize").toStdString();
+      if(result.empty())
+      {
+         return 16;
+      }
+      
+      return result.toUInt32();
+      /*        return theElevEstimate; */
+   }
+   static void setEphemerisEnabledFlag(bool flag)
+   {
+      writePreferenceSetting("ephemeris-flag", ossimString::toString(flag).c_str());
+   }
+   
+   static bool ephemerisEnabled()
+   {
+      ossimString result = readPreferenceSetting("ephemeris-flag").toStdString();
+      if(result.empty())
+      {
+         return true;
+      }
+      return result.toBool();
+   }
+   
+   static void setEphemerisAutoUpdateToCurrentTimeFlag(bool flag)
+   {
+      writePreferenceSetting("ephemeris-autoupdate-current-time-flag", ossimString::toString(flag).c_str());
+   }
+   static bool ephemerisAutoUpdateToCurrentTimeFlag()
+   {
+      ossimString result = readPreferenceSetting("ephemeris-autoupdate-current-time-flag").toStdString();
+      if(result.empty())
+      {
+         return true;
+      }
+      return result.toBool();
+   }
+   static void setSunlightEnabledFlag(bool flag)
+   {
+      writePreferenceSetting("sunlight-flag", ossimString::toString(flag).c_str());
+   }
+   
+   static bool sunlightEnabled()
+   {
+      ossimString result = readPreferenceSetting("sunlight-flag").toStdString();
+      if(result.empty())
+      {
+         return true;
+      }
+      return result.toBool();
+      /*        return theElevEnabled; */
+   }
+   static void setMoonEnabledFlag(bool flag)
+   {
+      writePreferenceSetting("moon-flag", ossimString::toString(flag).c_str());
+   }
+   
+   static bool moonEnabled()
+   {
+      ossimString result = readPreferenceSetting("moon-flag").toStdString();
+      if(result.empty())
+      {
+         return true;
+      }
+      return result.toBool();
+      /*        return theElevEnabled; */
+   }
+   
+   static void setSkyEnabledFlag(bool flag)
+   {
+      writePreferenceSetting("skydome-flag", ossimString::toString(flag).c_str());
+   }
+   static bool skyEnabled()
+   {
+      ossimString result = readPreferenceSetting("skydome-flag").toStdString();
+      if(result.empty())
+      {
+         return true;
+      }
+      return result.toBool();
+   }
+
+   static void setCloudsEnabledFlag(bool flag)
+   {
+      writePreferenceSetting("clouds-flag", ossimString::toString(flag).c_str());
+   }
+   static bool cloudsEnabled()
+   {
+      ossimString result = readPreferenceSetting("clouds-flag").toStdString();
+      if(result.empty())
+      {
+         return false;
+      }
+      return result.toBool();
+   }
+   static void setCloudCoverage(int value)
+   {
+      writePreferenceSetting("cloud-coverage", ossimString::toString(value).c_str());
+   }
+   static int cloudCoverage()
+   {
+      ossimString result = readPreferenceSetting("cloud-coverage").toStdString();
+      if(result.empty())
+      {
+         return 20;
+      }
+      return result.toInt32();
+   }
+   static void setCloudSharpness(double value)
+   {
+      writePreferenceSetting("cloud-sharpness", ossimString::toString(value).c_str());
+   }
+   static double cloudSharpness()
+   {
+      ossimString result = readPreferenceSetting("cloud-sharpness").toStdString();
+      if(result.empty())
+      {
+         return .96;
+      }
+      return result.toDouble();
+   }
+   static void setPercentVisibility(int value)
+   {
+      writePreferenceSetting("percent-visibility", ossimString::toString(value).c_str());
+   }
+   static int percentVisibility()
+   {
+      ossimString result = readPreferenceSetting("percent-visibility").toStdString();
+      if(result.empty())
+      {
+         return 100;
+      }
+      return result.toInt32();
+   }
+   static const ossimFilename elevCacheDir()
+   {
+      ossimString result = readPreferenceSetting("elev-cache").toStdString();
+      
+      return ossimFilename(result);
+      /*        return theElevCache; */
+   }
+   /*     static ossimPlanetLandType landType() */
+   /*     { */
+   /*        return theLandType; */
+   /*     } */
+   static ossim_uint32 levelOfDetail()
+   {
+      ossimString result = readPreferenceSetting("level-of-detail").toStdString();
+      if(result.empty())
+      {
+         return 20;
+      }
+      return result.toUInt32();
+      /*        return theLevelOfDetail; */
+   }
+   static void setAutomaticStagingEnabledFlag(bool flag)
+   {
+      writePreferenceSetting("automatic-staging-flag", ossimString::toString(flag).c_str());
+   }
+   static bool automaticStagingEnabledFlag()
+   {
+      ossimString result = readPreferenceSetting("automatic-staging-flag").toStdString();
+      if(result.empty())
+      {
+         return true;
+      }
+      
+      return result.toBool();
+   }
+   static void setHudFlag(bool flag)
+   {
+      writePreferenceSetting("hud-flag", ossimString::toString(flag).c_str());
+   }
+   
+   static bool hudEnabled()
+   {
+      ossimString result = readPreferenceSetting("hud-flag").toStdString();
+      if(result.empty())
+      {
+         return true;
+      }
+      
+      return result.toBool();
+      /*        return theHudEnabled; */
+   }
+   static bool mipMapping()
+   {
+      ossimString result = readPreferenceSetting("mipmap-flag").toStdString();
+      if(result.empty())
+      {
+         return true;
+      }
+      
+      return result.toBool();
+      /*        return theMipMapping; */
+   }
+   
+	static void setArchiveMappingEnabledFlag(bool flag)
+	{
+		writePreferenceSetting("Sousa/archive-mapping-enabled", ossimString::toString(flag).c_str());
+	}
+	static bool archiveMappingEnabled()
+	{
+		ossimString result = readPreferenceSetting("Sousa/archive-mapping-enabled").toStdString();
+		if( result.empty() )
+		{
+			return true;
+		}
+		return result.toBool();
+	}
+   static void setSousaIdentityUserName(const QString& value)
+   {
+		writePreferenceSetting("Sousa/Identity/username", value);
+   }
+   static QString sousaIdentityUserName()
+   {
+		return readPreferenceSetting("Sousa/Identity/username");
+   }
+   static void setSousaIdentityDomain(const QString& value)
+   {
+		writePreferenceSetting("Sousa/Identity/domain", value);
+   }
+   static QString sousaIdentityDomain()
+   {
+		return readPreferenceSetting("Sousa/Identity/domain");
+   }
+   static void setSousaConnectionAutoConnectOnStart(bool value)
+   {
+		writePreferenceSetting("Sousa/Connection/autoConnectOnStart", ossimString::toString(value).c_str());
+   }
+   static bool sousaConnectionAutoConnectOnStart()
+   {
+		ossimString result = readPreferenceSetting("Sousa/Connection/autoConnectOnStart").toStdString();
+		if( result.empty() )
+		{
+			return true;
+		}
+		return result.toBool();
+   }
+   
+   static void setSousaConnectionName(const QString& value)
+   {
+		writePreferenceSetting("Sousa/Connection/name", value);
+   }
+   static QString sousaConnectionName()
+   {
+		return readPreferenceSetting("Sousa/Connection/name");
+   }
+   static void setSousaConnectionIp(const QString& value)
+   {
+		writePreferenceSetting("Sousa/Connection/ip", value);
+   }
+   static QString sousaConnectionIp()
+   {
+		return readPreferenceSetting("Sousa/Connection/ip");
+   }
+   static void setSousaConnectionPort(const QString& value)
+   {
+		writePreferenceSetting("Sousa/Connection/port", value);
+   }
+   static QString sousaConnectionPort()
+   {
+		return readPreferenceSetting("Sousa/Connection/port");
+   }
+   static void setSousaConnectionPortType(const QString& value)
+   {
+		writePreferenceSetting("Sousa/Connection/portType", value);
+   }
+   static QString sousaConnectionPortType()
+   {
+		return readPreferenceSetting("Sousa/Connection/portType");
+   }
+   static std::deque<osg::ref_ptr<ossimPlanetTextureLayer> >& referenceImages()
+   {
+      return theReferenceImages;
+   }
+   
+   static ossimFilename themePath()
+   {
+      return theThemePath.dirCat("default");
+   }
+   static QStringList wmsSettingsSubkeyList();
+   static QString readWmsSettingsEntry(const QString& key);
+   static void writeWmsSettingsEntry(const QString& key,
+                                     const QString& value);
+   static void removeWmsSettingsKey(const QString& key);
+   
+   static QStringList preferenceSettingsSubkeyList(const QString& key);
+   static void removePreferenceSetting(const QString& key);
+   static QString readPreferenceSetting(const QString& key);
+   static void    writePreferenceSetting(const QString& key,
+                                         const QString& value);
+   
+   static QString readSettingsEntry(const QString& entry);
+   static QStringList settingsSubKeyList(const QString& key);
+   static void writeSettingsValue(const QString& key,
+                                  const QString& value);
+   static void settingsRemoveKey(const QString& key);    
+   static long initInputDevices();
+   static void terminateInputDevices();
+protected:
+   static QSettings*                           theSettings;
+   static QString                              theUserSupportDirectory;
+   static QString                              theUserDirectory;
+   static ReferenceImageListType               theReferenceImages;
+   static std::vector<ossimFilename>           thePlugins;
+   static ossimFilename                        theThemePath;
+   static ossimFilename                        theCompassRing; 
+  // static ossimFilename                        theCompassRose; 
+};
+
+
+#endif
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtDropDownDelegate.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtDropDownDelegate.h
new file mode 100644
index 0000000..bb638fe
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtDropDownDelegate.h
@@ -0,0 +1,30 @@
+#ifndef ossimPlanetQtDropDownDelegate_HEADER
+#define ossimPlanetQtDropDownDelegate_HEADER
+#ifdef check
+#undef check
+#endif
+#include <QtGui/QItemDelegate>
+#include <ossimPlanetQt/ossimPlanetQtExport.h>
+
+
+class OSSIMPLANETQT_DLL ossimPlanetQtDropDownDelegate : public QItemDelegate
+{
+public:
+   ossimPlanetQtDropDownDelegate(QObject* parent=0);
+
+   virtual QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
+                                 const QModelIndex &index) const;
+   
+   virtual void setEditorData(QWidget *editor, const QModelIndex &index) const;
+   virtual void setModelData(QWidget *editor, QAbstractItemModel *model,
+                     const QModelIndex &index) const;
+   
+   virtual void updateEditorGeometry(QWidget *editor,
+                                     const QStyleOptionViewItem &option, const QModelIndex &index) const;
+
+   void setChoices(const QStringList& choices);
+protected:
+   QStringList theChoices;
+};
+
+#endif
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtEvent.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtEvent.h
new file mode 100644
index 0000000..e627d54
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtEvent.h
@@ -0,0 +1,389 @@
+#ifndef ossimPlanetQtEvent_HEADER
+#define ossimPlanetQtEvent_HEADER
+#include <QtCore/QEvent>
+#include <QtCore/QString>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimXmlNode.h>
+#include <ossimPlanet/ossimPlanetNode.h>
+#include <ossimPlanet/ossimPlanetKmlLayerNode.h>
+#include <ossimPlanet/ossimPlanetVideoLayerNode.h>
+#include <ossimPlanet/ossimPlanetTextureLayer.h>
+#include <ossimPlanet/ossimPlanetTextureLayerGroup.h>
+class ossimPlanetQtLegendItem;
+
+namespace ossimPlanetQt
+{
+   enum ossimPlanetQtEventId
+   {
+      ANIMATION_EVENT_TYPE       = QEvent::User + 8000,
+      WMS_SETTINGS_EVENT_TYPE    = ANIMATION_EVENT_TYPE + 1,
+      LEGEND_XML_EVENT_TYPE      = WMS_SETTINGS_EVENT_TYPE + 1,
+      KML_FILE_EVENT_TYPE        = LEGEND_XML_EVENT_TYPE + 1,
+      NODE_CALLBACK_EVENT_TYPE   = KML_FILE_EVENT_TYPE + 1,
+      NODE_PROPERTY_EVENT_TYPE        = NODE_CALLBACK_EVENT_TYPE + 1,
+      IMAGE_LAYER_EVENT          = NODE_PROPERTY_EVENT_TYPE + 1,
+      LEGEND_ITEM_PROPERTY_EVENT = IMAGE_LAYER_EVENT + 1,
+		MESSAGE_EVENT_TYPE         = LEGEND_ITEM_PROPERTY_EVENT
+   };
+   
+   class Event : public QEvent
+   {
+   public:
+      Event(QEvent::Type type)
+         :QEvent(type)
+      {
+      }
+   };
+
+   class AnimationPathEvent : public ossimPlanetQt::Event
+   {
+   public:
+      AnimationPathEvent(const ossimString& animationPath="")
+         :Event((QEvent::Type)ANIMATION_EVENT_TYPE)
+         {
+            if(!animationPath.empty())
+            {
+               theAnimationPathList.push_back(animationPath);
+            }
+         }
+         ossim_uint32 animationPathCount()const
+         {
+            return theAnimationPathList.size();
+         }
+         void animationPath(ossimString& animationPath,
+                            ossim_uint32 idx=0)const
+         {
+            animationPath = "";
+            if(idx < theAnimationPathList.size())
+            {
+               animationPath = theAnimationPathList[idx];
+            }
+         }
+         void setAnimationPaths(const std::vector<ossimString>& paths)
+         {
+            theAnimationPathList = paths;
+         }
+   protected:
+         std::vector<ossimString> theAnimationPathList;
+   };
+   class LegendXmlEvent : public ossimPlanetQt::Event
+   {
+   public:
+      LegendXmlEvent(ossimRefPtr<ossimXmlNode> xml)
+         :Event((QEvent::Type)LEGEND_XML_EVENT_TYPE)
+      {
+         theXml = xml;
+      }
+         ossimRefPtr<ossimXmlNode> xmlNode()
+         {
+            return theXml;
+         }
+   protected:
+      ossimRefPtr<ossimXmlNode> theXml;
+      
+   };
+   class KmlFileEvent : public ossimPlanetQt::Event
+   {
+   public:
+      KmlFileEvent(const ossimFilename& file)
+         :Event((QEvent::Type)KML_FILE_EVENT_TYPE),
+         theFilename(file)
+      {
+      }
+      const ossimFilename& filename()
+      {
+         return theFilename;
+      }
+   protected:
+         ossimFilename theFilename;      
+   };
+   class NodeCallbackEvent : public ossimPlanetQt::Event
+	{
+	public:
+		enum NodeEventType
+		{
+			NodeEventType_ADD    = 1,
+			NodeEventType_REMOVE,
+			NodeEventType_DESTRUCTING,
+		};
+		NodeCallbackEvent(NodeEventType type)
+		:Event((QEvent::Type)NODE_CALLBACK_EVENT_TYPE),
+		theItem(0),
+		theNode(0),
+		theNodeEventType(type)
+		{
+		}
+		NodeCallbackEvent(osg::ref_ptr<ossimPlanetNode> node,
+								NodeEventType type)
+		:Event((QEvent::Type)NODE_CALLBACK_EVENT_TYPE),
+		theItem(0),
+		theNode(node.get()),
+		theNodeEventType(type)
+		{
+		}
+		NodeCallbackEvent(ossimPlanetQtLegendItem* item,
+								osg::ref_ptr<ossimPlanetNode> node,
+								NodeEventType type)
+		:Event((QEvent::Type)NODE_CALLBACK_EVENT_TYPE),
+		theItem(item),
+		theNode(node.get()),
+		theNodeEventType(type)
+		{
+		}
+		void setNodeEventType(NodeEventType t)
+		{
+			theNodeEventType = t;
+		}
+		NodeEventType nodeEventType()const
+		{
+			return theNodeEventType;
+		}
+		const ossimPlanetNode* node()const
+		{
+			return theNode.get();
+		}
+		ossimPlanetNode* node()
+		{
+			return theNode.get();
+		}
+		void setNode(ossimPlanetNode* n)
+		{
+			theNode = n;
+		}
+		void setItem(ossimPlanetQtLegendItem* value)
+		{
+			theItem = value;
+		}
+		ossimPlanetQtLegendItem* item()
+		{
+			return theItem;
+		}
+	protected:
+		ossimPlanetQtLegendItem*      theItem;
+		osg::ref_ptr<ossimPlanetNode> theNode;
+		NodeEventType                 theNodeEventType;
+	};
+	
+   class WmsSettingsEvent : public ossimPlanetQt::Event
+   {
+   public:
+      class WmsSettingsProperties
+      {
+      public:
+         WmsSettingsProperties(const ossimString& name,
+                               const ossimString& url="",
+                               const ossimString& cache="",
+                               const ossimString& proxyHost="",
+                               const ossimString& proxyPort="",
+                               const ossimString& proxyUser="",
+                               const ossimString& proxyPassword="")
+            :theName(name),
+            theUrl(url),
+            theCache(cache),
+            theProxyHost(proxyHost),
+            theProxyPort(proxyPort),
+            theProxyUser(proxyUser),
+            theProxyPassword(proxyPassword)
+            {
+            }
+         ossimString theName;
+         ossimString theUrl;
+         ossimString theCache;
+         ossimString theProxyHost;
+         ossimString theProxyPort;
+         ossimString theProxyUser;
+         ossimString theProxyPassword;
+      };
+      enum WmsSettiingsType
+      {
+         NONE = 0,
+         ADD  = 1,
+         DELETE = 2
+      };
+      WmsSettingsEvent(const WmsSettingsProperties& settings,
+                       WmsSettiingsType settingsType=ADD)
+         :Event((QEvent::Type)WMS_SETTINGS_EVENT_TYPE),
+         theSettingsType(settingsType)
+      {
+         theSettingsPropertyList.push_back(settings);
+      }
+      
+      WmsSettingsEvent(const std::vector<WmsSettingsProperties>& settings,
+                       WmsSettiingsType settingsType=ADD)
+         :Event((QEvent::Type)WMS_SETTINGS_EVENT_TYPE),
+         theSettingsPropertyList(settings),
+         theSettingsType(settingsType)
+      {
+         
+      }
+         const std::vector<WmsSettingsProperties>& settingsPropertyList()const
+         {
+            return theSettingsPropertyList;
+         }
+   protected:
+      std::vector<WmsSettingsProperties> theSettingsPropertyList;
+      WmsSettiingsType theSettingsType;
+   };
+   class NodePropertyEvent : public ossimPlanetQt::Event
+   {
+   public:
+      NodePropertyEvent (ossimPlanetNode* node,
+                    const ossimString& name)
+      :Event((QEvent::Type)NODE_PROPERTY_EVENT_TYPE),
+      theNode(node),
+      theName(name)
+      {
+         
+      }
+      const ossimString& name()const
+      {
+         return theName;
+      }
+      void setName(const ossimString& name)
+      {
+         theName = name;
+      }
+      
+		ossimPlanetNode* node()
+		{
+			return theNode.get();
+		}
+      const ossimPlanetNode* node()const
+      {
+         return theNode.get();
+      }
+      void setNode(ossimPlanetNode* node)
+      {
+         theNode = node;
+      }
+   protected:
+      osg::ref_ptr<ossimPlanetNode> theNode;
+      ossimString theName;
+   };
+   
+   class ImageLayerEvent : public ossimPlanetQt::Event
+   {
+   public:
+      enum ActionType
+      {
+         ADD = 0, // this is used to add a layer to the legend
+			ADDED, // this says a layer was added.
+         REMOVED // this says a layer was removed.
+      };
+      ImageLayerEvent(ossimPlanetTextureLayer* layer,
+                      ActionType actionType=ImageLayerEvent::ADD)
+      :Event((QEvent::Type)IMAGE_LAYER_EVENT),
+      theLayer(layer),
+      theActionType(actionType)
+      {
+			if(layer)
+			{
+				osg::ref_ptr<ossimPlanetTextureLayerGroup> group = layer->parent(0);
+				if(group.valid())
+				{
+					theIndex = group->findLayerIndex(layer);
+				}
+			}
+      }
+      osg::ref_ptr<ossimPlanetTextureLayer> layer()
+      {
+         return theLayer;
+      }
+      const osg::ref_ptr<ossimPlanetTextureLayer> layer()const
+      {
+         return theLayer;
+      }
+      void setLayer(ossimPlanetTextureLayer* layer)
+      {
+         theLayer = layer;
+      }
+      ActionType actionType()const
+      {
+         return theActionType;
+      }
+      void setActionType(ActionType type)
+      {
+         theActionType = type;
+      }
+		ossim_int32 layerIndex()const
+		{
+			return theIndex;
+		}
+   protected:
+      osg::ref_ptr<ossimPlanetTextureLayer> theLayer;
+		ossim_int32 theIndex;
+      ActionType theActionType;
+   };
+
+   class LegendItemProperty : public ossimPlanetQt::Event
+   {
+   public:
+      LegendItemProperty(const ossimString& name,
+                      ossimPlanetQtLegendItem* item)
+      :Event((QEvent::Type)LEGEND_ITEM_PROPERTY_EVENT),
+      theName(name),
+      theItem(item)
+      {
+      }
+      void setItem(ossimPlanetQtLegendItem* value)
+      {
+         theItem = value;
+      }
+      ossimPlanetQtLegendItem* item()
+      {
+         return theItem;
+      }
+      void setName(const ossimString& name)
+      {
+         theName = name;
+      }
+      const ossimString& name()const
+      {
+         return theName;
+      }
+   protected:
+      ossimString theName;
+      ossimPlanetQtLegendItem* theItem;
+   };
+   class MessageEvent : public ossimPlanetQt::Event
+   {
+   public:
+		enum MessageType
+		{
+			ERROR_MESSAGE_TYPE = 0,
+			WARNING_MESSAGE_TYPE,
+			DEBUG_MESSAGE_TYPE,
+			INFO_MESSAGE_TYPE
+		};
+      MessageEvent(const QString& msg,
+		  MessageType msgType)
+      :Event((QEvent::Type)MESSAGE_EVENT_TYPE),
+		theMessage(msg),
+		theMessageType(msgType)
+		{
+			
+		}
+		const QString& message()const
+		{
+			return theMessage;
+		}
+		void setMessage(const QString& msg)
+		{
+			theMessage = msg;
+		}
+		MessageType messageType()const
+		{
+			return theMessageType;
+		}
+		void setMessageType(MessageType msgType)
+		{
+			theMessageType = msgType;
+		}
+	protected:
+		QString theMessage;
+		MessageEvent::MessageType theMessageType;
+	};
+		
+}    
+
+#endif
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtExport.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtExport.h
new file mode 100644
index 0000000..348e641
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtExport.h
@@ -0,0 +1,52 @@
+/* -*-c++-*- libwms - Copyright (C) since 2004 Garrett Potts 
+ *
+ * This library is open source and may be redistributed and/or modified under  
+ * the terms of the libwms Public License (WMSGPL) version 0.0 or 
+ * (at your option) any later version.  The full license is in LICENSE file
+ * included with this distribution.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
+ * libwms Public License for more details.
+*/
+#ifndef ossimPlanetQtExport_HEADER
+#define ossimPlanetQtExport_HEADER
+// define used to include in API which is being fazed out
+// if you can compile your apps with this turned off you are
+// well placed for compatablity with future versions.
+#define USE_DEPRECATED_API
+
+#if defined(_MSC_VER)
+    #pragma warning( disable : 4244 )
+    #pragma warning( disable : 4251 )
+    #pragma warning( disable : 4267 )
+    #pragma warning( disable : 4275 )
+    #pragma warning( disable : 4290 )
+    #pragma warning( disable : 4786 )
+    #pragma warning( disable : 4305 )
+#endif
+
+#if defined(_MSC_VER) || defined(__MINGW32__) || defined( __BCPLUSPLUS__)  || defined( __MWERKS__)
+#    ifdef OSSIMPLANETQT_LIBRARY
+#        define OSSIMPLANETQT_EXPORT   __declspec(dllexport)
+#        define OSSIMPLANETQT_DLL   OSSIMPLANETQT_EXPORT
+#    else
+#        define OSSIMPLANETQT_EXPORT   __declspec(dllimport)
+#        define OSSIMPLANETQT_DLL   OSSIMPLANETQT_EXPORT
+#    endif /* OSSIMPLANETQT_LIBRARY */
+#else
+#    define OSSIMPLANETQT_EXPORT
+#    define OSSIMPLANETQT_DLL   OSSIMPLANETQT_EXPORT
+#endif  
+
+// set up define for whether member templates are supported by VisualStudio compilers.
+#ifdef _MSC_VER
+# if (_MSC_VER >= 1300)
+#  define __STL_MEMBER_TEMPLATES
+# endif
+#endif
+
+
+
+#endif
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtGlWidget.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtGlWidget.h
new file mode 100644
index 0000000..3a1b16d
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtGlWidget.h
@@ -0,0 +1,266 @@
+#ifndef  ossimPlanetQtGlWidget_HEADER
+#define ossimPlanetQtGlWidget_HEADER
+#include <QtOpenGL/QGLWidget>
+#include <iostream>
+#include <osg/Node>
+#include <osg/Timer>
+#include <osg/Matrixd>
+#include <osg/Material>
+#include <osg/FrameStamp>
+#include <osgDB/DatabasePager>
+#include <osgGA/GUIEventHandler>
+#include <osgGA/EventQueue>
+#include <osgGA/EventVisitor>
+#include <osgDB/ReadFile>
+#include <osgUtil/SceneView>
+#include "ossimPlanetQtActionAdapter.h"
+#include <ossimPlanet/ossimPlanet.h>
+#include <ossimPlanet/ossimPlanetSceneView.h>
+#include <ossimPlanet/ossimPlanetManipulator.h>
+#include <osgDB/DatabasePager>
+//#include <ossimPlanet/ossimPlanetDatabasePager.h>
+#include <ossimPlanet/ossimPlanetLookAt.h>
+#include <ossimPlanet/ossimPlanetViewer.h>
+//#include <osgGA/MatrixManipulator>
+#include <osgGA/CameraManipulator>
+#include <osgGA/StateSetManipulator>
+#include <ossimPlanet/ossimPlanetVisitors.h>
+/* #include <ossimPlanet/ossimPlanet.h> */
+#include <osgViewer/Viewer>
+#include <osgViewer/CompositeViewer>
+#include <osgViewer/ViewerEventHandlers>
+#include <OpenThreads/ReentrantMutex>
+class ossimOsgMainFormController;
+
+class ossimPlanetQtEmbedded;
+class OSSIMPLANETQT_DLL ossimPlanetQtGlWidget : public QGLWidget
+{
+   Q_OBJECT
+public:
+   ossimPlanetQtGlWidget( QWidget * parent = 0, const QGLWidget * shareWidget = 0, Qt::WindowFlags f = 0 );
+   ossimPlanetQtGlWidget( const QGLFormat & format, QWidget * parent = 0, const QGLWidget * shareWidget = 0, Qt::WindowFlags f = 0 );
+   virtual ~ossimPlanetQtGlWidget();
+
+   osgViewer::GraphicsWindow* getGraphicsWindow() { return theGraphicsWindow.get(); }
+   const osgViewer::GraphicsWindow* getGraphicsWindow() const { return theGraphicsWindow.get(); }
+   
+   void setMouseNavigationFlag(bool flag);
+   bool getMouseNavigationFlag()const;
+   
+   virtual void dropEvent ( QDropEvent * event );
+   virtual void dragEnterEvent(QDragEnterEvent *event);
+  
+protected slots:
+   
+   void doIdleAnimationFrame();
+   
+signals:
+   void signalMouseMoveEvent(QMouseEvent* event);
+   void signalMousePressEvent(QMouseEvent* event);
+   void signalMouseReleaseEvent(QMouseEvent* event);
+   void signalMouseDoubleClickEvent(QMouseEvent* event);
+   void signalViewPositionChangedLatLonHgtHPR(double lat, double lon, double height,
+                                              double heading, double pitch, double roll);
+   void signalDropEvent(QDropEvent * event);
+   void signalDragEnterEvent(QDragEnterEvent *event);
+   
+protected:
+   void init();
+   virtual void frameIfNeeded()=0;
+   virtual void resizeGL( int width, int height );
+   virtual void keyPressEvent( QKeyEvent* event );
+   virtual void keyReleaseEvent( QKeyEvent* event );
+   virtual void mousePressEvent( QMouseEvent* event );
+   virtual void mouseReleaseEvent( QMouseEvent* event );
+   virtual void mouseMoveEvent( QMouseEvent* event );
+   virtual void mouseDoubleClickEvent ( QMouseEvent * event );
+   virtual void wheelEvent ( QWheelEvent * event );
+   osgGA::GUIEventAdapter::KeySymbol qtKeyToOsg(QKeyEvent * e)const;
+   void addModifiers(osg::ref_ptr<osgGA::EventQueue> eventQueue, Qt::KeyboardModifiers modifier);
+   
+   osg::ref_ptr<osgViewer::GraphicsWindowEmbedded> theGraphicsWindow;
+   bool         theMouseNavigationFlag;
+   bool thePassAllUnhandledEventsFlag;
+};
+class ossimPlanetQtViewer : public ossimPlanetQtGlWidget
+{
+public:
+   ossimPlanetQtViewer(QWidget * parent = 0, const QGLWidget * shareWidget = 0, Qt::WindowFlags f = 0);
+   ossimPlanetQtViewer( const QGLFormat & format, QWidget * parent = 0, const QGLWidget * shareWidget = 0, Qt::WindowFlags f = 0 );
+   virtual ~ossimPlanetQtViewer();
+   void setViewer(ossimPlanetViewer* viewer);
+   virtual void paintGL();
+   
+   virtual void frameIfNeeded();
+   virtual void mouseMoveEvent( QMouseEvent* event );
+   ossimPlanetViewer* viewer();
+   void setCurrentSimulationTime(double simtime = USE_REFERENCE_TIME);
+   void setTargetFrameTimeInMilliseconds(float millisecondRate);
+   void setTargetFramesPerSecond(float framesPerSecond);
+protected:
+   virtual void resizeGL( int width, int height );
+   void clearPointersInViewer();
+   QTimer *timer();    // Ensures that qtimer_ exists
+   void noRenderCycle();
+   OpenThreads::ReentrantMutex theDrawMutex;
+//   bool theRequestRedrawFlag;
+//   bool theRequestContinuousUpdateFlag;
+   int theTimerInterval;
+   osg::Matrixd theCurrentViewMatrix;
+   osg::Matrixd theCurrentViewMatrixInverse;
+   osg::Vec3d   theCurrentViewLlh;
+   osg::Vec3d   theCurrentViewHpr;
+   osg::ref_ptr<ossimPlanetViewer> theViewer;
+   double theCurrentSimulationTime;
+   float theFrameRateLimiter;
+private:
+   QTimer *theQTimer;	// This  should always be accessed via the timer() method
+};
+
+#if 0
+class OSSIMPLANETQT_DLL ossimPlanetQtGlWidget : public QGLWidget
+{
+   Q_OBJECT
+public:
+    /** The RedrawPolicy controls how the window is updated. */
+   enum RedrawPolicy
+   {
+      ossimPlanetQtGlWidgetRedraw_AS_NEEDED=0,      ///< Only redraw as needed (Default), e.g. when a window is popped forward
+      ossimPlanetQtGlWidgetRedraw_CONSTANT=1        ///< Redraw constantly
+   };
+   ossimPlanetQtGlWidget( QWidget * parent = 0, const QGLWidget * shareWidget = 0, Qt::WindowFlags f = 0 );
+   ossimPlanetQtGlWidget( const QGLFormat & format, QWidget * parent = 0, const QGLWidget * shareWidget = 0, Qt::WindowFlags f = 0 );
+   virtual ~ossimPlanetQtGlWidget();
+
+
+   // Action Adapter interface
+
+   void stopClearPaging();
+   void clearPager();
+   void startPaging();
+   void cancelPager();
+   
+   void setSceneData(osg::Node *scene);
+   void setRedrawPolicy(RedrawPolicy);
+   
+   /** Get the current redraw mode */
+   RedrawPolicy getRedrawPolicy() const;
+   void setPassAllUnhandledEventsFlag(bool flag);
+   void update();
+   double qtMouseXToOsg(int)const;
+   double qtMouseYToOsg(int)const;
+   double qtMouseXToOsgViewport(int)const;
+   double qtMouseYToOsgViewport(int)const;
+
+   /* ossimRefPtr<ossimPlanetLookAt> getLookAt();
+    */   
+   bool intersectSceneQtCoordinates(osg::Vec3d& pt,
+                                    double x,// in qt coordinates
+                                    double y, // in qt coordinates
+                                    double shift=0.0);
+   bool intersectSceneOsgViewportCoordinates(osg::Vec3d& pt,
+                                             double x, // in normalized osg viewport coordinates
+                                             double y, // in normalized osg viewport coordinates
+                                             double shift=0.0);
+   bool pickObjectsQtCoordinates(osgUtil::IntersectVisitor::HitList& hits,
+                                 osg::Node* startNode,
+                                 double x, double y,
+                                 double startPointShift=0.0);
+   bool pickObjectsOsgViewportCoordinates(osgUtil::IntersectVisitor::HitList& hits,
+                                          osg::Node* startNode,
+                                          double vx, double vy,
+                                          double startPointShift = 0.0);
+   void getViewPositionLatLonHgtHPR(double& lat, double& lon, double& height,
+                                    double& heading, double& pitch, double& roll)const;
+   void setMouseNavigationFlag(bool flag);
+   bool getMouseNavigationFlag()const;
+
+   osg::ref_ptr<ossimPlanetSceneView> sceneView();
+
+   double getFramesPerSecond()const;
+   double getUpdateTimeInSeconds()const;
+   double getCullTimeInSeconds()const;
+   double getDrawTimeInSeconds()const;
+   virtual void dropEvent ( QDropEvent * event );
+   virtual void dragEnterEvent(QDragEnterEvent *event);
+
+   const osg::ref_ptr<ossimPlanetManipulator> manipulator()const;
+   void playRecording();
+   void startRecording();
+   void stopRecording();
+   void saveRecording(std::ostream& recording);
+   bool loadRecording(std::istream& recording);
+   
+protected slots:
+
+    void doIdleAnimationFrame();
+
+signals:
+    void signalMouseMoveEvent(QMouseEvent* event);
+    void signalMousePressEvent(QMouseEvent* event);
+    void signalMouseReleaseEvent(QMouseEvent* event);
+    void signalMouseDoubleClickEvent(QMouseEvent* event);
+    void signalDropEvent(QDropEvent * event);
+    void signalDragEnterEvent(QDragEnterEvent *event);
+    void signalPaintGl();
+protected:
+   void init();
+   virtual void initializeGL ();
+   virtual void resizeGL ( int width, int height );
+   virtual void paintGL ();
+   virtual void keyPressEvent(QKeyEvent * e);
+   virtual void keyReleaseEvent(QKeyEvent * e);
+   virtual void mouseDoubleClickEvent ( QMouseEvent * e );
+   virtual void mouseMoveEvent(QMouseEvent *);
+   virtual void mousePressEvent(QMouseEvent *);
+   virtual void mouseReleaseEvent(QMouseEvent *);
+   virtual void handleGUIActionUpdate();
+   QTimer *timer();    // Ensures that qtimer_ exists
+   virtual void wheelEvent ( QWheelEvent * e );   
+   virtual void moveEvent ( QMoveEvent * event );
+
+   osgGA::GUIEventAdapter::KeySymbol qtKeyToOsg(QKeyEvent * e)const;
+   void addModifiers(Qt::KeyboardModifiers modifier);
+   
+   bool                                    thePassAllUnhandledEventsFlag;
+   osg::ref_ptr<osgGA::EventQueue>         theEventQueue;
+   osg::ref_ptr<ossimPlanetSceneView>      theSceneView;
+   osg::ref_ptr<osgGA::EventVisitor>       theEventVisitor;
+   osg::ref_ptr<osgDB::DatabasePager>  theDatabasePager;
+   osg::ref_ptr<osg::FrameStamp>           theFrameStamp;
+   osg::ref_ptr<osgGA::GUIEventHandler>    theGuiEventHandler;
+   osg::ref_ptr<ossimPlanetManipulator>    theMatrixManipulator;
+   osg::ref_ptr<osgGA::StateSetManipulator> theStateSetManipulator;
+   ossimPlanetQtActionAdapter              theActionAdapter;
+   int                                     theTimerId;
+   QTimer *theQTimer;	// This  should always be accessed via the timer() method
+/*    bool theContinualUpdateFlag; */
+   RedrawPolicy theRedrawPolicy;
+   osg::ref_ptr<osg::Material> theMaterial;
+   
+   static osg::Timer theTimer;
+   static const osg::Timer_t theInitialTick;
+   unsigned int theTimerInterval;
+   bool         theMouseNavigationFlag;
+   osg::Matrixd theProjToWindowMatrix;
+   osg::Matrixd theWindowToProjMatrix;
+
+   mutable double theUpdateTime;
+   mutable double theCullTime;
+   mutable double theDrawTime;
+   mutable double theFrameTime;
+
+   double theViewLat;
+   double theViewLon;
+   double theViewHgt;
+   double theViewHeading;
+   double theViewPitch;
+   double theViewRoll;
+
+   osg::ref_ptr<ossimPlanet> thePlanet;
+/*    bool theFullScreenToggleFlag; */
+/*    QWidget* theSavedParent; */
+};
+
+#endif
+#endif
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtImage.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtImage.h
new file mode 100644
index 0000000..825e60b
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtImage.h
@@ -0,0 +1,21 @@
+#ifndef ossimPlanetQtImage_HEADER
+#define ossimPlanetQtImage_HEADER
+#include <QtGui/QImage>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossimPlanetQt/ossimPlanetQtExport.h>
+
+class OSSIMPLANETQT_DLL ossimPlanetQtImage : public QImage
+{
+public:
+   ossimPlanetQtImage(const QImage& img);
+   ossimPlanetQtImage(const ossimPlanetQtImage& img);
+   
+   ossimRefPtr<ossimImageData> getOssimImage()const;
+   
+protected:
+   void convertToOssimImage();
+   
+   ossimRefPtr<ossimImageData> theImage;
+};
+
+#endif
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtLayerOperation.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtLayerOperation.h
new file mode 100644
index 0000000..3a60cc5
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtLayerOperation.h
@@ -0,0 +1,29 @@
+#ifndef ossimPlanetQtLayerOperation_HEADER
+#define ossimPlanetQtLayerOperation_HEADER
+#include <QtGui/QDialog>
+#include <ossimPlanetQt/ui_ossimPlanetQtLayerOperation.h>
+//#include <ossimPlanet/ossimPlanetLand.h>
+#include <ossimPlanetQt/ossimPlanetQtExport.h>
+
+class OSSIMPLANETQT_DLL ossimPlanetQtLayerOperation : public QDialog, public Ui::ossimPlanetQtLayerOperation
+{
+   Q_OBJECT
+
+public:
+   ossimPlanetQtLayerOperation(QWidget *parent=0);
+
+//   void setLand(osg::ref_ptr<ossimPlanetLand> land);
+//   osg::ref_ptr<ossimPlanetLand> land();
+//   const osg::ref_ptr<ossimPlanetLand> land()const;
+
+protected slots:
+   void on_theOpacitySlider_valueChanged(int value);
+   void on_theSwipeSlider_valueChanged(int value);
+   void on_theOperationType_activated(const QString& v);
+protected:
+   void populateControl();
+   
+//   osg::ref_ptr<ossimPlanetLand> theLand;
+};
+
+#endif
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtLegend.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtLegend.h
new file mode 100644
index 0000000..e097b07
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtLegend.h
@@ -0,0 +1,142 @@
+#ifndef ossimPlanetQtLegend_HEADER
+#define ossimPlanetQtLegend_HEADER
+#include <QtGui/QTreeWidget>
+#include <QtGui/QKeyEvent>
+#include <QtGui/QMenu>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimXmlNode.h>
+#include <ossimPlanet/ossimPlanetKmlLayerNode.h>
+#include <ossimPlanet/ossimPlanetVideoLayerNode.h>
+#include <ossimPlanet/ossimPlanetTextureLayer.h>
+#include <ossim/base/ossimReferenced.h>
+#include <osg/Node>
+#include <ossimPlanetQt/ossimPlanetQtExport.h>
+#include <osg/AnimationPath>
+#include <ossimPlanetQt/ossimPlanetQtEvent.h>
+#include <map>
+class ossimPlanetQtMainWindow;
+class ossimPlanetQtLegendTextureItem;
+class ossimPlanetQtLegendKmlItem;
+class ossimPlanetQtLegendItem;
+class ossimPlanetQtLegendNodeItem;
+class ossimPlanetQtLegendVideoItem;
+
+class OSSIMPLANETQT_DLL ossimPlanetQtLegend : public QTreeWidget
+{
+   Q_OBJECT
+public:
+	typedef std::map<ossimPlanetNode*, ossimPlanetQtLegendNodeItem*> NodeIndexMapType;
+	typedef std::map<ossimPlanetTextureLayer*, ossimPlanetQtLegendTextureItem*> TextureLayerIndexMapType;
+   ossimPlanetQtLegend(QWidget * parent = 0);
+
+   virtual ~ossimPlanetQtLegend();
+
+   void setMainWindow(ossimPlanetQtMainWindow* mainWindow);
+   
+   void populate();
+   void populateLegend(ossimRefPtr<ossimXmlNode> legendNode);
+   ossimPlanetQtLegendTextureItem* referenceTextureItem();
+   void addAnimationPath(osg::ref_ptr<osg::AnimationPath> path);
+   void addAnimationPath(ossimRefPtr<ossimXmlNode> path);
+	void addTextureLayerToTop(osg::ref_ptr<ossimPlanetTextureLayer> layer);
+   //void addTextureLayersToTop(ossimRefPtr<ossimXmlNode> layers);
+	void addNode(osg::ref_ptr<ossimPlanetNode> node);
+	void addBookmark(osg::ref_ptr<ossimPlanetLookAt> lookAt, const QString& name=QString(""), const QString& description=QString("") );
+   
+	void removeNodeFromLegend(osg::ref_ptr<ossimPlanetNode> node, bool removeFromLayerFlag=false);
+	
+   ossimPlanetQtMainWindow* mainWindow();
+   void mouseDoubleClickEvent ( QMouseEvent * event );
+
+   /**
+    * Will add a legend as a child to the passed in root node.
+    */ 
+   virtual ossimRefPtr<ossimXmlNode> saveXml()const;
+
+   /**
+    * The passed in node is a legend node and will traverse and populate the legend with the passed in information
+    */ 
+   virtual void loadXml(ossimRefPtr<ossimXmlNode> legendNode);
+   virtual void addXml(ossimRefPtr<ossimXmlNode> legendNode);
+   void updateTextureLayer(ossimRefPtr<ossimPlanetTextureLayer> layer);
+   
+   virtual void dropEvent ( QDropEvent * event );   
+   virtual void dragEnterEvent(QDragEnterEvent *event);
+   void editSelectedItem();
+   void deleteSelectedItems();
+   void setEnableFlagOnSelectedItems(bool flag);
+   void clearDiskCacheOnSelectedItems();
+   void refreshSelectedItems();
+   void groupSelectedItems();
+   void setLookAtForSelectedItems(const osg::ref_ptr<ossimPlanetLookAt> lookAt);
+   void setLookAtToCurrentOrientationForSelectedItems(const osg::ref_ptr<ossimPlanetLookAt> lookAt);
+   void setLookAtToCurrentRangeForSelectedItems(double range);
+   void setHistogrmaStretchModeForSelectedItems(const QString& mode);
+   void synchSelectedItems();
+   void unselectItems();
+   
+   void selectLayersContainingPosition(double lat, double lon, double hgt);
+   virtual bool event(QEvent* e);
+	
+	void removeIndexMapping(osg::ref_ptr<ossimPlanetTextureLayer>,
+									bool deleteGuiItem=false);
+	void addIndexMapping(osg::ref_ptr<ossimPlanetTextureLayer>,
+								ossimPlanetQtLegendTextureItem* item);
+protected:
+   void setHistogramStretchAndMode(ossimPlanetTextureLayer* group,
+                                   bool enabledFlag,
+                                   const std::string& mode);
+   void setHistogramStretchAndMode(ossimPlanetTextureLayerGroup* group,
+                                   bool enabledFlag,
+                                   const std::string& mode);
+#if 0
+   ossimPlanetQtLegendTextureItem* addTextureLayerToTop(osg::ref_ptr<ossimPlanetTextureLayer> layer);
+   ossimPlanetQtLegendTextureItem* addTextureLayerAfterItem(osg::ref_ptr<ossimPlanetTextureLayer> layer,
+                                                            ossimPlanetQtLegendTextureItem* item);
+#endif
+   ossimPlanetQtLegendTextureItem* addTextureLayerToTop(osg::ref_ptr<ossimPlanetTextureLayer> layer,
+                                                        ossimPlanetQtLegendTextureItem* item);
+   ossimPlanetQtLegendTextureItem* addTextureLayerToBottom(osg::ref_ptr<ossimPlanetTextureLayer> layer,
+																			  ossimPlanetQtLegendTextureItem* item);
+   ossimPlanetQtLegendTextureItem* addTextureLayerBeforeItem(osg::ref_ptr<ossimPlanetTextureLayer> layer,
+                                                             ossimPlanetQtLegendTextureItem* item);
+   void addKmlNode(osg::ref_ptr<ossimPlanetKmlLayerNode> kml);
+   void removeKmlNodeFromLegend(osg::ref_ptr<ossimPlanetKmlLayerNode> node);
+   void addVideoNode(osg::ref_ptr<ossimPlanetVideoLayerNode> node);
+   void removeVideoNodeFromLegend(osg::ref_ptr<ossimPlanetVideoLayerNode> node);
+   void keyPressEvent ( QKeyEvent * e);
+   void mousePressEvent(QMouseEvent *e);
+   void mouseMoveEvent(QMouseEvent *e);
+   void mouseReleaseEvent(QMouseEvent * e);
+   
+   void moveTextureItemFromTo(ossimPlanetQtLegendTextureItem* itemBeingMoved,
+                              ossimPlanetQtLegendTextureItem* destination);
+
+   void moveSelectedTexturesTo(ossimPlanetQtLegendTextureItem* destination);
+   ossimPlanetQtLegendNodeItem* getParentNodeItem(ossimPlanetNode* node, ossimPlanetQtLegendNodeItem* defaultValue);
+   ossimPlanetQtMainWindow* theMainWindow;
+   bool theMouseDragFlag;
+   bool theMousePressFlag;
+   QTreeWidgetItem* theItemBeingMoved;
+   QPoint theLastPressPos;
+   QMenu* theItemPopup;
+   ossimString theVersion;
+   ossimPlanetQtLegendNodeItem* theLocationItem;
+   ossimPlanetQtLegendNodeItem* theVideoItem;
+   QTreeWidgetItem* theAnimationPathRootItem;
+   std::vector<QAction*> thePopupMenuActions;
+	
+	OpenThreads::ReentrantMutex  theNodeIndexMapMutex;
+	NodeIndexMapType    theNodeIndexMap;
+	OpenThreads::ReentrantMutex  theTextureLayerIndexMapMutex;
+	TextureLayerIndexMapType    theTextureLayerIndexMap;
+	
+   OpenThreads::ReentrantMutex thePopulateLegendMutex;
+protected slots:
+   void doubleClick(QTreeWidgetItem * item, int  columnNumber); 
+   void changed(QTreeWidgetItem * item, int  columnNumber);
+   void expanded(QTreeWidgetItem * item);
+   void collapsed(QTreeWidgetItem * item);
+   void popupMenuTriggered(QAction *);
+};
+#endif
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtLegendAnimationPathItem.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtLegendAnimationPathItem.h
new file mode 100644
index 0000000..65fa268
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtLegendAnimationPathItem.h
@@ -0,0 +1,36 @@
+#ifndef ossimPlanetQtLegendAnimationPathItem_HEADER
+#define ossimPlanetQtLegendAnimationPathItem_HEADER
+#include <ossimPlanetQt/ossimPlanetQtLegendItem.h>
+#include <osg/AnimationPath>
+#include <osg/ref_ptr>
+
+class ossimPlanetQtLegendAnimationPathItem : public ossimPlanetQtLegendItem
+{
+public:
+   ossimPlanetQtLegendAnimationPathItem(QTreeWidgetItem* item,
+                                  const QString& name);
+   ossimPlanetQtLegendAnimationPathItem(QTreeWidget* treeWidget,
+                           const QString& s);
+   ossimPlanetQtLegendAnimationPathItem();
+   
+   void setAnimationPath(osg::ref_ptr<osg::AnimationPath> animationPath);
+   osg::ref_ptr<osg::AnimationPath> animationPath();
+   
+   virtual void deleteLayer(bool deleteThis=false);
+   virtual ossimRefPtr<ossimXmlNode> saveXml()const;
+   virtual void loadXml(ossimRefPtr<ossimXmlNode> node,
+                        std::vector<ossimPlanetOperation*>& activityList);
+
+   virtual const osg::ref_ptr<ossimPlanetLookAt> getLookAt()const;
+   virtual void setLookAt(osg::ref_ptr<ossimPlanetLookAt> lookAt);
+
+   virtual const osg::ref_ptr<ossimPlanetExtents> getExtents()const;
+   
+   void getAnimationPathAsString(std::string& animationPath);
+   void setAnimationPathFromString(const std::string& animationPath);
+    
+protected:
+   osg::ref_ptr<osg::AnimationPath> theAnimationPath;
+};
+
+#endif
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtLegendItem.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtLegendItem.h
new file mode 100644
index 0000000..ca8c8fa
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtLegendItem.h
@@ -0,0 +1,48 @@
+#ifndef ossimPlanetQtLegendItem_HEADER
+#define ossimPlanetQtLegendItem_HEADER
+#include <QtGui/QTreeWidgetItem>
+#include <ossim/base/ossimXmlNode.h>
+#include <osg/ref_ptr>
+#include <ossimPlanet/ossimPlanetLookAt.h>
+#include <ossimPlanet/ossimPlanetExtents.h>
+#include <ossimPlanetQt/ossimPlanetQtExport.h>
+
+class ossimPlanetOperation;
+class ossimPlanetQtLegend;
+class OSSIMPLANETQT_DLL ossimPlanetQtLegendItem : public QTreeWidgetItem
+                                                  
+{
+public:
+   ossimPlanetQtLegendItem(QTreeWidgetItem* item,
+                           const QString& name);
+   ossimPlanetQtLegendItem(QTreeWidget* treeWidget,
+                           const QString& s);
+   ossimPlanetQtLegendItem();
+   enum DRAG_ACTION
+   {
+      REORDER, //change order of items (drag with left mouse button)
+      INSERT, //insert an item into another one (drag with middle mouse button)
+      NO_ACTION //do nothing
+   };
+
+   const ossimPlanetQtLegend* legend() const;
+   ossimPlanetQtLegend* legend();
+   virtual void deleteLayer(bool deleteThis=false)=0;
+   virtual void changed();
+
+   virtual ossimRefPtr<ossimXmlNode> saveXml()const=0;
+   virtual void loadXml(ossimRefPtr<ossimXmlNode> node,
+                        std::vector<ossimPlanetOperation*>& activityList)=0;
+
+   virtual const osg::ref_ptr<ossimPlanetLookAt> getLookAt()const=0;
+   virtual void setLookAt(osg::ref_ptr<ossimPlanetLookAt> lookAt)=0;
+
+   virtual const osg::ref_ptr<ossimPlanetExtents> getExtents()const=0;
+   virtual void propertyChanged(const ossimString& /*name*/){}
+   
+protected:
+   virtual void recursiveAdd(QTreeWidgetItem* parent,
+                             const ossimRefPtr<ossimXmlNode> node);
+};
+
+#endif
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtLegendKmlItem.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtLegendKmlItem.h
new file mode 100644
index 0000000..ab63e6c
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtLegendKmlItem.h
@@ -0,0 +1,28 @@
+#ifndef ossimPlanetQtLegendKmlItem_HEADER
+#define ossimPlanetQtLegendKmlItem_HEADER
+#include <ossimPlanetQt/ossimPlanetQtLegendNodeItem.h>
+#include <ossimPlanet/ossimPlanetKmlLayerNode.h>
+#include <ossimPlanet/ossimPlanetKml.h>
+#include <ossimPlanetQt/ossimPlanetQtExport.h>
+
+class OSSIMPLANETQT_DLL ossimPlanetQtLegendKmlItem : public ossimPlanetQtLegendNodeItem
+{
+public:
+   ossimPlanetQtLegendKmlItem(QTreeWidgetItem* item,
+                              const QString& name=QString(""));
+   ossimPlanetQtLegendKmlItem(QTreeWidget* treeWidget,
+                              const QString& s = QString(""));
+   ossimPlanetQtLegendKmlItem();
+
+   void setLayer(osg::ref_ptr<ossimPlanetNode> kml);
+   virtual void changed();
+   virtual ossimRefPtr<ossimXmlNode> saveXml()const;
+   virtual void loadXml(ossimRefPtr<ossimXmlNode> node,
+                        std::vector<ossimPlanetOperation*>& activityList);
+   
+protected:
+	ossimPlanetKmlLayerNode* kmlLayerNode();
+	const ossimPlanetKmlLayerNode* kmlLayerNode()const;
+};
+
+#endif
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtLegendLocatioInfo.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtLegendLocatioInfo.h
new file mode 100644
index 0000000..539bc6d
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtLegendLocatioInfo.h
@@ -0,0 +1,41 @@
+#ifndef ossimPlanetQtLegendLocationInfo_HEADER
+#define ossimPlanetQtLegendLocationInfo_HEADER
+#include <ossim/base/ossimReferenced.h>
+#include <ossim/base/ossimString.h>
+
+class ossimPlanetQtLegendLocationInfo : public ossimReferenced
+{
+public:
+   ossimPlanetQtLegendLocationInfo()
+      :theCategory(""),
+      theDescription(""),
+      theTimeOutInSeconds(9999999999.0),
+      theLat(0.0),
+      theLon(0.0),
+      theAltitude(0.0),
+      theMetadata("")
+   {
+   }
+   ossimPlanetQtLegendLocationInfo(const ossimPlanetQtLegendLocationInfo& src)
+      :theCategory(src.theCategory),
+      theDescription(src.theDescription),
+      theTimeOutInSeconds(src.theTimeOutInSeconds),
+      theLat(src.theLat),
+      theLon(src.theLon),
+      theAltitude(src.theAltitude),
+      theMetadata(src.theMetadata)
+      {
+      }
+   ossimPlanetQtLegendLocationInfo* clone()const
+   {
+      return new ossimPlanetQtLegendLocationInfo(*this);
+   }
+   ossimString theCategory;
+   ossimString theDescription;
+   double      theTimeOutInSeconds;
+   double      theLat;
+   double      theLon;
+   double      theAltitude;
+   ossimString theMetadata;
+};
+#endif
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtLegendLocationInfo.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtLegendLocationInfo.h
new file mode 100644
index 0000000..e00a465
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtLegendLocationInfo.h
@@ -0,0 +1,51 @@
+#ifndef ossimPlanetQtLegendLocationInfo_HEADER
+#define ossimPlanetQtLegendLocationInfo_HEADER
+#include <ossim/base/ossimReferenced.h>
+#include <ossim/base/ossimString.h>
+#include <osg/ref_ptr>
+#include <ossimPlanet/ossimPlanetLookAt.h>
+#include <ossimPlanetQt/ossimPlanetQtExport.h>
+
+class OSSIMPLANETQT_DLL ossimPlanetQtLegendLocationInfo : public ossimReferenced
+{
+public:
+   ossimPlanetQtLegendLocationInfo()
+      :theValidFlag(false),
+      theCategory(""),
+      theDescription(""),
+      theTimeOutInSeconds(9999999999.0),
+      theLat(0.0),
+      theLon(0.0),
+      theAltitude(0.0),
+      theMetadata("")
+   {
+      theLookAt = new ossimPlanetLookAt();
+   }
+   ossimPlanetQtLegendLocationInfo(const ossimPlanetQtLegendLocationInfo& src)
+      :theValidFlag(src.theValidFlag),
+      theCategory(src.theCategory),
+      theDescription(src.theDescription),
+      theTimeOutInSeconds(src.theTimeOutInSeconds),
+      theLat(src.theLat),
+      theLon(src.theLon),
+      theAltitude(src.theAltitude),
+      theMetadata(src.theMetadata),
+      theLookAt(src.theLookAt->clone())
+      {
+      }
+   virtual ossimPlanetQtLegendLocationInfo* clone()const
+   {
+      return new ossimPlanetQtLegendLocationInfo(*this);
+   }
+   
+   bool        theValidFlag;
+   ossimString theCategory;
+   ossimString theDescription;
+   double      theTimeOutInSeconds;
+   double      theLat;
+   double      theLon;
+   double      theAltitude;
+   ossimString theMetadata;
+   osg::ref_ptr<ossimPlanetLookAt> theLookAt;
+};
+#endif
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtLegendNodeItem.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtLegendNodeItem.h
new file mode 100644
index 0000000..a719f97
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtLegendNodeItem.h
@@ -0,0 +1,59 @@
+#ifndef ossimPlanetQtLegendNodeItem_HEADER
+#define ossimPlanetQtLegendNodeItem_HEADER
+#include <QtGui/QTreeWidgetItem>
+#include <ossim/base/ossimXmlNode.h>
+#include <osg/ref_ptr>
+#include <ossimPlanet/ossimPlanetNode.h>
+#include <ossimPlanet/ossimPlanetLookAt.h>
+#include <ossimPlanet/ossimPlanetExtents.h>
+#include <ossimPlanetQt/ossimPlanetQtExport.h>
+#include <ossimPlanetQt/ossimPlanetQtLegendItem.h>
+
+class ossimPlanetOperation;
+class ossimPlanetQtLegend;
+class OSSIMPLANETQT_DLL ossimPlanetQtLegendNodeItem : public ossimPlanetQtLegendItem
+{
+public:
+	class NodeCallback : public ossimPlanetNodeCallback
+		{
+		public:
+			NodeCallback(ossimPlanetQtLegendNodeItem* item);
+			virtual void propertyChanged(ossimPlanetNode* node,
+												  const ossimString& name);
+			virtual void destructingNode(ossimPlanetNode* node);
+			virtual void needsRedraw(ossimPlanetNode* node);
+			virtual void nodeAdded(osg::Node* /*node*/);
+			virtual void nodeRemoved(osg::Node* /*node*/);
+			
+		protected:
+			ossimPlanetQtLegendNodeItem* theItem;
+		};
+	
+   ossimPlanetQtLegendNodeItem(QTreeWidgetItem* item,
+                           const QString& name="");
+   ossimPlanetQtLegendNodeItem(QTreeWidget* treeWidget,
+                           const QString& s="");
+   ossimPlanetQtLegendNodeItem();
+	virtual ~ossimPlanetQtLegendNodeItem();
+   virtual void deleteLayer(bool deleteThis=false);
+	virtual void changed();
+   virtual ossimRefPtr<ossimXmlNode> saveXml()const;
+   virtual void loadXml(ossimRefPtr<ossimXmlNode> node,
+                        std::vector<ossimPlanetOperation*>& activityList);
+	const osg::ref_ptr<ossimPlanetLookAt> getLookAt()const;
+   virtual void setLookAt(osg::ref_ptr<ossimPlanetLookAt> lookAt);
+   virtual const osg::ref_ptr<ossimPlanetExtents> getExtents()const;
+   
+	osg::ref_ptr<ossimPlanetNode> layer();
+	const osg::ref_ptr<ossimPlanetNode> layer()const;
+	virtual void setLayer(osg::ref_ptr<ossimPlanetNode> value);
+	virtual void propertyChanged(const ossimString& name);
+protected:
+	osg::ref_ptr<ossimPlanetNode>   theLayerNode;
+	mutable osg::ref_ptr<ossimPlanetLookAt> theLookAt;
+	mutable osg::ref_ptr<ossimPlanetExtents> theExtents;
+	
+	osg::ref_ptr<ossimPlanetQtLegendNodeItem::NodeCallback> theNodeCallback;
+};
+
+#endif
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtLegendTextureItem.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtLegendTextureItem.h
new file mode 100644
index 0000000..72a3060
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtLegendTextureItem.h
@@ -0,0 +1,87 @@
+#ifndef ossimPlanetQtLegendTextureItem_HEADER
+#define ossimPlanetQtLegendTextureItem_HEADER
+#include <ossimPlanetQt/ossimPlanetQtLegendItem.h>
+#include <ossimPlanetQt/ossimPlanetQtEvent.h>
+#include <QtGui/QApplication>
+#include <ossimPlanet/ossimPlanetTextureLayer.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimXmlNode.h>
+#include <ossimPlanetQt/ossimPlanetQtExport.h>
+#include <ossimPlanet/ossimPlanetOperation.h>
+
+class OSSIMPLANETQT_DLL ossimPlanetQtLegendTextureItem : public ossimPlanetQtLegendItem
+{
+public:
+
+   class Callback : public ossimPlanetTextureLayerCallback
+   {
+   public:
+      Callback(ossimPlanetQtLegendTextureItem* item);
+      virtual void propertyChanged(const ossimString& name, 
+                                   const ossimPlanetTextureLayer* layer);
+		virtual void layersAdded(std::vector<osg::ref_ptr<ossimPlanetTextureLayer> >& layers);
+		virtual void layersRemoved(std::vector<osg::ref_ptr<ossimPlanetTextureLayer> >& layers);
+		void setItem(ossimPlanetQtLegendTextureItem* item)
+      {
+         theItem = item;
+      }
+   protected:
+      ossimPlanetQtLegendTextureItem* theItem;
+   };
+   
+   class StagerCallback : public ossimPlanetOperationCallback
+   {
+   public:
+      StagerCallback(ossimPlanetQtLegendTextureItem* item)
+      :theItem(item)
+      {
+      }
+      virtual void finished(ossimPlanetOperation* operation);
+      virtual void canceled(ossimPlanetOperation* operation);
+      
+   protected:
+      ossimPlanetQtLegendTextureItem* theItem;
+   };
+   friend class StagerCallback;
+      
+   ossimPlanetQtLegendTextureItem(QTreeWidgetItem* item,
+                                  const QString& name = QString(""));
+   ossimPlanetQtLegendTextureItem(QTreeWidget* treeWidget,
+                                  const QString& name = QString(""));
+   ossimPlanetQtLegendTextureItem();
+   virtual ~ossimPlanetQtLegendTextureItem();
+   void setLayer(osg::ref_ptr<ossimPlanetTextureLayer> layer);
+   osg::ref_ptr<ossimPlanetTextureLayer> layer();
+   const osg::ref_ptr<ossimPlanetTextureLayer> layer()const;
+
+   void populateItem();
+   virtual void changed();
+   void deleteLayer(bool deleteThis=false);
+
+   void updateLayerInfo();
+   virtual ossimRefPtr<ossimXmlNode> saveXml()const;
+   virtual void loadXml(ossimRefPtr<ossimXmlNode> node,
+                        std::vector<ossimPlanetOperation*>& activityList);
+   virtual void addXml(ossimRefPtr<ossimXmlNode> node,
+                       std::vector<ossimPlanetOperation*>& activityList,
+                       bool startAtTopFlag=false);
+
+   virtual const osg::ref_ptr<ossimPlanetLookAt> getLookAt()const;
+   virtual void setLookAt(osg::ref_ptr<ossimPlanetLookAt> lookAt);
+
+   virtual const osg::ref_ptr<ossimPlanetExtents> getExtents()const;
+   virtual void propertyChanged(const ossimString& name);
+
+protected:
+   void clearItem();
+   osg::ref_ptr<ossimPlanetTextureLayer> theLayer;
+   osg::ref_ptr<ossimPlanetQtLegendTextureItem::Callback> theCallback;
+   
+   OpenThreads::Mutex theStagerMutex;
+   osg::ref_ptr<StagerCallback> theStagerCallback;
+   osg::ref_ptr<ossimPlanetOperation> theStager;
+   
+/*    osg::ref_ptr<ossimPlanetLookAt> theLookAt; */
+
+};
+#endif
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtLegendVideoItem.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtLegendVideoItem.h
new file mode 100644
index 0000000..7ae28ca
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtLegendVideoItem.h
@@ -0,0 +1,36 @@
+#ifndef ossimPlanetQtLegendVideoItem_HEADER
+#define ossimPlanetQtLegendVideoItem_HEADER
+#include <ossimPlanetQt/ossimPlanetQtLegendNodeItem.h>
+#include <ossimPlanet/ossimPlanetVideoLayerNode.h>
+#include <ossimPlanetQt/ossimPlanetQtExport.h>
+#include <ossimPlanetQt/ossimPlanetQtVideoControlWidget.h>
+
+class ossimPlanetQtVideoControlWidget;
+class OSSIMPLANETQT_DLL ossimPlanetQtLegendVideoItem : public ossimPlanetQtLegendNodeItem
+{
+public:
+   ossimPlanetQtLegendVideoItem(QTreeWidgetItem* item,
+                              const QString& name=QString(""));
+   ossimPlanetQtLegendVideoItem(QTreeWidget* treeWidget,
+                              const QString& s = QString(""));
+   ossimPlanetQtLegendVideoItem();
+   virtual ~ossimPlanetQtLegendVideoItem();
+   virtual void deleteLayer(bool deleteThis);
+   virtual ossimRefPtr<ossimXmlNode> saveXml()const;
+   virtual void loadXml(ossimRefPtr<ossimXmlNode> node,
+                        std::vector<ossimPlanetOperation*>& activityList);
+
+   virtual void propertyChanged(const ossimString& name);
+	virtual void setLayer(osg::ref_ptr<ossimPlanetNode> node);
+	const osg::ref_ptr<ossimPlanetLookAt> getLookAt()const;
+protected:
+	void updateLookAt();
+	mutable osg::ref_ptr<ossimPlanetLookAt> theAutoUpdateLookAt;
+	ossimPlanetVideoLayerNode* videoLayerNode();
+	const ossimPlanetVideoLayerNode* videoLayerNode()const;
+	
+   QTreeWidgetItem*                   theVideoControlItem;
+   ossimPlanetQtVideoControlWidget*   theVideoControlWidget;
+};
+
+#endif
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtMainWindow.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtMainWindow.h
new file mode 100644
index 0000000..f2fdb5a
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtMainWindow.h
@@ -0,0 +1,329 @@
+#ifndef ossimPlanetQtMainWindow_HEADER
+#define ossimPlanetQtMainWindow_HEADER
+#define _WINSOCKAPI_
+#include <ossimPlanetQt/ui_ossimPlanetQtMainWindow.h>
+#include <QtGui/QMainWindow>
+#include <QtGui/QKeyEvent>
+#include <QtGui/QDesktopWidget>
+#include <QtGui/QFrame>
+#include <QtCore/QThread>
+#include <QtCore/QMutex>
+#include <ossimPlanet/ossimPlanet.h>
+#include <ossimPlanet/ossimPlanetTextureLayerGroup.h>
+#include <ossimPlanet/ossimPlanetConstants.h>
+#include <ossimPlanet/ossimPlanetExtents.h>
+#include <ossimPlanet/ossimPlanetIo.h>
+#include <ossimPlanet/ossimPlanetIoThread.h>
+#include <ossimPlanet/ossimPlanetKmlLayer.h>
+#include <ossimPlanet/ossimPlanetLatLonHud.h>
+#include <ossimPlanet/ossimPlanetSousaLayer.h>
+#include <ossimPlanet/ossimPlanetManipulator.h>
+#include <ossimPlanet/ossimPlanetVideoLayer.h>
+#include <ossimPlanet/ossimPlanetAnnotationLayer.h>
+#include <ossimPlanet/ossimPlanetSousaLayer.h>
+#include <ossimPlanet/ossimPlanetLookAt.h>
+#include <ossimPlanet/ossimPlanetOperation.h>
+#include <list>
+#include <ossim/base/ossimWms.h>
+#include <ossimPlanetQt/ossimPlanetQtWmsDialog.h>
+#include <ossimPlanetQt/ossimPlanetQtMessageLog.h>
+#include <ossimPlanetQt/ossimPlanetQtExport.h>
+#include <ossimPlanet/ossimPlanetIoMessageHandler.h>
+#include <osg/Timer>
+#include <ossimPlanet/ossimPlanetArchive.h>
+#include <ossimPlanet/ossimPlanetViewer.h>
+
+
+class ossimPlanetQtViewer;
+class ossimPlanetQtLegend;
+class ossimPlanetQtPreferences;
+class ossimPlanetQtLayerOperation;
+class ossimPlanetQtWmsDialog;
+class ossimPlanetQtRuler;
+class ossimPlanetQtActivityWindow;
+class ossimPlanetQtAboutDialog;
+class QTableWidgetItem;
+class ossimPlanetQtMainWindow;
+
+class ossimPlanetIoMainWindowMessageHandler : public ossimPlanetIoMessageHandler
+{
+public:
+   ossimPlanetIoMainWindowMessageHandler(ossimPlanetQtMainWindow* mainWindow);
+   virtual bool handleMessage(osg::ref_ptr<ossimPlanetMessage> message);
+
+protected:
+   ossimPlanetQtMainWindow* theMainWindow;
+};
+
+class OSSIMPLANETQT_DLL ossimPlanetQtMainWindow : public QMainWindow, public Ui::ossimPlanetQtMainWindow
+{
+   Q_OBJECT
+public:
+   class ViewerCallback : public ossimPlanetViewerCallback
+      {
+      public:
+         ViewerCallback(ossimPlanetQtMainWindow* main):theMainWindow(main){}
+         virtual void viewChanged(ossimPlanetViewer* /*viewer*/){
+            theMainWindow->viewChanged();
+         }
+
+      protected:
+         ossimPlanetQtMainWindow* theMainWindow;
+      };
+	class NodeCallback : public ossimPlanetNodeCallback
+		{
+		public:
+			NodeCallback(ossimPlanetQtMainWindow* mw);
+			void setMainWindow(ossimPlanetQtMainWindow* mw){theMainWindow=mw;}
+			ossimPlanetQtMainWindow* mainWindow(){return theMainWindow;}
+			virtual void nodeAdded(osg::Node* node);
+			virtual void nodeRemoved(osg::Node* node);
+			
+		protected:
+			ossimPlanetQtMainWindow* theMainWindow;
+		};
+	
+   ossimPlanetQtMainWindow(QWidget *parent = 0);
+   virtual ~ossimPlanetQtMainWindow();
+   osg::ref_ptr<ossimPlanet> planet();
+   const osg::ref_ptr<ossimPlanet> planet()const;
+   const osg::ref_ptr<ossimPlanetKmlLayer> kmlLayer()const;
+   const osg::ref_ptr<ossimPlanetVideoLayer> videoLayer()const;
+   osg::ref_ptr<ossimPlanetKmlLayer> kmlLayer();
+   osg::ref_ptr<ossimPlanetVideoLayer> videoLayer();
+   osg::ref_ptr<ossimPlanetAnnotationLayer> annotationLayer();
+   ossim_uint32 textureLayerGroupListSize()const;
+   osg::ref_ptr<ossimPlanetTextureLayerGroup> textureLayerGroup(ossim_uint32 idx=0);
+   const osg::ref_ptr<ossimPlanetTextureLayerGroup> textureLayerGroup(ossim_uint32 idx=0)const;
+   ossimPlanetQtLegend* legend();
+   const ossimPlanetQtLegend* legend()const;
+   ossimPlanetQtViewer* glWidget();
+   ossimPlanetManipulator* manipulator();
+   ossimPlanetQtActivityWindow* activityWindow();
+   const ossimPlanetQtActivityWindow* activityWindow()const;
+   
+   void gotoLocationNadir(double lat, double lon, double height);
+   void refreshLandTextures(osg::ref_ptr<ossimPlanetExtents> extents = 0,
+                            ossimPlanetLandRefreshType refreshType=ossimPlanetLandRefreshType_PRUNE);
+   const osg::ref_ptr<ossimPlanetLookAt> getLookAt()const;
+   
+   void saveSession(const QString& filename);
+   void loadSession(const QString& filename);
+   virtual void dropEvent ( QDropEvent * event );   
+   virtual void dragEnterEvent(QDragEnterEvent *event);
+
+   osg::ref_ptr<ossimPlanetIoThread> iothread()
+   {
+      return theIoThread;
+   }
+   void sendMessage(const std::string& id,
+                    const std::string& message,
+                    const ossimString& messageType);
+	void addOperation(osg::ref_ptr<ossimPlanetOperation> operation);
+   virtual bool event(QEvent* e);
+	
+public slots:
+   void on_actionActivity_triggered(bool checked = false);
+   void on_actionMessageLog_triggered(bool checked = false);
+   void wmsSyncCurrentSettings();
+   void wmsSyncAllSettings();
+   void on_viewToggleFullScreen_triggered(bool checked = false);
+ 
+private slots:
+   void on_fileSaveViewAsJpeg_triggered(bool checked = false);
+   void on_fileSaveViewAsPng_triggered(bool checked = false);
+   void on_fileSaveViewAsTiff_triggered(bool checked = false);
+   void on_fileSaveAnimationPath_triggered(bool checked = false);
+   void on_fileLoadAnimationPath_triggered(bool checked = false);
+   void on_viewBookmark_triggered( bool checked = false );
+   void on_viewGotoLatLon_triggered( bool checked = false );
+   void on_viewGotoAddress_triggered( bool checked = false );
+   void on_viewStartRecordingAnimationPath_triggered( bool checked = false );
+   void on_viewStopRecordingAnimationPath_triggered( bool checked = false );
+   void on_viewPlayAnimationPath_triggered( bool checked = false );
+   void on_fileQuit_triggered( bool checked = false );
+   void on_fileOpenImage_triggered( bool checked = false );
+   void on_fileOpenVideo_triggered( bool checked = false );
+   void on_fileOpenWms_triggered( bool checked = false );
+   void on_fileOpenKml_triggered( bool checked = false );
+   void on_openSession_triggered( bool checked = false );
+   void on_saveSession_triggered( bool checked = false );
+   void on_saveSessionAs_triggered( bool checked = false );
+   void on_filePreferences_triggered(bool checked = false);
+   void on_editLayerOperation_triggered(bool checked = false);
+   void on_viewRefreshTextures_triggered(bool checked = false);
+   void on_viewRefreshAll_triggered(bool checked = false);
+   void on_viewSyncLocation_triggered(bool checked = false);
+   void on_toolsRuler_triggered( bool checked = false );
+   void on_helpAbout_triggered( bool checked = false );
+   void serverPortItemChanged(QTableWidgetItem* item);
+   void addPort(bool checked = false);
+   void deletePort(bool checked = false);
+   void addClientPort(bool checked = false);
+   void deleteClientPort(bool checked = false);
+   void clientItemChanged(QTableWidgetItem* item);
+   void enableAllClientPorts(bool checked = false);
+   void disableAllClientPorts(bool checked = false);
+   void viewTransmitTextChanged(const QString& value);
+   void autoViewSyncFlagChanged(int state);
+
+   // added by russc 4/30/08
+   void archiveMappingWidgetItemChanged(QTableWidgetItem* item);
+   void archiveAddButtonClicked(bool checked = false);
+   void archiveRemoveButtonClicked(bool checked = false);
+   void sousaIdentitySetButtonClicked(bool checked = false);
+   void sousaServerConnectButtonClicked(bool checked = false);
+   void sousaServerAutoConnectOnStartClicked(bool checked = false);
+protected slots:
+   void preferencesDestroyed(QObject* obj);
+   void wmsAddButtonHit(ossimPlanetQtWmsDialog* wms,
+                        ossimRefPtr<ossimWmsCapabilitiesDocument> capabilities,
+                        ossimPlanetQtWmsDialog::SelectedLayerInfoListType& layers);
+   void layerOperationCloseButtonClicked(bool checked=false);
+   void rulerCloseButtonClicked(bool checked=false);
+   void closeActivity(bool checked = false);
+   void deleteSelectedActivities(bool checked = false);
+   void wmsDialogDestroyed(QObject* obj);
+/*    void newMessage(QString message, */
+/*                    int port); */
+/*    void geospatialReadServer(); */
+
+public slots:
+   void setWmsTimeout(const QString& text);
+   void setStagingCacheDirectory(const QString& text);
+   void setAutoHistogramStretchSetting(const QString& text);
+   void stagingCacheDirectoryButtonClicked(bool checked = false);
+   void setHudEnabledFlag(bool flag = false);
+   void setAutomaticStagingEnabled(bool flag = false);
+   void setArchiveMappingEnabledFlag(bool flag = false);
+   void setAutoHighlightLineOfSiteFlag(bool flag = false);
+   void setElevationEnabledFlag(bool flag = false);
+   void setTextureDetailType(int value);
+   void setMeshDetailType(int value);
+   void setTerrainCullingType(int value);
+   void setHeightExageration(const QString& height);
+   
+   void setEphemerisEnabledFlag(bool flag);
+   void setEphemerisAutoUpdateToCurrentTimeFlag(bool flag);
+   void setSkyEnabledFlag(bool flag);
+   void setMoonEnabledFlag(bool flag);
+   void setSunlightEnabledFlag(bool flag);
+   void setPercentVisibility(int value);
+   void setCloudsEnabledFlag(bool flag);
+   void setCloudAmount(int value);
+   void setCloudSharpness(int value);
+   void viewChanged();
+   void glWidgetDropEvent(QDropEvent * event);
+   void glWidgetDragEnterEvent(QDragEnterEvent *event);
+   void glWidgetMouseMoveEvent(QMouseEvent* event);
+   void glWidgetMouseReleaseEvent(QMouseEvent* event);
+protected:
+   class SocketInfo : public osg::Referenced
+   {
+   public:
+      SocketInfo(const std::string& name="",
+                 const std::string& host="",
+                 const std::string& port="",
+                 const std::string& portType="")
+         :theName(name),
+         theHost(host),
+         thePort(port),
+         thePortType(portType),
+         theValidFlag(false)
+         {
+         }
+
+      ossimString theName;
+      ossimString theHost;
+      ossimString thePort;
+      ossimString thePortType;
+      osg::ref_ptr<ossimPlanetIo> theIo;
+      bool theValidFlag;
+   };
+
+   void loadServerPortFromPreferences();
+   void loadClientPortFromPreferences();
+   void loadArchiveMappingFromPreferences();
+   void saveServerPortPreferences();
+   void saveClientPortPreferences();
+   void saveArchiveMappingPreferences();
+   void saveSousaConnectionPreferences();
+   
+   virtual void keyPressEvent ( QKeyEvent * event );
+   virtual void keyReleaseEvent ( QKeyEvent * event );
+/*    void createLegend(); */
+   void populatePreferences();
+   void populateServerPortPreferences();
+   void populateClientPortPreferences();
+   void populateSousaConnectionPreferences();
+   // added by russc
+   void populateArchiveMappingPreferences();
+
+/*    osg::Node* createBounds(const ossimPlanetTextureLayerExtents& extents)const; */
+   virtual void timerEvent ( QTimerEvent * event );
+   QString getSaveFile(const QString& title, const QString& extension, const QString& filters="", const QString& defaultDir = "");
+   std::string wmsSettingsToXml(const QString& connectionName)const;
+   void init();
+   int ephemerisMembers();
+   ossimPlanetQtViewer* theGlWidget;
+   osg::ref_ptr<ossimPlanet> thePlanet;
+   std::vector<osg::ref_ptr<ossimPlanetTextureLayerGroup> > theTextureLayers;
+   osg::ref_ptr<ossimPlanetTextureLayerGroup> theOverlayGroup;
+   QFrame*              theFullScreenFrame;
+   ossimPlanetQtPreferences* thePreferences;
+   ossimPlanetQtLayerOperation* theLayerOperation;
+   ossimPlanetQtRuler*          theRuler;
+   ossimPlanetQtActivityWindow* theActivityWindow;
+   ossim_uint32 theLargestLogMessageSize;
+   ossimPlanetQtWmsDialog*      theWmsWindow;   
+	ossimPlanetQtMessageLog*     theMessageLogDialog;
+   QDesktopWidget*              theDesktopWidget;
+   int                          theTimerId;
+   QRect                        theFullScreenGeometry;
+   bool                         theIsFullScreen;
+   ossimFilename                theSessionFilename;
+   bool                         theSessionDirtyFlag;
+   double                       theAutoViewSyncRateInSeconds;
+   double                       theAutoViewSyncFlag;
+   osg::Timer_t                 theLastAutoViewSyncTick;
+   osg::Vec3d                   theStartPoint;
+   osg::Vec3d                   theEndPoint;
+   osg::ref_ptr<ossimPlanetKmlLayer>         theKmlLayer;
+   osg::ref_ptr<ossimPlanetVideoLayer>       theVideoLayer;
+   osg::ref_ptr<ossimPlanetSousaLayer>       theSousaLayer;
+   osg::ref_ptr<ossimPlanetAnnotationLayer>  theAnnotationLayer;
+   osg::ref_ptr<ossimPlanetLatLonHud>        theHudLayer;
+   osg::ref_ptr<ossimPlanetTextureLayerCallback> theLayerListener;
+   osg::ref_ptr<ViewerCallback> theViewerCallback;
+   osg::ref_ptr<ossimPlanetManipulator> theManipulator;
+   osg::ref_ptr<ossimPlanetIoThread>                               theIoThread;
+   std::vector<osg::ref_ptr<ossimPlanetQtMainWindow::SocketInfo> > theServerList;
+   std::vector<osg::ref_ptr<ossimPlanetQtMainWindow::SocketInfo> > theClientList;
+  
+   mutable bool theUpdateHiglightsFlag;
+   bool theAutoHighlightLineOfSiteFlag;
+
+   ossimFilename theLastViewSaveDirectory;
+
+   osg::ref_ptr<ossimPlanetIoMainWindowMessageHandler> theIoMessageHandler;
+   
+   // added by russc 5/6/08
+   osg::ref_ptr<ossimPlanetArchive> theArchive;
+
+   bool theInitializedFlag;
+	osg::ref_ptr<ossimPlanetQtMainWindow::NodeCallback> theNodeCallback;
+   
+   ossimString theDefaultNavigationPortType;
+   ossimString theDefaultDataPortType;
+   
+   ossimFilename theCurrentOpenImagePath;
+   ossimFilename theCurrentOpenVideoPath;
+   ossimFilename theCurrentOpenKmlPath;
+   ossimFilename theCurrentOpenSessionPath;
+   ossimFilename theLastOpenedPath;
+   
+   double theMaxVisibility;
+   ossim_uint64 theCloudSeed;
+};
+
+#endif
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtMessageLog.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtMessageLog.h
new file mode 100644
index 0000000..3a6abd4
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtMessageLog.h
@@ -0,0 +1,34 @@
+#ifndef ossimPlanetQtMessageLog_HEADER
+#define ossimPlanetQtMessageLog_HEADER
+#include <ossimPlanetQt/ui_ossimPlanetQtMessageLog.h>
+#include <QtGui/QDialog>
+#include <ossimPlanetQt/ossimPlanetQtExport.h>
+#include <ossim/base/ossimConstants.h>
+class OSSIMPLANETQT_DLL ossimPlanetQtMessageLog : public QDialog, public Ui::ossimPlanetQtMessageLog
+{
+   Q_OBJECT
+public:
+	enum Type
+	{
+		LOG_ERROR = 0,
+		LOG_WARNING,
+		LOG_INFO,
+		LOG_DEBUG
+	};	
+   ossimPlanetQtMessageLog(QWidget* parent = 0);
+	
+	void addMessage(const QString& message,
+						 ossimPlanetQtMessageLog::Type type);
+	void showLastMessage();
+	
+public slots:
+	void closeButtonClicked(bool checked = false);
+	void clearButtonClicked(bool checked = false);
+	
+protected:
+	void adjustItemCount();
+	
+	ossim_uint32 theNumberOfItems;
+	ossim_uint32 theMaxNumberOfItems;
+};
+#endif
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtNewHttpConnection.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtNewHttpConnection.h
new file mode 100644
index 0000000..5e20430
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtNewHttpConnection.h
@@ -0,0 +1,22 @@
+#ifndef ossimPlanetQtNewHttpConnection_HEADER
+#define ossimPlanetQtNewHttpConnection_HEADER
+#include <ossimPlanetQt/ui_ossimPlanetQtNewHttpConnection.h>
+#include <ossimPlanetQt/ossimPlanetQtExport.h>
+
+class OSSIMPLANETQT_DLL ossimPlanetQtNewHttpConnection : public QDialog, public Ui::ossimPlanetQtNewHttpConnection
+{
+   Q_OBJECT
+public:
+   ossimPlanetQtNewHttpConnection(QWidget* parent,
+                                  const QString& connName = QString::null,
+                                  Qt::WFlags fl=0);
+
+public slots:
+   void saveConnection();
+
+protected:
+   QString theConnectionName;
+ 
+};
+
+#endif
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtOperation.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtOperation.h
new file mode 100644
index 0000000..f020b86
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtOperation.h
@@ -0,0 +1,113 @@
+#ifndef ossimPlanetQtOperation_HEADER
+#define ossimPlanetQtOperation_HEADER
+#include <ossimPlanet/ossimPlanetOperation.h>
+#include <ossimPlanetQt/ossimPlanetQtExport.h>
+#include <ossim/base/ossimProcessListener.h>
+#include <ossimPlanet/ossimPlanetOssimImageLayer.h>
+#include <ossim/base/ossimProcessListener.h>
+#include <ossim/base/ossimProcessInterface.h>
+#include <ossim/base/ossimReferenced.h>
+#include <ossimPlanet/ossimPlanetKml.h>
+#include <ossimPlanetQt/ossimPlanetQtExport.h>
+#include <OpenThreads/Mutex>
+#include <QtCore/Qt>
+#include <QtCore/QUrl>
+#include <QtCore/QStringList>
+#include <QtCore/QString>
+#include <QtCore/QList>
+#include <osg/ref_ptr>
+class ossimPlanetQtLegend;
+class ossimPlanetQtLegendTextureItem;
+class ossimPlanetQtActivityWidget;
+class ossimPlanetQtMainWindow;
+
+class OSSIMPLANETQT_DLL  ossimPlanetQtOperation : public ossimPlanetOperation
+{
+public:
+	ossimPlanetQtOperation();
+   void setActivityWidget(ossimPlanetQtActivityWidget* w)
+   {
+      theWidget = w;
+   }
+   virtual void updateGui(){}
+protected:
+	void postMessage(const QString& msg,
+						  int type)const;
+	void adjustToWriteableLocation(ossimFilename& file)const;
+	void adjustToStagerLocation(ossimFilename& file)const;
+   ossimPlanetQtActivityWidget* theWidget;
+};
+
+class OSSIMPLANETQT_DLL ossimPlanetQtOssimImageStagerOperation : public ossimPlanetQtOperation,
+                                                               public ossimProcessListener
+{
+public:
+	ossimPlanetQtOssimImageStagerOperation(ossimPlanetOssimImageLayer* layer, ossimPlanetQtLegend* legned = 0);
+   virtual void run();
+	
+protected:
+   virtual void processProgressEvent(ossimProcessProgressEvent& event);
+	void buildOverviews(ossimImageHandler* handler);
+	void buildHistograms(ossimImageHandler* handler);
+	osg::ref_ptr<ossimPlanetOssimImageLayer> theLayer;
+	OpenThreads::Mutex theStagerMutex;
+	ossimPlanetQtLegend* theLegend;
+	ossimFilename        theFilename;   
+   ossimString          theStagerMessage;
+	ossimProcessInterface* theCurrentProcessInterface;
+};
+
+class OSSIMPLANETQT_DLL ossimPlanetQtOpenImageFileOperation : public ossimPlanetQtOperation
+{
+public:
+	ossimPlanetQtOpenImageFileOperation(const QString& file,
+													 ossimPlanetQtLegend* legend);
+   virtual void run();
+protected:
+   std::vector<ossimString>                            theFileList;
+   ossimPlanetQtLegend*                                theLegend;
+   osg::ref_ptr<ossimPlanetExtents>                    theExtents;
+   std::vector<osg::ref_ptr<ossimPlanetTextureLayer> > theLayers;
+   bool                                                theInitializeGuiFlag;
+   ossim_uint32                                        theCurrentFileIdx;
+};
+
+class OSSIMPLANETQT_DLL ossimPlanetQtOpenImageFileFromLayerOperation : public ossimPlanetQtOperation
+{
+public:
+   ossimPlanetQtOpenImageFileFromLayerOperation(osg::ref_ptr<ossimPlanetOssimImageLayer> layer,
+                                               const ossimFilename& name,
+                                               ossim_int32 entry);
+   virtual void run();
+protected:
+	osg::ref_ptr<ossimPlanetOssimImageLayer> theLayer;
+   osg::ref_ptr<ossimPlanetLookAt> theSavedLookAt;
+   ossimString          theName;
+   ossimString          theDescription;
+   ossimFilename        theFilename;
+   ossim_int32          theEntry;
+   bool                 theInitializeGuiFlag;
+	
+};
+
+class OSSIMPLANETQT_DLL ossimPlanetQtOpenImageFileFromLayerXmlOperation : public ossimPlanetQtOperation
+{
+public:
+   ossimPlanetQtOpenImageFileFromLayerXmlOperation(osg::ref_ptr<ossimPlanetOssimImageLayer> layer,
+                                                  ossimRefPtr<ossimXmlNode> node,
+                                                  ossimPlanetQtLegend* legend);
+   virtual void run();
+   void setItem(ossimPlanetQtLegendTextureItem* item);
+protected:
+	osg::ref_ptr<ossimPlanetOssimImageLayer> theLayer;
+   ossimRefPtr<ossimXmlNode> theXmlNode;
+   ossimPlanetQtLegend* theLegend;
+   ossimPlanetQtLegendTextureItem* theItem;
+   bool                 theInitializeGuiFlag;
+   ossimFilename        theFilename;
+   ossimString          theName;
+   ossimString          theDescription;
+	
+};
+
+#endif
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtPreferences.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtPreferences.h
new file mode 100644
index 0000000..73f295a
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtPreferences.h
@@ -0,0 +1,16 @@
+#ifndef ossimPlanetQtPreferences_HEADER
+#define ossimPlanetQtPreferences_HEADER
+#include <ossimPlanetQt/ui_ossimPlanetQtPreferences.h>
+#include <QtGui/QDialog>
+#include <ossimPlanetQt/ossimPlanetQtExport.h>
+
+class ossimPlanetQtPreferences : public QDialog, public Ui::ossimPlanetQtPreferences
+{
+   Q_OBJECT
+public:
+   ossimPlanetQtPreferences(QWidget* parent=0);
+
+protected slots:
+   void on_theOkButton_clicked(bool checked = false);
+};
+#endif
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtRuler.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtRuler.h
new file mode 100644
index 0000000..7421158
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtRuler.h
@@ -0,0 +1,44 @@
+#ifndef ossimPlanetQtRuler_HEADER
+#define ossimPlanetQtRuler_HEADER
+#include <ossimPlanetQt/ui_ossimPlanetQtRuler.h>
+#include <QtGui/QDialog>
+#include <osg/Vec3d>
+#include <osg/ref_ptr>
+#include <ossimPlanet/ossimPlanet.h>
+#include <ossimPlanet/ossimPlanetGeoRefModel.h>
+#include <ossimPlanetQt/ossimPlanetQtExport.h>
+
+class ossimPlanetQtViewer;
+class ossimPlanetGeoRefModel;
+class ossimPlanetMeasureTool;
+class OSSIMPLANETQT_DLL ossimPlanetQtRuler : public QDialog, public Ui::ossimPlanetQtRuler
+{
+   Q_OBJECT
+public:
+   ossimPlanetQtRuler(QWidget* parent);
+   virtual ~ossimPlanetQtRuler();
+   void setPlanet(osg::ref_ptr<ossimPlanet> planet);
+   void setGlWidget(ossimPlanetQtViewer* widget);
+   
+protected slots:
+   void glWidgetSignalMouseMoveEvent(QMouseEvent* e);
+   void glWidgetSignalMousePressEvent(QMouseEvent* e);
+   void glWidgetSignalMouseReleaseEvent(QMouseEvent* e);
+   void mouseNavStateChange(int state);
+   
+protected:
+   void setDistance();
+
+   ossimPlanetMeasureTool*            theTool;
+   osg::ref_ptr<ossimPlanet> thePlanet;
+   osg::ref_ptr<ossimPlanetGeoRefModel> theModel;
+   ossimPlanetQtViewer*             theGlWidget;
+   bool                               theFirstPointSet;
+   osg::Vec3d                         theStartPointXYZ;
+   osg::Vec3d                         theStartPointLatLonHgt;
+
+   osg::Vec3d                         theEndPointXYZ;
+   osg::Vec3d                         theEndPointLatLonHgt;
+};
+
+#endif
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtVersion.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtVersion.h
new file mode 100644
index 0000000..4dace54
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtVersion.h
@@ -0,0 +1,11 @@
+#ifndef ossimPlanetQtVersion_HEADER
+#define ossimPlanetQtVersion_HEADER
+#include <ossim/ossimVersion.h>
+#define OSSIMPLANETQT_MAJOR_VERSION OSSIM_MAJOR_VERSION_NUMBER
+#define OSSIMPLANETQT_MINOR_VERSION OSSIM_MINOR_VERSION_NUMBER
+#define OSSIMPLANETQT_PATCH_VERSION OSSIM_RELEASE_NUMBER
+
+#define OSSIMPLANETQT_BUILD_STRING ""
+
+
+#endif
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtVideoControlWidget.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtVideoControlWidget.h
new file mode 100644
index 0000000..d103045
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtVideoControlWidget.h
@@ -0,0 +1,59 @@
+#ifndef ossimPlanetQtVideoControlWidget_HEADER
+#define ossimPlanetQtVideoControlWidget_HEADER
+#include "ui_ossimPlanetQtVideoControlWidget.h"
+#include <QtGui/QWidget>
+#include "ossimPlanetQtExport.h"
+#include <ossimPlanet/ossimPlanetVideoLayerNode.h>
+
+/* class ossimPlanetQtVideoControlCallback : public ossimPlanetVideoLayerNode::Callback */
+/* { */
+/* public: */
+/*    ossimPlanetQtVideoControlCallback(Ui::ossimPlanetQtVideoControlWidget* ui) */
+/*       :theUi(ui) */
+/*    { */
+/*    } */
+
+/*    virtual void propertyChanged(const ossimString& name) */
+/*    { */
+/*       if(!theUi||!theVideoLayerNode.valid()) return; */
+/*    } */
+/*    osg::ref_ptr<ossimPlanetVideoLayerNode> theVideoLayerNode; */
+/*    Ui::ossimPlanetQtVideoControlWidget* theUi; */
+/*    int theSliderValue; */
+/* }; */
+
+class OSSIMPLANETQT_DLL ossimPlanetQtVideoControlWidget : public QWidget,
+                                                          public Ui::ossimPlanetQtVideoControlWidget
+{
+   Q_OBJECT
+public:
+   ossimPlanetQtVideoControlWidget(QWidget * parent = 0,
+                                   Qt::WindowFlags f = 0 );
+   virtual ~ossimPlanetQtVideoControlWidget();
+   void setVideoLayerNode(osg::ref_ptr<ossimPlanetVideoLayerNode> videoNode);
+   osg::ref_ptr<ossimPlanetVideoLayerNode> videoLayerNode()
+   {
+      return theVideoLayerNode;
+   }
+   const osg::ref_ptr<ossimPlanetVideoLayerNode> videoLayerNode()const
+   {
+      return theVideoLayerNode;
+   }
+   void setCallback(osg::ref_ptr<ossimPlanetNodeCallback> callback)
+   {
+      theCallback = callback;
+   }
+protected slots:
+   virtual void on_theReferenceTimeSlider_valueChanged(int value);
+   virtual void on_theReferenceTimeSlider_sliderPressed();
+   virtual void on_theReferenceTimeSlider_sliderReleased();
+   virtual void on_thePlayButton_clicked(bool checked = false);
+   virtual void on_theFrameStepLeftButton_clicked(bool checked = false);
+   virtual void on_theFrameStepRightButton_clicked(bool checked = false);
+   
+protected:
+   virtual void init();
+   osg::ref_ptr<ossimPlanetVideoLayerNode> theVideoLayerNode;
+   osg::ref_ptr<ossimPlanetNodeCallback> theCallback;
+};
+#endif
diff --git a/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtWmsDialog.h b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtWmsDialog.h
new file mode 100644
index 0000000..38ce513
--- /dev/null
+++ b/ossimPlanetQt/include/ossimPlanetQt/ossimPlanetQtWmsDialog.h
@@ -0,0 +1,88 @@
+#ifndef ossimPlanetQtWmsDialog_HEADER
+#define ossimPlanetQtWmsDialog_HEADER
+#include <ossimPlanetQt/ui_ossimPlanetQtWmsDialog.h>
+#include <QtGui/QDialog>
+#include <ossimPlanet/ossimPlanetWmsImageLayer.h>
+#include <wms/wmsMemoryStream.h>
+#include <wms/wmsCapabilitiesRoot.h>
+#include <wms/wmsCapabilitiesState.h>
+#include <QtCore/QSettings>
+#include <ossim/base/ossimWms.h>
+#include <map>
+#include <ossimPlanetQt/ossimPlanetQtExport.h>
+
+class OSSIMPLANETQT_DLL ossimPlanetQtWmsDialog : public QDialog, public Ui::ossimPlanetQtWmsDialog
+{
+   Q_OBJECT
+public:
+   struct WmsLayerSelectionInfoType
+   {
+      ossimString                theUrl;
+      ossimRefPtr<ossimWmsLayer> theLayer;
+      ossimString                theStyle;
+      ossimString                theImageFormat;
+      ossimFilename              theRootCacheDir;
+      ossimString                theDescription;
+      ossimString                theProxyHost;
+      ossimString                theProxyPort;
+      ossimString                theProxyUser;
+      ossimString                theProxyPassword;
+   };
+   typedef std::map<QString, QString> ServerSelectionMapType;
+   typedef std::map<unsigned int, ossimRefPtr<ossimWmsLayer> > NamedLayerMapType;
+   typedef QMap<QString, QPair<QString, int> > ImageEncodingFormatType;
+   typedef std::vector<WmsLayerSelectionInfoType> SelectedLayerInfoListType;
+   
+   ossimPlanetQtWmsDialog(QWidget* parent);
+   void populateConnectionList();
+   void setConnectionListPosition();
+   void populateLayerList();
+   void populateImageFormats();
+   void populateCacheDir();
+/*    bool populateLayerList */
+   
+/*    static QStringList subkeyList(QSettings& settings, const QString& key); */
+/*    static QString readEntry(QSettings& settings, const QString& key); */
+
+   void setSelectedItemsInfo();
+   
+protected slots:
+   void on_theAddButton_clicked(bool checked = false);
+   void on_theCloseButton_clicked(bool checked = false);
+   void on_theAddDefaultServersButton_clicked(bool checked = false);
+   void on_theServerConnections_activated(int);
+   void on_theConnectServerButton_clicked(bool checked = false);
+   void on_theNewServerButton_clicked(bool checked = false);
+   void on_theEditServerButton_clicked(bool checked = false);
+   void on_theDeleteServerButton_clicked(bool checked = false);
+   void on_theLayersList_itemSelectionChanged();
+   void on_theCacheDirButton_clicked(bool checked = false);
+   void on_theCacheDir_textChanged(const QString& value);
+   void imageFormatButtonClicked(QAbstractButton* button);
+/*    void on_theCacheDirButton_clicked(bool checked = false); */
+/*    void capabilitiesReturnPressed(); */
+/*    void cacheDirReturnPressed(); */
+/*    void on_theLayerList_currentItemChanged ( QListWidgetItem * current, QListWidgetItem * previous ); */
+/*    void on_theLayerList_itemActivated ( QListWidgetItem * item ); */
+signals:
+   void addButtonHit(ossimPlanetQtWmsDialog*,
+                     ossimRefPtr<ossimWmsCapabilitiesDocument> capabilities,
+                     ossimPlanetQtWmsDialog::SelectedLayerInfoListType& layers);
+
+protected:
+   void clearFormatButtons();
+   void setupHeaderLabels();
+   void serverChanged();
+
+   QString theConnectionName;
+   QString theConnectionInfo;
+   ossimRefPtr<ossimWmsCapabilitiesDocument> theCurrentCapabilities;
+   ossimWmsLayerListType                     theNamedLayers;
+   QButtonGroup*           theImageFormatGroup;
+   QHBoxLayout*            theImageFormatLayout;
+   SelectedLayerInfoListType theSelectedLayers;
+   NamedLayerMapType         theNamedLayersMap;
+   ossimString               theImageFormat; 
+};
+
+#endif
diff --git a/ossimPlanetQt/ossimPlanetQt.pro b/ossimPlanetQt/ossimPlanetQt.pro
new file mode 100644
index 0000000..31dc97f
--- /dev/null
+++ b/ossimPlanetQt/ossimPlanetQt.pro
@@ -0,0 +1,11 @@
+
+TEMPLATE	= subdirs
+LANGUAGE	= C++
+
+# depend on variables, not actual directories
+SUBDIRS = sub_src sub_apps
+
+# specify the directories and dependencies
+sub_src.subdir = src
+sub_apps.subdir = apps
+sub_apps.depends = sub_src
diff --git a/ossimPlanetQt/src/README b/ossimPlanetQt/src/README
new file mode 100644
index 0000000..99b4001
--- /dev/null
+++ b/ossimPlanetQt/src/README
@@ -0,0 +1,9 @@
+ossimPlanetQt builds ossimPlanet - the Trolltech Qt gui version of the ossimPlanet global visualization program.  Developers are typically available at irc.freenode.net on the #ossimplanet channel.  The main website is www.ossim.org.
+
+It requires Qt version 4.3, ossim, libwms, ossimPlanet, OpenSceneGraph 2.2.
+
+to build:
+
+qmake-qt4 ossimPlanetQt.pro; make
+
+
diff --git a/ossimPlanetQt/src/core/ossimPlanetQtImage.cpp b/ossimPlanetQt/src/core/ossimPlanetQtImage.cpp
new file mode 100644
index 0000000..4857eaf
--- /dev/null
+++ b/ossimPlanetQt/src/core/ossimPlanetQtImage.cpp
@@ -0,0 +1,60 @@
+#include <ossimPlanetQt/ossimPlanetQtImage.h>
+
+ossimPlanetQtImage::ossimPlanetQtImage(const QImage& img)
+   :QImage(img)
+{
+   convertToOssimImage();
+}
+
+ossimPlanetQtImage::ossimPlanetQtImage(const ossimPlanetQtImage& img)
+   :QImage(img)
+{
+   convertToOssimImage();
+}
+
+ossimRefPtr<ossimImageData> ossimPlanetQtImage::getOssimImage()const
+{
+   return theImage;
+}
+
+void ossimPlanetQtImage::convertToOssimImage()
+{
+   if(format() != QImage::Format_RGB32)
+   {
+      (*this) = convertToFormat(QImage::Format_RGB32);
+   }
+
+   ossim_uint32 w = width();
+   ossim_uint32 h = height();
+   ossim_uint32 area = w*h;
+   const ossim_uint32* bitsPtr = (ossim_uint32*)bits();
+   theImage = new ossimImageData(0,
+                                 OSSIM_UINT8,
+                                 3,
+                                 w,
+                                 h);
+   theImage->initialize();
+   
+   ossim_uint8* outBufRed   = (ossim_uint8*)theImage->getBuf(0);
+   ossim_uint8* outBufGreen = (ossim_uint8*)theImage->getBuf(1);
+   ossim_uint8* outBufBlue  = (ossim_uint8*)theImage->getBuf(2);
+                                 
+   if(bitsPtr)
+   {
+      ossim_uint32 offset = 0;
+
+      while(offset < area)
+      {
+         *outBufRed   = (ossim_uint8)(((*bitsPtr)&0x00ff0000)>>16);
+         *outBufGreen = (ossim_uint8)(((*bitsPtr)&0x0000ff00)>>8);
+         *outBufBlue  = (ossim_uint8)(((*bitsPtr)&0x000000ff));
+         
+         ++outBufRed;
+         ++outBufGreen;
+         ++outBufBlue;
+         ++bitsPtr;
+         ++offset;
+      }
+   }
+   theImage->validate();
+}
diff --git a/ossimPlanetQt/src/gui/ossimPlanetQtAboutDialog.cpp b/ossimPlanetQt/src/gui/ossimPlanetQtAboutDialog.cpp
new file mode 100644
index 0000000..c832a3e
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ossimPlanetQtAboutDialog.cpp
@@ -0,0 +1,7 @@
+#include <ossimPlanetQt/ossimPlanetQtAboutDialog.h>
+
+ossimPlanetQtAboutDialog::ossimPlanetQtAboutDialog(QWidget* parent)
+   :QDialog(parent)
+{
+   setupUi(this);
+}
diff --git a/ossimPlanetQt/src/gui/ossimPlanetQtActivityItem.cpp b/ossimPlanetQt/src/gui/ossimPlanetQtActivityItem.cpp
new file mode 100644
index 0000000..7d076aa
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ossimPlanetQtActivityItem.cpp
@@ -0,0 +1,702 @@
+#include <ossimPlanetQt/ossimPlanetQtActivityItem.h>
+#include <ossimPlanetQt/ossimPlanetQtApplication.h>
+#include <ossimPlanet/ossimPlanetTextureLayerRegistry.h>
+#include <ossimPlanet/ossimPlanetConstants.h>
+#include <ossimPlanetQt/ossimPlanetQtLegendTextureItem.h>
+#include <ossimPlanetQt/ossimPlanetQtMainWindow.h>
+#include <ossimPlanetQt/ossimPlanetQtLegend.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/imaging/ossimOverviewBuilderFactoryRegistry.h>
+#include <ossim/imaging/ossimOverviewBuilderBase.h>
+#include <ossim/imaging/ossimHistogramWriter.h>
+#include <ossim/imaging/ossimImageHistogramSource.h>
+#include <sstream>
+
+ossimPlanetQtActivityItem::ossimPlanetQtActivityItem(QTreeWidget * parent, int type)
+   :QTreeWidgetItem(parent, type),
+    theState(ossimPlanetQtActivityItem::READY)
+{
+   theThread = 0;
+   theInitializeGuiFlag = true;
+}
+
+ossimPlanetQtActivityItem::ossimPlanetQtActivityItem(QTreeWidgetItem * parent, int type)
+   :QTreeWidgetItem(parent, type),
+    theState(ossimPlanetQtActivityItem::READY)
+{
+   theThread = 0;
+   theInitializeGuiFlag = true;
+}
+
+ossimPlanetQtActivityItem::ossimPlanetQtActivityItem(int type)
+   :QTreeWidgetItem(type),
+    theState(ossimPlanetQtActivityItem::READY)
+{   
+   theThread = 0;
+   theInitializeGuiFlag = true;
+}
+
+void ossimPlanetQtActivityItem::setState(ossimPlanetQtActivityItem::State state)
+{
+   QMutexLocker lock(&theMutex);
+   theState = state;
+}
+
+ossimPlanetQtActivityItem::State ossimPlanetQtActivityItem::state()const
+{
+   QMutexLocker lock(&theMutex);
+   
+   return theState;
+}
+
+const ossimString& ossimPlanetQtActivityItem::errorMessage()const
+{
+   return theErrorMessage;
+}
+
+void ossimPlanetQtActivityItem::setThread(QThread* thread)
+{
+   theThread = thread;
+}
+
+ossimPlanetQtOssimImageStagerActivity::ossimPlanetQtOssimImageStagerActivity(QTreeWidget * parent,
+                                                                                 ossimPlanetOssimImageLayer* layer,
+                                                                                 int type)
+   :ossimPlanetQtActivityItem(parent, type),
+    theLayer(layer)
+{
+   
+}
+
+ossimPlanetQtOssimImageStagerActivity::ossimPlanetQtOssimImageStagerActivity(QTreeWidgetItem * parent,
+                                                                                 ossimPlanetOssimImageLayer* layer,
+                                                                                 int type)
+   :ossimPlanetQtActivityItem(parent, type),
+    theLayer(layer)
+{
+}
+
+ossimPlanetQtOssimImageStagerActivity::ossimPlanetQtOssimImageStagerActivity(ossimPlanetOssimImageLayer* layer,
+                                                                                 ossimPlanetQtLegend* legend,
+                                                                                 int type)
+   :ossimPlanetQtActivityItem(type),
+    theLayer(layer),
+    theLegend(legend)
+{
+}
+
+void ossimPlanetQtOssimImageStagerActivity::execute()
+{
+   theMutex.lock();
+   theState = ossimPlanetQtActivityItem::EXECUTING;
+   theMutex.unlock();
+	
+   if(theLayer->getHandler().valid()&&
+		(theLayer->isStateSet(ossimPlanetTextureLayer_NO_OVERVIEWS)||
+		 theLayer->isStateSet(ossimPlanetTextureLayer_NO_HISTOGRAMS)))
+   {
+		ossimRefPtr<ossimImageHandler> handler = (ossimImageHandler*)(theLayer->getHandler()->dup());
+
+		if(theLayer->isStateSet(ossimPlanetTextureLayer_NO_OVERVIEWS))
+		{
+			buildOverviews(handler.get());
+		}
+		if(theLayer->isStateSet(ossimPlanetTextureLayer_NO_HISTOGRAMS)&&
+			(!theLayer->getHandler()->getClassName().contains("OgrGdal")))
+		{
+			buildHistograms(handler.get());
+		}
+   }
+}
+
+void ossimPlanetQtOssimImageStagerActivity::adjustToWriteableLocation(ossimFilename& file)const
+{
+	if(file.path().isWriteable())
+	{
+		return;
+	}
+	ossimString drivePart;
+	ossimString pathPart;
+	ossimString filePart;
+	ossimString extPart;
+	
+	file.split(drivePart, pathPart, filePart, extPart);
+	
+	ossimFilename stagingCache(ossimPlanetQtApplication::stagingCacheDirectory().toStdString().c_str());
+	
+	if(!stagingCache.empty())
+	{
+		stagingCache = stagingCache.dirCat(pathPart);
+		if(!stagingCache.exists())
+		{
+			stagingCache.createDirectory();
+		}
+		stagingCache = stagingCache.dirCat(filePart);
+		stagingCache += ossimFilename("." + extPart);
+		
+		file = stagingCache;
+	}
+}
+
+void ossimPlanetQtOssimImageStagerActivity::buildOverviews(ossimImageHandler* handler)
+{
+	theMutex.lock();
+	ossimRefPtr<ossimOverviewBuilderBase> builder = ossimOverviewBuilderFactoryRegistry::instance()->createBuilder("ossim_tiff_box");
+	builder->setInputSource(handler);
+	ossimFilename overviewLocation = handler->createDefaultOverviewFilename();
+	theMutex.unlock();
+	adjustToWriteableLocation(overviewLocation);
+	builder->addListener((ossimProcessListener*)this);
+	theFilename = overviewLocation;
+	if(overviewLocation.path().isWriteable())
+	{
+		builder->setOutputFile(overviewLocation);
+		builder->execute();
+	}
+	builder->removeListener((ossimProcessListener*)this);	
+
+   if(overviewLocation.exists())
+   {
+      theLayer->setOverviewFile(overviewLocation);
+      theLayer->dirtyExtents();
+   }
+}
+
+void ossimPlanetQtOssimImageStagerActivity::buildHistograms(ossimImageHandler* handler)
+{
+	theMutex.lock();
+	ossimFilename histogramFile = handler->createDefaultHistogramFilename();
+	theMutex.unlock();
+	adjustToWriteableLocation(histogramFile);
+	ossimRefPtr<ossimImageHistogramSource> histoSource = new ossimImageHistogramSource;
+	ossimRefPtr<ossimHistogramWriter> writer = new ossimHistogramWriter;
+	histoSource->connectMyInputTo(0, handler);
+	histoSource->enableSource();
+	histoSource->setComputationMode(OSSIM_HISTO_MODE_FAST);
+	writer->connectMyInputTo(0, histoSource.get());
+	theFilename = histogramFile;
+
+	writer->setFilename(histogramFile);
+	writer->addListener((ossimProcessListener*)this);
+	writer->execute();
+	writer->removeListener((ossimProcessListener*)this);
+	if(histogramFile.exists())
+	{
+		theLayer->setHistogramFile(histogramFile);
+		theLayer->setHistogramStretchEnableFlag(true);
+	}
+}
+
+void ossimPlanetQtOssimImageStagerActivity::processProgressEvent(ossimProcessProgressEvent& event)
+{
+   QMutexLocker lock(&theMutex);
+   theStatus = ossimString::toString((ossim_uint32)(event.getPercentComplete())).string() +
+      "% " + event.getMessage().c_str()+ "\n" +
+      "file: " + theFilename.string() + "\n";
+   
+}
+
+void ossimPlanetQtOssimImageStagerActivity::updateGui()
+{
+   QMutexLocker lock(&theMutex);
+
+   if(theInitializeGuiFlag)
+   {
+      theInitializeGuiFlag = false;
+      theStatus = theLayer->getHandler()->getFilename().string();
+   }
+   
+   setText(0, theStatus.c_str());
+   
+   if(theState == ossimPlanetQtActivityItem::FINISHED)
+   {
+      theLegend->mainWindow()->refreshLandTextures(theLayer->getExtents()->clone(), ossimPlanetLandRefreshType_TEXTURE);
+   }
+}
+
+ossimPlanetQtOpenImageFileFromLayerActivity::ossimPlanetQtOpenImageFileFromLayerActivity(osg::ref_ptr<ossimPlanetOssimImageLayer> layer,
+                                                                                         const ossimFilename& name,
+                                                                                         ossim_int32 entry,
+                                                                                         ossimPlanetQtLegend* legend)
+    :ossimPlanetQtActivityItem(),
+     theLayer(layer),
+     theFilename(name),
+     theEntry(entry),
+     theLegend(legend)
+{
+   theName = layer->getName();
+   theDescription = layer->getDescription();
+   theInitializeGuiFlag = true;
+   theItem = 0;
+   theSavedLookAt = layer->getLookAt();
+}
+
+void ossimPlanetQtOpenImageFileFromLayerActivity::execute()
+{
+   theMutex.lock();
+   theState = ossimPlanetQtActivityItem::EXECUTING;
+   theErrorMessage = "";
+   theStatus = "Opening " + theFilename;
+   theMutex.unlock();
+
+   if(theLayer.valid())
+   {
+      if(theLayer->openImage(theFilename, theEntry))
+      {
+         ossimPlanetOssimImageLayer* imageLayer = dynamic_cast<ossimPlanetOssimImageLayer*>(theLayer.get());
+         if(imageLayer)
+         {
+            QString stretchMode = ossimPlanetQtApplication::autoHistogramStretchMode();
+            if(!stretchMode.isEmpty())
+            {
+               imageLayer->setHistogramStretchMode(stretchMode.toStdString());
+               if(stretchMode!="None")
+               {
+                  imageLayer->setHistogramStretchEnableFlag(true);
+               }
+               else
+               {
+                  imageLayer->setHistogramStretchEnableFlag(false);
+               }
+            }
+         }
+         if(theLayer->getHandler().valid())
+         {
+				ossimString drivePart;
+				ossimString pathPart;
+				ossimString filePart;
+				ossimString extPart;
+				ossimFilename overviewFile = imageLayer->getHandler()->createDefaultOverviewFilename();
+				ossimFilename histogramFile = imageLayer->getHandler()->createDefaultHistogramFilename();
+				
+            if(!overviewFile.exists())
+            {
+					ossimFilename cachedFile = overviewFile;
+               
+               cachedFile.split(drivePart, pathPart, filePart, extPart);
+               ossimFilename stagingCache(ossimPlanetQtApplication::stagingCacheDirectory().toStdString().c_str());
+               stagingCache = stagingCache.dirCat(filePart);
+               stagingCache += ossimFilename("." + extPart);
+               if(stagingCache.exists())
+               {
+                  theLayer->getHandler()->openOverview(stagingCache);
+                  theLayer->dirtyExtents();
+               }
+            }
+				if(!histogramFile.exists())
+				{
+					ossimFilename cachedFile = histogramFile;
+               cachedFile.split(drivePart, pathPart, filePart, extPart);
+               ossimFilename stagingCache(ossimPlanetQtApplication::stagingCacheDirectory().toStdString().c_str());
+               stagingCache = stagingCache.dirCat(filePart);
+               stagingCache += ossimFilename("." + extPart);
+               if(stagingCache.exists())
+               {
+                  theLayer->setHistogramFile(stagingCache);
+               }
+				}
+         }
+      }
+      if(!theName.empty())
+      {
+         theLayer->setName(theName);
+      }
+      if(!theDescription.empty())
+      {
+         theLayer->setDescription(theDescription);
+      }
+      if(theSavedLookAt.valid())
+      {
+         theLayer->setLookAt(theSavedLookAt);
+      }
+      else
+      {
+         theLayer->resetLookAt();
+      }
+   }
+}
+
+void ossimPlanetQtOpenImageFileFromLayerActivity::updateGui()
+{
+   QMutexLocker lock(&theMutex);
+   
+   if(theInitializeGuiFlag)
+   {
+      theStatus = "Ready to open " + theFilename;
+      setText(0, theStatus.c_str());
+      theInitializeGuiFlag = false;
+      treeWidget()->scrollToItem(this);
+   }
+   setText(0, theStatus.c_str());
+   
+   if(theState == ossimPlanetQtActivityItem::FINISHED)
+   {
+      if(theItem)
+      {
+         theLegend->mainWindow()->refreshLandTextures(theLayer->getExtents(), ossimPlanetLandRefreshType_TEXTURE);
+         theItem->updateLayerInfo();
+         if(theItem->parent())
+         {
+            if(!theItem->parent()->isExpanded())
+            {
+               theItem->parent()->setExpanded(true);
+            }
+         }
+      }
+   }
+}
+
+void ossimPlanetQtOpenImageFileFromLayerActivity::setItem(ossimPlanetQtLegendTextureItem* item)
+{
+   theItem = item;
+}
+
+ossimPlanetQtOpenImageFileFromLayerXmlActivity::ossimPlanetQtOpenImageFileFromLayerXmlActivity(osg::ref_ptr<ossimPlanetOssimImageLayer> layer,
+																															  ossimRefPtr<ossimXmlNode> node,
+																															  ossimPlanetQtLegend* legend)
+    :ossimPlanetQtActivityItem(),
+     theLayer(layer),
+     theXmlNode(node),
+     theLegend(legend)
+{
+   ossimRefPtr<ossimXmlNode> filenameNode = theXmlNode->findFirstNode("filename");
+   ossimRefPtr<ossimXmlNode> name = theXmlNode->findFirstNode("name");
+   ossimRefPtr<ossimXmlNode> description = theXmlNode->findFirstNode("desciption");
+   if(filenameNode.valid())
+   {
+      theFilename = filenameNode->getText();
+   }
+   if(name.valid())
+   {
+      theName = name->getText();
+   }
+   else
+   {
+      theName = theFilename.file();
+   }
+   if(description.valid()) theDescription = description->getText();
+   theInitializeGuiFlag = true;
+   theItem = 0;
+}
+
+void ossimPlanetQtOpenImageFileFromLayerXmlActivity::execute()
+{
+   theMutex.lock();
+   theState = ossimPlanetQtActivityItem::EXECUTING;
+   theErrorMessage = "";
+   theStatus = "Opening " + theFilename;
+   theMutex.unlock();
+
+   if(theLayer.valid())
+   {
+      theLayer->loadXml(theXmlNode);
+      if(!theLayer->getLookAt().valid())
+      {
+         theLayer->resetLookAt();
+      }
+   }
+}
+
+void ossimPlanetQtOpenImageFileFromLayerXmlActivity::updateGui()
+{
+   QMutexLocker lock(&theMutex);
+   
+   if(theInitializeGuiFlag)
+   {
+      theStatus = "Ready to open " + theFilename;
+      setText(0, theStatus.c_str());
+      theInitializeGuiFlag = false;
+      treeWidget()->scrollToItem(this);
+   }
+   
+   setText(0, theStatus.c_str());
+//    if(theItem)
+//    {
+//       theItem->setText(0, theStatus.c_str());
+//    }
+   
+   if(theState == ossimPlanetQtActivityItem::FINISHED)
+   {
+      if(theItem)
+      {
+         theLayer->setName(theName);
+         theLayer->setDescription(theDescription);
+         theLegend->mainWindow()->refreshLandTextures(theLayer->getExtents(), ossimPlanetLandRefreshType_TEXTURE);
+         theItem->updateLayerInfo();
+      }
+   }
+}
+
+void ossimPlanetQtOpenImageFileFromLayerXmlActivity::setItem(ossimPlanetQtLegendTextureItem* item)
+{
+   theItem = item;
+}
+
+ossimPlanetQtOpenImageFilesActivity::ossimPlanetQtOpenImageFilesActivity(const QList<QUrl>& urls,
+                                                                         ossimPlanetQtLegend* legend)
+   :ossimPlanetQtActivityItem(),
+    theLegend(legend)
+{
+   QList<QUrl>::const_iterator iter = urls.begin();
+   while(iter != urls.end())
+   {
+      theFileList.push_back(ossimString(iter->toLocalFile().toStdString().c_str())); 
+      ++iter;
+   }
+   theCurrentFileIdx   = 0;
+   theGuiFileItemIndex = 0;
+}
+
+ossimPlanetQtOpenImageFilesActivity::ossimPlanetQtOpenImageFilesActivity(const QStringList& stringList,
+                                                                         ossimPlanetQtLegend* legend)
+   :ossimPlanetQtActivityItem(),
+    theLegend(legend)
+{
+   QStringList::const_iterator iter = stringList.begin();
+   while(iter != stringList.end())
+   {
+      theFileList.push_back(iter->toStdString()); 
+      ++iter;
+   }
+   theCurrentFileIdx   = 0;
+   theGuiFileItemIndex = 0;
+}
+
+void ossimPlanetQtOpenImageFilesActivity::execute()
+{
+   theMutex.lock();
+   theState = ossimPlanetQtActivityItem::EXECUTING;
+   theCurrentFileIdx = 0;
+   theErrorMessage = "";
+   theExtents = 0;
+   theLayers.clear();
+   theFileStatus.clear();
+   theMutex.unlock();
+   
+   ossim_uint32 fileTotal = theFileList.size();
+   while(theCurrentFileIdx < fileTotal)
+   {
+      theMutex.lock();
+      theStatus = (ossimString::toString(theCurrentFileIdx+1) + "/" +
+                   ossimString::toString(fileTotal) + "\n" +
+                   ossimString("Current file: ") + theFileList[theCurrentFileIdx]);
+                   
+      theMutex.unlock();
+      osg::ref_ptr<ossimPlanetTextureLayer> textureLayer = ossimPlanetTextureLayerRegistry::instance()->createLayer(theFileList[theCurrentFileIdx]);
+      
+      if(textureLayer.valid()&&!textureLayer->isStateSet(ossimPlanetTextureLayer_NO_GEOM))
+      {
+         if(!textureLayer->getLookAt().valid())
+         {
+            textureLayer->resetLookAt();
+         }
+         ossimPlanetOssimImageLayer* imageLayer = dynamic_cast<ossimPlanetOssimImageLayer*>(textureLayer.get());
+         if(imageLayer)
+         {
+            QString stretchMode = ossimPlanetQtApplication::autoHistogramStretchMode();
+            if(!stretchMode.isEmpty())
+            {
+               imageLayer->setHistogramStretchMode(stretchMode.toStdString());
+               if(stretchMode!="None")
+               {
+                  imageLayer->setHistogramStretchEnableFlag(true);
+               }
+               else
+               {
+                  imageLayer->setHistogramStretchEnableFlag(false);
+               }
+            }
+         }
+         theMutex.lock();
+         theLayers.push_back(textureLayer.get());
+         theFileStatus.push_back("Loaded " + theFileList[theCurrentFileIdx]);
+         theMutex.unlock();
+         
+      }
+      else if(!textureLayer.valid())
+      {
+         theMutex.lock();
+         theFileStatus.push_back(ossimString("ERROR: Unable to open file ") + theFileList[theCurrentFileIdx]);
+         theErrorMessage += theFileStatus[theCurrentFileIdx] + "\n";
+         theMutex.unlock();
+      }
+      else if(textureLayer->isStateSet(ossimPlanetTextureLayer_NO_GEOM))
+      {
+         theMutex.lock();
+         theFileStatus.push_back(ossimString("ERROR: No Geometry for file ") + theFileList[theCurrentFileIdx]);
+         theErrorMessage += theFileStatus[theCurrentFileIdx] + "\n";
+         theMutex.unlock();
+      }
+      else
+      {
+         theMutex.lock();
+         theFileStatus.push_back(ossimString("ERROR: Unable to open file ") + theFileList[theCurrentFileIdx]);  
+         theErrorMessage += theFileStatus[theCurrentFileIdx] + "\n";
+         theMutex.unlock();
+      }
+      theMutex.lock();
+      ++theCurrentFileIdx;
+      theMutex.unlock();
+   }
+}
+
+void ossimPlanetQtOpenImageFilesActivity::updateGui()
+{
+   QMutexLocker lock(&theMutex);
+   
+   if(theInitializeGuiFlag)
+   {
+      theStatus = "Ready to process " + ossimString::toString((ossim_uint32)theFileList.size()) + " files\n";
+      
+      ossim_uint32 idx = 0;
+      ossim_uint32 maxIdx = theFileList.size();
+      for(idx = 0; idx < maxIdx; ++idx)
+      {
+         QTreeWidgetItem* fileItem = new QTreeWidgetItem();
+         fileItem->setText(0, theFileList[idx].c_str());
+         fileItem->setTextColor(0, QColor(255, 0, 0));
+         addChild(fileItem);
+      }
+      theInitializeGuiFlag = false;
+      treeWidget()->scrollToItem(this);
+   }
+   else
+   {
+      for(;theGuiFileItemIndex < theCurrentFileIdx; ++theGuiFileItemIndex)
+      {
+         QTreeWidgetItem* i = child(theGuiFileItemIndex);
+         if(i)
+         {
+            if(ossimString(theFileStatus[theGuiFileItemIndex].begin(),
+                           theFileStatus[theGuiFileItemIndex].begin() + 5) != "ERROR")
+            {
+               i->setText(0, theFileStatus[theGuiFileItemIndex].c_str());
+               i->setTextColor(0, QColor(0, 255, 0));
+            }
+            else
+            {
+               i->setText(0, theFileStatus[theGuiFileItemIndex].c_str());
+            }
+         }
+      }
+   }
+   setText(0, theStatus.c_str());
+   
+   if(theLayers.size())
+   {
+      ossim_int32 idx = 0;
+      for(idx = ((ossim_int32)theLayers.size()-1); idx >=0 ; --idx)
+      {
+         if(theExtents.valid())
+         {
+            theExtents->combine(theLayers[idx]->getExtents().get());
+         }
+         else
+         {
+            theExtents = theLayers[idx]->getExtents()->clone();
+         }
+         //theLegend->addTextureLayerToTop(theLayers[idx].get());
+      }
+      theLayers.clear();
+      if(theState == ossimPlanetQtActivityItem::FINISHED)
+      {
+//          theLegend->setLandTextureRefreshFlag(true);   
+//          theLegend->mainWindow()->refreshLandTextures(theExtents.get(), ossimPlanetLandRefreshType_TEXTURE);
+         theExtents = 0;
+      }
+   }
+}
+
+ossimPlanetQtMessageActivity::ossimPlanetQtMessageActivity(const std::list<QString>& messageList,
+                                                           ossimPlanetQtLegend* legend)
+   :theMessageList(messageList),
+    theLegend(legend)
+{
+}
+
+void ossimPlanetQtMessageActivity::execute()
+{
+   theMutex.lock();
+   theState = ossimPlanetQtActivityItem::EXECUTING;
+   theMutex.unlock();
+
+   while(!theMessageList.empty())
+   {
+ //     QString& msg = theMessageList.front();
+
+//       if(msg.startsWith("<tcpipevent", Qt::CaseInsensitive))
+//       {
+//          msg = QString("<uaimAlert>") + msg + QString("</uaimAlert>");
+//          std::istringstream in(msg.toStdString());
+         
+//          ossimRefPtr<ossimXmlNode> node = new ossimXmlNode;
+//          if(node->read(in))
+//          {
+//             std::vector<ossimRefPtr<ossimXmlNode> > nodeList;
+//             node->findChildNodes("tcpipEvent", nodeList);
+//             ossim_uint32 listSize = nodeList.size();
+//             if(listSize)
+//             {
+//                ossim_uint32 idx = 0;
+//                for(;idx < listSize; ++idx)
+//                {
+//                   ossimRefPtr<ossimXmlNode> geoCenterNode = nodeList[idx]->findFirstNode("geoCenter");
+//                   if(geoCenterNode.valid())
+//                   {
+//                      ossimString latString;
+//                      ossimString lonString;
+//                      ossimString altitudeString;
+//                      ossimString eventId;
+//                      ossimString userId;
+//                      nodeList[idx]->getChildTextValue(eventId, "eventID");
+//                      nodeList[idx]->getChildTextValue(userId, "userID");
+//                      if(geoCenterNode->getChildTextValue(latString, "latitude")&&
+//                         geoCenterNode->getChildTextValue(lonString, "longitude")&&
+//                         geoCenterNode->getChildTextValue(altitudeString, "altitude"))
+//                      {
+//                         osg::ref_ptr<ossimPlanetKmlPlacemark> placemark = new ossimPlanetKmlPlacemark;
+//                         osg::ref_ptr<ossimPlanetKmlRegion>       region = new ossimPlanetKmlRegion;
+//                         osg::ref_ptr<ossimPlanetKmlLatLonAltBox> llBox  = new ossimPlanetKmlLatLonAltBox;
+//                         double lat = latString.toDouble();
+//                         double lon = lonString.toDouble();
+//                         placemark->setName(userId+": "+eventId);
+//                         placemark->setMetaData(msg.toStdString().c_str());
+//                         region->setBounds(lat, lat, lon, lon);
+//                         placemark->setRegion(region.get());
+//                         theMutex.lock();
+//                         theResultList.push_back(placemark.get());
+//                         theMutex.unlock();
+//                      }
+//                   }
+//                }
+//             }
+//          }
+//       }
+      // process message
+      theMessageList.pop_front();
+   }
+}
+
+void ossimPlanetQtMessageActivity::updateGui()
+{
+   theMutex.lock();
+   if(!theResultList.empty())
+   {
+      int count = 0;
+      while(!theResultList.empty()&&(count < 5))
+      {
+         osg::ref_ptr<ossimPlanetKmlObject> result = theResultList.front();
+         //theLegend->addLocation(result->clone());
+         theLegend->mainWindow()->kmlLayer()->addKml(result.get());
+         theResultList.pop_front();
+         ++count;
+      }
+   }
+   theMutex.unlock();
+   
+   if(theState == ossimPlanetQtActivityItem::FINISHED)
+   {
+   }   
+}
+
+
diff --git a/ossimPlanetQt/src/gui/ossimPlanetQtActivityThread.cpp b/ossimPlanetQt/src/gui/ossimPlanetQtActivityThread.cpp
new file mode 100644
index 0000000..3e97407
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ossimPlanetQtActivityThread.cpp
@@ -0,0 +1,28 @@
+#include <ossimPlanetQt/ossimPlanetQtActivityThread.h>
+#include <ossimPlanetQt/ossimPlanetQtActivityItem.h>
+
+ossimPlanetQtActivityThread::ossimPlanetQtActivityThread(ossimPlanetQtActivityItem* item, QObject * parent)
+   :QThread(parent),
+    theItem(item)
+{
+}
+
+ossimPlanetQtActivityThread::ossimPlanetQtActivityThread(QObject* parent)
+   :QThread(parent),
+    theItem(0)
+{
+}
+
+void ossimPlanetQtActivityThread::setActivityItem(ossimPlanetQtActivityItem* item)
+{
+   theItem = item;
+}
+
+void ossimPlanetQtActivityThread::run()
+{
+   if(theItem)
+   {
+      theItem->setThread(this);
+      theItem->execute();
+   }
+}
diff --git a/ossimPlanetQt/src/gui/ossimPlanetQtActivityThreadQueueItem.cpp b/ossimPlanetQt/src/gui/ossimPlanetQtActivityThreadQueueItem.cpp
new file mode 100644
index 0000000..ceddc8b
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ossimPlanetQtActivityThreadQueueItem.cpp
@@ -0,0 +1,152 @@
+#include <ossimPlanetQt/ossimPlanetQtActivityThreadQueueItem.h>
+#include <ossimPlanetQt/ossimPlanetQtActivityThread.h>
+#include <QtGui/QMessageBox>
+
+// ossimPlanetQtActivityThreadQueueItem::ossimPlanetQtActivityThreadQueueItem(QTreeWidget* parent,
+//                                                                            const QString& queueName,
+//                                                                            int type)
+//    :QTreeWidgetItem(parent, type),
+//     theStartFlag(false)
+// {
+//    setText(0, queueName);
+//    theThread = new ossimPlanetQtActivityThread();
+//    connect(theThread, SIGNAL(finished()), this, SLOT(finished()));
+//    connect(theThread, SIGNAL(terminated()), this, SLOT(terminated()));
+// }
+
+ossimPlanetQtActivityThreadQueueItem::ossimPlanetQtActivityThreadQueueItem(QTreeWidget* parent,
+                                                                           const QString& queueName,
+                                                                           ossimPlanetQtActivityThread* thread,
+                                                                           int type)
+   :QTreeWidgetItem(parent, type),
+    theStartFlag(false)
+{
+   theDeletableFlag = true;
+   setText(0, queueName);
+   theThread = thread;
+   if(!theThread)
+   {
+      theThread = new ossimPlanetQtActivityThread();  
+   }
+   connect(theThread, SIGNAL(finished()), this, SLOT(finished()));
+   connect(theThread, SIGNAL(terminated()), this, SLOT(terminated()));
+}
+
+void ossimPlanetQtActivityThreadQueueItem::start()
+{
+   QMutexLocker lock(&theMutex);
+   if((!theStartFlag)&&
+      (childCount() > 0))
+   {
+      ossimPlanetQtActivityItem* item = dynamic_cast<ossimPlanetQtActivityItem*>(child(0));
+      if(item)
+      {
+         theStartFlag = true;
+         theThread->setActivityItem((ossimPlanetQtActivityItem*)child(0));
+         theThread->start(QThread::LowestPriority);
+      }
+   }
+}
+
+QThread* ossimPlanetQtActivityThreadQueueItem::thread()
+{
+   return theThread;
+}
+
+void ossimPlanetQtActivityThreadQueueItem::finished()
+{
+   QMutexLocker lock(&theMutex);
+   ossimPlanetQtActivityItem* item = dynamic_cast<ossimPlanetQtActivityItem*>(child(0));
+   theStartFlag = false;
+   if(item)
+   {
+      item->setState(ossimPlanetQtActivityItem::FINISHED);
+   }
+}
+
+void ossimPlanetQtActivityThreadQueueItem::terminated()
+{
+   QMutexLocker lock(&theMutex);
+   ossimPlanetQtActivityItem* item = dynamic_cast<ossimPlanetQtActivityItem*>(child(0));
+   theStartFlag = false;
+   if(item)
+   {
+      item->setState(ossimPlanetQtActivityItem::CANCELED);
+   }
+}
+
+void ossimPlanetQtActivityThreadQueueItem::updateGui()
+{
+   ossim_uint32 count = childCount();
+
+   if(count < 1) return;
+
+   ossim_uint32 idx = 0;
+
+   ossimPlanetQtActivityItem* item = 0;
+   
+   for(idx = 0; idx < count; ++idx)
+   {
+      item = dynamic_cast<ossimPlanetQtActivityItem*>(child(idx));
+      if(item)
+      {
+         item->updateGui();
+      }
+   }
+   item = dynamic_cast<ossimPlanetQtActivityItem*>(child(0));
+   if(item)
+   {
+      // make sure all updates have been transferred.
+      item->updateGui();
+      switch(item->state())
+      {
+         case ossimPlanetQtActivityItem::READY:
+         {
+            theMutex.lock();
+            if(!theStartFlag)
+            {
+               theMutex.unlock();
+               start();
+            }
+            else
+            {
+               theMutex.unlock();
+            }
+            break;
+         }
+         case ossimPlanetQtActivityItem::FINISHED:
+         case ossimPlanetQtActivityItem::CANCELED:
+         {
+            ossimString message = item->errorMessage();
+            if(message != "")
+            {
+               QMessageBox *messageBox = new QMessageBox(0);
+               messageBox->setButtonText(QMessageBox::Ok, "Ok");
+               messageBox->setText(message.c_str());
+               messageBox->setAttribute(Qt::WA_DeleteOnClose);
+               messageBox->setModal(false);
+               messageBox->show();
+            }
+            if(theDeletableFlag)
+            {
+               delete child(0);
+            }
+            
+            break;
+         }
+         default:
+         {
+            break;
+         }
+      }
+   }
+}
+bool ossimPlanetQtActivityThreadQueueItem::deletableFlag()const
+{
+   return theDeletableFlag;
+}
+
+void ossimPlanetQtActivityThreadQueueItem::setDeletableFlag(bool flag)
+{
+   theDeletableFlag = flag;
+}
diff --git a/ossimPlanetQt/src/gui/ossimPlanetQtActivityWidget.cpp b/ossimPlanetQt/src/gui/ossimPlanetQtActivityWidget.cpp
new file mode 100644
index 0000000..5a4b600
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ossimPlanetQtActivityWidget.cpp
@@ -0,0 +1,199 @@
+#include <ossimPlanetQt/ossimPlanetQtActivityWidget.h>
+#include <ossimPlanetQt/ossimPlanetQtActivityThread.h>
+#include <ossimPlanetQt/ossimPlanetQtOperation.h>
+#include <QtGui/QHeaderView>
+#include <QtGui/QTreeWidgetItemIterator>
+#include <QtGui/QApplication>
+
+
+void ossimPlanetQtActivityWidget::Callback::started(ossimPlanetOperation* operation)
+{
+   if(theWidget)
+   {
+      QApplication::postEvent(theWidget, new ossimPlanetQtActivityWidget::QtOperationEvent(operation, 
+                                                                                           ossimPlanetQtActivityWidget::STARTED_TYPE));
+   }
+}
+
+void ossimPlanetQtActivityWidget::Callback::finished(ossimPlanetOperation* operation)
+{
+   if(theWidget)
+   {
+      QApplication::postEvent(theWidget, new ossimPlanetQtActivityWidget::QtOperationEvent(operation, 
+                                                                                           ossimPlanetQtActivityWidget::FINISHED_TYPE));
+   }
+}
+
+void ossimPlanetQtActivityWidget::Callback::canceled(ossimPlanetOperation* operation)
+{
+   if(theWidget)
+   {
+      QApplication::postEvent(theWidget, new ossimPlanetQtActivityWidget::QtOperationEvent(operation, 
+                                                                                           ossimPlanetQtActivityWidget::CANCELED_TYPE));
+   }
+}
+
+void ossimPlanetQtActivityWidget::Callback::propertyChanged(const ossimString& name,
+                                                            ossimPlanetOperation* operation)
+{
+   if(name == "status")
+   {
+      if(theWidget)
+      {
+         QApplication::postEvent(theWidget, new ossimPlanetQtActivityWidget::QtOperationEvent(operation, 
+                                                                                              ossimPlanetQtActivityWidget::STATUS_TYPE));
+      }
+   }
+}
+
+//static const char *STAGER_ACTIVITY_KW = "Image Stager Activities";
+//static const char *OPEN_FILES_ACTIVITY_KW = "Open Files";
+//static const char *MESSAGE_ACTIVITY_KW = "Message Activities";
+//static const char *MISC_ACTIVITY_KW = "Miscellaneous Activities";
+ossimPlanetQtActivityWidget::ossimPlanetQtActivityWidget(QWidget* parent)
+   :QTreeWidget(parent)
+{
+	theStagerQueue     = new ossimPlanetOperationThreadQueue();
+	theOpenFileQueue   = new ossimPlanetOperationThreadQueue();
+	theMiscQueue       = new ossimPlanetOperationThreadQueue();
+   theCallback = new ossimPlanetQtActivityWidget::Callback(this);
+
+   header()->setHidden(1);
+   setRootIsDecorated(true);
+   setAutoScroll(true);
+   setSortingEnabled(false);
+   
+   update();
+}
+
+ossimPlanetQtActivityWidget::~ossimPlanetQtActivityWidget()
+{
+	theStagerQueue->removeAllOperations();
+	theStagerQueue->cancelCurrentOperation();
+	theOpenFileQueue->removeAllOperations();
+	theOpenFileQueue->cancelCurrentOperation();
+	theMiscQueue->removeAllOperations();
+	theMiscQueue->cancelCurrentOperation();
+}
+
+void ossimPlanetQtActivityWidget::addOperation(ossimPlanetOperation* operation)
+{
+   if(!operation) return;
+   ossimPlanetQtOperation* qtOperation = dynamic_cast<ossimPlanetQtOperation*>(operation);
+   QTreeWidgetItem* item = 0;
+   operation->addCallback(theCallback.get());
+   ossimString status;
+   if(qtOperation)
+   {
+      qtOperation->setActivityWidget(this);
+      qtOperation->status(status);
+   }
+	if(dynamic_cast<ossimPlanetQtOssimImageStagerOperation*>(operation))
+	{
+      item = new ActivityItem(this, operation);
+      item->setText(0, status.c_str());
+      theItemMap.insert(std::make_pair(operation, item));
+		theStagerQueue->add(operation);
+	}
+	else if(dynamic_cast<ossimPlanetQtOpenImageFileOperation*>(operation))
+	{
+      item = new ActivityItem(this, operation);
+      item->setText(0, status.c_str());
+      theItemMap.insert(std::make_pair(operation, item));
+		theOpenFileQueue->add(operation);
+	}
+   else
+   {
+      item = new ActivityItem(this, operation);
+      item->setText(0, status.c_str());
+      theItemMap.insert(std::make_pair(operation, item));
+      theMiscQueue->add(operation);
+   }
+	
+}
+bool ossimPlanetQtActivityWidget::event(QEvent* e)
+{
+   switch(e->type())
+   {
+      case ossimPlanetQtActivityWidget::STATUS_TYPE:
+      {
+         OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theItemMapMutex);
+         ossimPlanetQtActivityWidget::QtOperationEvent* event = dynamic_cast<ossimPlanetQtActivityWidget::QtOperationEvent*>(e);
+         if(event)
+         {
+            ossimPlanetQtOperation* qtOperation = event->toQtOperation();
+            
+            if(qtOperation)
+            {
+               ossimString status;
+               qtOperation->status(status);
+               OperationItemMapType::iterator iter = theItemMap.find(qtOperation);
+               if(iter!=theItemMap.end())
+               {
+                  iter->second->setText(0, status.c_str());
+               }
+            }
+         }
+         break;
+      }
+      case ossimPlanetQtActivityWidget::FINISHED_TYPE:
+      {
+         ossimPlanetQtActivityWidget::QtOperationEvent* event = dynamic_cast<ossimPlanetQtActivityWidget::QtOperationEvent*>(e);
+         if(event)
+         {
+            ossimPlanetOperation* operation = event->operation();
+            if(operation)
+            {
+               removeOperation(operation);
+            }
+         }
+         break;
+      }
+      default:
+      {
+         break;
+      }
+	}
+   return QTreeWidget::event(e);
+}
+
+void ossimPlanetQtActivityWidget::deleteSelectedActivities()
+{
+	QTreeWidgetItemIterator iter(this, QTreeWidgetItemIterator::Selected);
+	while(*iter)
+	{
+		ossimPlanetQtActivityWidget::ActivityItem* item = dynamic_cast<ossimPlanetQtActivityWidget::ActivityItem*>(*iter);
+		++iter;
+		if(item)
+		{
+			removeOperation(item->theOperation.get());
+		}
+	}
+}
+void ossimPlanetQtActivityWidget::deleteAllActivities()
+{
+	QTreeWidgetItemIterator iter(this, QTreeWidgetItemIterator::All);
+	while(*iter)
+	{
+		ossimPlanetQtActivityWidget::ActivityItem* item = dynamic_cast<ossimPlanetQtActivityWidget::ActivityItem*>(*iter);
+		++iter;
+		if(item)
+		{
+			removeOperation(item->theOperation.get());
+		}
+	}
+}
+
+void ossimPlanetQtActivityWidget::removeOperation(ossimPlanetOperation* operation)
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theItemMapMutex);
+   OperationItemMapType::iterator iter = theItemMap.find(operation);
+   
+   if(iter!=theItemMap.end())
+   {
+		operation->cancel();
+      //removeItemWidget(iter->second, 0);
+      delete iter->second;
+      theItemMap.erase(iter);
+   }
+}
diff --git a/ossimPlanetQt/src/gui/ossimPlanetQtActivityWindow.cpp b/ossimPlanetQt/src/gui/ossimPlanetQtActivityWindow.cpp
new file mode 100644
index 0000000..24e57a5
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ossimPlanetQtActivityWindow.cpp
@@ -0,0 +1,7 @@
+#include <ossimPlanetQt/ossimPlanetQtActivityWindow.h>
+
+ossimPlanetQtActivityWindow::ossimPlanetQtActivityWindow(QWidget* parent)
+   :QDialog(parent)
+{
+   setupUi(this);
+}
diff --git a/ossimPlanetQt/src/gui/ossimPlanetQtAlertLayer.cpp b/ossimPlanetQt/src/gui/ossimPlanetQtAlertLayer.cpp
new file mode 100644
index 0000000..9454596
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ossimPlanetQtAlertLayer.cpp
@@ -0,0 +1,164 @@
+#include <ossimPlanetQt/ossimPlanetQtAlertLayer.h>
+#include <OpenThreads/ScopedLock>
+#include <ossimPlanet/ossimPlanet.h>
+//#include <ossimPlanet/ossimPlanetLand.h>
+#include <ossimPlanet/ossimPlanetGeoRefModel.h>
+#include <ossimPlanet/ossimPlanetIdManager.h>
+#include <ossim/elevation/ossimElevManager.h>
+
+#include <iostream>
+#define _MAX_STEM_LENGTH 100
+#define _STEM_R 246
+#define _STEM_G 185
+#define _STEM_B 0
+// static unsigned char theLinePixelBuffer[_MAX_STEM_LENGTH * 3];
+
+ossimPlanetQtAlertIconCallout::ossimPlanetQtAlertIconCallout()
+{
+   setSupportsDisplayList(false);
+   theLinePixelBuffer.resize(100*3);
+   theStemHeight = 30;
+   for (int i = 0; i < _MAX_STEM_LENGTH; i +=3)
+   {
+      theLinePixelBuffer[i]   = _STEM_R;
+      theLinePixelBuffer[i+1] = _STEM_G;
+      theLinePixelBuffer[i+2] = _STEM_B;
+   }
+}
+
+ossimPlanetQtAlertIconCallout::ossimPlanetQtAlertIconCallout(const ossimPlanetQtAlertIconCallout& iconCallout,
+                                                             const osg::CopyOp& copyop)
+   : osg::Drawable(iconCallout, copyop),
+     theImage(iconCallout.theImage),
+     theStemHeight(iconCallout.theStemHeight),
+     theLinePixelBuffer(iconCallout.theLinePixelBuffer)
+{
+//    theLinePixelBuffer.resize(100*3);
+}
+
+ossimPlanetQtAlertIconCallout::~ossimPlanetQtAlertIconCallout()
+{
+   
+}
+
+void ossimPlanetQtAlertIconCallout::drawImplementation(osg::RenderInfo& /*state*/)const
+{
+   std::map<ossimPlanetId, AlertInfo>::const_iterator iter = theAlerts.begin();
+
+   while(iter!=theAlerts.end())
+   {
+      glPushMatrix();
+      glTranslated(iter->second.theLandPosition[0], iter->second.theLandPosition[1], iter->second.theLandPosition[2]);
+      glRasterPos3d(0.0,0.0,0.0);
+      glDrawPixels(1, theStemHeight, GL_RGB, GL_UNSIGNED_BYTE, &theLinePixelBuffer.front());
+      glBitmap(0, 0, 0, 0, -2, theStemHeight, NULL);
+      glDrawPixels(10, 10, GL_RGB, GL_UNSIGNED_BYTE, &theLinePixelBuffer.front());
+      glPopMatrix();
+      ++iter;
+   }
+}
+
+void ossimPlanetQtAlertIconCallout::addOrUpdateAlert(const AlertInfo& info)
+{
+   std::map<ossimPlanetId, AlertInfo>::iterator iter = theAlerts.find(info.theId);
+
+   if(iter == theAlerts.end())
+   {
+      theAlerts.insert(std::make_pair(info.theId, info));
+   }
+   else
+   {
+      iter->second = info; 
+   }
+}
+
+osg::BoundingBox ossimPlanetQtAlertIconCallout::computeBound()const
+{
+   osg::BoundingBox bbox;
+
+   return bbox;
+}
+
+ossimPlanetQtAlertLayer::ossimPlanetQtAlertLayer()
+   :thePlanet(0),
+    theGeoid(ossimGeoidManager::instance()->findGeoidByShortName("geoid1996"))
+{
+   theDrawable = new ossimPlanetQtAlertIconCallout;
+   theGeode = new osg::Geode;
+   theGeode->addDrawable(theDrawable);
+   theGeode->setCullingActive(false);
+   theDrawable->setSupportsDisplayList(false);
+   addChild(theGeode.get());
+   setCullingActive(false);
+   
+}
+
+void ossimPlanetQtAlertLayer::removeAlert(const ossimPlanetId& /*id*/)
+{
+   
+}
+
+void ossimPlanetQtAlertLayer::updateAlert(const ossimPlanetId& /*id*/,
+                                          const ossimGpt& /*gpt*/)
+{
+   
+}
+
+ossimPlanetId ossimPlanetQtAlertLayer::addAlert(const ossimGpt& gpt)
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+   ossimPlanetId id = ossimPlanetIdManager::nextId();
+   theAlertsToAddOrUpdate.insert(std::make_pair(id, gpt));
+   return id;
+}
+ 
+void ossimPlanetQtAlertLayer::traverse(osg::NodeVisitor& nv)
+{  
+   switch(nv.getVisitorType())
+   {
+      case osg::NodeVisitor::UPDATE_VISITOR:
+      {
+         if(!thePlanet)
+         {
+            thePlanet = ossimPlanet::findPlanet(this);
+         }
+
+         if(thePlanet&&!theAlertsToAddOrUpdate.empty())
+         {
+            std::map<ossimPlanetId, ossimGpt>::iterator iter = theAlertsToAddOrUpdate.begin();
+            ossimPlanetId id = iter->first;
+            double h = ossimElevManager::instance()->getHeightAboveMSL(iter->second);
+            if(!ossim::isnan(h))
+            {
+               if(theGeoid.valid()) h +=theGeoid->offsetFromEllipsoid(iter->second);
+            }
+            else
+            {
+               if(theGeoid.valid()) h =theGeoid->offsetFromEllipsoid(iter->second);
+            }
+            if(!ossim::isnan(h))
+            {
+               h = 0;
+            }
+            h /= thePlanet->model()->getNormalizationScale();
+            osg::Vec3d llh(iter->second.latd(),
+                           iter->second.lond(),
+                           h);
+            osg::Vec3d out;
+            thePlanet->model()->forward(llh, out);
+            ossimPlanetQtAlertIconCallout::AlertInfo info;
+            info.theId = iter->first;
+            info.theLandPosition = out;
+            theDrawable->addOrUpdateAlert(info);
+            theAlertsToAddOrUpdate.erase(iter);
+         }
+         break;
+      }
+      default:
+      {
+         break;
+      }
+   }
+   
+   osg::Group::traverse(nv);
+}
diff --git a/ossimPlanetQt/src/gui/ossimPlanetQtApplication.cpp b/ossimPlanetQt/src/gui/ossimPlanetQtApplication.cpp
new file mode 100644
index 0000000..b126e8a
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ossimPlanetQtApplication.cpp
@@ -0,0 +1,889 @@
+#include <ossimPlanetQt/ossimPlanetQtApplication.h>
+
+#include <QtCore/QDir>
+#include <ossim/base/ossimEnvironmentUtility.h>
+#include <ossim/init/ossimInit.h>
+#include <iostream>
+#include <osgDB/Registry>
+#include <osg/ArgumentParser>
+#include <osg/Drawable>
+#include <osg/Texture>
+#include <osg/ApplicationUsage>
+#include <ossim/base/ossimArgumentParser.h>
+#include <wms/wms.h>
+#include <ossim/base/ossimEnvironmentUtility.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimDirectory.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimGeoidEgm96.h>
+#include <ossim/base/ossimGeoidManager.h>
+#include <ossim/elevation/ossimElevManager.h>
+#include <ossimPlanet/ossimPlanetInteractionController.h>
+#include <ossimPlanet/ossimPlanetAction.h>
+#include <ossimPlanet/ossimPlanetActionRouter.h>
+
+QSettings*                       ossimPlanetQtApplication::theSettings = 0;
+QString                          ossimPlanetQtApplication::theUserSupportDirectory;
+QString                          ossimPlanetQtApplication::theUserDirectory;
+ossimPlanetQtApplication::ReferenceImageListType ossimPlanetQtApplication::theReferenceImages;
+std::vector<ossimFilename>       ossimPlanetQtApplication::thePlugins;
+// bool                             ossimPlanetQtApplication::theElevEnabled  = true;
+// ossim_float32                    ossimPlanetQtApplication::theElevExag     = 1.0;
+// ossim_float32                    ossimPlanetQtApplication::theSplitMetricRatio = 3.0;
+// ossim_uint32                     ossimPlanetQtApplication::theElevEstimate = 16;
+// ossimFilename                    ossimPlanetQtApplication::theElevCache    = "";
+// ossimPlanetLandType              ossimPlanetQtApplication::theLandType     = ossimPlanetLandType_NORMALIZED_ELLIPSOID;
+// ossim_uint32                     ossimPlanetQtApplication::theLevelOfDetail= 20;
+// bool                             ossimPlanetQtApplication::theHudEnabled   = true;
+// bool                             ossimPlanetQtApplication::theMipMapping   = true;
+ossimFilename                    ossimPlanetQtApplication::theThemePath      = "";
+ossimFilename                    ossimPlanetQtApplication::theCompassRing = ""; 
+//ossimFilename                    ossimPlanetQtApplication::theCompassRose = ""; 
+//#define OSSIMPLANET_3D_CONNEXION
+// NOTE THIS IS ONLY TEST CODE for ossimPlanet roadmap docs to enhance future versions
+#ifdef OSSIMPLANET_3D_CONNEXION
+#include "3DconnexionClient/ConnexionClientAPI.h"
+#ifdef __MACOSX__
+// extern OSErr InstallConnexionHandlers() __attribute__((weak_import));
+
+static void tdx_drv_handler(io_connect_t connection, 
+                            natural_t messageType, 
+                            void *messageArgument);
+typedef struct
+{
+	UInt16 				clientID; /* ID assigned by the driver */
+	Boolean				showClientEventsOnly;
+} TdxDeviceWrapperInfo, *TdxDeviceWrapperInfoPtr;
+
+TdxDeviceWrapperInfo gDevWrapperInfo;
+
+
+/* ========================================================================== */
+// #pragma mark -
+// #pragma mark * Façade of 3DconnexionClient framework APIs *
+
+/* -------------------------------------------------------------------------- */
+long ossimPlanetQtApplication::initInputDevices()
+   // (UInt32 appID, 
+//               Boolean showOnlyMyClientEvents, 
+//               UInt16 mode, 
+//               UInt32 mask)
+{
+   OSStatus err;
+   gDevWrapperInfo.clientID = 0;
+   gDevWrapperInfo.showClientEventsOnly = true;
+   
+//    gDevWrapperInfo.mainEventQueue = GetMainEventQueue();
+   
+   /* make sure the framework is installed */
+   if (InstallConnexionHandlers == NULL)
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << "3Dconnexion framework not found!\n" << std::endl;
+//       fprintf(stderr, "3Dconnexion framework not found!\n");
+      return -1;
+   }
+   
+   /* install 3dx message handler in order to receive driver events */
+   err = InstallConnexionHandlers(tdx_drv_handler, 0L, 0L);
+//    assert(err == 0);
+//    if (err)
+//       return err;
+   
+   /* register our app with the driver */
+//    gDevWrapperInfo.clientID = RegisterConnexionClient('osPt', (UInt8*)"ossimplanet", kConnexionClientModeTakeOver, kConnexionMaskAll);
+   gDevWrapperInfo.clientID = RegisterConnexionClient('osPt', 0, kConnexionClientModeTakeOver, kConnexionMaskAll);
+//    if (gDevWrapperInfo.clientID == 0)
+//       return -2;
+//    std::cout << "CLIENT ID = " <<    gDevWrapperInfo.clientID << std::endl;
+//    fprintf(stderr, "3Dconnexion device initialized. Client ID: %d\n", 
+   //gDevWrapperInfo.clientID);
+
+   ossimPlanetAction(":iac tie axis0 LON").execute();
+   ossimPlanetAction(":iac tie axis1 LAT").execute();
+   ossimPlanetAction(":iac tie axis2 ZOOM").execute();
+   ossimPlanetAction(":iac tie axis3 PITCH").execute();
+//    ossimPlanetAction(":iac tie axis4 ROLL").execute();
+   ossimPlanetAction(":iac tie axis5 YAW").execute();
+   
+   return err;
+}
+
+void ossimPlanetQtApplication::terminateInputDevices()
+{
+   UInt16 wasConnexionOpen = gDevWrapperInfo.clientID;
+
+   if (InstallConnexionHandlers == NULL)
+   {
+      return;
+   }
+    
+   /* make sure the framework is installed */
+//	if (InstallConnexionHandlers == NULL)
+//        return;
+   
+   /* close the connection with the 3dx driver */
+   if (wasConnexionOpen)
+   {
+      UnregisterConnexionClient(gDevWrapperInfo.clientID);
+   }
+   
+   CleanupConnexionHandlers();
+   
+   ///fprintf(stderr, "Terminated connection with 3Dconnexion device.\n");
+}
+
+// bool ossimPlanetQtApplication::macEventFilter ( EventHandlerCallRef caller, EventRef event )
+// {
+//    long kind = GetEventKind(event);
+//    if(gDevWrapperInfo.mainEventQueue)
+//    {
+//       std::cout << GetNumEventsInQueue(gDevWrapperInfo.mainEventQueue) << std::endl;
+//    }
+//    return QApplication::macEventFilter(caller, event);
+// }
+inline double dampen(double value)
+{
+//    return value;
+#if 1
+   if(value > 1.0 || value < -1.0) return value;
+
+   if(value < 0.0) return -(value*value);
+
+   return value*value;
+#endif
+}
+static void tdx_drv_handler(io_connect_t connection, 
+                            natural_t messageType, 
+                            void *messageArgument)
+{
+   static double normalizer = 500.0;
+   static int minAxisValue = 1;
+   static ConnexionDeviceState	lastState;
+   ConnexionDeviceStatePtr state = (ConnexionDeviceStatePtr)messageArgument;
+   ossimPlanetInteractionController* iac = ossimPlanetInteractionController::instance();
+   
+   switch(messageType)
+   {
+      case kConnexionMsgDeviceState:
+//          std::cout << "client = " << state->client << std::endl;
+//          std::cout << "myclient = " << gDevWrapperInfo.clientID << std::endl;
+         /* Device state messages are broadcast to all clients.  It is up to
+          * the client to figure out if the message is meant for them. This
+          * is done by comparing the "client" id sent in the message to our
+          * assigned id when the connection to the driver was established.
+          * 
+          * There is a special mode wherein all events are sent to this 
+          * client regardless if it was meant for it or not.  This mode is 
+          * determined by the showClientEventOnly flag.
+          */
+         if (!gDevWrapperInfo.showClientEventsOnly 
+             || state->client == gDevWrapperInfo.clientID)
+         {
+            switch (state->command)
+            {
+               case kConnexionCmdHandleAxis:
+               {
+                  if((std::abs(state->axis[0]) <= minAxisValue)&&
+                     (std::abs(state->axis[1]) <= minAxisValue))
+                  {
+                     if((std::abs(lastState.axis[0]) > minAxisValue)||
+                        (std::abs(lastState.axis[1]) > minAxisValue))
+                     {
+                        iac->updateInteractionValuators("axis0", 0.0);
+                        iac->updateInteractionValuators("axis1", 0.0);
+                        ossimPlanetAction(":navigator rotatestop").execute();
+                     }
+                  }
+                  else 
+                  {
+                     if((std::abs(lastState.axis[0]) <= minAxisValue)&&
+                        (std::abs(lastState.axis[1]) <= minAxisValue))
+                     {
+                        iac->updateInteractionValuators("axis0", 0.0);
+                        iac->updateInteractionValuators("axis1", 0.0);
+                        ossimPlanetAction(":navigator rotatestart").execute();
+                     }
+                  }
+
+
+                  // now do axis z
+                  if(std::abs(state->axis[2]) <= minAxisValue)
+                  {
+                     if(std::abs(lastState.axis[2])> minAxisValue)
+                     {
+                        iac->updateInteractionValuators("axis2", 0.0);
+                        ossimPlanetAction(":navigator loszoomstop").execute();
+                     }
+                  }
+                  else
+                  {
+                     if(std::abs(lastState.axis[2]) <= minAxisValue)
+                     {
+                        iac->updateInteractionValuators("axis2", 0.0);
+                        
+                        ossimPlanetAction(":navigator loszoomstart").execute();
+                     }                     
+                  }
+
+                  // now handle yaw and pitch that are associate to losrotatestart
+                  if((std::abs(state->axis[3]) <= minAxisValue)&&
+                     (std::abs(state->axis[5]) <= minAxisValue))
+                  {
+                     if((std::abs(lastState.axis[3]) > minAxisValue)||
+                        (std::abs(lastState.axis[5]) > minAxisValue))
+                     {
+                         iac->updateInteractionValuators("axis3", 0.0);
+                         iac->updateInteractionValuators("axis5", 0.0);
+                         ossimPlanetAction(":navigator losrotatestop").execute();
+                     }
+                  }
+                  else 
+                  {
+                     if((std::abs(lastState.axis[3]) < minAxisValue)&&
+                        (std::abs(lastState.axis[5]) < minAxisValue))
+                     {
+                         iac->updateInteractionValuators("axis3", 0.0);
+                         iac->updateInteractionValuators("axis5", 0.0);
+                        ossimPlanetAction(":navigator losrotatestart").execute();
+                     }
+                  }
+
+                  iac->updateInteractionValuators("axis0", dampen(state->axis[0]/normalizer));
+                  iac->updateInteractionValuators("axis1", dampen(state->axis[1]/normalizer));
+                  iac->updateInteractionValuators("axis2", dampen(state->axis[2]/normalizer));
+                  iac->updateInteractionValuators("axis3", dampen(state->axis[3]/normalizer));
+                  iac->updateInteractionValuators("axis5", dampen(state->axis[5]/normalizer));
+                  break;
+               }
+               
+               case kConnexionCmdHandleButtons:
+               {
+                  
+                  break;
+               }
+               
+               default:
+                  break;
+                  
+            } /* switch */
+         }
+         BlockMoveData(state, &lastState, (long)sizeof(ConnexionDeviceState));
+         
+         break;
+         
+      default:
+         /* other messageTypes can happen and should be ignored */
+         break;
+   }
+   /*
+     printf("connection: %X\n", connection);
+     printf("messageType: %X\n", messageType);
+     printf("version: %d\n", msg->version);
+     printf("front app client: %d  ourID: %d\n", 
+     msg->client, gDevWrapperInfo.clientID);
+     printf("command: %u\n", msg->command);
+     printf("value: %ld\n", msg->value);
+     printf("param: %hd\n", msg->param);
+     for (int i=0; i<8; i++)
+     printf("report[%d]: %d\n", i, msg->report[i]);
+     printf("buttons: %d\n", msg->buttons);
+     printf("TX: %d\n", msg->axis[0]);
+     printf("TY: %d\n", msg->axis[1]);
+     printf("TZ: %d\n", msg->axis[2]);
+     printf("RX: %d\n", msg->axis[3]);
+     printf("RY: %d\n", msg->axis[4]);
+     printf("RZ: %d\n", msg->axis[5]);
+    printf("-----------------------------------------\n\n");
+   */
+//      printf("TX: %d\n", state->axis[0]);
+//      printf("TY: %d\n", state->axis[1]);
+//      printf("TZ: %d\n", state->axis[2]);
+//      printf("RX: %d\n", state->axis[3]);
+//      printf("RY: %d\n", state->axis[4]);
+//      printf("RZ: %d\n", state->axis[5]);
+}
+#else
+long ossimPlanetQtApplication::initInputDevices()
+{
+   return 0;
+}
+
+void ossimPlanetQtApplication::terminateInputDevices()
+{
+   return;
+}
+#endif // __MACOSX__
+
+#else
+long ossimPlanetQtApplication::initInputDevices()
+{
+   return 0;
+}
+
+void ossimPlanetQtApplication::terminateInputDevices()
+{
+   return;
+}
+#endif //OSSIMPLANET_3D_CONNEXION
+#if  !defined(_WIN32) && !defined(__WIN32__) && !defined(_MSC_VER)
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <sys/errno.h>
+int setMaximumFiles(int filecount)
+{
+   struct rlimit lim;
+   lim.rlim_cur = lim.rlim_max = (rlim_t)filecount;
+   if ( setrlimit(RLIMIT_NOFILE, &lim) == 0 )
+   {
+      return 0;
+   }
+   else
+   {
+      return errno;
+   }
+}
+int getMaximumFiles()
+{
+    struct rlimit lim;
+    if ( getrlimit(RLIMIT_NOFILE, &lim) == 0 )
+    {
+        return (long)lim.rlim_max;
+    }
+    return 0;
+}
+#else
+int setMaximumFiles(int /*filecount*/)
+{
+   return 0;
+}
+int getMaximumFiles()
+{
+   return 0;
+}
+#endif
+
+/*!
+  \class ossimPlanetQtApplication
+  \brief The ossimPlanetQtApplication class manages application-wide information.
+
+  This is a subclass of QApplication and should be instantiated in place of
+  QApplication. Most methods are static in keeping witn the design of QApplication.
+
+  This class hides platform-specific path information and provides
+  a portable way of referencing specific files and directories.
+  Ideally, hard-coded paths should appear only here and not in other modules
+  so that platform-conditional code is minimized and paths are easier
+  to change due to centralization.
+*/
+ossimPlanetQtApplication::ossimPlanetQtApplication(int & argc, char ** argv, bool guiEnabled)
+: QApplication(argc, argv, guiEnabled)
+{
+   osg::Referenced::setThreadSafeReferenceCounting(true);
+   setOrganizationName("OSSIM");
+   setOrganizationDomain("planet.ossim.org");
+   setApplicationName("OSSIM Planet");
+   theSettings = new QSettings("planet.ossim.org");
+   theUserSupportDirectory = ossimEnvironmentUtility::instance()->getUserOssimSupportDir();   
+   theUserDirectory = ossimEnvironmentUtility::instance()->getUserDir();   
+}
+
+ossimPlanetQtApplication::~ossimPlanetQtApplication()
+{
+   if(theSettings)
+   {
+      delete theSettings;
+      theSettings = 0;
+   }
+   ossimPlanetActionRouter::instance()->shutdown();
+}
+
+bool ossimPlanetQtApplication::initWithArgs(int& argc, char** argv)
+{
+   //osg::Texture::setMinimumNumberOfTextureObjectsToRetainInCache(0);
+   osg::Drawable::setMinimumNumberOfDisplayListsToRetainInCache(0);
+   //osg::DisplaySettings::instance()->setMaxNumberOfGraphicsContexts(1);
+
+   if(getMaximumFiles() < 1024)
+   {
+            setMaximumFiles(1024);
+   }
+   //    setMaximumFiles(25);
+
+   //osgDB::DatabasePager* databasePager = osgDB::Registry::instance()->getOrCreateDatabasePager();
+   
+   ossimArgumentParser argumentParser(&argc, argv);
+   
+   wmsInitialize();
+   ossimInit::instance()->setPluginLoaderEnabledFlag(false);
+   ossimInit::instance()->initialize(argumentParser);
+   osg::ArgumentParser arguments(&argumentParser.argc(),argumentParser.argv());
+   
+   std::string tempString;
+   osg::ArgumentParser::Parameter stringParam(tempString);
+   addCommandLineOptions(arguments);
+   
+   if(arguments.read("-h") || arguments.read("--help"))
+   {
+      arguments.getApplicationUsage()->write(std::cout);
+      return false;
+   }
+   
+//    if(arguments.read("--enable-flatland"))
+//    {
+//       theLandType = ossimPlanetLandType_FLAT;
+//    }
+   if(arguments.read("--wms-timeout", stringParam))
+   {
+      setWmsNetworkTimeoutInSeconds(ossimString(tempString).toDouble());
+   }
+   if(arguments.read("--disable-elevation"))
+   {
+//       theElevEnabled = false;
+      writePreferenceSetting("elev-flag",
+                             "false");
+   }
+   if(arguments.read("--elev-estimation", stringParam))
+   {
+//       theElevEstimate = 1<<ossimString(tempString.c_str()).toUInt32();
+      writePreferenceSetting("elev-patchsize",
+                             ossimString::toString(1<<ossimString(tempString.c_str()).toUInt32()).c_str());
+  }
+   if(arguments.read("--elev-patchsize", stringParam))
+   {
+      writePreferenceSetting("elev-patchsize", tempString.c_str());
+//       theElevEstimate = ossimString(tempString.c_str()).toUInt32();
+   }
+   if(arguments.read("--elev-exag", stringParam))
+   {
+//       theElevExag = ossimString(tempString.c_str()).toDouble();
+      writePreferenceSetting("elev-exag", tempString.c_str());
+   }
+   if(arguments.read("--split-metric", stringParam))
+   {
+//       theSplitMetricRatio = ossimString(tempString.c_str()).toDouble();
+      writePreferenceSetting("split-metric", tempString.c_str());
+   }
+   if(arguments.read("--elev-cache", stringParam))
+   {
+//       theElevCache = tempString.c_str();
+      writePreferenceSetting("elev-cache", tempString.c_str());
+   }
+   if(arguments.read("--level-detail", stringParam))
+   {
+//       theLevelOfDetail = ossimString(tempString.c_str()).toUInt32();
+      writePreferenceSetting("level-detail", tempString.c_str());
+   }
+   if(arguments.read("--enable-hud"))
+   {
+      writePreferenceSetting("hud-flag", "true");
+//       theHudEnabled = true;
+   }
+   else if(arguments.read("--disable-hud"))
+   {
+      writePreferenceSetting("hud-flag", "false");
+   }
+
+   // archive mapping enabled
+   if( arguments.read("--enable-archive-mapping-enabled") )
+   {
+	   writePreferenceSetting("archive-mapping-enabled", "true");
+   }
+   else if( arguments.read("--disable-archive-mapping-enabled") )
+   {
+	   writePreferenceSetting("archive-mapping-enabled", "false");
+   }
+
+   if(arguments.read("--disable-mipmap"))
+   {
+      writePreferenceSetting("mipmap-flag", "false");
+// 	   theMipMapping = false;
+   }
+   if(arguments.read("--enable-mipmap"))
+   {
+      writePreferenceSetting("mipmap-flag", "true");
+// 	   theMipMapping = false;
+   }
+   arguments.reportRemainingOptionsAsUnrecognized();
+   
+   if (arguments.errors())
+   {
+      arguments.writeErrorMessages(std::cout);
+   }
+   ossimFilename currentPath = ossimFilename(argv[0]).path();
+   ossimFilename imageBundle;
+   ossimFilename referenceImageBundle;
+   ossimInit::instance()->setPluginLoaderEnabledFlag(true);
+//    ossimString paths = ossimEnvironmentUtility::instance()->getEnvironmentVariable("OSSIM_ELEVATION_PATH");
+//    std::vector<ossimString> pathArray;
+//    ossimString pathSeparator = ":";
+   osgDB::Registry::instance()->getDataFilePathList().push_back(theUserSupportDirectory.toStdString());
+   ossimFilename installDir = ossimEnvironmentUtility::instance()->getInstalledOssimSupportDir();
+   if(installDir.exists())
+   {
+      osgDB::Registry::instance()->getDataFilePathList().push_back(installDir);
+   }
+   ossimFilename userDir    = ossimEnvironmentUtility::instance()->getUserOssimSupportDir();
+   ossimFilename userImageDir = userDir.dirCat("images");
+   ossimFilename userDataDir = userDir.dirCat("data");
+   ossimFilename userImageReferenceDir = userImageDir.dirCat("reference");
+   ossimFilename installImageDir = installDir.dirCat("images");
+   ossimFilename installDataDir = installDir.dirCat("data");
+   ossimFilename instalImageReferenceDir = installImageDir.dirCat("reference");
+   userDir = userDir.dirCat("images");
+   userDir = userDir.dirCat("reference");
+   installDir = installDir.dirCat("images");
+   installDir = installDir.dirCat("reference");
+
+   // tmp drb
+   // ossimFilename userStatePlaneFile = userDataDir.dirCat("state_plane.csv");
+   // ossimFilename installStatePlaneFile = installDataDir.dirCat("state_plane.csv");
+   // if(userStatePlaneFile.exists())
+   // {
+      // allow state plane to override from user directory any installed state plane file.
+   //   ossimStatePlaneProjectionFactory::instance()->addCsvFile(userStatePlaneFile);
+   // }
+#ifdef __MACOSX__
+   // test for a bundle
+   //
+   ossimFilename contentsFolder = currentPath.path();
+
+   // Check for embedded geoid grid nder the resource folder Resources/egm96.grd
+   ossimFilename resourceFolder = contentsFolder.dirCat("Resources");
+   ossimFilename geoid1996File = resourceFolder.dirCat("egm96.grd");
+   ossimFilename statePlaneFile = resourceFolder.dirCat("state_plane.csv");
+   if(geoid1996File.exists())
+   {
+      ossimRefPtr<ossimGeoid> geoid96 = new ossimGeoidEgm96;
+      if(geoid96->open(geoid1996File, OSSIM_BIG_ENDIAN))
+      {
+         ossimGeoidManager::instance()->addGeoid(geoid96.get());
+      }
+   }
+//   if(statePlaneFile.exists())
+//   {
+//      ossimStatePlaneProjectionFactory::instance()->addCsvFile(statePlaneFile);
+//   }
+   // Check for embedded plugins and reference images
+   ossimFilename resources = contentsFolder.dirCat("Resources");
+   ossimFilename ossimPluginsBundle = contentsFolder.dirCat("plugins");
+   ossimFilename osgPlugins         = contentsFolder.dirCat("osgplugins");
+   referenceImageBundle = contentsFolder.dirCat("Resources");
+   imageBundle = referenceImageBundle.dirCat("images");
+   referenceImageBundle = imageBundle.dirCat("reference");
+   if(ossimPluginsBundle.exists())
+   {
+      ossimInit::instance()->loadPlugins(ossimPluginsBundle);
+   }
+   if(osgPlugins.exists())
+   {
+      osgDB::Registry::instance()->getLibraryFilePathList().push_front(osgPlugins);
+   }
+   if(resources.exists())
+   {
+      osgDB::Registry::instance()->getDataFilePathList().push_front(resources);
+      osgDB::Registry::instance()->getDataFilePathList().push_front(resources.dirCat("fonts"));
+   }
+
+   theThemePath = resourceFolder;
+   theThemePath = theThemePath.dirCat("themes");
+
+   ossimFilename elevation = resourceFolder.dirCat("elevation");
+   if(elevation.exists())
+   {
+      ossimElevManager::instance()->loadElevationPath(elevation);
+   }
+//    addLibraryPath(contentsFolder.dirCat("qtplugins").c_str());
+#endif
+#ifdef WIN32
+   ossimFilename geoid = currentPath.dirCat("geoid1996");
+   ossimFilename geoid1996File = geoid.dirCat("egm96.grd");
+   if(!geoid1996File.exists())
+   {
+	   geoid = currentPath.dirCat("geoids");
+	   geoid = geoid.dirCat("geoid1996");
+	   geoid1996File = geoid.dirCat("egm96.grd");
+   }
+   if(geoid1996File.exists())
+   {
+      ossimRefPtr<ossimGeoid> geoid96 = new ossimGeoidEgm96;
+      if(geoid96->open(geoid1996File, OSSIM_BIG_ENDIAN))
+      {
+         ossimGeoidManager::instance()->addGeoid(geoid96.get());
+      }
+   }
+   ossimFilename osgPluginsBundle = currentPath.dirCat("osgplugins");
+// ossimFilename ossimPluginsBundle = currentPath.dirCat("plugins");
+   referenceImageBundle = currentPath;
+   imageBundle = referenceImageBundle.dirCat("images");
+   referenceImageBundle = imageBundle.dirCat("reference");
+   if(osgPluginsBundle.exists())
+   {
+	   osgDB::Registry::instance()->getLibraryFilePathList().push_back(osgPluginsBundle);
+   }
+//   if(ossimPluginsBundle.exists())
+//   {
+//      ossimInit::instance()->loadPlugins(ossimPluginsBundle);
+//   }
+   ossimFilename elevation = currentPath.dirCat("elevation");
+   if(elevation.exists())
+   {
+      ossimElevManager::instance()->loadElevationPath(elevation);
+   }
+//    pathSeparator = ";";
+#endif
+   ossimFilename dataDir = currentPath.dirCat("data");
+
+   // tmp drb
+   // ossimFilename statePlane = dataDir.dirCat("state_plane.csv");
+
+   // if(statePlane.exists())
+   // {
+   // ossimStatePlaneProjectionFactory::instance()->addCsvFile(statePlane);
+   //}
+  // we will now initialize any other plugins outside the bundle in standard locations
+   //
+   // if(installStatePlaneFile.exists())
+   // {
+   // ossimStatePlaneProjectionFactory::instance()->addCsvFile(installStatePlaneFile);
+   // }
+   ossimInit::instance()->initializePlugins();
+   
+   if(arguments.argc() > 1)
+   {
+      ossimKeywordlist kwl;
+      if(kwl.addFile(arguments.argv()[1]))
+      {
+         osg::ref_ptr<ossimPlanetTextureLayer> layer = ossimPlanetTextureLayerRegistry::instance()->createLayer(kwl.toString());
+         if(layer.valid())
+         {
+            layer->resetLookAt();
+            theReferenceImages.push_front(layer);
+         }
+      }
+   }
+   else
+   {
+      ossimFilename refFiles;
+      
+      if(userDir.exists())
+      {
+         refFiles = userDir;
+      }
+      else if(installDir.exists())
+      {
+         refFiles = installDir;
+      }
+      else if(referenceImageBundle.exists())
+      {
+         refFiles = referenceImageBundle;
+      }
+      if(refFiles.exists())
+      {
+         ossimDirectory dir;
+         if(dir.open(refFiles))
+         {
+            ossimFilename file;
+            dir.getFirst(file);
+            do
+            {
+               ossimString ext = file.ext();
+               if((ext != "ovr")&&
+                  (ext != "omd")&&
+                  (ext != "geom")&&
+                  (ext != "his"))
+               {
+                  osg::ref_ptr<ossimPlanetTextureLayer> layer = ossimPlanetTextureLayerRegistry::instance()->createLayer(ossimString(file.c_str()));
+                  if(layer.valid())
+                  {
+                     layer->resetLookAt();
+                     theReferenceImages.push_front(layer);
+                  }
+               }
+               
+            }while(dir.getNext(file));
+         }
+      }      
+   }
+   if(userImageDir.dirCat("compass.png").exists())
+   {
+      theCompassRing = userImageDir.dirCat("compass.png");
+   }
+   else if(imageBundle.dirCat("compass.png").exists())
+   {
+      theCompassRing = imageBundle.dirCat("compass.png");
+   }
+   else if(installImageDir.dirCat("compassring.png").exists())
+   {
+      theCompassRing = installImageDir.dirCat("compassring.png");
+      //theCompassRose = installImageDir.dirCat("compassrose.png");
+   }
+   else if(userImageDir.dirCat("compassring.png").exists())
+   {
+      theCompassRing = userImageDir.dirCat("compassring.png");
+      //theCompassRose = userImageDir.dirCat("compassrose.png");
+   }
+   else if(imageBundle.dirCat("compassring.png").exists())
+   {
+      theCompassRing = imageBundle.dirCat("compassring.png");
+      //theCompassRose = imageBundle.dirCat("compassrose.png");
+   }
+   else if(installImageDir.dirCat("compassring.png").exists())
+   {
+      theCompassRing = installImageDir.dirCat("compassring.png");
+      //theCompassRose = installImageDir.dirCat("compassrose.png");
+   }
+   
+   if(autoHistogramStretchMode().isEmpty())
+   {
+      setAutoHistogramStretchMode("Linear Auto Min Max");
+   }
+   return true;
+}
+
+ossimFilename ossimPlanetQtApplication::compassRing()
+{
+   return theCompassRing;
+}
+#if 0
+ossimFilename ossimPlanetQtApplication::compassRose()
+{
+   return theCompassRose;
+}
+#endif
+QStringList ossimPlanetQtApplication::wmsSettingsSubkeyList()
+{
+   return settingsSubKeyList("/ossim/connections-wms");
+}
+
+
+QString ossimPlanetQtApplication::readWmsSettingsEntry(const QString& key)
+{
+   return readSettingsEntry("/ossim/connections-wms/" + key);
+}
+
+void ossimPlanetQtApplication::writeWmsSettingsEntry(const QString& key,
+                                                     const QString& value)
+{
+   writeSettingsValue("/ossim/connections-wms/" + key, value);
+}
+
+void ossimPlanetQtApplication::removeWmsSettingsKey(const QString& key)
+{
+   settingsRemoveKey("/ossim/connections-wms/" + key);
+}
+
+QStringList ossimPlanetQtApplication::preferenceSettingsSubkeyList(const QString& key)
+{
+   if(key == "")
+   {
+      return settingsSubKeyList("/planet/preferences");
+   }
+   return settingsSubKeyList("/planet/preferences/" + key);
+}
+
+void ossimPlanetQtApplication::removePreferenceSetting(const QString& key)
+{
+   settingsRemoveKey("/planet/preferences/" + key);
+}
+
+QString ossimPlanetQtApplication::readPreferenceSetting(const QString& key)
+{
+   return readSettingsEntry("/planet/preferences/" + key);
+}
+
+void ossimPlanetQtApplication::writePreferenceSetting(const QString& key,
+                                                      const QString& value)
+{
+   writeSettingsValue("/planet/preferences/" + key, value);
+  
+}
+
+QString ossimPlanetQtApplication::readSettingsEntry(const QString& entry)
+{
+   return theSettings->value(entry, "").toString();
+}
+
+QStringList ossimPlanetQtApplication::settingsSubKeyList(const QString& key)
+{
+   theSettings->beginGroup(key);
+   QStringList result = theSettings->childGroups();
+   theSettings->endGroup();
+
+   return result;
+}
+
+void ossimPlanetQtApplication::writeSettingsValue(const QString& key,
+                                                  const QString& value)
+{
+   theSettings->setValue(key, value);
+}
+
+void ossimPlanetQtApplication::settingsRemoveKey(const QString& key)
+{
+   theSettings->remove(key);
+}
+
+void ossimPlanetQtApplication::addCommandLineOptions(osg::ArgumentParser& args)
+{
+   args.getApplicationUsage()->setApplicationName(args.getApplicationName());
+   args.getApplicationUsage()->setDescription(args.getApplicationName()+" is the test application for accessing wms servers.");
+   args.getApplicationUsage()->setCommandLineUsage(args.getApplicationName()+" [options] ...");
+   args.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information");
+   args.getApplicationUsage()->addCommandLineOption("--enable-flatland", "Uses the flat land model");
+   args.getApplicationUsage()->addCommandLineOption("--disable-elevation", "Uses elevation");
+   args.getApplicationUsage()->addCommandLineOption("--elev-estimation", "number of levels to estimate.  A value of 4 will say 2^4 or 16 number of rows and cols.");
+   args.getApplicationUsage()->addCommandLineOption("--split-metric", "set Split Metric Ratio.  Default is 3.0");
+   args.getApplicationUsage()->addCommandLineOption("--elev-patchsize", "number of points in each chunk.");
+   args.getApplicationUsage()->addCommandLineOption("--elev-exag", "Multiplier for the height values");
+   args.getApplicationUsage()->addCommandLineOption("--elev-cache", "Cache directory for elevation");
+   args.getApplicationUsage()->addCommandLineOption("--level-detail", "Maximum level of detail to split to.  Default is 16 levels");
+   args.getApplicationUsage()->addCommandLineOption("--enable-hud", "Enables the lat lon read outs");
+   args.getApplicationUsage()->addCommandLineOption("--disable-hud", "Disable the lat lon read outs");
+   args.getApplicationUsage()->addCommandLineOption("--disable-mipmap", "Doesn't use  MipMapping");
+   args.getApplicationUsage()->addCommandLineOption("--enable-mipmap", "Use  MipMapping");
+   args.getApplicationUsage()->addCommandLineOption("--wms-timeout", "Time out for WMS get Capabiltites for the WmsDialog specified in seconds");
+}
+
+QString ossimPlanetQtApplication::userSupportDirectory()
+{
+   return theUserSupportDirectory;
+}
+QString ossimPlanetQtApplication::userDirectory()
+{
+   return theUserDirectory;
+}
+
+QString  ossimPlanetQtApplication::sessionDirectory()
+{
+   QString result = currentOpenSessionDirectory();
+   if(result=="")
+   {
+      ossimFilename dir(userSupportDirectory().toStdString());
+      dir = dir.dirCat("planet");
+      dir = dir.dirCat("session");
+      result = dir.c_str();
+   }
+   
+   return result;
+}
+
+QString ossimPlanetQtApplication::defaultSession()
+{
+   ossimFilename dir(sessionDirectory().toStdString());
+
+   dir = dir.dirCat("default.session");
+
+   return dir.c_str();
+}
+
+QString ossimPlanetQtApplication::defaultWmsCacheDir()
+{
+   ossimFilename dir(userSupportDirectory().toStdString());
+   dir = dir.dirCat("planet");
+   dir = dir.dirCat("wms");
+   dir = dir.dirCat("cache");
+   
+   return dir.c_str();
+}
diff --git a/ossimPlanetQt/src/gui/ossimPlanetQtDropDownDelegate.cpp b/ossimPlanetQt/src/gui/ossimPlanetQtDropDownDelegate.cpp
new file mode 100644
index 0000000..cb6775b
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ossimPlanetQtDropDownDelegate.cpp
@@ -0,0 +1,44 @@
+#include <ossimPlanetQt/ossimPlanetQtDropDownDelegate.h>
+#include <QtGui/QComboBox>
+
+ossimPlanetQtDropDownDelegate::ossimPlanetQtDropDownDelegate(QObject* parent)
+   :QItemDelegate(parent)
+{
+}
+
+QWidget *ossimPlanetQtDropDownDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option,
+                                                     const QModelIndex &index) const
+{
+   QComboBox *editor = new QComboBox(parent);
+   editor->insertItems(0, theChoices);
+   
+   return editor;
+ }
+
+void ossimPlanetQtDropDownDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const
+{
+   QString value = index.model()->data(index, Qt::DisplayRole).toString();
+   
+   QComboBox *comboBox = static_cast<QComboBox*>(editor);
+   comboBox->setEditText(value);
+}
+
+void ossimPlanetQtDropDownDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,
+                                                 const QModelIndex &index) const
+{
+   QComboBox *comboBox = static_cast<QComboBox*>(editor);
+   QString value = comboBox->currentText();
+   
+   model->setData(index, value);
+}
+
+void ossimPlanetQtDropDownDelegate::updateEditorGeometry(QWidget *editor,
+                                                         const QStyleOptionViewItem &option, const QModelIndex &index) const
+{
+     editor->setGeometry(option.rect);
+}
+
+void ossimPlanetQtDropDownDelegate::setChoices(const QStringList& choices)
+{
+   theChoices = choices;
+}
diff --git a/ossimPlanetQt/src/gui/ossimPlanetQtGlWidget.cpp b/ossimPlanetQt/src/gui/ossimPlanetQtGlWidget.cpp
new file mode 100644
index 0000000..a687aa1
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ossimPlanetQtGlWidget.cpp
@@ -0,0 +1,454 @@
+#include <ossimPlanetQt/ossimPlanetQtGlWidget.h>
+#include <QtGui/QCursor>
+#include <QtCore/QTimer>
+#include <QtCore/QRect>
+#include <QtCore/QEvent>
+#include <QtGui/QMouseEvent>
+#include <QtGui/QKeyEvent>
+#include <QtGui/QLayout>
+#include <QtGui/QFrame>
+#include <ossimPlanet/ul.h>
+#include <ossimPlanet/ossimPlanetTerrain.h>
+#include <OpenThreads/ScopedLock>
+#include <osgUtil/LineSegmentIntersector>
+#include <osg/io_utils>
+#include <osgGA/GUIEventAdapter>
+
+ossimPlanetQtGlWidget::ossimPlanetQtGlWidget( QWidget * parent, const QGLWidget * shareWidget, Qt::WindowFlags f)
+:QGLWidget(parent, shareWidget, f),
+theMouseNavigationFlag(true),
+thePassAllUnhandledEventsFlag(true)
+{
+   init();
+}
+
+ossimPlanetQtGlWidget::ossimPlanetQtGlWidget( const QGLFormat & format, QWidget * parent, const QGLWidget * shareWidget, Qt::WindowFlags f )
+:QGLWidget(format, parent, shareWidget, f),
+theMouseNavigationFlag(true),
+thePassAllUnhandledEventsFlag(true)
+{
+   init();
+}
+
+ossimPlanetQtGlWidget::~ossimPlanetQtGlWidget()
+{
+}
+
+void ossimPlanetQtGlWidget::init()
+{
+   theGraphicsWindow = new osgViewer::GraphicsWindowEmbedded(0,0,width(),height());
+   setAcceptDrops(true);
+}
+
+void ossimPlanetQtGlWidget::doIdleAnimationFrame()
+{
+   frameIfNeeded();
+}
+
+void ossimPlanetQtGlWidget::setMouseNavigationFlag(bool flag)
+{
+   theMouseNavigationFlag = flag;
+}
+
+bool ossimPlanetQtGlWidget::getMouseNavigationFlag()const
+{
+   return theMouseNavigationFlag;
+}
+
+void ossimPlanetQtGlWidget::resizeGL( int width, int height )
+{
+   width = ossim::max(64, width);
+   height = ossim::max(64, height);
+   theGraphicsWindow->getEventQueue()->windowResize(0, 0, width, height );
+   theGraphicsWindow->resized(0,0,width,height);
+}
+
+void ossimPlanetQtGlWidget::keyPressEvent( QKeyEvent* event )
+{
+   theGraphicsWindow->getEventQueue()->keyPress( qtKeyToOsg(event) );
+   addModifiers(theGraphicsWindow->getEventQueue(), event->modifiers());
+   if(thePassAllUnhandledEventsFlag)
+   {
+      event->ignore();
+   }
+}
+
+void ossimPlanetQtGlWidget::keyReleaseEvent( QKeyEvent* event )
+{
+   theGraphicsWindow->getEventQueue()->keyRelease( qtKeyToOsg(event) );
+   addModifiers(theGraphicsWindow->getEventQueue(), event->modifiers());
+   if(thePassAllUnhandledEventsFlag)
+   {
+      event->ignore();
+   }
+}
+
+void ossimPlanetQtGlWidget::mousePressEvent( QMouseEvent* event )
+{
+   int button = 0;
+   switch(event->button())
+   {
+      case(Qt::LeftButton): button = 1; break;
+      case(Qt::MidButton): button = 2; break;
+      case(Qt::RightButton): button = 3; break;
+      case(Qt::NoButton): button = 0; break;
+      default: button = 0; break;
+   }
+   theGraphicsWindow->getEventQueue()->mouseButtonPress(event->x(), event->y(), button);
+   addModifiers(theGraphicsWindow->getEventQueue(), event->modifiers());
+   if(thePassAllUnhandledEventsFlag)
+   {
+      event->ignore();
+   }
+   emit signalMousePressEvent(event);
+}
+
+void ossimPlanetQtGlWidget::mouseReleaseEvent( QMouseEvent* event )
+{
+   int button = 0;
+   switch(event->button())
+   {
+      case(Qt::LeftButton): button = 1; break;
+      case(Qt::MidButton): button = 2; break;
+      case(Qt::RightButton): button = 3; break;
+      case(Qt::NoButton): button = 0; break;
+      default: button = 0; break;
+   }
+   theGraphicsWindow->getEventQueue()->mouseButtonRelease(event->x(), event->y(), button);
+   addModifiers(theGraphicsWindow->getEventQueue(), event->modifiers());
+   if(thePassAllUnhandledEventsFlag)
+   {
+      event->ignore();
+   }
+   emit signalMouseReleaseEvent(event);
+}
+
+void ossimPlanetQtGlWidget::mouseMoveEvent( QMouseEvent* event )
+{
+   theGraphicsWindow->getEventQueue()->mouseMotion(event->x(), event->y());
+   addModifiers(theGraphicsWindow->getEventQueue(), event->modifiers());
+   emit signalMouseMoveEvent(event);
+   
+}
+
+void ossimPlanetQtGlWidget::mouseDoubleClickEvent( QMouseEvent * event )
+{
+   int button = 0;
+   switch(event->button())
+   {
+      case(Qt::LeftButton): button = 1; break;
+      case(Qt::MidButton): button = 2; break;
+      case(Qt::RightButton): button = 3; break;
+      case(Qt::NoButton): button = 0; break;
+      default: button = 0; break;
+   }
+   theGraphicsWindow->getEventQueue()->mouseDoubleButtonPress(event->x(), event->y(), button);
+   addModifiers(theGraphicsWindow->getEventQueue(), event->modifiers());
+   if(thePassAllUnhandledEventsFlag)
+   {
+      event->ignore();
+   }
+}
+
+void ossimPlanetQtGlWidget::wheelEvent(QWheelEvent * event)
+{
+   theGraphicsWindow->getEventQueue()->mouseScroll(event->delta()>0?osgGA::GUIEventAdapter::SCROLL_UP:osgGA::GUIEventAdapter::SCROLL_DOWN);
+   addModifiers(theGraphicsWindow->getEventQueue(), event->modifiers());
+   if(thePassAllUnhandledEventsFlag)
+   {
+      event->ignore();
+   }
+}
+
+void ossimPlanetQtGlWidget::dropEvent ( QDropEvent * event )
+{
+   emit signalDropEvent(event);
+}
+
+void ossimPlanetQtGlWidget::dragEnterEvent(QDragEnterEvent *event)
+{
+   emit signalDragEnterEvent(event);
+}
+
+osgGA::GUIEventAdapter::KeySymbol ossimPlanetQtGlWidget::qtKeyToOsg(QKeyEvent * e)const
+{
+   int qtKey = e->key();
+   switch(qtKey)
+   {
+      case Qt::Key_Up:
+      {
+         return(osgGA::GUIEventAdapter::KEY_Up);
+      }
+      case Qt::Key_Down:
+      {
+         return (osgGA::GUIEventAdapter::KEY_Down);
+      }
+      case Qt::Key_Left:
+      {
+         return (osgGA::GUIEventAdapter::KEY_Left);
+      }
+      case Qt::Key_Right:
+      {
+         return (osgGA::GUIEventAdapter::KEY_Right);
+      }
+      case Qt::Key_Return:
+      {
+         return (osgGA::GUIEventAdapter::KEY_Return);
+      }
+      default:
+      {
+         if((qtKey >= Qt::Key_A)&&(qtKey <= Qt::Key_Z))
+         {
+            QString s = e->text();
+            std::string stdString = s.toStdString();
+            char c = *stdString.begin();
+            return (osgGA::GUIEventAdapter::KeySymbol)(c);  
+         }
+      }
+   }
+   
+   return (osgGA::GUIEventAdapter::KeySymbol)(qtKey);
+}
+
+void ossimPlanetQtGlWidget::addModifiers(osg::ref_ptr<osgGA::EventQueue> eventQueue, Qt::KeyboardModifiers modifier)
+{
+   if(!eventQueue.valid()) return;
+   unsigned int modKeyMask = 0;
+   osgGA::GUIEventAdapter* adapter = eventQueue->getCurrentEventState();
+   if(!adapter) return;
+   if(modifier & Qt::ShiftModifier)
+   {
+      modKeyMask|=osgGA::GUIEventAdapter::MODKEY_SHIFT;
+   }
+   if(modifier & Qt::ControlModifier)
+   {
+      modKeyMask|=osgGA::GUIEventAdapter::MODKEY_CTRL;
+   }
+   if(modifier & Qt::AltModifier)
+   {
+      modKeyMask|=osgGA::GUIEventAdapter::MODKEY_ALT;
+   }
+   if(modifier & Qt::MetaModifier)
+   {
+      modKeyMask|=osgGA::GUIEventAdapter::MODKEY_META;
+   }
+   adapter->setModKeyMask(modKeyMask);
+}
+
+ossimPlanetQtViewer::ossimPlanetQtViewer(QWidget * parent, const QGLWidget * shareWidget, Qt::WindowFlags f)
+:ossimPlanetQtGlWidget( parent, shareWidget, f ),
+theTimerInterval(0),
+theQTimer(0)
+{
+   setViewer(new ossimPlanetViewer);
+   setCurrentSimulationTime();
+   setTargetFramesPerSecond(60);
+   theCurrentSimulationTime = USE_REFERENCE_TIME;
+   timer()->setInterval(theTimerInterval);
+   timer()->setSingleShot(false);
+   timer()->start();
+}
+
+ossimPlanetQtViewer::ossimPlanetQtViewer( const QGLFormat & format, QWidget * parent, const QGLWidget * shareWidget, Qt::WindowFlags f )
+:ossimPlanetQtGlWidget(format, parent, shareWidget, f),
+theTimerInterval(0),
+theQTimer(0)
+{
+   setViewer(new ossimPlanetViewer);
+   setCurrentSimulationTime();
+   setTargetFramesPerSecond(60);
+   theCurrentSimulationTime = USE_REFERENCE_TIME;
+   timer()->setInterval(theTimerInterval);
+   timer()->setSingleShot(false);
+   timer()->start();
+}
+
+ossimPlanetQtViewer::~ossimPlanetQtViewer()
+{
+   clearPointersInViewer(); 
+}
+
+void ossimPlanetQtViewer::setViewer(ossimPlanetViewer* viewer)
+{
+   clearPointersInViewer();
+   ossim_uint32 idx = 0;
+   theViewer = viewer;
+   if(theViewer.valid())
+   {
+      theViewer->getCamera()->setGraphicsContext(getGraphicsWindow());
+      osgViewer::ViewerBase::Cameras cameraList;
+      theViewer->getCameras(cameraList);
+      for(idx = 0; idx < cameraList.size();++idx)
+      {
+         cameraList[idx]->setGraphicsContext(getGraphicsWindow());
+      }
+      // initialize some size for the view port for this canvas if it doesn't have any
+      //
+      int w=width(), h=height();
+      
+      // let's default to something
+      w = w>0?w:10;
+      h = h>0?h:10;
+      if((w > 0)&&(h>0))
+      {
+         theViewer->getCamera()->setViewport(new osg::Viewport(0,0,w,h));
+        
+        // theViewer->getCamera()->setProjectionMatrixAsPerspective(0.286321, 
+        //                                                          static_cast<double>(w)/
+         //                                                         static_cast<double>(h), 
+         //                                                         0.0000007839, 
+         //                                                         50);
+         theViewer->getCamera()->setProjectionMatrixAsPerspective(45, 
+                                                                  static_cast<double>(w)/
+                                                                  static_cast<double>(h), 
+                                                                  1, 
+                                                                  50);
+      }
+   }
+}
+
+void ossimPlanetQtViewer::resizeGL( int width, int height )
+{
+   width = ossim::max(64, width);
+   height = ossim::max(64, height);
+   ossimPlanetQtGlWidget::resizeGL(width, height);
+   if(theViewer.valid()&&theViewer->getCamera())
+   {
+      theViewer->getCamera()->getViewport()->setViewport(0,0,width,height);
+      double fovy, aspectRatio, znear, zfar;
+      theViewer->getCamera()->getProjectionMatrixAsPerspective(fovy, aspectRatio, znear, zfar);
+      aspectRatio = static_cast<double>(width)/static_cast<double>(height);
+      theViewer->getCamera()->setProjectionMatrixAsPerspective(fovy, 
+                                                               aspectRatio, 
+                                                               znear, 
+                                                               zfar);
+   }
+}
+
+void ossimPlanetQtViewer::clearPointersInViewer()
+{
+   if(theViewer.valid())
+   {
+      ossim_uint32 idx = 0;
+      osgViewer::ViewerBase::Cameras cameraList;
+      theViewer->getCameras(cameraList);
+      for(idx = 0; idx < cameraList.size();++idx)
+      {
+         cameraList[idx]->setGraphicsContext(0);
+      }
+   }
+}
+void ossimPlanetQtViewer::setTargetFrameTimeInMilliseconds(float millisecondRate)
+{
+   theFrameRateLimiter = millisecondRate;
+}
+
+void ossimPlanetQtViewer::setTargetFramesPerSecond(float framesPerSecond)
+{
+   setTargetFrameTimeInMilliseconds(1000.0/framesPerSecond);
+}
+
+QTimer *ossimPlanetQtViewer::timer()
+{
+   if(!theQTimer)
+   {
+      theQTimer=new QTimer(this);
+      connect(theQTimer,SIGNAL(timeout()),this,SLOT(doIdleAnimationFrame()));
+   }
+   return theQTimer;
+}
+
+#if 0
+void ossimPlanetQtViewer::requestRedraw()
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theDrawMutex);
+   theRequestRedrawFlag = true;
+   if(!timer()->isActive())
+   {
+      timer()->setInterval(theTimerInterval);
+      timer()->start();
+   }
+}
+#endif
+#if 0
+void ossimPlanetQtViewer::requestContinuousUpdate(bool needed)
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theDrawMutex);
+   theRequestContinuousUpdateFlag = needed;
+   if(needed)
+   {
+      if(!timer()->isActive())
+      {
+        timer()->setInterval(theTimerInterval);
+        timer()->start();
+      }
+   }
+}
+#endif
+
+ossimPlanetViewer* ossimPlanetQtViewer::viewer()
+{
+   return theViewer.get();
+}
+
+void ossimPlanetQtViewer::setCurrentSimulationTime(double simtime)
+{
+   theCurrentSimulationTime = simtime; 
+}
+
+void ossimPlanetQtViewer::frameIfNeeded()
+{
+   //OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theDrawMutex);
+   bool doVBlankLimit = false;
+   osg::Timer_t beginT = osg::Timer::instance()->tick();
+   osg::Timer_t endT;
+   if(theViewer->continuousUpdateFlag()||
+      theViewer->getAndSetRedrawFlag(false))
+   {
+      updateGL();
+      doVBlankLimit = format().swapInterval() < 0;
+      endT = osg::Timer::instance()->tick();
+  }
+   else
+   {
+      noRenderCycle();
+      doVBlankLimit = true;
+      endT = osg::Timer::instance()->tick();
+   }
+   if(doVBlankLimit)
+   {
+     double test = osg::Timer::instance()->delta_m(beginT, endT);
+     if(test < theFrameRateLimiter)
+      {
+         ulMilliSecondSleep((int)(theFrameRateLimiter-test));
+      }
+   }
+#if 0
+   std::cout << "---" << std::endl;
+   std::cout << (getDatabasePager()->requiresUpdateSceneGraph()||getDatabasePager()->requiresCompileGLObjects()) << std::endl;
+   std::cout << getDatabasePager()->getFileRequestListSize() << std::endl
+            << getDatabasePager()->getDataToCompileListSize() << std::endl;
+#endif
+}
+
+void ossimPlanetQtViewer::noRenderCycle()//double simtime)
+{
+   if(!theViewer)return;
+   theViewer->advance(theCurrentSimulationTime);
+   getGraphicsWindow()->getEventQueue()->frame(theViewer->getViewerFrameStamp()->getReferenceTime());
+   theViewer->eventTraversal();
+   theViewer->updateTraversal();
+}
+
+void ossimPlanetQtViewer::paintGL()
+{
+   if(theViewer.valid())
+   {
+      theViewer->frame(theCurrentSimulationTime);
+   }
+}
+
+void ossimPlanetQtViewer::mouseMoveEvent( QMouseEvent* event )
+{
+   ossimPlanetQtGlWidget::mouseMoveEvent(event);
+}
diff --git a/ossimPlanetQt/src/gui/ossimPlanetQtLayerOperation.cpp b/ossimPlanetQt/src/gui/ossimPlanetQtLayerOperation.cpp
new file mode 100644
index 0000000..c863f19
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ossimPlanetQtLayerOperation.cpp
@@ -0,0 +1,290 @@
+#include <ossimPlanetQt/ossimPlanetQtLayerOperation.h>
+#include <QtGui/QMessageBox>
+
+static const int NO_SHADER_INDEX = 0;
+static const int TOP_INDEX = NO_SHADER_INDEX + 1;
+static const int REFERENCE_INDEX = TOP_INDEX + 1;
+static const int OPACITY_INDEX = REFERENCE_INDEX + 1;
+static const int HORIZONTAL_SWIPE_INDEX = OPACITY_INDEX + 1;
+static const int VERTICAL_SWIPE_INDEX = HORIZONTAL_SWIPE_INDEX + 1;
+static const int BOX_SWIPE_INDEX = VERTICAL_SWIPE_INDEX + 1;
+static const int CIRCLE_SWIPE_INDEX =  BOX_SWIPE_INDEX + 1;
+static const int ABSOLUTE_DIFFERENCE_INDEX = CIRCLE_SWIPE_INDEX + 1;
+static const int FALSE_COLOR_REPLACEMENT_INDEX = ABSOLUTE_DIFFERENCE_INDEX + 1;
+static const char* operationTypeText []=
+{
+ "NO SHADER",
+ "Top",
+ "Reference",
+ "Opacity",
+ "Horizontal Swipe",
+ "Vertical Swipe",
+ "Box Swipe",
+ "Circle Swipe",
+ "Absolute Difference",
+ "False Color Replacement"};
+   
+ossimPlanetQtLayerOperation::ossimPlanetQtLayerOperation(QWidget *parent)
+   :QDialog(parent)
+{
+   setupUi(this);
+   theOperationType->addItem(operationTypeText[NO_SHADER_INDEX]);
+   theOperationType->addItem(operationTypeText[TOP_INDEX]);
+   theOperationType->addItem(operationTypeText[REFERENCE_INDEX]);
+   theOperationType->addItem(operationTypeText[OPACITY_INDEX]);
+   theOperationType->addItem(operationTypeText[HORIZONTAL_SWIPE_INDEX]);
+   theOperationType->addItem(operationTypeText[VERTICAL_SWIPE_INDEX]);
+   theOperationType->addItem(operationTypeText[BOX_SWIPE_INDEX]);
+   theOperationType->addItem(operationTypeText[CIRCLE_SWIPE_INDEX]);
+   theOperationType->addItem(operationTypeText[ABSOLUTE_DIFFERENCE_INDEX]);
+   theOperationType->addItem(operationTypeText[FALSE_COLOR_REPLACEMENT_INDEX]);
+  
+}
+
+#if 0
+void ossimPlanetQtLayerOperation::setLand(osg::ref_ptr<ossimPlanetLand> land)
+{
+   theLand = land.get();
+   if(theLand.valid())
+   {
+      if(theLand->getCurrentShader().valid())
+      {
+         populateControl();
+      }
+      else
+      {
+         QMessageBox::warning(this, "Layer Operation Warning", "GL Shader support not available", QMessageBox::Ok, QMessageBox::Ok);
+      }
+   }
+}
+#endif
+
+//osg::ref_ptr<ossimPlanetLand> ossimPlanetQtLayerOperation::land()
+//{
+//   return theLand.get();
+//}
+
+//const osg::ref_ptr<ossimPlanetLand> ossimPlanetQtLayerOperation::land()const
+//{
+//   return theLand.get();
+//}
+
+void ossimPlanetQtLayerOperation::populateControl()
+{
+   blockSignals(true);
+#if 0
+   if(theLand.get())
+   {
+      ossimPlanetShaderProgramSetup::ossimPlanetFragmentShaderType fragType =
+         theLand->getCurrentShader()->fragmentType();
+
+      switch(fragType)
+      {
+         case ossimPlanetShaderProgramSetup::NO_SHADER:
+         {
+            theOperationType->setCurrentIndex(NO_SHADER_INDEX);
+            theParameterStack->setCurrentWidget(theParameterStack->widget(2));
+            break;
+         }
+         case ossimPlanetShaderProgramSetup::TOP:
+         {
+            theOperationType->setCurrentIndex(TOP_INDEX);
+            theParameterStack->setCurrentWidget(theParameterStack->widget(2));
+            break;
+         }
+         case ossimPlanetShaderProgramSetup::REFERENCE:
+         {
+            theOperationType->setCurrentIndex(REFERENCE_INDEX);
+            theParameterStack->setCurrentWidget(theParameterStack->widget(2));
+            break;
+         }
+         case ossimPlanetShaderProgramSetup::OPACITY:
+         {
+            theOperationType->setCurrentIndex(OPACITY_INDEX);
+            
+            theParameterStack->setCurrentWidget(theParameterStack->widget(0));
+            osg::ref_ptr<osg::Uniform> param = theLand->getCurrentShader()->getUniform("param");
+            if(param.valid())
+            {
+               float minValue = theOpacitySlider->minimum();
+               float maxValue = theOpacitySlider->maximum();
+               float v = .5;
+               param->get(v);
+               theOpacitySlider->setSliderPosition((int)(minValue + (maxValue-minValue)*v));
+            }
+            break;
+         }
+         case ossimPlanetShaderProgramSetup::HORIZONTAL_SWIPE:
+         {
+            theOperationType->setCurrentIndex(HORIZONTAL_SWIPE_INDEX);
+            theParameterStack->setCurrentWidget(theParameterStack->widget(1));
+             osg::ref_ptr<osg::Uniform> param = theLand->getCurrentShader()->getUniform("param");
+            if(param.valid())
+            {
+               float minValue = theSwipeSlider->minimum();
+               float maxValue = theSwipeSlider->maximum();
+               float v = .5;
+               param->get(v);
+               theSwipeSlider->setSliderPosition((int)(minValue + (maxValue-minValue)*v));
+            }       
+            break;
+         }
+         case ossimPlanetShaderProgramSetup::VERTICAL_SWIPE:
+         {
+            theOperationType->setCurrentIndex(VERTICAL_SWIPE_INDEX);
+            theParameterStack->setCurrentWidget(theParameterStack->widget(1));
+             osg::ref_ptr<osg::Uniform> param = theLand->getCurrentShader()->getUniform("param");
+            if(param.valid())
+            {
+               float minValue = theSwipeSlider->minimum();
+               float maxValue = theSwipeSlider->maximum();
+               float v = .5;
+               param->get(v);
+               theSwipeSlider->setSliderPosition((int)(minValue + (maxValue-minValue)*v));
+            }       
+            break;
+         }
+         case ossimPlanetShaderProgramSetup::BOX_SWIPE:
+         {
+            theOperationType->setCurrentIndex(BOX_SWIPE_INDEX);
+            theParameterStack->setCurrentWidget(theParameterStack->widget(1));
+             osg::ref_ptr<osg::Uniform> param = theLand->getCurrentShader()->getUniform("param");
+            if(param.valid())
+            {
+               float minValue = theSwipeSlider->minimum();
+               float maxValue = theSwipeSlider->maximum();
+               float v = .5;
+               param->get(v);
+               theSwipeSlider->setSliderPosition((int)(minValue + (maxValue-minValue)*v));
+            }       
+            break;
+         }
+         case ossimPlanetShaderProgramSetup::CIRCLE_SWIPE:
+         {
+            theOperationType->setCurrentIndex(CIRCLE_SWIPE_INDEX);
+           theParameterStack->setCurrentWidget(theParameterStack->widget(1));
+             osg::ref_ptr<osg::Uniform> param = theLand->getCurrentShader()->getUniform("param");
+            if(param.valid())
+            {
+               float minValue = theSwipeSlider->minimum();
+               float maxValue = theSwipeSlider->maximum();
+               float v = .5;
+               param->get(v);
+               theSwipeSlider->setSliderPosition((int)(minValue + (maxValue-minValue)*v));
+            }       
+            break;
+         }
+         case ossimPlanetShaderProgramSetup::ABSOLUTE_DIFFERENCE:
+         {
+            theOperationType->setCurrentIndex(ABSOLUTE_DIFFERENCE_INDEX);
+            theParameterStack->setCurrentWidget(theParameterStack->widget(2));
+            break;
+         }
+         case ossimPlanetShaderProgramSetup::FALSE_COLOR_REPLACEMENT:
+         {
+            theOperationType->setCurrentIndex(FALSE_COLOR_REPLACEMENT_INDEX);
+            theParameterStack->setCurrentWidget(theParameterStack->widget(2));
+            break;
+         }
+         default:
+         {
+            break;
+         }
+      }
+   }
+#endif
+   blockSignals(false);
+}
+
+void ossimPlanetQtLayerOperation::on_theOperationType_activated(const QString& v)
+{
+#if 0
+   if(!theLand.valid()) return;
+
+   if(v == operationTypeText[NO_SHADER_INDEX])
+   {
+      theLand->setCurrentFragmentShaderType(ossimPlanetShaderProgramSetup::NO_SHADER);
+   }
+   else if(v == operationTypeText[TOP_INDEX])
+   {
+      theLand->setCurrentFragmentShaderType(ossimPlanetShaderProgramSetup::TOP);
+   }
+   else if(v == operationTypeText[REFERENCE_INDEX])
+   {
+      theLand->setCurrentFragmentShaderType(ossimPlanetShaderProgramSetup::REFERENCE);
+   }
+   else if(v == operationTypeText[OPACITY_INDEX])
+   {
+      theLand->setCurrentFragmentShaderType(ossimPlanetShaderProgramSetup::OPACITY);
+   }
+   else if(v == operationTypeText[HORIZONTAL_SWIPE_INDEX])
+   {
+      theLand->setCurrentFragmentShaderType(ossimPlanetShaderProgramSetup::HORIZONTAL_SWIPE);
+   }
+   else if(v == operationTypeText[VERTICAL_SWIPE_INDEX])
+   {
+      theLand->setCurrentFragmentShaderType(ossimPlanetShaderProgramSetup::VERTICAL_SWIPE);
+   }
+   else if(v == operationTypeText[BOX_SWIPE_INDEX])
+   {
+      theLand->setCurrentFragmentShaderType(ossimPlanetShaderProgramSetup::BOX_SWIPE);
+   }
+   else if(v == operationTypeText[CIRCLE_SWIPE_INDEX])
+   {
+      theLand->setCurrentFragmentShaderType(ossimPlanetShaderProgramSetup::CIRCLE_SWIPE);
+   }
+   else if(v == operationTypeText[ABSOLUTE_DIFFERENCE_INDEX])
+   {
+      theLand->setCurrentFragmentShaderType(ossimPlanetShaderProgramSetup::ABSOLUTE_DIFFERENCE);
+   }
+   else if(v == operationTypeText[FALSE_COLOR_REPLACEMENT_INDEX])
+   {
+       theLand->setCurrentFragmentShaderType(ossimPlanetShaderProgramSetup::FALSE_COLOR_REPLACEMENT);
+   }
+   
+   populateControl();
+#endif
+}
+
+void ossimPlanetQtLayerOperation::on_theOpacitySlider_valueChanged(int value)
+{
+#if 0
+   if(theLand.valid())
+   {
+      float minValue = theOpacitySlider->minimum();
+      float maxValue = theOpacitySlider->maximum();
+      
+      float v = ((value - minValue)/
+                 (maxValue-minValue));
+
+      osg::ref_ptr<osg::Uniform> param = theLand->getCurrentShader()->getUniform("param");
+      if(param.valid())
+      {
+         param->set(v);
+         theLand->setRedrawFlag(true);
+      }
+   }
+#endif
+}
+
+void ossimPlanetQtLayerOperation::on_theSwipeSlider_valueChanged(int value)
+{
+#if 0
+   if(theLand.valid())
+   {
+      float minValue = theSwipeSlider->minimum();
+      float maxValue = theSwipeSlider->maximum();
+      
+      float v = ((value - minValue)/
+                 (maxValue-minValue));
+
+      osg::ref_ptr<osg::Uniform> param = theLand->getCurrentShader()->getUniform("param");
+      if(param.valid())
+      {
+         param->set(v);
+         theLand->setRedrawFlag(true);
+      }
+   }
+#endif
+}
+
diff --git a/ossimPlanetQt/src/gui/ossimPlanetQtLegend.cpp b/ossimPlanetQt/src/gui/ossimPlanetQtLegend.cpp
new file mode 100644
index 0000000..3903afb
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ossimPlanetQtLegend.cpp
@@ -0,0 +1,2095 @@
+#include <ossimPlanetQt/ossimPlanetQtLegend.h>
+#include <ossimPlanetQt/ossimPlanetQtLegendItem.h>
+#include <ossimPlanetQt/ossimPlanetQtLegendTextureItem.h>
+#include <ossimPlanetQt/ossimPlanetQtMainWindow.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimXmlNode.h>
+#include <ossim/base/ossimXmlDocument.h>
+#include <ossim/base/ossimGzStream.h>
+#include <QtCore/Qt>
+#include <QtGui/QFont>
+#include <QtGui/QTextDocument>
+#include <QtGui/QTextEdit>
+#include <QtGui/QDialog>
+#include <QtGui/QHeaderView>
+#include <QtGui/QTreeWidgetItemIterator>
+#include <QtGui/QHBoxLayout>
+#include <QtGui/QVBoxLayout>
+#include <QtGui/QPushButton>
+#include <iostream>
+#include <QtGui/QMessageBox>
+#include <QtGui/QAction>
+#include <QtCore/QUrl>
+#include <ossimPlanet/ossimPlanetKml.h>
+#include <ossimPlanet/ossimPlanetKmlLayer.h>
+#include <ossimPlanet/ossimPlanetTextureLayerGroup.h>
+#include <ossimPlanet/ossimPlanetTextureLayerRegistry.h>
+#include <ossimPlanet/ossimPlanetAction.h>
+#include <ossimPlanetQt/ossimPlanetQtActivityWindow.h>
+#include <ossimPlanetQt/ossimPlanetQtLegendKmlItem.h>
+#include <ossimPlanetQt/ossimPlanetQtLegendVideoItem.h>
+#include <ossimPlanetQt/ossimPlanetQtLegendNodeItem.h>
+#include <ossimPlanetQt/ossimPlanetQtLegendAnimationPathItem.h>
+#include <ossimPlanetQt/ossimPlanetQtGlWidget.h>
+#include <ossimPlanet/ossimPlanetDestinationCommandAction.h>
+#include <ossimPlanet/ul.h>
+#ifdef check
+#undef check
+#endif
+#include <QtGui/QItemDelegate>
+#include <stack>
+struct LegendPopupMenuInfoType
+{
+   const char* theMenuItem;
+   int         theMenuItemId; 
+};
+
+enum LegendPopupMenuIdType
+{
+	LegendPopupMenuId_GROUP   = 0,
+	LegendPopupMenuId_EDIT,
+	LegendPopupMenuId_DELETE,
+	LegendPopupMenuId_ENABLE,
+	LegendPopupMenuId_DISABLE,
+	LegendPopupMenuId_LOOKAT_SET_TO_DEFAULT,
+	LegendPopupMenuId_LOOKAT_SET_TO_CURRENT_VIEW,
+	LegendPopupMenuId_LOOKAT_SET_TO_CURRENT_ORIENTATION,
+	LegendPopupMenuId_LOOKAT_SET_TO_CURRENT_RANGE,
+	LegendPopupMenuId_STRETCH_NONE,
+	LegendPopupMenuId_STRETCH_LINEAR_AUTO_MIN_MAX,
+	LegendPopupMenuId_STRETCH_1STD,
+	LegendPopupMenuId_STRETCH_2STD,
+	LegendPopupMenuId_STRETCH_3STD,
+	LegendPopupMenuId_TOUR_SELECTED_ITEMS,
+	LegendPopupMenuId_CLEAR_DISK_CACHE,
+	LegendPopupMenuId_REFRESH,
+	LegendPopupMenuId_SYNCH,
+};
+
+
+static const LegendPopupMenuInfoType legendMenuInfo[] = 
+{ 
+	{"Group", (int)LegendPopupMenuId_GROUP},
+	{"Edit", (int)LegendPopupMenuId_EDIT},
+	{"Delete", (int)LegendPopupMenuId_DELETE},
+	{"Enable", (int)LegendPopupMenuId_ENABLE},
+	{"Disable", (int)LegendPopupMenuId_DISABLE},
+	{"To Default View", (int)LegendPopupMenuId_LOOKAT_SET_TO_DEFAULT},
+	{"To Current View", (int)LegendPopupMenuId_LOOKAT_SET_TO_CURRENT_VIEW},
+	{"To Current Orientation", (int)LegendPopupMenuId_LOOKAT_SET_TO_CURRENT_ORIENTATION},
+	{"To Current Range", (int)LegendPopupMenuId_LOOKAT_SET_TO_CURRENT_RANGE},
+	{"None", (int)LegendPopupMenuId_STRETCH_NONE},
+	{"Linear Auto Min Max", (int)LegendPopupMenuId_STRETCH_LINEAR_AUTO_MIN_MAX},
+	{"1 Standard Deviation", (int)LegendPopupMenuId_STRETCH_1STD},
+	{"2 Standard Deviation", (int)LegendPopupMenuId_STRETCH_2STD},
+	{"3 Standard Deviation", (int)LegendPopupMenuId_STRETCH_3STD},
+	{"Tour Selected Items", (int)LegendPopupMenuId_TOUR_SELECTED_ITEMS},
+	{"Clear Disk Cache", (int)LegendPopupMenuId_CLEAR_DISK_CACHE},
+	{"Refresh", (int)LegendPopupMenuId_REFRESH},
+	{"Synch", (int)LegendPopupMenuId_SYNCH},
+};
+
+ossimPlanetQtLegend::ossimPlanetQtLegend(QWidget * parent)
+   :QTreeWidget(parent),
+    theMainWindow(0),
+//     theLandTextureRefreshFlag(true),
+    theMouseDragFlag(false),
+    theMousePressFlag(false),
+    theItemBeingMoved(0),
+    theLocationItem(0),
+    theVideoItem(0),
+    theAnimationPathRootItem(0)
+{
+
+//   setAcceptDrops(true);
+   setSortingEnabled(false);
+   setDragEnabled(false);
+   setAutoScroll(true);
+   QFont f("Arial", 10, QFont::Normal);
+   setFont(f);
+   setColumnCount(2);
+   header()->setHidden(1);
+   setRootIsDecorated(true);
+   theItemPopup = new QMenu();
+//   const LegendPopupMenuInfoType* legendMenuPtr = legendMenuInfo;
+
+   // setup the popup menu
+   thePopupMenuActions.push_back(theItemPopup->addAction(legendMenuInfo[LegendPopupMenuId_GROUP].theMenuItem));
+   thePopupMenuActions.push_back(theItemPopup->addAction(legendMenuInfo[LegendPopupMenuId_EDIT].theMenuItem));
+   thePopupMenuActions.push_back(theItemPopup->addAction(legendMenuInfo[LegendPopupMenuId_DELETE].theMenuItem));
+   thePopupMenuActions.push_back(theItemPopup->addAction(legendMenuInfo[LegendPopupMenuId_ENABLE].theMenuItem));
+   thePopupMenuActions.push_back(theItemPopup->addAction(legendMenuInfo[LegendPopupMenuId_DISABLE].theMenuItem));
+   theItemPopup->addSeparator();
+   QMenu* menu = theItemPopup->addMenu("Set Selected Layers Look At");
+   thePopupMenuActions.push_back(menu->addAction(legendMenuInfo[LegendPopupMenuId_LOOKAT_SET_TO_DEFAULT].theMenuItem));
+   thePopupMenuActions.push_back(menu->addAction(legendMenuInfo[LegendPopupMenuId_LOOKAT_SET_TO_CURRENT_VIEW].theMenuItem));
+   thePopupMenuActions.push_back(menu->addAction(legendMenuInfo[LegendPopupMenuId_LOOKAT_SET_TO_CURRENT_ORIENTATION].theMenuItem));
+   thePopupMenuActions.push_back(menu->addAction(legendMenuInfo[LegendPopupMenuId_LOOKAT_SET_TO_CURRENT_RANGE].theMenuItem));
+   
+   QMenu* menuHistogram = theItemPopup->addMenu("Histogram Stretch");
+   thePopupMenuActions.push_back(menuHistogram->addAction(legendMenuInfo[LegendPopupMenuId_STRETCH_NONE].theMenuItem));
+   thePopupMenuActions.push_back(menuHistogram->addAction(legendMenuInfo[LegendPopupMenuId_STRETCH_LINEAR_AUTO_MIN_MAX].theMenuItem));
+   thePopupMenuActions.push_back(menuHistogram->addAction(legendMenuInfo[LegendPopupMenuId_STRETCH_1STD].theMenuItem));
+   thePopupMenuActions.push_back(menuHistogram->addAction(legendMenuInfo[LegendPopupMenuId_STRETCH_2STD].theMenuItem));
+   thePopupMenuActions.push_back(menuHistogram->addAction(legendMenuInfo[LegendPopupMenuId_STRETCH_3STD].theMenuItem));
+   
+   thePopupMenuActions.push_back(theItemPopup->addAction(legendMenuInfo[LegendPopupMenuId_TOUR_SELECTED_ITEMS].theMenuItem));
+   thePopupMenuActions.push_back(theItemPopup->addAction(legendMenuInfo[LegendPopupMenuId_CLEAR_DISK_CACHE].theMenuItem));
+   thePopupMenuActions.push_back(theItemPopup->addAction(legendMenuInfo[LegendPopupMenuId_REFRESH].theMenuItem));
+   thePopupMenuActions.push_back(theItemPopup->addAction(legendMenuInfo[LegendPopupMenuId_SYNCH].theMenuItem));
+   
+   connect(theItemPopup, SIGNAL(triggered(QAction*)), this, SLOT(popupMenuTriggered(QAction*)));
+   connect(this, SIGNAL(itemDoubleClicked(QTreeWidgetItem * , int  )),
+           this, SLOT(doubleClick(QTreeWidgetItem * , int  )));
+   
+   connect(this, SIGNAL(itemChanged(QTreeWidgetItem * , int  )),
+           this, SLOT(changed(QTreeWidgetItem * , int  )));
+
+   connect(this, SIGNAL(itemExpanded(QTreeWidgetItem * )),
+           this, SLOT(expanded(QTreeWidgetItem * )));
+
+   connect(this, SIGNAL(itemCollapsed(QTreeWidgetItem * )),
+           this, SLOT(collapsed(QTreeWidgetItem * )));
+   theVersion = "1";
+   setSelectionMode(QAbstractItemView::ExtendedSelection);
+}
+
+ossimPlanetQtLegend::~ossimPlanetQtLegend()
+{
+   theMainWindow = 0;
+}
+
+void ossimPlanetQtLegend::setMainWindow(ossimPlanetQtMainWindow* mainWindow)
+{
+   theMainWindow = mainWindow;
+   populate();
+}
+
+void ossimPlanetQtLegend::populate()
+{
+   clear();
+	{
+		OpenThreads::ScopedLock<OpenThreads::Mutex> lockTemp(theNodeIndexMapMutex);
+		OpenThreads::ScopedLock<OpenThreads::Mutex> lockTemp2(theTextureLayerIndexMapMutex);
+		theNodeIndexMap.clear();
+		theTextureLayerIndexMap.clear();
+	}
+   if(!theMainWindow) return;
+   
+   ossim_uint32 size = theMainWindow->textureLayerGroupListSize();
+   ossim_uint32 idx = 0;
+   for(idx = 0; idx < size; ++idx)
+   {
+      const osg::ref_ptr<ossimPlanetTextureLayerGroup> layer = theMainWindow->textureLayerGroup(idx);
+      if(layer.valid())
+      {
+         ossimPlanetQtLegendTextureItem* item = new ossimPlanetQtLegendTextureItem(this);
+         item->setLayer(layer.get());
+
+      }
+   }
+   
+   theLocationItem          = new ossimPlanetQtLegendKmlItem(this, "Location");
+   theVideoItem             = new ossimPlanetQtLegendVideoItem(this, "Video");
+   theAnimationPathRootItem = new QTreeWidgetItem(this);
+   theAnimationPathRootItem->setText(0, "Animation Paths");
+   
+   resizeColumnToContents(0);
+   resizeColumnToContents(1);
+}
+
+void ossimPlanetQtLegend::populateLegend(ossimRefPtr<ossimXmlNode> legendNode)
+{
+   mainWindow()->iothread()->setPauseFlag(true);
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(thePopulateLegendMutex);
+   {  
+      OpenThreads::ScopedLock<OpenThreads::Mutex> lockTemp(theNodeIndexMapMutex);
+		OpenThreads::ScopedLock<OpenThreads::Mutex> lockTemp2(theTextureLayerIndexMapMutex);
+      theNodeIndexMap.clear();
+		theTextureLayerIndexMap.clear();
+  }
+   
+   if(!legendNode.valid()) return;
+   blockSignals(true);
+   clear();
+   theLocationItem = 0;
+   theAnimationPathRootItem= 0;
+   ossimPlanetQtLegendTextureItem* imageOperationLayer = new ossimPlanetQtLegendTextureItem(this, "Image Operation Layer");
+   ossimPlanetQtLegendTextureItem* imageLayers          = new ossimPlanetQtLegendTextureItem(this, "Image Layers");
+   theLocationItem          = new ossimPlanetQtLegendKmlItem(this, "Location");
+   theVideoItem             = new ossimPlanetQtLegendVideoItem(this, "Video");
+   theAnimationPathRootItem = new QTreeWidgetItem(this);
+   theAnimationPathRootItem->setText(0, "Animation Paths");
+   
+   const vector<ossimRefPtr<ossimXmlNode> >& childNodes = legendNode->getChildNodes();
+   std::vector<ossimPlanetOperation*> activityList;
+   if(childNodes.size())
+   {
+      ossim_uint32 idx = 0;
+      ossim_uint32 textureLayerCount = 0;
+      ossimString attribute;
+      ossimString type;
+      for(idx = 0; idx < childNodes.size(); ++idx)
+      {
+         type = childNodes[idx]->getTag();
+         if((type == "ossimPlanetTextureLayerGroup")&&
+            (textureLayerCount < theMainWindow->textureLayerGroupListSize()))
+         {
+            const osg::ref_ptr<ossimPlanetTextureLayerGroup> layer = theMainWindow->textureLayerGroup(idx);
+            if(idx == 0)
+            {
+               imageOperationLayer->setLayer(layer.get());
+               imageOperationLayer->loadXml(childNodes[idx], activityList);
+            }
+            else if(idx == 1)
+            {
+               imageLayers->setLayer(layer.get());
+               imageLayers->loadXml(childNodes[idx], activityList);
+            }
+            ++textureLayerCount;
+         }
+         else if(type == "ossimPlanetKml")
+         {
+            theLocationItem->loadXml(childNodes[idx], activityList);
+         }
+         else if(type == "ossimPlanetVideoLayer")
+         {
+            theVideoItem->loadXml(childNodes[idx], activityList);
+         }
+         else if(type == "AnimationPath")
+         {
+            ossimPlanetQtLegendAnimationPathItem* item = new ossimPlanetQtLegendAnimationPathItem(theAnimationPathRootItem, "");
+            item->loadXml(childNodes[idx], activityList);
+         }
+      }
+   }
+   // quick hack for locations not being loaded until I have a full load and save for them
+   if(activityList.size())
+   {
+      ossim_int32 idx = activityList.size()-1;
+      for(;idx>=0; --idx)
+      {
+         mainWindow()->activityWindow()->theActivityWidget->addOperation(activityList[idx]);
+         
+      }
+      activityList.clear();
+   }
+   resizeColumnToContents(0);
+   resizeColumnToContents(1);
+   blockSignals(false);
+   {
+      OpenThreads::ScopedLock<OpenThreads::Mutex> lockTemp(theNodeIndexMapMutex);
+      QTreeWidgetItemIterator locationIter(theLocationItem);
+      while(*locationIter)
+      {
+         ossimPlanetQtLegendNodeItem* item = dynamic_cast<ossimPlanetQtLegendNodeItem*>(*locationIter);
+         if(item)
+         {
+            if(item->layer().valid())
+            {
+					theNodeIndexMap[item->layer().get()] = item;
+            }
+         }
+         ++locationIter;
+      }      
+      QTreeWidgetItemIterator videoIter(theVideoItem);
+      while(*videoIter)
+      {
+         ossimPlanetQtLegendNodeItem* item = dynamic_cast<ossimPlanetQtLegendNodeItem*>(*videoIter);
+         if(item)
+         {
+            if(item->layer().valid())
+            {
+					theNodeIndexMap[item->layer().get()] = item;
+            }
+         }
+         ++videoIter;
+      }      
+   }
+   mainWindow()->iothread()->setPauseFlag(false);
+}
+
+void ossimPlanetQtLegend::addTextureLayerToTop(osg::ref_ptr<ossimPlanetTextureLayer> layer)
+{
+   ossimPlanetQtLegendTextureItem* root = referenceTextureItem();
+	{
+		OpenThreads::ScopedLock<OpenThreads::Mutex> lock2(theTextureLayerIndexMapMutex);
+		if(theTextureLayerIndexMap.find(layer.get()) != theTextureLayerIndexMap.end())
+		{
+			return;
+		}
+	}
+   ossimPlanetTextureLayerGroup* group = root->layer()->asGroup();
+   if(group)
+   {
+      group->addTop(layer.get());
+   }
+}
+#if 0
+ossimPlanetQtLegendTextureItem* ossimPlanetQtLegend::addTextureLayerToTop(osg::ref_ptr<ossimPlanetTextureLayer> layer)
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(thePopulateLegendMutex);
+   ossimPlanetQtLegendTextureItem* root = referenceTextureItem();
+
+   if(root)
+   {
+      return addTextureLayerToTop(layer, root);
+   }
+
+   return 0;
+}
+#endif
+void ossimPlanetQtLegend::addAnimationPath(osg::ref_ptr<osg::AnimationPath> path)
+{
+   ossimPlanetQtLegendAnimationPathItem* animationPath = new ossimPlanetQtLegendAnimationPathItem(theAnimationPathRootItem, "Animation Path");
+   animationPath->setAnimationPath(path);
+}
+
+void ossimPlanetQtLegend::addAnimationPath(ossimRefPtr<ossimXmlNode> path)
+{
+   ossimPlanetQtLegendAnimationPathItem* item = new ossimPlanetQtLegendAnimationPathItem(theAnimationPathRootItem, "");
+   std::vector<ossimPlanetOperation*> activityList;
+   item->loadXml(path, activityList);
+}
+
+#if 0
+
+
+ossimPlanetQtLegendTextureItem* ossimPlanetQtLegend::addTextureLayerAfterItem(osg::ref_ptr<ossimPlanetTextureLayer> layer,
+                                                                              ossimPlanetQtLegendTextureItem* item)
+{
+   ossimPlanetQtLegendTextureItem* i = 0;
+   ossimPlanetTextureLayerGroup* group = item->layer()->getParent(0);
+   if(group&&item->parent())
+   {
+      OpenThreads::ScopedLock<OpenThreads::Mutex> lock(thePopulateLegendMutex);
+		OpenThreads::ScopedLock<OpenThreads::Mutex> lock2(theTextureLayerIndexMapMutex);
+		if(theTextureLayerIndexMap.find(layer.get()) != theTextureLayerIndexMap.end())
+		{
+			return 0;
+		}
+      i = new ossimPlanetQtLegendTextureItem();
+      group->addAfterLayer(item->layer(), layer.get());
+      item->parent()->insertChild(item->parent()->indexOfChild(item)+1,
+                                  i);
+      i->setLayer(layer.get());
+		theTextureLayerIndexMap[layer.get()] = i;
+      resizeColumnToContents(0);
+      resizeColumnToContents(1);
+   }
+   else
+   {
+      return addTextureLayerToTop(layer);
+   }
+
+   return i;
+}
+
+ossimPlanetQtLegendTextureItem* ossimPlanetQtLegend::addTextureLayerToTop(osg::ref_ptr<ossimPlanetTextureLayer> layer,
+																								  ossimPlanetQtLegendTextureItem* item)
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(thePopulateLegendMutex);
+	OpenThreads::ScopedLock<OpenThreads::Mutex> lock2(theTextureLayerIndexMapMutex);
+	if(theTextureLayerIndexMap.find(layer.get()) != theTextureLayerIndexMap.end())
+	{
+		return 0;
+	}
+   ossimPlanetQtLegendTextureItem* i = new ossimPlanetQtLegendTextureItem();
+   ossimPlanetTextureLayerGroup* group = item->layer()->asGroup();
+   if(group)
+   {
+      group->addTop(layer.get());
+      item->insertChild(0, i);
+      i->setLayer(layer.get());
+		theTextureLayerIndexMap[layer.get()] = i;
+   }
+   else
+   {
+      delete i;
+      i = 0;
+   }
+   resizeColumnToContents(0);
+   resizeColumnToContents(1);
+	
+   return i;
+}
+ossimPlanetQtLegendTextureItem* ossimPlanetQtLegend::addTextureLayerToBottom(osg::ref_ptr<ossimPlanetTextureLayer> layer,
+                                                                             ossimPlanetQtLegendTextureItem* item)
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(thePopulateLegendMutex);
+	OpenThreads::ScopedLock<OpenThreads::Mutex> lock2(theTextureLayerIndexMapMutex);
+	if(theTextureLayerIndexMap.find(layer.get()) != theTextureLayerIndexMap.end())
+	{
+		return 0;
+	}
+   ossimPlanetQtLegendTextureItem* i = new ossimPlanetQtLegendTextureItem();
+   ossimPlanetTextureLayerGroup* group = item->layer()->asGroup();
+   if(group)
+   {
+      group->addBottom(layer.get());
+      item->addChild(i);
+      i->setLayer(layer.get());
+		theTextureLayerIndexMap[layer.get()] = i;
+   }
+   else
+   {
+      delete i;
+      i = 0;
+   }
+   resizeColumnToContents(0);
+   resizeColumnToContents(1);
+	
+   return i;
+}
+
+ossimPlanetQtLegendTextureItem* ossimPlanetQtLegend::addTextureLayerBeforeItem(osg::ref_ptr<ossimPlanetTextureLayer> layer,
+                                                                               ossimPlanetQtLegendTextureItem* item)
+{
+   ossimPlanetQtLegendTextureItem* i = 0;
+   ossimPlanetTextureLayerGroup* group = item->layer()->getParent(0);
+   if(group&&item->parent())
+   {
+      OpenThreads::ScopedLock<OpenThreads::Mutex> lock(thePopulateLegendMutex);
+		OpenThreads::ScopedLock<OpenThreads::Mutex> lock2(theTextureLayerIndexMapMutex);
+		if(theTextureLayerIndexMap.find(layer.get()) != theTextureLayerIndexMap.end())
+		{
+			return 0;
+		}
+      i = new ossimPlanetQtLegendTextureItem();
+      group->addBeforeLayer(item->layer(),
+                            layer.get());
+      item->parent()->insertChild(item->parent()->indexOfChild(item),
+                                  i);
+      i->setLayer(layer.get());
+		theTextureLayerIndexMap[layer.get()] = i;
+      resizeColumnToContents(0);
+      resizeColumnToContents(1);
+   }
+   else
+   {
+      return addTextureLayerToTop(layer, referenceTextureItem());
+   }
+	
+   return i;
+}
+#endif
+
+void ossimPlanetQtLegend::addKmlNode(osg::ref_ptr<ossimPlanetKmlLayerNode> kml)
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(thePopulateLegendMutex);
+   if(theLocationItem)
+   {
+		OpenThreads::ScopedLock<OpenThreads::Mutex> lock2(theNodeIndexMapMutex);
+      ossimPlanetQtLegendKmlItem* item = new ossimPlanetQtLegendKmlItem(theLocationItem);
+		theNodeIndexMap.insert(std::make_pair(kml.get(), item));
+      item->setLayer(kml.get());
+   }  
+}
+
+
+void ossimPlanetQtLegend::removeKmlNodeFromLegend(osg::ref_ptr<ossimPlanetKmlLayerNode> node)
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(thePopulateLegendMutex);
+   QTreeWidgetItemIterator iter(theLocationItem);
+   while(*iter)
+   {
+      ossimPlanetQtLegendKmlItem* kmlItem = dynamic_cast<ossimPlanetQtLegendKmlItem*>(*iter);
+      if(kmlItem)
+      {
+         if(kmlItem->layer().get() == node.get())
+         {
+            if(kmlItem->parent())
+            {
+               QTreeWidgetItem* it = kmlItem->parent()->takeChild(kmlItem->parent()->indexOfChild(kmlItem));
+               if(it) delete it;
+               return;
+            }
+            else
+            {
+               QTreeWidgetItem* it = theLocationItem->takeChild(theLocationItem->indexOfChild(kmlItem));
+               if(it) delete it;
+               return;
+            }
+         }
+      }
+      ++iter;
+   }
+}
+
+void ossimPlanetQtLegend::addVideoNode(osg::ref_ptr<ossimPlanetVideoLayerNode> node)
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(thePopulateLegendMutex);
+   if(theVideoItem)
+   {
+		OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theNodeIndexMapMutex);
+      ossimPlanetQtLegendVideoItem* item = new ossimPlanetQtLegendVideoItem(theVideoItem);
+		theNodeIndexMap[node.get()] = item;
+      item->setLayer(node.get());
+   }  
+}
+
+void ossimPlanetQtLegend::removeVideoNodeFromLegend(osg::ref_ptr<ossimPlanetVideoLayerNode> node)
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(thePopulateLegendMutex);
+   QTreeWidgetItemIterator iter(theVideoItem);
+   while(*iter)
+   {
+      ossimPlanetQtLegendVideoItem* videoItem = dynamic_cast<ossimPlanetQtLegendVideoItem*>(*iter);
+      if(videoItem)
+      {
+         if(videoItem->layer().get() == node.get())
+         {
+            if(videoItem->parent())
+            {
+               QTreeWidgetItem* it = videoItem->parent()->takeChild(videoItem->parent()->indexOfChild(videoItem));
+               if(it) delete it;
+               return;
+            }
+            else
+            {
+               QTreeWidgetItem* it = theVideoItem->takeChild(theVideoItem->indexOfChild(videoItem));
+               if(it) delete it;
+               return;
+            }
+         }
+      }
+      ++iter;
+   }
+}
+
+void ossimPlanetQtLegend::addNode(osg::ref_ptr<ossimPlanetNode> node)
+{
+	if(!node.valid()) return;
+	ossimPlanetKmlLayerNode* kmlNode = dynamic_cast<ossimPlanetKmlLayerNode*>(node.get());
+	if(kmlNode)
+	{
+		addKmlNode(kmlNode);
+		return;
+	}
+	ossimPlanetVideoLayerNode* videoNode = dynamic_cast<ossimPlanetVideoLayerNode*>(node.get());
+	if(videoNode)
+	{
+		addVideoNode(videoNode);
+		return;
+	}
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock1(thePopulateLegendMutex);
+	OpenThreads::ScopedLock<OpenThreads::Mutex> lock2(theNodeIndexMapMutex);
+   
+	ossimPlanetQtLegendNodeItem* item = new ossimPlanetQtLegendNodeItem(getParentNodeItem(node.get(), theLocationItem));
+	theNodeIndexMap[node.get()] = item;
+	item->setLayer(node.get());
+}
+
+void ossimPlanetQtLegend::addBookmark(osg::ref_ptr<ossimPlanetLookAt> lookAt, const QString& name, const QString& description )
+{
+   ossimPlanetAnnotationPlacemark* placemark = new ossimPlanetAnnotationPlacemark(osg::Vec3d(lookAt->lat(), lookAt->lon(), lookAt->altitude()),
+                                                                                  lookAt->altitudeMode(),
+                                                                                  ossimString("Bookmark"),
+                                                                                  ossimString("Bookmark")); 
+   mainWindow()->annotationLayer()->addChild(placemark);
+   placemark->setLookAt(lookAt.get());
+   mainWindow()->annotationLayer()->stagingThreadQueue()->add(new ossimPlanetAnnotationLayer::Stager(placemark));
+}
+
+
+void ossimPlanetQtLegend::removeNodeFromLegend(osg::ref_ptr<ossimPlanetNode> node, bool removeNodeFromLayerFlag)
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock1(thePopulateLegendMutex);
+	OpenThreads::ScopedLock<OpenThreads::Mutex> lock2(theNodeIndexMapMutex);
+   std::stack<ossimPlanetQtLegendNodeItem*> itemStack;
+   if(node.valid())
+   {
+      NodeIndexMapType::iterator iter = theNodeIndexMap.find(node.get());
+      if(iter != theNodeIndexMap.end())
+      {
+         if(iter->second->childCount() > 0)
+         {
+            std::stack<ossimPlanetQtLegendNodeItem*> needToTraverseStack;
+            ossim_uint32 idx = 0;
+            needToTraverseStack.push(iter->second);
+            while(!needToTraverseStack.empty())
+            {
+               ossimPlanetQtLegendNodeItem* current = needToTraverseStack.top();
+               needToTraverseStack.pop();
+               itemStack.push(current);
+               for(idx = 0; idx < (ossim_uint32)current->childCount(); ++idx)
+               {
+                  ossimPlanetQtLegendNodeItem* child = dynamic_cast<ossimPlanetQtLegendNodeItem*>(current->child(idx));
+                  if(child)
+                  {
+                     if(child->childCount()>0)
+                     {
+                        needToTraverseStack.push(child);
+                     }
+                     else
+                     {
+                        itemStack.push(child);
+                     }
+                  }
+               }
+            }
+            //QTreeWidgetItemIterator childIter(iter->second->child(0));
+            //while(*childIter)
+            //{
+            //   ossimPlanetQtLegendNodeItem* test  = dynamic_cast<ossimPlanetQtLegendNodeItem*>(*childIter);
+            //   if(test)
+            //   {
+            //      std::cout << test->text(0).toStdString() << std::endl;
+            //      itemStack.push(test);
+            //   }
+            //   ++childIter;
+           // }
+         }
+         else
+         {
+            itemStack.push(iter->second);
+         }
+         if(removeNodeFromLayerFlag)
+         {
+            while(!itemStack.empty())
+            {
+               if(itemStack.top()->layer().get())
+               {
+                  NodeIndexMapType::iterator tempIter = theNodeIndexMap.find(itemStack.top()->layer().get());
+                  if(tempIter!=theNodeIndexMap.end())
+                  {
+                     theNodeIndexMap.erase(tempIter);
+                  }
+               }
+               itemStack.top()->deleteLayer(true);
+               itemStack.pop();
+            }
+         }
+         else
+         {
+            while(!itemStack.empty())
+            {
+               if(itemStack.top()->layer().get())
+               {
+                  NodeIndexMapType::iterator tempIter = theNodeIndexMap.find(itemStack.top()->layer().get());
+                  if(tempIter!=theNodeIndexMap.end())
+                  {
+                     theNodeIndexMap.erase(tempIter);
+                  }
+               }
+               QTreeWidgetItem* it = itemStack.top()->parent()->takeChild(itemStack.top()->parent()->indexOfChild(itemStack.top()));
+               if(it) delete it;
+               itemStack.pop();
+            }
+         }
+      }
+   }
+}
+
+ossimPlanetQtLegendTextureItem* ossimPlanetQtLegend::referenceTextureItem()
+{
+   QTreeWidgetItemIterator iter(this);
+   ossimPlanetQtLegendTextureItem* result = 0;
+   while(*iter)
+   {
+      ossimPlanetQtLegendTextureItem* test  = dynamic_cast<ossimPlanetQtLegendTextureItem*>(*iter);
+
+      if(test&&!test->parent())
+      {
+         result = test;
+      }
+      ++iter;
+   }
+   return result;
+}
+
+
+void ossimPlanetQtLegend::doubleClick(QTreeWidgetItem * item, int  /*columnNumber*/)
+{
+   ossimPlanetQtLegendItem* legendItem = dynamic_cast<ossimPlanetQtLegendItem*>(item);
+   if(legendItem)
+   {
+      ossimPlanetQtLegendAnimationPathItem* animationItem = dynamic_cast<ossimPlanetQtLegendAnimationPathItem*>(legendItem);
+
+      if(!animationItem)
+      {
+         const osg::ref_ptr<ossimPlanetLookAt> lookAt = legendItem->getLookAt();
+         if(lookAt.valid())
+         {
+            ossimPlanetDestinationCommandAction(lookAt->toNavigationString()).execute();
+         }
+      }
+      else
+      {
+         std::string animationPath;
+
+         animationItem->getAnimationPathAsString(animationPath);
+
+         istringstream in(animationPath);
+         mainWindow()->manipulator()->loadRecording(in);
+         mainWindow()->manipulator()->playRecording();
+      }
+   }
+}
+
+ossimPlanetQtMainWindow* ossimPlanetQtLegend::mainWindow()
+{
+   return theMainWindow;
+}
+
+// void ossimPlanetQtLegend::setLandTextureRefreshFlag(bool flag)
+// {
+//    theLandTextureRefreshFlag = flag;
+// }
+
+void ossimPlanetQtLegend::mouseDoubleClickEvent ( QMouseEvent * event )
+{
+   event->accept();
+   QTreeWidgetItem* item = itemAt(event->pos());
+   doubleClick(item, 0);
+#if 0
+   ossimPlanetQtLegendItem* legendItem = dynamic_cast<ossimPlanetQtLegendItem*>(item);
+   if(legendItem)
+   {
+      const osg::ref_ptr<ossimPlanetLookAt> lookAt = legendItem->getLookAt();
+
+      if(lookAt.valid())
+      {
+         ossimPlanetAction(lookAt->toNavigationString()).execute();
+      }
+   }
+#endif
+}
+
+ossimRefPtr<ossimXmlNode> ossimPlanetQtLegend::saveXml()const
+{
+   ossimRefPtr<ossimXmlNode> result = new ossimXmlNode;
+
+   result->setTag("ossimPlanetQtLegend");
+//    result->setTag("object");
+//    result->addAttribute("type", "ossimPlanetQtLegend");
+   result->addAttribute("version", theVersion);
+
+   int count = topLevelItemCount();
+   int idx = 0;
+   for(idx = 0; idx < count; ++idx)
+   {
+      ossimPlanetQtLegendItem* legendItem  = dynamic_cast<ossimPlanetQtLegendItem*>(topLevelItem(idx));
+      
+      if(legendItem)
+      {
+         ossimRefPtr<ossimXmlNode> node = legendItem->saveXml();
+         if(node.valid())
+         {
+            result->addChildNode(node.get());
+         }
+      }
+   }
+   count = theAnimationPathRootItem->childCount();
+   for(idx = 0; idx < count; ++idx)
+   {
+      ossimPlanetQtLegendItem* legendItem  = dynamic_cast<ossimPlanetQtLegendItem*>(theAnimationPathRootItem->child(idx));
+      
+      if(legendItem)
+      {
+         ossimRefPtr<ossimXmlNode> node = legendItem->saveXml();
+         if(node.valid())
+         {
+            result->addChildNode(node.get());
+         }
+      }
+   }
+   
+   return result.get();
+}
+
+void ossimPlanetQtLegend::loadXml(ossimRefPtr<ossimXmlNode> legendNode)
+{
+   populateLegend(legendNode.get());
+}
+
+void ossimPlanetQtLegend::addXml(ossimRefPtr<ossimXmlNode> node)
+{
+   blockSignals(true);
+   ossimString type;
+   const vector<ossimRefPtr<ossimXmlNode> >& childNodes = node->getChildNodes();
+   std::vector<ossimPlanetOperation*> activityList;
+   ossimPlanetQtLegendTextureItem* imageLayers = referenceTextureItem();
+   if(childNodes.size())
+   {
+      ossim_uint32 idx = 0;
+      for(idx = 0; idx < childNodes.size(); ++idx)
+      {
+         type = childNodes[idx]->getTag();
+         if(imageLayers&&
+            ((type == "ossimPlanetTextureLayerGroup")||
+             (type == "ossimPlanetOssimImageLayer")||
+             (type == "ossimPlanetWmsImageLayer")))
+         {
+            imageLayers->addXml(childNodes[idx], activityList, true);
+         }
+//          else if(type == "ossimPlanetKml")
+//          {
+//             imageLayers>loadXml(childNodes[idx], activityList);
+//          }
+         else if(type == "AnimationPath")
+         {
+            ossimPlanetQtLegendAnimationPathItem* item = new ossimPlanetQtLegendAnimationPathItem(theAnimationPathRootItem, "");
+            item->loadXml(childNodes[idx], activityList);
+         }         
+      }
+   }
+   if(activityList.size())
+   {
+      ossim_int32 idx = activityList.size()-1;
+      for(;idx>=0; --idx)
+      {
+         mainWindow()->activityWindow()->theActivityWidget->addOperation(activityList[idx]);
+         
+      }
+      activityList.clear();
+   }
+   resizeColumnToContents(0);
+   resizeColumnToContents(1);
+   blockSignals(false);
+}
+
+void ossimPlanetQtLegend::updateTextureLayer(ossimRefPtr<ossimPlanetTextureLayer> layer)
+{
+   if(!layer.valid()) return;
+   QTreeWidgetItemIterator iter(this, QTreeWidgetItemIterator::All);;
+   while(*iter)
+   {
+      QTreeWidgetItem* item = *iter;
+      ossimPlanetQtLegendTextureItem* textureItem = dynamic_cast<ossimPlanetQtLegendTextureItem*>(item);
+
+      if(textureItem->layer().get() == layer.get())
+      {
+         textureItem->updateLayerInfo();
+         return;
+      }
+      ++iter;
+   }
+}
+
+
+// bool ossimPlanetQtLegend::landTextureRefreshFlag()const
+// {
+//    return theLandTextureRefreshFlag;
+// }
+
+void ossimPlanetQtLegend::changed(QTreeWidgetItem * item, int  /*columnNumber*/)
+{
+   ossimPlanetQtLegendItem* legendItem = dynamic_cast<ossimPlanetQtLegendItem*>(item);
+
+   if(legendItem)
+   {
+      legendItem->changed();
+   }
+}
+
+void ossimPlanetQtLegend::deleteSelectedItems()
+{
+   QTreeWidgetItemIterator iter(this, QTreeWidgetItemIterator::Selected);
+//    bool needRefresh = true;
+   osg::ref_ptr<ossimPlanetExtents> extents = 0;
+   while(*iter)
+   {
+      QTreeWidgetItem* item = *iter;
+      ossimPlanetQtLegendItem* legendItem = dynamic_cast<ossimPlanetQtLegendItem*>(item);
+      ++iter;
+      if(legendItem&&(legendItem->parent()))
+      {
+         ossimPlanetQtLegendTextureItem* textureItem = dynamic_cast<ossimPlanetQtLegendTextureItem*>(legendItem);
+
+         if(textureItem)
+         {
+            if(extents.valid())
+            {
+               extents->combine(textureItem->layer()->getExtents().get());
+            }
+            else
+            {
+               extents = textureItem->layer()->getExtents()->clone();
+            }
+         }
+			ossimPlanetQtLegendNodeItem* nodeItem = dynamic_cast<ossimPlanetQtLegendNodeItem*>(legendItem);
+			if(nodeItem)
+			{
+				if(nodeItem->layer().valid())
+				{
+					removeNodeFromLegend(nodeItem->layer().get(), true);
+				}
+				else
+				{
+					legendItem->deleteLayer(true);
+				}
+			}
+			else
+			{
+				legendItem->deleteLayer(true);
+			}
+      }
+   }
+//    if(needRefresh)
+//    {
+//       theMainWindow->refreshLandTextures(extents.get(),
+//                                          ossimPlanetPagedLandLodRefreshType_TEXTURE);
+//    }
+}
+
+void ossimPlanetQtLegend::setEnableFlagOnSelectedItems(bool flag)
+{
+   QTreeWidgetItemIterator iter(this, QTreeWidgetItemIterator::Selected);
+   bool currentlyChecked = false;
+   while(*iter)
+   {
+      currentlyChecked = (*iter)->checkState(0)!=Qt::Unchecked;
+      if(currentlyChecked != flag)
+      {
+         (*iter)->setCheckState(0, flag?Qt::Checked:Qt::Unchecked);
+      }
+      ++iter;
+   }
+}
+
+void ossimPlanetQtLegend::editSelectedItem()
+{
+   QTreeWidgetItemIterator iter(this, QTreeWidgetItemIterator::Selected);
+   osg::ref_ptr<ossimPlanetExtents> extents = 0;
+   if(*iter)
+   {
+      editItem(*iter);
+   }
+}
+
+void ossimPlanetQtLegend::clearDiskCacheOnSelectedItems()
+{
+   QTreeWidgetItemIterator iter(this, QTreeWidgetItemIterator::Selected);
+   while(*iter)
+   {
+      QTreeWidgetItem* item = *iter;
+      ossimPlanetQtLegendTextureItem* legendItem = dynamic_cast<ossimPlanetQtLegendTextureItem*>(item);
+      ++iter;
+      if(legendItem)
+      {
+         ossimPlanetWmsImageLayer* wmsLayer = dynamic_cast<ossimPlanetWmsImageLayer*>(legendItem->layer().get());
+
+         if(wmsLayer)
+         {
+            wmsLayer->clearDiskCache();
+         }
+      }
+   }
+}
+
+void ossimPlanetQtLegend::groupSelectedItems()
+{
+   // for now I will only support grouping of texture items
+   QList<QTreeWidgetItem*> items = selectedItems();
+   QList<QTreeWidgetItem*>::iterator iter = items.begin();
+   while(iter != items.end())
+   {
+      if(dynamic_cast<ossimPlanetQtLegendTextureItem*>(*iter))
+      {
+         if((*iter)->parent())
+         {
+            if((*iter)->parent()->isSelected())
+            {
+               (*iter)->parent()->setSelected(false);
+            }
+         }
+      }
+      else
+      {
+         (*iter)->setSelected(false);
+      }
+      
+      ++iter;
+   }
+   
+   items = selectedItems();
+   if(items.size())
+   {
+      iter = items.begin();
+		ossimPlanetQtLegendTextureItem* parentItem = dynamic_cast<ossimPlanetQtLegendTextureItem*>((*iter)->parent());
+		ossimPlanetQtLegendTextureItem* item = dynamic_cast<ossimPlanetQtLegendTextureItem*>(*iter);
+		ossimPlanetQtLegendTextureItem* newItem = new ossimPlanetQtLegendTextureItem();
+		if(!parentItem||!item||!item->layer())
+		{
+			return;
+		}
+		osg::ref_ptr<ossimPlanetTextureLayerGroup> parentGroup = item->layer()->parent(0);
+		if(!parentGroup) return;
+		osg::ref_ptr<ossimPlanetTextureLayerGroup> group = new ossimPlanetTextureLayerGroup;
+		parentGroup->blockCallbacks(true);
+		parentGroup->addBeforeLayer(item->layer().get(), group.get());
+		parentGroup->blockCallbacks(false);
+		while(iter != items.end())
+		{
+			
+			ossimPlanetQtLegendTextureItem* item = dynamic_cast<ossimPlanetQtLegendTextureItem*>(*iter);
+			
+			if(item)
+			{
+				osg::ref_ptr<ossimPlanetTextureLayer> layer = item->layer();
+				removeIndexMapping(layer.get(), true);
+				layer->detachFromParents();
+				
+				group->addBottom(layer.get());
+			}
+			++iter;
+		}
+		ossim_int32 idx = parentGroup->findLayerIndex(group.get());
+		
+		parentItem->insertChild(idx, newItem);
+		group->dirtyExtents();
+		group->updateExtents();
+		parentGroup->dirtyExtents();
+		parentGroup->updateExtents();
+		newItem->setLayer(group.get());
+	}
+}
+
+void ossimPlanetQtLegend::setLookAtForSelectedItems(osg::ref_ptr<ossimPlanetLookAt> lookAt)
+{
+   QList<QTreeWidgetItem*> items = selectedItems();
+   QList<QTreeWidgetItem*>::iterator iter = items.begin();
+   while(iter != items.end())
+   {
+      ossimPlanetQtLegendItem* legendItem = dynamic_cast<ossimPlanetQtLegendItem*>(*iter);
+      if(legendItem)
+      {
+         if(lookAt.valid())
+         {
+            legendItem->setLookAt(lookAt->clone());
+         }
+         else
+         {
+            legendItem->setLookAt(0);
+         }
+      }
+      ++iter;
+   }
+}
+
+void ossimPlanetQtLegend::setLookAtToCurrentOrientationForSelectedItems(const osg::ref_ptr<ossimPlanetLookAt> lookAt)
+{
+   if(!lookAt.valid()) return;
+   QList<QTreeWidgetItem*> items = selectedItems();
+   QList<QTreeWidgetItem*>::iterator iter = items.begin();
+   while(iter != items.end())
+   {
+      ossimPlanetQtLegendItem* legendItem = dynamic_cast<ossimPlanetQtLegendItem*>(*iter);
+      if(legendItem)
+      {
+         osg::ref_ptr<ossimPlanetLookAt> look = legendItem->getLookAt();
+         
+         if(look.valid())
+         {
+            osg::ref_ptr<ossimPlanetLookAt> newLook = look->clone();
+            newLook->setHeading(lookAt->heading());
+            newLook->setPitch(lookAt->pitch());
+            newLook->setRoll(lookAt->roll());
+            legendItem->setLookAt(newLook);
+         }
+      }
+      ++iter;
+   }
+}
+
+void ossimPlanetQtLegend::setLookAtToCurrentRangeForSelectedItems(double range)
+{
+   QList<QTreeWidgetItem*> items = selectedItems();
+   QList<QTreeWidgetItem*>::iterator iter = items.begin();
+   while(iter != items.end())
+   {
+      ossimPlanetQtLegendItem* legendItem = dynamic_cast<ossimPlanetQtLegendItem*>(*iter);
+      if(legendItem)
+      {
+         osg::ref_ptr<ossimPlanetLookAt> look = legendItem->getLookAt();
+         
+         if(look.valid())
+         {
+            osg::ref_ptr<ossimPlanetLookAt> newLook = look->clone();
+            newLook->setRange(range);
+            legendItem->setLookAt(newLook);
+         }
+      }
+      ++iter;
+   }
+   
+}
+
+
+void ossimPlanetQtLegend::setHistogramStretchAndMode(ossimPlanetTextureLayerGroup* group,
+                                                     bool enabledFlag,
+                                                     const std::string& mode)
+{
+   if(group)
+   {
+      ossim_uint32 idx = 0;
+      ossim_uint32 layers = group->numberOfLayers();
+      for(;idx < layers; ++idx)
+      {
+         osg::ref_ptr<ossimPlanetTextureLayer> layer =  group->layer(idx);
+         if(layer.valid())
+         {
+            ossimPlanetOssimImageLayer*   imageLayer      = dynamic_cast<ossimPlanetOssimImageLayer*>(layer.get());
+            ossimPlanetTextureLayerGroup* imageLayerGroup = dynamic_cast<ossimPlanetTextureLayerGroup*>(layer.get());
+            if(imageLayer)
+            {
+               imageLayer->setHistogramStretchEnableFlag(enabledFlag);
+               imageLayer->setHistogramStretchMode(mode);
+            }
+            else if(imageLayerGroup)
+            {
+               setHistogramStretchAndMode(imageLayerGroup, enabledFlag, mode);
+            }
+         }
+      }
+   }
+}
+
+void ossimPlanetQtLegend::setHistogrmaStretchModeForSelectedItems(const QString& mode)
+{
+   QList<QTreeWidgetItem*> items = selectedItems();
+   QList<QTreeWidgetItem*>::iterator iter = items.begin();
+   bool stretchEnableFlag = mode!="None";
+   std::string stretchMode = mode.toStdString();
+   while(iter != items.end())
+   {
+      ossimPlanetQtLegendTextureItem* textureItem = dynamic_cast<ossimPlanetQtLegendTextureItem*>(*iter);
+      if(textureItem)
+      {
+         ossimPlanetOssimImageLayer*   imageLayer = dynamic_cast<ossimPlanetOssimImageLayer*>(textureItem->layer().get());
+         ossimPlanetTextureLayerGroup* imageLayerGroup = dynamic_cast<ossimPlanetTextureLayerGroup*>(textureItem->layer().get());
+         if(imageLayer)
+         {
+            imageLayer->setHistogramStretchEnableFlag(stretchEnableFlag);
+            imageLayer->setHistogramStretchMode(stretchMode);
+         }
+         else if(imageLayerGroup)
+         {
+            setHistogramStretchAndMode(imageLayerGroup, stretchEnableFlag, stretchMode);
+         }
+      }
+      ++iter;
+   }
+}
+
+void ossimPlanetQtLegend::synchSelectedItems()
+{
+   QList<QTreeWidgetItem*> items = selectedItems();
+   QList<QTreeWidgetItem*>::iterator iter = items.begin();
+   
+   while(iter != items.end())
+   {
+      if(dynamic_cast<ossimPlanetQtLegendTextureItem*>(*iter))
+      {
+         if((*iter)->parent())
+         {
+            if((*iter)->parent()->isSelected())
+            {
+               (*iter)->parent()->setSelected(false);
+            }
+         }
+      }
+      else
+      {
+         (*iter)->setSelected(false);
+      }
+      
+      ++iter;
+   }
+   iter = items.begin();
+   ossimRefPtr<ossimXmlNode> result = new ossimXmlNode;
+   result->setTag("ossimPlanetQtLegend");
+   std::vector<ossimFilename> kmlFiles;
+   while(iter != items.end())
+   {
+      ossimPlanetQtLegendItem* item = dynamic_cast<ossimPlanetQtLegendItem*>(*iter);
+      if(item)
+      {
+         ossimPlanetQtLegendKmlItem* kmlItem = dynamic_cast<ossimPlanetQtLegendKmlItem*>(item);
+         if(kmlItem)
+         {
+				ossimPlanetKmlLayerNode* kml = dynamic_cast<ossimPlanetKmlLayerNode*>( kmlItem->layer().get());
+				osg::ref_ptr<ossimPlanetKmlObject> obj;
+				if(kml)
+				{
+					obj = kml->kmlObject();
+				}
+            if(obj.valid())
+            {
+               ossimPlanetKmlObject* root = ossimPlanetKmlObject::getRoot(obj.get());
+//                if(root&&(root != obj.get()))
+//                {
+//                   ossimRefPtr<ossimXmlNode> tempNode = new ossimXmlNode;
+//                   obj->write(tempNode);
+//                   std::ostringstream out;
+                  
+//                   out << *tempNode;
+//                   mainWindow()->sendMessage(out.str(), "Data");
+//                }
+//                else if(root)
+               if(root)
+               {
+                  ossimPlanetKml* kml = dynamic_cast<ossimPlanetKml*>(root);
+                  if(!kml->isCompressed())
+                  {
+                     ossimFilename name = kml->filename();
+//                      if(name.ext() != "kmz")
+//                      {
+//                         name.file();
+                        if(std::find(kmlFiles.begin(), kmlFiles.end(), name.file()) == kmlFiles.end())
+                        {
+                           kmlFiles.push_back(name);
+                        }
+//                      }
+                  }
+               }
+            }
+         }
+         else
+         {
+            result->addChildNode(item->saveXml());
+         }
+      }
+      
+      ++iter;
+   }
+   {
+      std::ostringstream out;
+      
+      out << *result;
+      mainWindow()->sendMessage("", out.str(), "Data");
+   }
+   
+   if(!kmlFiles.empty())
+   {
+      ossim_uint32 idx = 0;
+      for(idx = 0; idx < kmlFiles.size(); ++idx)
+      {
+         std::ifstream in(kmlFiles[idx].c_str());
+         if(!in.fail())
+         {
+            std::vector<char> byteBuffer(kmlFiles[idx].fileSize());
+            in.read((char*)(&byteBuffer.front()), byteBuffer.size());
+            ossim_int64 bytesRead = in.gcount();
+            
+            std::ostringstream out;
+            out << "<ossimPlanetQtKml " << kmlFiles[idx].file() << ">";
+            out.write((char*)(&byteBuffer.front()), bytesRead);
+            mainWindow()->sendMessage("", out.str(), "Data");
+         }
+      }
+   }
+   
+}
+void ossimPlanetQtLegend::unselectItems()
+{
+   QTreeWidgetItemIterator iter(this, QTreeWidgetItemIterator::All);
+   while(*iter)
+   {
+      (*iter)->setSelected(false);
+      ++iter;
+   }
+}
+
+void ossimPlanetQtLegend::selectLayersContainingPosition(double lat, double lon, double /*hgt*/)
+{
+   QTreeWidgetItemIterator iter(this, QTreeWidgetItemIterator::All);
+   while(*iter)
+   {
+      ossimPlanetQtLegendTextureItem* item = dynamic_cast<ossimPlanetQtLegendTextureItem*>(*iter);
+
+      if(item)
+      {
+         osg::ref_ptr<ossimPlanetExtents> extents = item->getExtents();
+         if(extents.valid())
+         {
+            double minLat=extents->getMinLat(),
+               minLon=extents->getMinLon(),
+               maxLat=extents->getMaxLat(),
+               maxLon=extents->getMaxLon();
+            if(lat >= minLat && lat <= maxLat && lon >=minLon && lon <=maxLon)
+            {
+               if(!item->isSelected())
+               {
+                  item->setSelected(true);
+               }
+            }
+            else
+            {
+               if(item->isSelected())
+               {
+                  item->setSelected(false);
+               }
+               
+            }
+         }
+         else
+         {
+            item->setSelected(false);
+         }
+      }
+      else
+      {
+         (*iter)->setSelected(false);
+      }
+      ++iter;
+   }
+}
+
+bool ossimPlanetQtLegend::event(QEvent* e)
+{
+   switch(e->type())
+   {
+      case ossimPlanetQt::ANIMATION_EVENT_TYPE:
+      {
+         ossimPlanetQt::AnimationPathEvent* pathEvent = dynamic_cast<ossimPlanetQt::AnimationPathEvent*>(e);
+         if(pathEvent)
+         {
+            ossimString animationPath;
+            ossim_uint32 idx = 0;
+            ossimRefPtr<ossimXmlNode> node = new ossimXmlNode;
+            for(idx = 0; idx < pathEvent->animationPathCount();++idx)
+            {
+               pathEvent->animationPath(animationPath, idx);
+               if(!animationPath.empty())
+               {
+                  std::istringstream in(animationPath);
+                  if(node->read(in))
+                  {
+                     addAnimationPath(node);
+                  }
+               }
+            }
+         }
+         return true;
+      }
+      case ossimPlanetQt::LEGEND_XML_EVENT_TYPE:
+      {
+         ossimPlanetQt::LegendXmlEvent* xmlEvent = dynamic_cast<ossimPlanetQt::LegendXmlEvent*>(e);
+         if(xmlEvent)
+         {
+            addXml(xmlEvent->xmlNode());
+         }
+         return true;
+      }
+      case ossimPlanetQt::KML_FILE_EVENT_TYPE:
+      {
+         ossimPlanetQt::KmlFileEvent* kmlEvent = dynamic_cast<ossimPlanetQt::KmlFileEvent*>(e);
+         if(kmlEvent)
+         {
+            ossimFilename kmlFilename = kmlEvent->filename();
+            bool isKmlFile = false;
+            if(kmlFilename.ext() == "kmz")
+            {
+               isKmlFile = true;
+            }
+            else
+            {
+               std::ifstream in(kmlFilename.c_str(), std::ios::binary|std::ios::in);
+               if(!in.fail())
+               {
+                  char buf[1024];
+                  in.read(buf, 1024);
+                  if(in.gcount())
+                  {
+                     if(ossimString(buf,
+                                    buf + in.gcount()).contains("<kml"))
+                     {
+                        isKmlFile = true;
+                     }
+                  }
+               }
+            }
+            if(isKmlFile)
+            {
+               mainWindow()->kmlLayer()->addKml(kmlFilename);
+            }
+         }
+      }
+      case ossimPlanetQt::NODE_CALLBACK_EVENT_TYPE:
+      {
+         ossimPlanetQt::NodeCallbackEvent* callbackEvent = dynamic_cast<ossimPlanetQt::NodeCallbackEvent*>(e);
+
+         if(callbackEvent)
+         {
+            if(callbackEvent->nodeEventType() == ossimPlanetQt::NodeCallbackEvent::NodeEventType_ADD)
+            {
+					addNode(callbackEvent->node());
+            }
+            else if(callbackEvent->nodeEventType() ==  ossimPlanetQt::NodeCallbackEvent::NodeEventType_REMOVE)
+            {
+					removeNodeFromLegend(callbackEvent->node());  
+           }
+         }
+         return true;
+      }
+      case ossimPlanetQt::IMAGE_LAYER_EVENT:
+      {
+         ossimPlanetQt::ImageLayerEvent* imageLayerEvent = dynamic_cast<ossimPlanetQt::ImageLayerEvent*>(e);
+         if(imageLayerEvent)
+         {
+            switch(imageLayerEvent->actionType())
+            {
+               case ossimPlanetQt::ImageLayerEvent::ADD:
+               {
+						ossimPlanetQtLegendTextureItem* root = referenceTextureItem();
+						
+						if(root)
+						{
+							ossimPlanetTextureLayerGroup* group = root->layer()->asGroup();
+							if(group)
+							{
+								group->addTop(imageLayerEvent->layer().get());
+							}
+						}
+						break;
+               }
+					case ossimPlanetQt::ImageLayerEvent::ADDED:
+               {
+						bool indexedFlag = false;
+						{
+						  OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theTextureLayerIndexMapMutex);
+						
+							indexedFlag = theTextureLayerIndexMap.find(imageLayerEvent->layer().get()) != theTextureLayerIndexMap.end();
+						}
+						if(!indexedFlag)
+						{
+							ossimPlanetTextureLayerGroup* parent = imageLayerEvent->layer()->parent(0);
+							if(parent)
+							{
+								TextureLayerIndexMapType::iterator iter = theTextureLayerIndexMap.find(parent);
+								ossimPlanetQtLegendTextureItem* root = referenceTextureItem();
+
+								if(iter!=theTextureLayerIndexMap.end())
+								{
+									root = iter->second;
+								}
+								ossimPlanetQtLegendTextureItem* i = new ossimPlanetQtLegendTextureItem();
+								root->insertChild(0, i);
+								i->setLayer(imageLayerEvent->layer().get());
+								resizeColumnToContents(0);
+								resizeColumnToContents(1);
+							}
+						}
+						break;
+					}
+					case ossimPlanetQt::ImageLayerEvent::REMOVED:
+               {
+						//OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theTextureLayerIndexMapMutex);
+						//std::cout << "DOING REMOVED EVENT" << std::endl;
+						removeIndexMapping(imageLayerEvent->layer().get(), true);
+						break;
+					}
+            }
+         }
+         return true;
+      }
+      case ossimPlanetQt::NODE_PROPERTY_EVENT_TYPE:
+		{
+			ossimPlanetQt::NodePropertyEvent* nodePropertyEvent = dynamic_cast<ossimPlanetQt::NodePropertyEvent*>(e);
+			if(nodePropertyEvent&&nodePropertyEvent->node())
+			{
+				OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theNodeIndexMapMutex);
+				NodeIndexMapType::iterator iter = theNodeIndexMap.find(nodePropertyEvent->node());
+				if(iter!=theNodeIndexMap.end())
+				{
+					iter->second->propertyChanged(nodePropertyEvent->name());
+				}
+				return true;
+			}
+			break;
+		}
+      case ossimPlanetQt::LEGEND_ITEM_PROPERTY_EVENT:
+      {
+         ossimPlanetQt::LegendItemProperty* itemProperty = dynamic_cast<ossimPlanetQt::LegendItemProperty*>(e);
+         if(itemProperty&&itemProperty->item())
+         {
+            itemProperty->item()->propertyChanged(itemProperty->name());
+         }
+         return true;
+      }
+      default:
+      {
+         break;
+      }
+   }
+   
+   return QTreeWidget::event(e);
+}
+
+void ossimPlanetQtLegend::removeIndexMapping(osg::ref_ptr<ossimPlanetTextureLayer> layer,
+															bool deleteGuiItem)
+{
+	OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theTextureLayerIndexMapMutex);
+	TextureLayerIndexMapType::iterator iter = theTextureLayerIndexMap.find(layer.get());
+	if(iter != theTextureLayerIndexMap.end())
+	{
+		if(deleteGuiItem)
+		{
+			delete iter->second;
+		}
+		theTextureLayerIndexMap.erase(iter);
+	}
+}
+
+void ossimPlanetQtLegend::addIndexMapping(osg::ref_ptr<ossimPlanetTextureLayer> layer,
+														ossimPlanetQtLegendTextureItem* item)
+{
+	OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theTextureLayerIndexMapMutex);
+	if(layer.valid() && item)
+	{
+		theTextureLayerIndexMap[layer.get()] = item;
+	}
+}
+
+void ossimPlanetQtLegend::refreshSelectedItems()
+{
+   if(!theMainWindow) return;
+   QTreeWidgetItemIterator iter(this, QTreeWidgetItemIterator::Selected);
+   while(*iter)
+   {
+      QTreeWidgetItem* item = *iter;
+      ossimPlanetQtLegendTextureItem* legendItem = dynamic_cast<ossimPlanetQtLegendTextureItem*>(item);
+      ++iter;
+      if(legendItem)
+      {
+         legendItem->layer()->notifyRefreshExtent(legendItem->layer()->getExtents());
+//          theMainWindow->refreshLandTextures(legendItem->layer()->getExtents().get(),
+//                                             ossimPlanetPagedLandLodRefreshType_TEXTURE);         
+      }
+   }
+}
+
+void ossimPlanetQtLegend::keyPressEvent ( QKeyEvent * event )
+{
+   switch(event->key())
+   {
+      case Qt::Key_Delete:
+      {
+         if(QMessageBox::question(this, "Delete Items", "Do you wish to delete the currently\nselected items?", QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes) == QMessageBox::Yes)
+         {
+            deleteSelectedItems();
+         }
+         break;
+      }
+   }
+}
+
+void ossimPlanetQtLegend::mousePressEvent(QMouseEvent *e)
+{
+   if (e->button() == Qt::LeftButton)
+   {
+      theLastPressPos = e->pos();
+      theMouseDragFlag = false;
+      theMousePressFlag = true;
+//       e->setAccepted(false);
+   }
+   else if(e->button() == Qt::RightButton)
+   {
+      thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_STRETCH_NONE].theMenuItemId]->setEnabled(false);
+      thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_STRETCH_LINEAR_AUTO_MIN_MAX].theMenuItemId]->setEnabled(false);
+      thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_STRETCH_1STD].theMenuItemId]->setEnabled(false);
+      thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_STRETCH_2STD].theMenuItemId]->setEnabled(false);
+      thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_STRETCH_3STD].theMenuItemId]->setEnabled(false);
+      QTreeWidgetItem *destItem = itemAt(e->pos());
+      ossimPlanetQtLegendTextureItem* destination = dynamic_cast<ossimPlanetQtLegendTextureItem*>(destItem);
+      ossimPlanetQtLegendAnimationPathItem* animationPathItem = dynamic_cast<ossimPlanetQtLegendAnimationPathItem*>(destItem);
+      if(destination)
+      {
+         ossimPlanetOssimImageLayer* imageLayer = dynamic_cast<ossimPlanetOssimImageLayer*>(destination->layer().get());
+         if(dynamic_cast<ossimPlanetWmsImageLayer*>(destination->layer().get()))
+         {
+            thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_CLEAR_DISK_CACHE].theMenuItemId]->setEnabled(true);
+         }
+         else
+         {
+            thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_CLEAR_DISK_CACHE].theMenuItemId]->setEnabled(false);
+         }
+         if(!(destination->flags()&Qt::ItemIsEditable))
+         {
+            thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_EDIT].theMenuItemId]->setEnabled(false);
+            
+         }
+         thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_TOUR_SELECTED_ITEMS].theMenuItemId]->setEnabled(false);
+         theItemPopup->popup(QPoint(e->globalX(),
+                                    e->globalY()));
+         thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_LOOKAT_SET_TO_DEFAULT].theMenuItemId]->setEnabled(true);
+         thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_LOOKAT_SET_TO_CURRENT_VIEW].theMenuItemId]->setEnabled(true);
+         thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_LOOKAT_SET_TO_CURRENT_ORIENTATION].theMenuItemId]->setEnabled(true);
+         thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_LOOKAT_SET_TO_CURRENT_RANGE].theMenuItemId]->setEnabled(true);
+         thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_STRETCH_NONE].theMenuItemId]->setEnabled(true);
+         thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_STRETCH_LINEAR_AUTO_MIN_MAX].theMenuItemId]->setEnabled(true);
+         thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_STRETCH_1STD].theMenuItemId]->setEnabled(true);
+         thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_STRETCH_2STD].theMenuItemId]->setEnabled(true);
+         thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_STRETCH_3STD].theMenuItemId]->setEnabled(true);
+         if(imageLayer)
+         {
+            thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_STRETCH_NONE].theMenuItemId]->setEnabled(true);
+            thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_STRETCH_LINEAR_AUTO_MIN_MAX].theMenuItemId]->setEnabled(true);
+         }
+      }
+      else if(animationPathItem)
+      {
+         thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_CLEAR_DISK_CACHE].theMenuItemId]->setEnabled(false);
+         thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_TOUR_SELECTED_ITEMS].theMenuItemId]->setEnabled(false);
+         thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_ENABLE].theMenuItemId]->setEnabled(false);
+         thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_DISABLE].theMenuItemId]->setEnabled(false);
+         thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_REFRESH].theMenuItemId]->setEnabled(false);
+         thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_LOOKAT_SET_TO_DEFAULT].theMenuItemId]->setEnabled(false);
+         thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_LOOKAT_SET_TO_CURRENT_VIEW].theMenuItemId]->setEnabled(false);
+         thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_LOOKAT_SET_TO_CURRENT_ORIENTATION].theMenuItemId]->setEnabled(false);
+         thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_LOOKAT_SET_TO_CURRENT_RANGE].theMenuItemId]->setEnabled(false);
+         
+         theItemPopup->popup(QPoint(e->globalX(),
+                                    e->globalY()));
+      }
+      else
+      {
+         thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_CLEAR_DISK_CACHE].theMenuItemId]->setEnabled(false);
+         thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_TOUR_SELECTED_ITEMS].theMenuItemId]->setEnabled(false);
+         thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_ENABLE].theMenuItemId]->setEnabled(true);
+         thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_DISABLE].theMenuItemId]->setEnabled(true);
+         thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_REFRESH].theMenuItemId]->setEnabled(true);
+         thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_LOOKAT_SET_TO_DEFAULT].theMenuItemId]->setEnabled(true);
+         thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_LOOKAT_SET_TO_CURRENT_VIEW].theMenuItemId]->setEnabled(true);
+         thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_LOOKAT_SET_TO_CURRENT_ORIENTATION].theMenuItemId]->setEnabled(true);
+         thePopupMenuActions[legendMenuInfo[LegendPopupMenuId_LOOKAT_SET_TO_CURRENT_RANGE].theMenuItemId]->setEnabled(true);
+         
+         theItemPopup->popup(QPoint(e->globalX(),
+                                    e->globalY()));
+         
+      }
+//       QTreeWidgetItem* item = itemAt(e->pos());
+//       setCurrentItem(item);
+//       e->setAccepted(true);
+      theMouseDragFlag = false;
+      theMousePressFlag = false;
+   }
+      QTreeWidget::mousePressEvent(e);
+   
+}
+
+void ossimPlanetQtLegend::mouseMoveEvent(QMouseEvent * /*e*/)
+{
+    if(theMousePressFlag)
+    {
+       // set the cursor one time and say we are dragging
+       theMouseDragFlag  = true;
+       theMousePressFlag = false;
+
+	// remember item we've pressed as the one being moved
+	// and where it was originally
+// 	QTreeWidgetItem* item = itemAt(theLastPressPos);
+// 	if(item)
+	{
+// 	    theItemBeingMoved = item; 
+	    setCursor(Qt::SizeVerCursor);
+	}
+    }
+}
+
+void ossimPlanetQtLegend::mouseReleaseEvent(QMouseEvent * e)
+{
+  setCursor(QCursor(Qt::ArrowCursor));
+
+  if(e->button() == Qt::LeftButton)//theItemBeingMoved)
+  {
+     if(theMouseDragFlag)
+     {
+        QTreeWidgetItem *destItem = itemAt(e->pos());
+        ossimPlanetQtLegendTextureItem* destination = dynamic_cast<ossimPlanetQtLegendTextureItem*>(destItem);
+        
+        if(destination)
+        {
+           moveSelectedTexturesTo(destination);
+        }
+        theMouseDragFlag = false;
+     }
+  }
+  else if(e->button() == Qt::RightButton)
+  {
+//      e->setAccepted(true);
+  }
+  else
+  {
+//      e->setAccepted(false);
+//      QTreeWidget::mouseReleaseEvent(e);
+  }
+  QTreeWidget::mouseReleaseEvent(e);
+}
+
+void ossimPlanetQtLegend::moveTextureItemFromTo(ossimPlanetQtLegendTextureItem* itemBeingMoved,
+                                                ossimPlanetQtLegendTextureItem* destination)
+{
+   if(!itemBeingMoved||!destination) return;
+   bool itemBeingMovedExpanded = isItemExpanded(itemBeingMoved);
+   if(itemBeingMoved->parent()&&(itemBeingMoved != destination))
+   {
+      ossimPlanetQtLegendTextureItem* itemBeingMovedParent = dynamic_cast<ossimPlanetQtLegendTextureItem*>(itemBeingMoved->parent());
+      ossimPlanetQtLegendTextureItem* destinationParent    = dynamic_cast<ossimPlanetQtLegendTextureItem*>(destination->parent());
+      bool needRefreshing = true;
+      if(itemBeingMovedParent&&destinationParent)
+      {
+         itemBeingMovedParent->takeChild(itemBeingMovedParent->indexOfChild(itemBeingMoved));
+         int idx = destinationParent->indexOfChild(destination);
+         
+         if((idx >=0) && (idx < destinationParent->childCount()))
+         {
+            if(isItemExpanded(destination))
+            {
+               destination->insertChild(0, itemBeingMoved);
+               itemBeingMovedParent->layer()->asGroup()->removeLayer(itemBeingMoved->layer(), false);
+               destination->layer()->asGroup()->addTop(itemBeingMoved->layer().get(), false);
+               destination->layer()->asGroup()->notifyRefreshExtent(itemBeingMoved->layer()->getExtents());
+            }
+            else
+            {
+               if((idx+1) >= destinationParent->childCount()) // adding to the end of the list
+               {
+                 destinationParent->addChild(itemBeingMoved);
+                  itemBeingMovedParent->layer()->asGroup()->removeLayer(itemBeingMoved->layer(), false);
+                  destinationParent->layer()->asGroup()->addBottom(itemBeingMoved->layer().get(), false);
+               }
+               else // inserting a child
+               {
+                  itemBeingMovedParent->layer()->asGroup()->removeLayer(itemBeingMoved->layer(), false);
+                  destinationParent->insertChild(idx+1, itemBeingMoved);
+                  destinationParent->layer()->asGroup()->addAfterLayer(destination->layer().get(),
+                                                                       itemBeingMoved->layer().get(), false);
+                  destinationParent->layer()->asGroup()->notifyRefreshExtent(itemBeingMoved->layer()->getExtents());
+               }
+            }
+         }
+      }
+      else if(!destination->parent())// it's a root item
+      {
+         if(itemBeingMovedParent->takeChild(itemBeingMovedParent->indexOfChild(itemBeingMoved))==itemBeingMoved)
+         {
+            destination->insertChild(0, itemBeingMoved);
+            itemBeingMovedParent->layer()->asGroup()->removeLayer(itemBeingMoved->layer(), false);
+            destination->layer()->asGroup()->addTop(itemBeingMoved->layer().get(), false);
+            destination->layer()->asGroup()->notifyRefreshExtent(itemBeingMoved->layer()->getExtents());
+         }
+      }
+      else
+      {
+         needRefreshing = false;
+      }
+      if(itemBeingMovedExpanded)
+      {
+         setItemExpanded(itemBeingMoved, itemBeingMovedExpanded);
+      }
+   }
+}
+
+void ossimPlanetQtLegend::moveSelectedTexturesTo(ossimPlanetQtLegendTextureItem* destination)
+{
+   if(!destination) return;
+   // 
+   if(destination->isSelected())
+   {
+      // for now we will not allow this.
+   }
+   else
+   {
+      // find actual items to move.  So we have to make sure we remove all item correctly
+      // and avoid circular problems.  So if a child and it's parent is selscted this will be a no no.
+      //
+      QList<QTreeWidgetItem*> itemsToMove = selectedItems();
+      QList<QTreeWidgetItem*>::iterator iter = itemsToMove.begin();
+      while(iter != itemsToMove.end())
+      {
+         if(dynamic_cast<ossimPlanetQtLegendTextureItem*>(*iter))
+         {
+            if((*iter)->parent())
+            {
+               if((*iter)->parent()->isSelected())
+               {
+                  (*iter)->parent()->setSelected(false);
+               }
+            }
+         }
+         else
+         {
+            (*iter)->setSelected(false);
+         }
+         
+         ++iter;
+      }
+      itemsToMove = selectedItems();
+      iter = itemsToMove.begin();
+      ossimPlanetQtLegendTextureItem* to = destination;
+      while(iter != itemsToMove.end())
+      {
+         ossimPlanetQtLegendTextureItem* from = dynamic_cast<ossimPlanetQtLegendTextureItem*>(*iter);
+         if(from)
+         {
+            moveTextureItemFromTo(from, to);
+            if(to->parent() || to->isExpanded())
+            {
+               to = from;
+            }
+         }
+         (*iter)->setSelected(true);
+         ++iter;
+      }
+   }
+}
+
+ossimPlanetQtLegendNodeItem* ossimPlanetQtLegend::getParentNodeItem(ossimPlanetNode* node, ossimPlanetQtLegendNodeItem* defaultValue)
+{
+   ossimPlanetQtLegendNodeItem* result = defaultValue;
+   if(node)
+   {
+      ossimPlanetNode* parentNode = 0;
+      if((node->getNumParents()>0)&&node->getParent(0))
+      {
+         parentNode  = dynamic_cast<ossimPlanetNode*>(node->getParent(0));
+      }
+      NodeIndexMapType::iterator iter = theNodeIndexMap.end();
+      if(parentNode)
+      {
+         iter = theNodeIndexMap.find(parentNode);
+         if(iter != theNodeIndexMap.end())
+         {
+            if(iter->second)
+            {
+               result = iter->second;
+            }
+         }
+      }
+   }
+   
+   return result;
+}
+
+void ossimPlanetQtLegend::dropEvent ( QDropEvent * event )
+{
+	if(event->mimeData()->hasUrls())
+   {
+      osg::ref_ptr<ossimPlanetExtents> extents = 0;
+      event->acceptProposedAction();
+      QList<QUrl> urls = event->mimeData()->urls();
+      std::vector<ossimFilename> sessionFiles;
+      std::vector<ossimFilename> kmlFiles;
+      std::vector<ossimFilename> plwCityFiles;
+      std::vector<ossimFilename> videoFiles;
+      QList<QUrl>::iterator i = urls.begin();
+      
+      while(i != urls.end())
+      {         
+
+         ossimFilename file(i->toLocalFile().toStdString().c_str());
+         ossimString ext = file.ext();
+         ext = ext.downcase();
+         if((ext == "kml")||
+            (ext == "kmz"))         
+         {
+            kmlFiles.push_back(file);
+            i = urls.erase(i);
+         }
+         else if((ext == "mpeg") ||
+                 (ext == "mpg") ||
+                 (ext == "mp4")||
+                 (ext == "m2p")||
+                 (ext == "mpv")||
+                 (ext == "m2v"))
+         {
+            videoFiles.push_back(file);
+            i = urls.erase(i);
+         }
+         else if(file.empty())
+         {
+            i = urls.erase(i);
+         }
+         else
+         {
+            
+            ifstream in(file.c_str(), std::ios::binary|std::ios::in);
+            if(in)
+            {
+               char buf[1000];
+               in.read(buf, 1000);
+               int count = in.gcount();
+               if(count > 0)
+               {
+                  ossimString header(buf, buf+count);
+                  
+                  if(header.contains("<ossimPlanetQt>"))
+                  {
+                     sessionFiles.push_back(ossimFilename(file.c_str()));
+                     i = urls.erase(i);
+                  }
+                  else if(ossimString(header.begin(),
+                                      header.begin() + 12) == "origin_WGS84")
+                  {
+                     plwCityFiles.push_back(ossimFilename(file.c_str()));
+                     i = urls.erase(i);
+                  }
+                  else
+                  {
+                     ++i;
+                  }
+               }
+               else
+               {
+                  ++i;
+               }
+               in.close();
+            }
+            else
+            {
+               ++i;
+            }
+         }
+      }
+		i = urls.begin();
+		while(i != urls.end())
+		{
+			mainWindow()->activityWindow()->theActivityWidget->addOperation(new ossimPlanetQtOpenImageFileOperation(i->toLocalFile(), this)); 
+			++i;
+		}
+		
+      ossim_uint32 idx = 0;
+      for(idx = 0; idx < kmlFiles.size(); ++idx)
+      {
+         ossimFilename kmlFilename = kmlFiles[idx];
+         bool isKmlFile = false;
+         ossimString ext = kmlFilename.ext();
+         ext = ext.downcase();
+         if(ext == "kmz")
+         {
+            isKmlFile = true;
+         }
+         else
+         {
+            std::ifstream in(kmlFilename.c_str(), std::ios::binary|std::ios::in);
+            if(!in.fail())
+            {
+               char buf[1024];
+               in.read(buf, 1024);
+               if(in.gcount())
+               {
+                  if(ossimString(buf,
+                                 buf + in.gcount()).contains("<kml"))
+                  {
+                     isKmlFile = true;
+                  }
+               }
+            }
+         }
+         if(isKmlFile)
+         {
+            mainWindow()->kmlLayer()->addKml(kmlFilename);
+         }
+      }
+#if 0
+      for(idx = 0; idx < plwCityFiles.size(); ++idx)
+      {
+         mainWindow()->kmlLayer()->addCityDatabase(plwCityFiles[idx]);
+      }
+#endif
+      for(idx = 0; idx < videoFiles.size();++idx)
+      {
+         mainWindow()->videoLayer()->add(videoFiles[idx]);
+      }
+   }
+   else
+   {
+      if(event->mimeData()->hasText())
+      {
+      }
+   }
+}
+
+void ossimPlanetQtLegend::dragEnterEvent(QDragEnterEvent *event)
+{
+   if (event->mimeData()->hasUrls()||
+       event->mimeData()->hasText())
+   {
+     event->acceptProposedAction();
+   }
+}
+
+void ossimPlanetQtLegend::popupMenuTriggered(QAction *action)
+{
+   if(action->text() == legendMenuInfo[LegendPopupMenuId_EDIT].theMenuItem)
+   {
+      editSelectedItem();
+   }
+   else if(action->text() == legendMenuInfo[LegendPopupMenuId_DELETE].theMenuItem)
+   {
+      if(QMessageBox::question(this, "Delete Items", "Do you wish to delete the currently\nselected items?", QMessageBox::Yes| QMessageBox::No, QMessageBox::Yes) == QMessageBox::Yes)
+      {
+         deleteSelectedItems();
+      }
+   }
+   else if(action->text() == legendMenuInfo[LegendPopupMenuId_CLEAR_DISK_CACHE].theMenuItem)
+   {
+      if(QMessageBox::question(this, "Clear Disk Cache ", "Do you wish to clear any associated disk cache for this layer?", QMessageBox::Yes| QMessageBox::No, QMessageBox::Yes) == QMessageBox::Yes)
+      {
+         clearDiskCacheOnSelectedItems();
+      }      
+   }
+   else if(action->text() == legendMenuInfo[LegendPopupMenuId_REFRESH].theMenuItem)
+   {
+      refreshSelectedItems();
+   }
+   else if(action->text() == legendMenuInfo[LegendPopupMenuId_GROUP].theMenuItem)
+   {
+      groupSelectedItems();
+   }
+   else if(action->text() ==  legendMenuInfo[LegendPopupMenuId_ENABLE].theMenuItem)
+   {
+      setEnableFlagOnSelectedItems(true);
+   }
+   else if(action->text() ==  legendMenuInfo[LegendPopupMenuId_DISABLE].theMenuItem)
+   {
+      setEnableFlagOnSelectedItems(false);
+   }
+   else if(action->text() == legendMenuInfo[LegendPopupMenuId_LOOKAT_SET_TO_DEFAULT].theMenuItem)
+   {
+      setLookAtForSelectedItems(0);
+   }
+   else if(action->text() == legendMenuInfo[LegendPopupMenuId_LOOKAT_SET_TO_CURRENT_VIEW].theMenuItem)
+   {
+      setLookAtForSelectedItems(theMainWindow->getLookAt()->clone());	
+   }
+   else if(action->text() == legendMenuInfo[LegendPopupMenuId_LOOKAT_SET_TO_CURRENT_ORIENTATION].theMenuItem)
+   {
+      setLookAtToCurrentOrientationForSelectedItems(theMainWindow->getLookAt()->clone());
+   }
+   else if(action->text() == legendMenuInfo[LegendPopupMenuId_LOOKAT_SET_TO_CURRENT_RANGE].theMenuItem)
+   {
+      setLookAtToCurrentRangeForSelectedItems(theMainWindow->getLookAt()->range());     
+   }
+   else if((action->text() == legendMenuInfo[LegendPopupMenuId_STRETCH_LINEAR_AUTO_MIN_MAX].theMenuItem)||
+           (action->text() == legendMenuInfo[LegendPopupMenuId_STRETCH_NONE].theMenuItem)||
+           (action->text() == legendMenuInfo[LegendPopupMenuId_STRETCH_1STD].theMenuItem)||
+           (action->text() == legendMenuInfo[LegendPopupMenuId_STRETCH_2STD].theMenuItem)||
+           (action->text() == legendMenuInfo[LegendPopupMenuId_STRETCH_3STD].theMenuItem))
+   {
+      setHistogrmaStretchModeForSelectedItems(action->text());
+   }
+   else if(action->text() == legendMenuInfo[LegendPopupMenuId_TOUR_SELECTED_ITEMS].theMenuItem)
+   {
+   }
+   else if(action->text() == legendMenuInfo[LegendPopupMenuId_SYNCH].theMenuItem)
+   {
+      synchSelectedItems();     
+   }
+}
+
+void ossimPlanetQtLegend::expanded(QTreeWidgetItem * /*item*/)
+{
+   resizeColumnToContents(0);
+   resizeColumnToContents(1);
+}
+
+void ossimPlanetQtLegend::collapsed(QTreeWidgetItem * /*item*/)
+{
+   resizeColumnToContents(0);
+   resizeColumnToContents(1);
+}
+
diff --git a/ossimPlanetQt/src/gui/ossimPlanetQtLegendAnimationPathItem.cpp b/ossimPlanetQt/src/gui/ossimPlanetQtLegendAnimationPathItem.cpp
new file mode 100644
index 0000000..8f24398
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ossimPlanetQtLegendAnimationPathItem.cpp
@@ -0,0 +1,120 @@
+#include <ossimPlanetQt/ossimPlanetQtLegendAnimationPathItem.h>
+#include <sstream>
+#include <ossimPlanet/ossimPlanetAction.h>
+
+ossimPlanetQtLegendAnimationPathItem::ossimPlanetQtLegendAnimationPathItem(QTreeWidgetItem* item,
+                                                               const QString& name)
+   :ossimPlanetQtLegendItem(item, name)
+{
+   setFlags(Qt::ItemIsEditable| Qt::ItemIsEnabled| Qt::ItemIsSelectable);
+}
+
+
+ossimPlanetQtLegendAnimationPathItem::ossimPlanetQtLegendAnimationPathItem(QTreeWidget* treeWidget,
+                                                               const QString& s)
+   :ossimPlanetQtLegendItem(treeWidget, s)
+{
+   setFlags(Qt::ItemIsEditable| Qt::ItemIsEnabled| Qt::ItemIsSelectable);
+}
+
+ossimPlanetQtLegendAnimationPathItem::ossimPlanetQtLegendAnimationPathItem()
+   :ossimPlanetQtLegendItem()
+{
+   setFlags(Qt::ItemIsEditable| Qt::ItemIsEnabled| Qt::ItemIsSelectable);
+}
+
+void ossimPlanetQtLegendAnimationPathItem::deleteLayer(bool deleteThis)
+{
+   if(deleteThis)
+   {
+      delete this;
+   }
+}
+
+ossimRefPtr<ossimXmlNode> ossimPlanetQtLegendAnimationPathItem::saveXml()const
+{
+   ossimRefPtr<ossimXmlNode> result = new ossimXmlNode;
+   
+   result->setTag("AnimationPath");
+   result->addChildNode("name",
+                        text(0).toStdString());
+  
+   std::ostringstream out;
+   if(theAnimationPath.valid()&&!theAnimationPath->empty())
+   {
+      theAnimationPath->write(out);
+
+      result->addChildNode("path",
+                           out.str());
+   }
+
+   return result;
+}
+
+void ossimPlanetQtLegendAnimationPathItem::loadXml(ossimRefPtr<ossimXmlNode> node,
+                                             std::vector<ossimPlanetOperation*>& activityList)
+{
+   if(!node.valid()) return;
+   ossimString tempValue;
+
+   if(node->getChildTextValue(tempValue, "name"))
+   {
+      setText(0, tempValue.c_str());
+   }
+   if(node->getChildTextValue(tempValue, "path"))
+   {   
+      setAnimationPathFromString(tempValue);
+   }  
+}
+
+const osg::ref_ptr<ossimPlanetLookAt> ossimPlanetQtLegendAnimationPathItem::getLookAt()const
+{
+   return 0;
+}
+
+void ossimPlanetQtLegendAnimationPathItem::setLookAt(osg::ref_ptr<ossimPlanetLookAt> lookAt)
+{
+}
+
+const osg::ref_ptr<ossimPlanetExtents> ossimPlanetQtLegendAnimationPathItem::getExtents()const
+{
+   return 0;
+}
+
+void ossimPlanetQtLegendAnimationPathItem::setAnimationPath(osg::ref_ptr<osg::AnimationPath> animationPath)
+{
+   theAnimationPath = animationPath;
+}
+
+osg::ref_ptr<osg::AnimationPath> ossimPlanetQtLegendAnimationPathItem::animationPath()
+{
+   return theAnimationPath;
+}
+
+void ossimPlanetQtLegendAnimationPathItem::getAnimationPathAsString(std::string& animationPath)
+{
+   std::ostringstream out;
+
+   animationPath = "";
+   if(theAnimationPath.valid()&&(!theAnimationPath->empty()))
+   {
+      theAnimationPath->write(out);
+      animationPath = out.str();
+   }
+}
+
+void ossimPlanetQtLegendAnimationPathItem::setAnimationPathFromString(const std::string& animationPath)
+{
+   std::istringstream in(animationPath);
+   
+   if(!theAnimationPath)
+   {
+      theAnimationPath = new osg::AnimationPath;
+   }
+   else
+   {
+      theAnimationPath->getTimeControlPointMap().clear();
+   }
+
+   theAnimationPath->read(in);
+}
diff --git a/ossimPlanetQt/src/gui/ossimPlanetQtLegendItem.cpp b/ossimPlanetQt/src/gui/ossimPlanetQtLegendItem.cpp
new file mode 100644
index 0000000..0a6dccb
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ossimPlanetQtLegendItem.cpp
@@ -0,0 +1,63 @@
+#include <ossimPlanetQt/ossimPlanetQtLegendItem.h>
+#include <ossimPlanetQt/ossimPlanetQtLegend.h>
+ossimPlanetQtLegendItem::ossimPlanetQtLegendItem(QTreeWidgetItem* item,
+                                                 const QString& name)
+   :QTreeWidgetItem(item)
+{
+   setText(0, name);
+}
+
+ossimPlanetQtLegendItem::ossimPlanetQtLegendItem(QTreeWidget* tWidget,
+                                                 const QString& s)
+   :QTreeWidgetItem(tWidget)
+{
+   setText(0, s);
+}
+ 
+ossimPlanetQtLegendItem::ossimPlanetQtLegendItem()
+   :QTreeWidgetItem()
+{
+}
+
+const ossimPlanetQtLegend* ossimPlanetQtLegendItem::legend() const
+{
+   return dynamic_cast<const ossimPlanetQtLegend*>(treeWidget());
+}
+
+ossimPlanetQtLegend* ossimPlanetQtLegendItem::legend() 
+{
+   return dynamic_cast<ossimPlanetQtLegend*>(treeWidget());
+}
+
+void ossimPlanetQtLegendItem::changed()
+{
+}
+
+void ossimPlanetQtLegendItem::recursiveAdd(QTreeWidgetItem* parent,
+                                           const ossimRefPtr<ossimXmlNode> node)
+{
+   if(!node.valid())
+   {
+      return;
+   }
+   const std::vector<ossimRefPtr<ossimXmlNode> >& childNodes = node->getChildNodes();
+   if(childNodes.size() == 0)
+   {
+      QTreeWidgetItem* item = new QTreeWidgetItem(parent);
+      item->setText(0, node->getTag().c_str());
+      item->setText(1, node->getText().c_str());
+   }
+   else
+   {
+      ossim_uint32 idx = 0;
+      ossim_uint32 idxMax = 0;
+      idxMax = childNodes.size();
+      QTreeWidgetItem* item = new QTreeWidgetItem(parent);
+      item->setText(0, node->getTag().c_str());
+      item->setText(1, node->getText().c_str());
+      for(idx = 0; idx < idxMax; ++idx)
+      {         
+         recursiveAdd(item, childNodes[idx]);
+      }
+   }
+}
diff --git a/ossimPlanetQt/src/gui/ossimPlanetQtLegendKmlItem.cpp b/ossimPlanetQt/src/gui/ossimPlanetQtLegendKmlItem.cpp
new file mode 100644
index 0000000..1ae2b96
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ossimPlanetQtLegendKmlItem.cpp
@@ -0,0 +1,163 @@
+#include <ossimPlanetQt/ossimPlanetQtLegendKmlItem.h>
+//#include <ossimPlanet/ossimPlanetLand.h>
+#include <ossimPlanet/ossimPlanetGeoRefModel.h>
+#include <ossimPlanetQt/ossimPlanetQtLegend.h>
+#include <ossimPlanetQt/ossimPlanetQtMainWindow.h>
+
+ossimPlanetQtLegendKmlItem::ossimPlanetQtLegendKmlItem(QTreeWidgetItem* item,
+                                                       const QString& name)
+   :ossimPlanetQtLegendNodeItem(item, name)
+{
+   setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsSelectable);
+   setCheckState (0, Qt::Checked);
+}
+
+ossimPlanetQtLegendKmlItem::ossimPlanetQtLegendKmlItem(QTreeWidget* treeWidget,
+                                                       const QString& s)
+   :ossimPlanetQtLegendNodeItem(treeWidget, s)
+{
+   setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsSelectable);
+   setCheckState (0, Qt::Checked);
+}
+
+ossimPlanetQtLegendKmlItem::ossimPlanetQtLegendKmlItem()
+   :ossimPlanetQtLegendNodeItem()
+{
+   setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsSelectable);
+   setCheckState (0, Qt::Checked);
+}
+
+void ossimPlanetQtLegendKmlItem::setLayer(osg::ref_ptr<ossimPlanetNode> kml)
+{
+	ossimPlanetQtLegendNodeItem::setLayer(kml.get());
+   if(kmlLayerNode())
+   {
+      ossimPlanetKmlFeature* feature = dynamic_cast<ossimPlanetKmlFeature*>(kmlLayerNode()->kmlObject().get());
+      
+      if(feature)
+      {
+         setText(0, feature->name().c_str());
+         osg::ref_ptr<ossimPlanetGeoRefModel> model = legend()->mainWindow()->planet()->model();
+         if(feature->lookAt().valid()&&
+				feature->lookAt()->lookAt().valid())
+         {
+            setLookAt(feature->lookAt()->lookAt());
+            if(theLookAt->altitudeMode() == ossimPlanetAltitudeMode_CLAMP_TO_GROUND)
+            {
+               if(model.valid())
+               {
+                  theLookAt->setAltitude(model->getHeightAboveEllipsoid(theLookAt->lat(),
+                                                                        theLookAt->lon()));
+               }
+            }
+            else if(theLookAt->altitudeMode() == ossimPlanetAltitudeMode_RELATIVE_TO_GROUND)
+            {
+               if(model.valid())
+               {
+                  theLookAt->setAltitude(model->getHeightAboveEllipsoid(theLookAt->lat(),
+                                                                        theLookAt->lon()));
+               }               
+            }
+         }
+         else
+         {
+            double lat, lon, h;
+            if(feature->getCenter(lat, lon, h))
+            {
+               theLookAt = new ossimPlanetLookAt;
+               theLookAt->setAll(lat, lon,
+                                 model->getHeightAboveEllipsoid(lat,lon),
+                                 0, 45, 0, 4000);
+             }
+         }
+      }
+      else
+      {
+			ossimPlanetKmlLayerNode* kmlNode = dynamic_cast<ossimPlanetKmlLayerNode*>(kml.get());
+			ossimPlanetKml* kmlRoot = 0;
+			if(kmlNode)
+			{
+				kmlRoot = dynamic_cast<ossimPlanetKml*>(kmlNode->kmlObject().get());
+			}
+         if(kmlRoot)
+         {
+            setText(0, kmlRoot->filename().file().c_str()); 
+         }
+      }
+      ossim_uint32 idx = 0;
+      ossim_uint32 bound = kml->getNumChildren();
+      for(idx = 0; idx < bound; ++idx)
+      {
+         ossimPlanetKmlLayerNode* layerNode = dynamic_cast<ossimPlanetKmlLayerNode*>(kml->getChild(idx));
+         if(layerNode)
+         {
+            ossimPlanetQtLegendKmlItem* item = new ossimPlanetQtLegendKmlItem(this, "");
+            item->setLayer(layerNode);
+         }
+      }
+   }
+   else
+   {
+      theLookAt = 0;
+   }
+}
+
+void ossimPlanetQtLegendKmlItem::changed()
+{
+   if(kmlLayerNode())
+   {
+      bool checked = (checkState(0) !=Qt::Unchecked);
+      if(checked!=kmlLayerNode()->enableFlag())
+      {
+         kmlLayerNode()->setEnableFlag(checked);
+         ossimPlanetLayer* layer = ossimPlanetLayer::findLayer(kmlLayerNode());
+         if(layer)
+         {
+            layer->setRedrawFlag(true);
+         }
+      }
+   }
+}
+
+
+ossimRefPtr<ossimXmlNode> ossimPlanetQtLegendKmlItem::saveXml()const
+{
+   ossimRefPtr<ossimXmlNode> childNode = new ossimXmlNode;
+   
+   childNode->setTag("ossimPlanetKml");
+   childNode->addChildNode("name", text(0).toStdString());
+   
+   std::cout << "NEED TO IMPLEMENT ossimPlanetQtLegendKmlItem::saveXml()!!!" << std::endl;
+
+   return childNode.get();
+}
+
+void ossimPlanetQtLegendKmlItem::loadXml(ossimRefPtr<ossimXmlNode> node,
+                                         std::vector<ossimPlanetOperation*>& activityList)
+{
+   ossimRefPtr<ossimXmlNode> enabled = node->findFirstNode("enableFlag");
+   ossimRefPtr<ossimXmlNode> name    = node->findFirstNode("name");
+   if(!enabled.valid())
+   {
+      enabled =  node->findFirstNode("enabled");
+   }
+   if(enabled.valid())
+   {
+   }
+
+   if(name.valid())
+   {
+      setText(0, name->getText().c_str());
+   }
+   std::cout << "NEED TO IMPLEMENT ossimPlanetQtLegendKmlItem::loadXml()!!!" << std::endl;
+}
+
+ossimPlanetKmlLayerNode* ossimPlanetQtLegendKmlItem::kmlLayerNode()
+{
+	return dynamic_cast<ossimPlanetKmlLayerNode*>(theLayerNode.get());
+}
+
+const ossimPlanetKmlLayerNode* ossimPlanetQtLegendKmlItem::kmlLayerNode()const
+{
+	return dynamic_cast<const ossimPlanetKmlLayerNode*>(theLayerNode.get());
+}
diff --git a/ossimPlanetQt/src/gui/ossimPlanetQtLegendNodeItem.cpp b/ossimPlanetQt/src/gui/ossimPlanetQtLegendNodeItem.cpp
new file mode 100644
index 0000000..5d7b53d
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ossimPlanetQtLegendNodeItem.cpp
@@ -0,0 +1,192 @@
+#include <ossimPlanetQt/ossimPlanetQtLegendNodeItem.h>
+#include <QtGui/QApplication>
+#include <ossimPlanetQt/ossimPlanetQtEvent.h>
+#include <ossimPlanetQt/ossimPlanetQtLegend.h>
+#include <QtGui/QApplication>
+
+ossimPlanetQtLegendNodeItem::NodeCallback::NodeCallback(ossimPlanetQtLegendNodeItem* item)
+:theItem(item)
+{
+}
+
+void ossimPlanetQtLegendNodeItem::NodeCallback::propertyChanged(ossimPlanetNode* node,
+																					 const ossimString& name)
+{
+	if(!theItem) return;
+	if(theItem->legend())
+	{
+		QApplication::postEvent(theItem->legend(), new ossimPlanetQt::NodePropertyEvent(node, name));
+	}
+}
+
+void ossimPlanetQtLegendNodeItem::NodeCallback::destructingNode(ossimPlanetNode* node)
+{
+}
+
+void ossimPlanetQtLegendNodeItem::NodeCallback::needsRedraw(ossimPlanetNode* node)
+{
+}
+
+void ossimPlanetQtLegendNodeItem::NodeCallback::nodeAdded(osg::Node* node)
+{
+	if(!theItem) return;
+	ossimPlanetNode* n = dynamic_cast<ossimPlanetNode*>(node);
+	if(n)
+	{
+		QApplication::postEvent(theItem->legend(),
+										new ossimPlanetQt::NodeCallbackEvent(n, ossimPlanetQt::NodeCallbackEvent::NodeEventType_ADD));
+	}
+}
+
+void ossimPlanetQtLegendNodeItem::NodeCallback::nodeRemoved(osg::Node* node)
+{
+	if(!theItem) return;
+	ossimPlanetNode* n = dynamic_cast<ossimPlanetNode*>(node);
+	if(n)
+	{
+      QApplication::postEvent(theItem->legend(),
+                           new ossimPlanetQt::NodeCallbackEvent(n, ossimPlanetQt::NodeCallbackEvent::NodeEventType_REMOVE));
+	}
+}
+
+ossimPlanetQtLegendNodeItem::ossimPlanetQtLegendNodeItem(QTreeWidgetItem* item,
+																			const QString& name)
+:ossimPlanetQtLegendItem(item, name)
+{
+   setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsSelectable|Qt::ItemIsEditable);
+	theNodeCallback = new ossimPlanetQtLegendNodeItem::NodeCallback(this);
+}
+
+ossimPlanetQtLegendNodeItem::ossimPlanetQtLegendNodeItem(QTreeWidget* treeWidget,
+																			const QString& s)
+:ossimPlanetQtLegendItem(treeWidget, s)
+{
+   setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsSelectable|Qt::ItemIsEditable);
+	theNodeCallback = new ossimPlanetQtLegendNodeItem::NodeCallback(this);
+}
+
+ossimPlanetQtLegendNodeItem::ossimPlanetQtLegendNodeItem()
+:ossimPlanetQtLegendItem()
+{
+   setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsSelectable|Qt::ItemIsEditable);
+	theNodeCallback = new ossimPlanetQtLegendNodeItem::NodeCallback(this);
+}
+ossimPlanetQtLegendNodeItem::~ossimPlanetQtLegendNodeItem()
+{
+	if(theLayerNode.valid())
+	{
+		theLayerNode->removeCallback(theNodeCallback.get());
+	}
+}
+
+void ossimPlanetQtLegendNodeItem::deleteLayer(bool deleteThis)
+{
+   if(theLayerNode.valid())
+   {
+		theLayerNode->removeCallback(theNodeCallback.get());
+      if(theLayerNode->getParent(0))
+      {
+         theLayerNode->getParent(0)->removeChild(theLayerNode.get());
+      }
+      theLayerNode=0;
+   }
+   
+   if(deleteThis)
+   {
+      delete this;
+   }
+}
+
+void ossimPlanetQtLegendNodeItem::changed()
+{
+   if(theLayerNode.valid())
+   {
+      bool checked = (checkState(0) !=Qt::Unchecked);
+      if(checked!=theLayerNode->enableFlag())
+      {
+         theLayerNode->setEnableFlag(checked);
+         theLayerNode->setRedrawFlag(true);
+      }
+   
+      if((text(0)!="") &&(text(0) != QString(theLayerNode->name().c_str())))
+      {
+         theLayerNode->setName(text(0).toStdString());
+      }
+   }
+}
+
+ossimRefPtr<ossimXmlNode> ossimPlanetQtLegendNodeItem::saveXml()const
+{
+	return 0;
+}
+
+void ossimPlanetQtLegendNodeItem::loadXml(ossimRefPtr<ossimXmlNode> node,
+														std::vector<ossimPlanetOperation*>& activityList)
+{
+}
+
+const osg::ref_ptr<ossimPlanetLookAt> ossimPlanetQtLegendNodeItem::getLookAt()const
+{
+	if(theLookAt.valid())
+	{
+		return theLookAt;
+	}
+	if(theLayerNode.valid())
+	{
+		return theLayerNode->lookAt();
+	}
+	
+	return 0;
+}
+
+void ossimPlanetQtLegendNodeItem::setLookAt(osg::ref_ptr<ossimPlanetLookAt> lookAt)
+{
+	theLookAt = lookAt;
+}
+
+const osg::ref_ptr<ossimPlanetExtents> ossimPlanetQtLegendNodeItem::getExtents()const
+{
+	return theExtents;
+}
+
+osg::ref_ptr<ossimPlanetNode> ossimPlanetQtLegendNodeItem::layer()
+{
+	return theLayerNode;
+}
+
+const osg::ref_ptr<ossimPlanetNode> ossimPlanetQtLegendNodeItem::layer()const
+{
+	return theLayerNode;
+}
+
+void ossimPlanetQtLegendNodeItem::setLayer(osg::ref_ptr<ossimPlanetNode> value)
+{
+	if(theLayerNode.valid())
+	{
+		theLayerNode->removeCallback(theNodeCallback.get());
+	}
+	theLayerNode = value;
+	if(theLayerNode.valid())
+	{
+		setCheckState (0, theLayerNode->enableFlag()?Qt::Checked:Qt::Unchecked);
+		setText(0, theLayerNode->name().c_str());
+		theLayerNode->addCallback(theNodeCallback.get());
+	}
+}
+
+void ossimPlanetQtLegendNodeItem::propertyChanged(const ossimString& name)
+{
+	if(name == "name")
+	{
+		if(theLayerNode.valid())
+		{
+			setText(0, theLayerNode->name().c_str());
+		}
+	}
+	else if(name == "enableFlag")
+	{
+		setCheckState (0, theLayerNode->enableFlag()?Qt::Checked:Qt::Unchecked);
+	}
+}
+
+
diff --git a/ossimPlanetQt/src/gui/ossimPlanetQtLegendTextureItem.cpp b/ossimPlanetQt/src/gui/ossimPlanetQtLegendTextureItem.cpp
new file mode 100644
index 0000000..954a4b6
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ossimPlanetQtLegendTextureItem.cpp
@@ -0,0 +1,716 @@
+#include <ossimPlanetQt/ossimPlanetQtLegendTextureItem.h>
+#include <ossimPlanetQt/ossimPlanetQtApplication.h>
+#include <ossimPlanet/ossimPlanetTextureLayerGroup.h>
+#include <ossimPlanet/ossimPlanetOssimImageLayer.h>
+#include <ossimPlanet/ossimPlanetWmsImageLayer.h>
+#include <ossimPlanetQt/ossimPlanetQtLegend.h>
+#include <ossimPlanetQt/ossimPlanetQtApplication.h>
+#include <ossimPlanetQt/ossimPlanetQtOperation.h>
+#include <ossimPlanetQt/ossimPlanetQtMainWindow.h>
+#include <ossim/base/ossimEnvironmentUtility.h>
+#include <QtGui/QApplication>
+#include <ossimPlanetQt/ossimPlanetQtEvent.h>
+
+ossimPlanetQtLegendTextureItem::Callback::Callback(ossimPlanetQtLegendTextureItem* item)
+:theItem(item)
+{
+}
+
+void ossimPlanetQtLegendTextureItem::Callback::layersAdded(std::vector<osg::ref_ptr<ossimPlanetTextureLayer> >& layers)
+{
+	ossim_uint32 idx = 0;
+	
+	for(idx = 0; idx < layers.size(); ++idx)
+	{
+	}
+}
+
+void ossimPlanetQtLegendTextureItem::Callback::layersRemoved(std::vector<osg::ref_ptr<ossimPlanetTextureLayer> >& layers)
+{
+	ossim_uint32 idx = 0;
+	
+	for(idx = 0; idx < layers.size(); ++idx)
+	{
+	}
+}
+
+void ossimPlanetQtLegendTextureItem::Callback::propertyChanged(const ossimString& name,
+                                                               const ossimPlanetTextureLayer* layer)
+{
+   if(theItem)
+   {
+      ossimPlanetQtLegend* legend = theItem->legend();
+     if(legend)
+      {
+         QApplication::postEvent(legend,
+                                 new ossimPlanetQt::LegendItemProperty(name.c_str(),
+                                                                       theItem));
+      }
+   }
+}
+
+void ossimPlanetQtLegendTextureItem::StagerCallback::finished(ossimPlanetOperation* /*operation*/)
+{
+   if(theItem)
+   {
+      theItem->theStagerMutex.lock();
+      theItem->theStager = 0;
+      theItem->theStagerMutex.unlock();
+   }
+}
+
+void ossimPlanetQtLegendTextureItem::StagerCallback::canceled(ossimPlanetOperation* operation)
+{
+   finished(operation);
+}
+
+ossimPlanetQtLegendTextureItem::ossimPlanetQtLegendTextureItem(QTreeWidgetItem* item,
+                                                               const QString& name)
+   :ossimPlanetQtLegendItem(item, name)
+{
+   
+   setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsSelectable|Qt::ItemIsEditable);
+   setCheckState (0, Qt::Checked);
+   theCallback = new ossimPlanetQtLegendTextureItem::Callback(this);
+//    QIcon myIcon(ossimPlanetQtApplication::themePath().dirCat("mActionFolder.png").c_str());
+//    setIcon(0, myIcon);
+}
+
+ossimPlanetQtLegendTextureItem::ossimPlanetQtLegendTextureItem(QTreeWidget* treeWidget,
+                                                               const QString& name)
+   :ossimPlanetQtLegendItem(treeWidget, name)
+{
+   setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsEditable);
+   setCheckState (0, Qt::Checked);
+   theCallback = new ossimPlanetQtLegendTextureItem::Callback(this);
+//    QIcon myIcon(ossimPlanetQtApplication::themePath().dirCat("mActionFolder.png").c_str());
+//    setIcon(0, myIcon);
+}
+
+ossimPlanetQtLegendTextureItem::ossimPlanetQtLegendTextureItem()
+   :ossimPlanetQtLegendItem()
+{
+   setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsSelectable|Qt::ItemIsEditable);
+   setCheckState (0, Qt::Checked);
+   theCallback = new ossimPlanetQtLegendTextureItem::Callback(this);
+//    QIcon myIcon(ossimPlanetQtApplication::themePath().dirCat("mActionFolder.png").c_str());
+//    setIcon(0, myIcon);
+}
+
+ossimPlanetQtLegendTextureItem::~ossimPlanetQtLegendTextureItem()
+{
+   theCallback->setItem(0);
+   if(theLayer.valid())
+   {
+      theLayer->removeCallback(theCallback.get());
+   }
+}
+
+void ossimPlanetQtLegendTextureItem::setLayer(osg::ref_ptr<ossimPlanetTextureLayer> layer)
+{
+   if(theLayer.valid())
+   {
+      theLayer->removeCallback(theCallback.get());
+   }
+   theLayer = layer;
+   if(theLayer.valid())
+   {
+      theLayer->addCallback(theCallback.get());
+   }
+	if(legend())
+	{
+		legend()->addIndexMapping(layer.get(), this);
+	}
+
+   populateItem();
+}
+
+osg::ref_ptr<ossimPlanetTextureLayer> ossimPlanetQtLegendTextureItem::layer()
+{
+   return theLayer;
+}
+
+const osg::ref_ptr<ossimPlanetTextureLayer> ossimPlanetQtLegendTextureItem::layer()const
+{
+   return theLayer;
+}
+
+
+void ossimPlanetQtLegendTextureItem::updateLayerInfo()
+{
+   if(!theLayer.valid()) return;
+   ossimString name = theLayer->getName();
+   if(theLayer->getEnableFlag())
+   {
+      setCheckState (0, Qt::Checked);
+      
+   }
+   else
+   {
+      setCheckState (0, Qt::Unchecked);
+   }
+   theStagerMutex.lock();
+   if((theLayer->isStateSet(ossimPlanetTextureLayer_NO_OVERVIEWS)||
+		theLayer->isStateSet(ossimPlanetTextureLayer_NO_HISTOGRAMS))&&
+      ossimPlanetQtApplication::automaticStagingEnabledFlag())
+   {
+      if(!theStager.valid())
+      {
+         ossimPlanetOssimImageLayer* imageLayer = dynamic_cast<ossimPlanetOssimImageLayer*>(layer().get());
+         if(imageLayer)
+         {
+            if(legend()&&legend()->mainWindow())
+            {
+					theStager = new ossimPlanetQtOssimImageStagerOperation(imageLayer,
+																							 legend());
+					legend()->mainWindow()->addOperation(theStager.get());
+					ossimPlanetQtApplication::postEvent(legend()->mainWindow(),
+																	new ossimPlanetQt::MessageEvent(QString("Staging layer ") + QString(layer()->name().c_str()),
+																											  ossimPlanetQt::MessageEvent::INFO_MESSAGE_TYPE));
+            }
+         }
+      }
+   }
+   theStagerMutex.unlock();
+   if(theLayer->isStateSet(ossimPlanetTextureLayer_NO_SOURCE_DATA))
+   {
+      setForeground(0, QBrush(QColor(255, 0, 0)));
+   }
+   else
+   {
+      setForeground(0, QBrush(QColor(0, 0, 0)));
+   }
+   setText(0, name.c_str());
+   if(!theLayer->asGroup())
+   {
+      clearItem();
+      ossimRefPtr<ossimXmlNode> metadata = new ossimXmlNode;
+      theLayer->getMetadata(metadata);
+      
+      ossim_uint32 idx = 0;
+      ossim_uint32 idxMax = 0;
+      const std::vector<ossimRefPtr<ossimXmlNode> >& childNodes = metadata->getChildNodes();
+      idxMax = childNodes.size();
+      for(idx = 0; idx < idxMax; ++idx)
+      {
+         recursiveAdd(this,
+                      childNodes[idx]);
+      }
+   }
+}
+
+
+void ossimPlanetQtLegendTextureItem::populateItem()
+{
+   clearItem();
+   if(!theLayer.valid()) return;
+   theCallback->setEnableFlag(false);
+   updateLayerInfo();
+   
+   if(theLayer.valid())
+   {
+      osg::ref_ptr<ossimPlanetTextureLayerGroup> group = theLayer->asGroup();
+
+      if(group.valid())
+      {
+         unsigned int n = group->numberOfLayers();
+         unsigned int idx = 0;
+         for(idx = 0; idx < n; ++idx)
+         {
+            ossimPlanetQtLegendTextureItem* item = new ossimPlanetQtLegendTextureItem(this);
+            item->setLayer(group->layer(idx));
+         }
+      }
+   }
+   theCallback->setEnableFlag(true);
+}
+
+void ossimPlanetQtLegendTextureItem::deleteLayer(bool deleteThis)
+{
+   if(!theLayer.valid()) return;
+   theLayer->removeCallback(theCallback.get());
+
+	legend()->removeIndexMapping(theLayer.get(), false);
+	
+   if(theLayer->getParent(0))
+   {
+      theLayer->getParent(0)->removeLayer(theLayer.get());
+   }
+	if(deleteThis)
+	{
+		delete this;
+	}
+}
+
+void ossimPlanetQtLegendTextureItem::changed()
+{
+   if(!theLayer.valid())
+   {
+      return;
+   }
+   theCallback->setEnableFlag(false);
+   if(text(0).toStdString() != "")
+   {
+      theLayer->setName(text(0).toStdString());
+   }
+   bool checked = (checkState(0) !=Qt::Unchecked);
+   if(checked != theLayer->getEnableFlag())
+   {
+      theLayer->setEnableFlag(checked);
+//      theLayer->notifyRefreshExtent(theLayer->getExtents());
+//       if(legend()->landTextureRefreshFlag())
+      {
+//         legend()->mainWindow()->refreshLandTextures(theLayer->getExtents().get(),
+//                                                     ossimPlanetLandRefreshType_TEXTURE);
+      }
+   }
+   theCallback->setEnableFlag(true);
+}
+
+ossimRefPtr<ossimXmlNode> ossimPlanetQtLegendTextureItem::saveXml()const
+{
+   ossimRefPtr<ossimXmlNode> result;
+   if(theLayer.valid())
+   {
+      theCallback->setEnableFlag(false);
+      result  = theLayer->saveXml(false);
+//       if(theLookAt.valid())
+//       {
+//          ossimRefPtr<ossimXmlNode> lookAtOverride = theLookAt->saveXml();
+//          lookAtOverride->setTag("ossimPlanetLookAtOverride");
+//          result->addChildNode(lookAtOverride);
+//       }
+      if(theLayer->asGroup())
+      {
+         ossim_uint32 idx = 0;
+         ossim_uint32 idxBound = childCount();
+
+         for(idx = 0; idx < idxBound; ++idx)
+         {
+            if(child(idx))
+            {
+               ossimPlanetQtLegendTextureItem* item = dynamic_cast<ossimPlanetQtLegendTextureItem*>(child(idx));
+               if(item)
+               {
+                  result->addChildNode(item->saveXml());
+               }
+            }
+         }
+      }
+      theCallback->setEnableFlag(true);
+   }
+
+   return result;
+}
+
+void ossimPlanetQtLegendTextureItem::loadXml(ossimRefPtr<ossimXmlNode> node,
+                                             std::vector<ossimPlanetOperation*>& activityList)
+{
+   clearItem();
+   theCallback->setEnableFlag(false);
+   ossimRefPtr<ossimXmlNode> enabled = node->findFirstNode("enableFlag");
+   ossimRefPtr<ossimXmlNode> name = node->findFirstNode("name");
+   if(!enabled.valid())
+   {
+      enabled =  node->findFirstNode("enabled");
+   }
+   if(enabled.valid())
+   {
+      if(theLayer.valid())
+      {
+         theLayer->setEnableFlag(enabled->getText().toBool());
+      }
+   }
+   if(name.valid())
+   {
+      if(theLayer.valid())
+      {
+         theLayer->setName(name->getText());
+      }
+      setText(0, name->getText().c_str());
+   }
+   const vector<ossimRefPtr<ossimXmlNode> >& childNodes = node->getChildNodes();
+   if(childNodes.size())
+   {
+      ossim_uint32 idx = 0;
+      for(idx = 0; idx < childNodes.size(); ++idx)
+      {
+         addXml(childNodes[idx], activityList);
+      }
+   }
+   theCallback->setEnableFlag(true);
+}
+
+void ossimPlanetQtLegendTextureItem::addXml(ossimRefPtr<ossimXmlNode> node,
+                                            std::vector<ossimPlanetOperation*>& activityList,
+                                            bool startAtTopFlag)
+{
+   ossimString type = node->getTag();
+   ossimRefPtr<ossimXmlNode> enabled = node->findFirstNode("enableFlag");
+   ossimRefPtr<ossimXmlNode> name    = node->findFirstNode("name");
+   ossimRefPtr<ossimXmlNode> lookAtNode = node->findFirstNode("ossimPlanetLookAt");
+	theLayer->blockCallbacks(true);
+   if(type == "ossimPlanetTextureLayerGroup")
+   {
+      osg::ref_ptr<ossimPlanetTextureLayerGroup> layer = new ossimPlanetTextureLayerGroup;
+      if(startAtTopFlag)
+      {
+         theLayer->asGroup()->addTop(layer.get());
+      }
+      else
+      {
+         theLayer->asGroup()->addBottom(layer.get());
+      }
+      if(name.valid())
+      {
+         layer->setName(name->getText());
+      }
+      else
+      {
+         layer->setName(layer->getClassName());
+      }
+      if(enabled.valid())
+      {
+         layer->setEnableFlag(enabled->getText().toBool());
+      }
+      if(lookAtNode.valid())
+      {
+         osg::ref_ptr<ossimPlanetLookAt> lookAt = new ossimPlanetLookAt;
+         if(lookAt->loadXml(lookAtNode))
+         {
+            layer->setLookAt(lookAt);
+         }
+      }
+      ossimPlanetQtLegendTextureItem* item = new ossimPlanetQtLegendTextureItem();
+      if(startAtTopFlag)
+      {
+         this->insertChild(0, item);
+      }
+      else
+      {
+         this->addChild(item);
+      }
+      item->setLayer(layer.get());
+      item->loadXml(node, activityList);
+      if(!layer->getLookAt().valid())
+      {
+         layer->resetLookAt();
+      }
+      if(!item->parent()->isExpanded())
+      {
+         item->parent()->setExpanded(true);
+      }            
+   }
+   else if(type == "ossimPlanetOssimImageLayer")
+   {
+      osg::ref_ptr<ossimPlanetOssimImageLayer> layer = new ossimPlanetOssimImageLayer;
+      layer->blockCallbacks(true);
+      if(startAtTopFlag)
+      {
+         theLayer->asGroup()->addTop(layer.get());
+      }
+      else
+      {
+         theLayer->asGroup()->addBottom(layer.get());
+      }
+      ossimPlanetQtLegendTextureItem* item = new ossimPlanetQtLegendTextureItem();//(this);
+      if(startAtTopFlag)
+      {
+         this->insertChild(0, item);
+      }
+      else
+      {
+         this->addChild(item);
+      }
+      item->setLayer(layer.get());
+      if(!item->parent()->isExpanded())
+      {
+         item->parent()->setExpanded(true);
+      }
+      if(name.valid())
+      {
+         layer->setName(name->getText());
+         item->setText(0, name->getText().c_str());
+      }
+      
+//                   ossimPlanetQtOpenImageFileFromLayerXmlActivity* activity = new ossimPlanetQtOpenImageFileFromLayerXmlActivity(layer.get(),
+//                                                                                                                                 ossimFilename(filenameNode->getText()),
+//                                                                                                                                 entryNode->getText().toInt32(),
+//                                                                                                                                 legend());
+      ossimPlanetQtOpenImageFileFromLayerXmlOperation* activity = new ossimPlanetQtOpenImageFileFromLayerXmlOperation(layer.get(),
+                                                                                                                      node,
+                                                                                                                      legend());
+      activity->setItem(item);
+      activityList.push_back(activity);
+      
+      item->loadXml(node, activityList);
+      if(!item->parent()->isExpanded())
+      {
+         item->parent()->setExpanded(true);
+      }
+      layer->blockCallbacks(false);
+  }
+   else if(type == "ossimPlanetWmsImageLayer")
+   {
+      // Need to move all of this to the core planet
+      ossimRefPtr<ossimXmlNode> cacheDirectory       = node->findFirstNode("cacheDirectory");
+      if(cacheDirectory.valid())
+      {
+         ossimFilename testDir(cacheDirectory->getText());
+         if(!testDir.exists())
+         {
+            testDir.createDirectory();
+         }
+         if(!testDir.exists()||!testDir.isWriteable())
+         {
+            ossimFilename file = ossimFilename(ossimPlanetQtApplication::defaultWmsCacheDir().toStdString());
+            cacheDirectory->setText(file.c_str());
+         }
+      }
+     
+      osg::ref_ptr<ossimPlanetWmsImageLayer> layer = new ossimPlanetWmsImageLayer;
+      if(layer->loadXml(node))
+      {
+         ossimRefPtr<ossimXmlNode> cacheDirectory       = node->findFirstNode("cacheDirectory");
+         ossimPlanetQtLegendTextureItem* item = new ossimPlanetQtLegendTextureItem();//(this);
+         if(startAtTopFlag)
+         {
+            this->insertChild(0, item);
+         }
+         else
+         {
+            this->addChild(item);
+         }
+        if(layer->getName() == "")
+         {
+            layer->setName(ossimString("WMS: ") +
+                           ossimString(layer->getServer()));
+         }
+         item->setLayer(layer.get());
+         if(!item->parent()->isExpanded())
+         {
+            item->parent()->setExpanded(true);
+         }
+         if(startAtTopFlag)
+         {
+            theLayer->asGroup()->addTop(layer.get());
+         }
+         else
+         {
+            theLayer->asGroup()->addBottom(layer.get());
+         }
+         item->loadXml(node, activityList);
+         if(!item->parent()->isExpanded())
+         {
+            item->parent()->setExpanded(true);
+         }
+      }
+   }
+	theLayer->blockCallbacks(false);
+#if 0
+   const vector<ossimRefPtr<ossimXmlNode> >& childNodes = node->getChildNodes();
+   if(childNodes.size())
+   {
+      ossim_uint32 idx = 0;
+      ossimString attribute;
+      ossimString type;
+      for(idx = 0; idx < childNodes.size(); ++idx)
+      {
+         type = childNodes[idx]->getTag();
+         ossimRefPtr<ossimXmlNode> enabled = childNodes[idx]->findFirstNode("enableFlag");
+          ossimRefPtr<ossimXmlNode> name    = childNodes[idx]->findFirstNode("name");
+         ossimRefPtr<ossimXmlNode> lookAtNode = childNodes[idx]->findFirstNode("ossimPlanetLookAt");
+         if(!enabled.valid())
+         {
+            enabled =  childNodes[idx]->findFirstNode("enabled");
+         }
+         if(type == "ossimPlanetTextureLayerGroup")
+         {
+            osg::ref_ptr<ossimPlanetTextureLayerGroup> layer = new ossimPlanetTextureLayerGroup;
+            theLayer->asGroup()->addBottom(layer.get());
+
+            if(name.valid())
+            {
+               layer->setName(name->getText());
+            }
+            else
+            {
+               layer->setName(layer->getClassName());
+            }
+            if(enabled.valid())
+            {
+               layer->setEnableFlag(enabled->getText().toBool());
+            }
+            if(lookAtNode.valid())
+            {
+               osg::ref_ptr<ossimPlanetLookAt> lookAt = new ossimPlanetLookAt;
+               if(lookAt->loadXml(lookAtNode))
+               {
+                  layer->setLookAt(lookAt);
+               }
+            }
+            ossimPlanetQtLegendTextureItem* item = new ossimPlanetQtLegendTextureItem(this);
+            item->setLayer(layer.get());
+            item->loadXml(childNodes[idx], activityList);
+            if(!layer->getLookAt().valid())
+            {
+               layer->resetLookAt();
+            }
+            if(!item->parent()->isExpanded())
+            {
+               item->parent()->setExpanded(true);
+            }            
+         }
+         else if(type == "ossimPlanetOssimImageLayer")
+         {
+            osg::ref_ptr<ossimPlanetOssimImageLayer> layer = new ossimPlanetOssimImageLayer;
+            theLayer->asGroup()->addBottom(layer.get());
+            ossimPlanetQtLegendTextureItem* item = new ossimPlanetQtLegendTextureItem(this);
+            item->setLayer(layer.get());
+            if(!item->parent()->isExpanded())
+            {
+               item->parent()->setExpanded(true);
+            }
+            if(name.valid())
+            {
+               layer->setName(name->getText());
+               item->setText(0, name->getText().c_str());
+            }
+            
+            ossimPlanetQtOpenImageFileFromLayerXmlActivity* activity = new ossimPlanetQtOpenImageFileFromLayerXmlActivity(layer.get(),
+                                                                                                                          childNodes[idx],
+                                                                                                                          legend());
+            activity->setItem(item);
+            activityList.push_back(activity);
+            item->loadXml(childNodes[idx], activityList);
+            if(!item->parent()->isExpanded())
+            {
+               item->parent()->setExpanded(true);
+            }
+         }
+         else if(type == "ossimPlanetWmsImageLayer")
+         {
+            // Need to move all of this to the core planet
+            
+            osg::ref_ptr<ossimPlanetWmsImageLayer> layer = new ossimPlanetWmsImageLayer;
+            if(layer->loadXml(childNodes[idx]))
+            {
+               ossimPlanetQtLegendTextureItem* item = new ossimPlanetQtLegendTextureItem(this);
+               if(layer->getName() == "")
+               {
+                  layer->setName(ossimString("WMS: ") +
+                                 ossimString(layer->getServer()));
+               }
+               item->setLayer(layer.get());
+               if(!item->parent()->isExpanded())
+               {
+                  item->parent()->setExpanded(true);
+               }
+               theLayer->asGroup()->addBottom(layer.get());
+               item->loadXml(childNodes[idx], activityList);
+               if(!item->parent()->isExpanded())
+               {
+                  item->parent()->setExpanded(true);
+               }
+            }
+         }
+      }
+   }
+#endif
+}
+
+
+void ossimPlanetQtLegendTextureItem::clearItem()
+{
+   QList<QTreeWidgetItem *> children = takeChildren();
+   QList<QTreeWidgetItem*>::Iterator iter = children.begin();
+
+   while(iter != children.end())
+   {
+      delete *iter;
+      ++iter;
+   }
+
+   children.clear();
+}
+
+const osg::ref_ptr<ossimPlanetLookAt> ossimPlanetQtLegendTextureItem::getLookAt()const
+{
+//    if(theLookAt.valid()) return theLookAt;
+   if(theLayer.valid())
+   {
+		if(theLayer->getLookAt().valid())
+		{
+			return theLayer->getLookAt();
+		}
+		else
+		{
+			double lat, lon, len;
+			theLayer->getCenterLatLonLength(lat, lon, len);
+			
+			osg::ref_ptr<ossimPlanetLookAt> lookAt = new ossimPlanetLookAt;
+			
+			lookAt->setLat(lat);
+			lookAt->setLon(lon);
+			lookAt->setRange(len);
+			
+			return lookAt;
+		}
+   }
+   return 0;
+}
+
+void ossimPlanetQtLegendTextureItem::setLookAt(osg::ref_ptr<ossimPlanetLookAt> lookAt)
+{
+   theCallback->setEnableFlag(false);
+   if(!lookAt.valid())
+   {
+      theLayer->resetLookAt();
+   }
+   else
+   {
+      theLayer->setLookAt(lookAt);
+   }
+   theCallback->setEnableFlag(true);
+}
+
+const osg::ref_ptr<ossimPlanetExtents> ossimPlanetQtLegendTextureItem::getExtents()const
+{
+   if(theLayer.valid())
+   {
+      return theLayer->getExtents();
+   }
+
+   return 0;
+}
+
+void ossimPlanetQtLegendTextureItem::propertyChanged(const ossimString& name)
+{
+	if(!theLayer.valid())
+	{
+		return;
+	}
+	if(name =="name")
+	{
+		setText(0, theLayer->name().c_str());
+	}
+	else if(name == "enableFlag")
+	{
+		if(theLayer->enableFlag())
+		{
+			setCheckState (0, Qt::Checked);
+			
+		}
+		else
+		{
+			setCheckState (0, Qt::Unchecked);
+		}
+	}
+	else 
+	{
+		theCallback->setEnableFlag(false);
+		updateLayerInfo();
+		theCallback->setEnableFlag(true);
+	}
+}
+
diff --git a/ossimPlanetQt/src/gui/ossimPlanetQtLegendVideoItem.cpp b/ossimPlanetQt/src/gui/ossimPlanetQtLegendVideoItem.cpp
new file mode 100644
index 0000000..0eae0f1
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ossimPlanetQtLegendVideoItem.cpp
@@ -0,0 +1,147 @@
+#include <ossimPlanetQt/ossimPlanetQtLegendVideoItem.h>
+#include <ossimPlanet/ossimPlanetVideoLayer.h>
+#include <ossimPlanetQt/ossimPlanetQtLegend.h>
+#include <ossimPlanet/ossimPlanetLookAt.h>
+#include <QtGui/QApplication>
+
+ossimPlanetQtLegendVideoItem::ossimPlanetQtLegendVideoItem(QTreeWidgetItem* item,
+                                                           const QString& name)
+   :ossimPlanetQtLegendNodeItem(item, name)
+{
+   theLookAt = new ossimPlanetLookAt;
+   setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsSelectable|Qt::ItemIsEditable);
+   setCheckState (0, Qt::Checked);
+   theVideoControlItem = 0;
+   theVideoControlWidget = 0;
+   
+  
+}
+ossimPlanetQtLegendVideoItem::ossimPlanetQtLegendVideoItem(QTreeWidget* treeWidget,
+                                                         const QString& s)
+   :ossimPlanetQtLegendNodeItem(treeWidget, s)
+{
+   setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsSelectable);
+   setCheckState (0, Qt::Checked);
+   theVideoControlItem = 0;
+   theVideoControlWidget = 0;
+}
+
+ossimPlanetQtLegendVideoItem::ossimPlanetQtLegendVideoItem()
+   :ossimPlanetQtLegendNodeItem()
+{
+   setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsSelectable);
+   setCheckState (0, Qt::Checked);
+   theVideoControlItem   = 0;
+   theVideoControlWidget = 0;
+}
+
+ossimPlanetQtLegendVideoItem::~ossimPlanetQtLegendVideoItem()
+{
+}
+
+void ossimPlanetQtLegendVideoItem::setLayer(osg::ref_ptr<ossimPlanetNode> node)
+{
+	ossimPlanetQtLegendNodeItem::setLayer(node.get());
+   if(!theVideoControlItem)
+   {
+      theVideoControlItem = new QTreeWidgetItem(this);
+      theVideoControlItem->setText(0, "");
+      theVideoControlItem->setFlags(Qt::ItemIsEnabled);
+      theVideoControlWidget = new ossimPlanetQtVideoControlWidget;
+      
+      theVideoControlItem->setSizeHint(0, theVideoControlWidget->sizeHint());
+      legend()->setItemWidget(theVideoControlItem, 0, theVideoControlWidget);
+
+   }
+   if(videoLayerNode())
+   {
+      theVideoControlWidget->theReferenceTimeSlider->setRange(0, (int)videoLayerNode()->duration());
+      theVideoControlWidget->theReferenceTimeSlider->setValue((int)videoLayerNode()->referenceTime());
+		videoLayerNode()->lookAt(*theLookAt);
+   }
+   theVideoControlWidget->setVideoLayerNode(videoLayerNode());
+   theVideoControlWidget->setCallback(theNodeCallback.get());
+}
+
+void ossimPlanetQtLegendVideoItem::deleteLayer(bool deleteThis)
+{
+	theVideoControlWidget->setVideoLayerNode(0);
+	if(videoLayerNode())
+	{
+		videoLayerNode()->pause();
+	}
+	ossimPlanetQtLegendNodeItem::deleteLayer(deleteThis);
+}
+
+ossimRefPtr<ossimXmlNode> ossimPlanetQtLegendVideoItem::saveXml()const
+{
+   ossimRefPtr<ossimXmlNode> childNode = new ossimXmlNode;
+   
+   childNode->setTag("ossimPlanetVideoLayer");
+   childNode->addChildNode("name", text(0).toStdString());
+   
+   std::cout << "NEED TO IMPLEMENT ossimPlanetQtLegendVideoItem::saveXml()!!!" << std::endl;
+
+   return childNode.get();
+}
+
+void ossimPlanetQtLegendVideoItem::loadXml(ossimRefPtr<ossimXmlNode> node,
+                                         std::vector<ossimPlanetOperation*>& activityList)
+{
+   ossimRefPtr<ossimXmlNode> enabled = node->findFirstNode("enableFlag");
+   ossimRefPtr<ossimXmlNode> name    = node->findFirstNode("name");
+   if(!enabled.valid())
+   {
+      enabled =  node->findFirstNode("enabled");
+   }
+   if(enabled.valid())
+   {
+   }
+
+   if(name.valid())
+   {
+      setText(0, name->getText().c_str());
+   }
+   std::cout << "NEED TO IMPLEMENT ossimPlanetQtLegendVideoItem::loadXml()!!!" << std::endl;
+}
+
+ossimPlanetVideoLayerNode* ossimPlanetQtLegendVideoItem::videoLayerNode()
+{
+	return dynamic_cast<ossimPlanetVideoLayerNode*>(theLayerNode.get());
+}
+const ossimPlanetVideoLayerNode* ossimPlanetQtLegendVideoItem::videoLayerNode()const
+{
+	return dynamic_cast<const ossimPlanetVideoLayerNode*>(theLayerNode.get());
+}
+
+void ossimPlanetQtLegendVideoItem::propertyChanged(const ossimString& name)
+{
+	if(name == "referenceTime")
+	{
+		if(videoLayerNode()&&
+			theVideoControlWidget)
+		{
+			ossim_float64 newTime = videoLayerNode()->referenceTime();
+			int newValue = (int)newTime;
+			if(theVideoControlWidget->theReferenceTimeSlider->sliderPosition()!=newValue)
+			{
+				theVideoControlWidget->theReferenceTimeSlider->blockSignals(true);
+				theVideoControlWidget->theReferenceTimeSlider->setValue(newValue);
+				theVideoControlWidget->theReferenceTimeSlider->blockSignals(false);
+			}
+		}
+	}
+}
+
+const osg::ref_ptr<ossimPlanetLookAt> ossimPlanetQtLegendVideoItem::getLookAt()const
+{
+	if(!theAutoUpdateLookAt.valid()) theAutoUpdateLookAt = new ossimPlanetLookAt();
+	if(videoLayerNode())
+	{
+		videoLayerNode()->lookAt(*theAutoUpdateLookAt);
+		theAutoUpdateLookAt->setRoll(0.0);
+		theAutoUpdateLookAt->setPitch(fabs(theLookAt->pitch()));
+	}
+	
+	return theAutoUpdateLookAt.get();
+}
diff --git a/ossimPlanetQt/src/gui/ossimPlanetQtMainWindow.cpp b/ossimPlanetQt/src/gui/ossimPlanetQtMainWindow.cpp
new file mode 100644
index 0000000..e4a9b35
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ossimPlanetQtMainWindow.cpp
@@ -0,0 +1,3916 @@
+#include <ossimPlanetQt/ossimPlanetQtMainWindow.h>
+#include <ossimPlanetQt/ossimPlanetQtGlWidget.h>
+#include <ossimPlanetQt/ossimPlanetQtLegend.h>
+#include <ossimPlanetQt/ossimPlanetQtPreferences.h>
+#include <ossimPlanetQt/ossimPlanetQtApplication.h>
+#include <ossim/ossimVersion.h>
+#include <QtGui/QHBoxLayout>
+#include <QtGui/QTextBrowser>
+#include <QtGui/QWhatsThis>
+#include <QtGui/QTableWidget>
+#include <QtGui/QTableWidgetItem>
+#include <QtGui/QFileDialog>
+#include <QtGui/QInputDialog>
+#include <ossimPlanet/ossimPlanet.h>
+//#include <ossimPlanet/ossimPlanetLand.h>
+#include <iostream>
+#include <sstream>
+#include <ossimPlanet/ossimPlanetCloudLayer.h>
+#include <ossimPlanet/ossimPlanetTerrain.h>
+#include <ossimPlanet/ossimPlanetYahooGeocoder.h>
+#include <ossimPlanet/ossimPlanetAction.h>
+#include <ossimPlanet/ossimPlanetOssimImageLayer.h>
+#include <ossimPlanet/ossimPlanetTextureLayerRegistry.h>
+#include <ossimPlanet/ossimPlanetKmlLayerNode.h>
+#include <ossimPlanetQt/ossimPlanetQtRuler.h>
+#include <ossimPlanetQt/ossimPlanetQtWmsDialog.h>
+#include <ossimPlanetQt/ossimPlanetQtLayerOperation.h>
+#include <ossimPlanetQt/ossimPlanetQtActivityWindow.h>
+#include <ossimPlanetQt/ossimPlanetQtApplication.h>
+#include <ossimPlanetQt/ossimPlanetQtAboutDialog.h>
+#include <ossimPlanetQt/ossimPlanetQtVersion.h>
+#include <ossimPlanet/ossimPlanetWmsImageLayer.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/base/ossimXmlDocument.h>
+#include <QtCore/QDataStream>
+#include <QtGui/QInputDialog>
+#include <QtGui/QMessageBox>
+#include <sstream>
+#include <ossimPlanet/ossimPlanetKmlLayerNode.h>
+#include <wms/wmsCurlMemoryStream.h>
+#include <QtCore/QProcess>
+#include <QtCore/QTemporaryFile>
+#include <QtOpenGL/QGLFormat>
+#include <ossimPlanetQt/ossimPlanetQtImage.h>
+#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
+#include <ossim/imaging/ossimMemoryImageSource.h>
+#include <ossim/imaging/ossimScalarRemapper.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossimPlanet/ossimPlanetIoSocketServerChannel.h>
+#include <ossimPlanet/ossimPlanetIoSocket.h>
+#include <ossimPlanetQt/ossimPlanetQtEvent.h>
+#include <ossimPlanetQt/ossimPlanetQtDropDownDelegate.h>
+#include <ossimPlanet/ossimPlanetDestinationCommandAction.h>
+#include <ossimPlanet/ossimPlanetManipulator.h>
+#include <ossimPlanet/ossimPlanetCache.h>
+#include <osgGA/TrackballManipulator>
+#include <osgGA/FlightManipulator>
+#include <osgGA/DriveManipulator>
+#include <osgGA/KeySwitchMatrixManipulator>
+#include <osgGA/StateSetManipulator>
+#include <osgGA/AnimationPathManipulator>
+#include <osgGA/TerrainManipulator>
+#include <osg/io_utils>
+static const int PREFERENCES_CLIENT_WIDGET_NAME_IDX   = 0;
+static const int PREFERENCES_CLIENT_WIDGET_IP_IDX   = 1;
+static const int PREFERENCES_CLIENT_WIDGET_PORT_IDX = 2;
+static const int PREFERENCES_CLIENT_WIDGET_PORT_TYPE_IDX = 3;
+static const int PREFERENCES_CLIENT_WIDGET_ENABLE_IDX = 4;
+static const int PREFERENCES_CLIENT_WIDGET_SIZE = 5;
+
+static const int PREFERENCES_SERVER_WIDGET_NAME_IDX   = 0;
+static const int PREFERENCES_SERVER_WIDGET_IP_IDX   = 1;
+static const int PREFERENCES_SERVER_WIDGET_PORT_IDX = 2;
+static const int PREFERENCES_SERVER_WIDGET_PORT_TYPE_IDX = 3;
+static const int PREFERENCES_SERVER_WIDGET_ENABLE_IDX = 4;
+static const int PREFERENCES_SERVER_WIDGET_SIZE = 5;
+
+static const int PREFERENCES_ARCHIVE_WIDGET_SOURCE_IDX		= 0;
+static const int PREFERENCES_ARCHIVE_WIDGET_DESTINATION_IDX = 1;
+static const int PREFERENCES_ARCHIVE_WIDGET_SIZE			= 2;
+
+
+template <class charT, class traits = std::char_traits<charT> >
+class ossimPlanetQtLogBufferStream : public std::basic_streambuf<charT, traits>
+{
+public:
+   ossimPlanetQtLogBufferStream()
+	:theMainWindow(0), 
+	 theMessageType(ossimPlanetQt::MessageEvent::ERROR_MESSAGE_TYPE)
+	 {}
+	
+	void setMessageType(ossimPlanetQt::MessageEvent::MessageType type)
+	{
+		theMessageType = type;
+	}
+	void setMainWindow(ossimPlanetQtMainWindow* w)
+	{
+		theMainWindow = w;
+	}
+protected:
+   virtual int overflow(int c)
+	{
+		OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+		if(!traits::eq_int_type(c, traits::eof()))
+		{
+			theBuffer += ossimString(c);
+		}
+		
+		return c;
+	}
+	
+   virtual std::streamsize xsputn(const charT * pChar, std::streamsize n)
+	{
+		OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+		theBuffer += ossimString(pChar, pChar + n);
+		return n;
+	}
+	
+   virtual int sync()
+	{
+		OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+		if(theMainWindow)
+		{
+			if(theBuffer.size())
+			{
+				theBuffer = theBuffer.trim();
+				QApplication::postEvent(theMainWindow, new ossimPlanetQt::MessageEvent(theBuffer.c_str(),
+																											  theMessageType));
+			}
+		}
+		theBuffer = "";
+		return 0;
+	}
+private:
+	mutable OpenThreads::ReentrantMutex theMutex;
+	ossimPlanetQtMainWindow* theMainWindow;
+	ossimPlanetQt::MessageEvent::MessageType theMessageType;
+   ossimString theBuffer;
+	
+};
+
+class ossimPlanetQtLogStream : public std::ostream
+{
+public:
+	ossimPlanetQtLogStream(ossimPlanetQt::MessageEvent::MessageType type = ossimPlanetQt::MessageEvent::INFO_MESSAGE_TYPE) : std::ostream(&theLogBufferStream)
+	{
+		theLogBufferStream.setMessageType(type);
+	}
+   virtual ~ossimPlanetQtLogStream()
+	{
+		theLogBufferStream.pubsync();
+	}
+	void setMessageType(ossimPlanetQt::MessageEvent::MessageType type)
+	{
+		theLogBufferStream.setMessageType(type);
+	}
+	void setMainWindow(ossimPlanetQtMainWindow* w)
+	{
+		theLogBufferStream.setMainWindow(w);
+	}
+	
+private:
+   ossimPlanetQtLogBufferStream<char> theLogBufferStream;
+   // Copy & assignment are undefined in iostreams
+};
+
+static ossimPlanetQtLogStream theQtErrorLogStream(ossimPlanetQt::MessageEvent::ERROR_MESSAGE_TYPE);
+static ossimPlanetQtLogStream theQtWarnLogStream(ossimPlanetQt::MessageEvent::WARNING_MESSAGE_TYPE);
+static ossimPlanetQtLogStream theQtDebugLogStream(ossimPlanetQt::MessageEvent::DEBUG_MESSAGE_TYPE);
+static ossimPlanetQtLogStream theQtInfoLogStream(ossimPlanetQt::MessageEvent::INFO_MESSAGE_TYPE);
+
+class ossimPlanetQtBrowser
+{
+public:
+   static bool openUrl(const QString& url)
+      {
+#ifdef __MACOSX__
+         QStringList args;
+         args.push_back(url);
+         
+         return QProcess::startDetached("open",
+                                        args);
+         
+         return true;
+#elif  defined(__WIN32__) || defined(_WIN32)
+         QStringList args;
+         args.push_back(url);
+		 return QProcess::startDetached(QString( "rundll32 url.dll,FileProtocolHandler \"%1\"").arg( url ));
+#else
+	ossimFilename file("/usr/bin/firefox");
+        if(file.exists())
+	{
+         QStringList args;
+         args.push_back(url);
+
+         return QProcess::startDetached(file.c_str(),
+                                        args);
+	}
+         return false;
+#endif
+      }
+};
+
+
+class ossimPlanetQtTextureLayerCallback : public ossimPlanetTextureLayerCallback
+{
+public:
+   ossimPlanetQtTextureLayerCallback(ossimPlanetQtMainWindow* window)
+      :theMainWindow(window)
+      {
+      }
+   virtual void layerAdded(osg::ref_ptr<ossimPlanetTextureLayer> layer)
+   {
+		if(theMainWindow)
+		{
+			QApplication::postEvent(theMainWindow->legend(),
+											new ossimPlanetQt::ImageLayerEvent(layer.get(), ossimPlanetQt::ImageLayerEvent::ADDED));
+		}
+   }
+   virtual void layerRemoved(osg::ref_ptr<ossimPlanetTextureLayer> layer,
+                             osg::ref_ptr<ossimPlanetTextureLayer> parent)
+   {
+		if(theMainWindow)
+		{
+			QApplication::postEvent(theMainWindow->legend(),
+											new ossimPlanetQt::ImageLayerEvent(layer.get(), ossimPlanetQt::ImageLayerEvent::REMOVED));
+		}
+   }
+   virtual void refreshExtent(osg::ref_ptr<ossimPlanetExtents> extent)
+   {
+   }
+   virtual void propertyChanged(const ossimString& name,
+                                const ossimPlanetTextureLayer* object){}
+	
+
+protected:
+   ossimPlanetQtMainWindow* theMainWindow;
+};
+
+ossimPlanetQtMainWindow::NodeCallback::NodeCallback(ossimPlanetQtMainWindow* mainWindow)
+:theMainWindow(mainWindow)
+{
+}
+
+void ossimPlanetQtMainWindow::NodeCallback::nodeAdded(osg::Node* node)
+{
+	ossimPlanetNode* n = dynamic_cast<ossimPlanetNode*>(node);
+	if(n)
+	{
+		QApplication::postEvent(theMainWindow->legend(),
+										new ossimPlanetQt::NodeCallbackEvent(n, ossimPlanetQt::NodeCallbackEvent::NodeEventType_ADD));
+	}
+}
+void ossimPlanetQtMainWindow::NodeCallback::nodeRemoved(osg::Node* node)
+{
+	ossimPlanetNode* n = dynamic_cast<ossimPlanetNode*>(node);
+	if(n)
+	{
+		QApplication::postEvent(theMainWindow->legend(),
+										new ossimPlanetQt::NodeCallbackEvent(n, ossimPlanetQt::NodeCallbackEvent::NodeEventType_REMOVE));
+	}
+}
+
+
+
+ossimPlanetIoMainWindowMessageHandler::ossimPlanetIoMainWindowMessageHandler(ossimPlanetQtMainWindow* mainWindow)
+   :theMainWindow(mainWindow)
+{
+}
+
+bool ossimPlanetIoMainWindowMessageHandler::handleMessage(osg::ref_ptr<ossimPlanetMessage> message)
+{
+   ossimString test(message->data().begin(),
+                    message->data().begin() + std::min((int)message->dataSize(), (int)30));
+   if(test.contains("ossimPlanetQtLegend"))
+   {
+      ossimRefPtr<ossimXmlNode> node = new ossimXmlNode;
+      std::istringstream in(ossimString(message->data().begin(),
+                                       message->data().end()));
+      if(node->read(in))
+      {
+         QApplication::postEvent(theMainWindow->legend(),
+                                 new ossimPlanetQt::LegendXmlEvent(node.get()));
+      }
+
+      return true;
+   }
+   else if(test.contains("AnimationPath"))
+   {
+      QApplication::postEvent(theMainWindow->legend(),
+                              new ossimPlanetQt::AnimationPathEvent(ossimString(message->data().begin(), message->data().end())));
+      return true;
+   }
+   else if(test.contains("ossimPlanetQtKml"))
+   {
+      ossimString tempMessage(message->data().begin()+18,
+                              message->data().end());
+      ossimString filename;
+      ossimString kml;
+
+      kml = tempMessage.after(">");
+      filename = tempMessage.before(">");
+
+      ossimFilename kmlFile(ossimPlanetQtApplication::userSupportDirectory().toStdString());
+      kmlFile = kmlFile.dirCat("kml");
+      kmlFile.createDirectory();
+      kmlFile = kmlFile.dirCat(filename);
+      ofstream out(kmlFile.c_str());
+      out.write((char*)(kml.c_str()), kml.size());
+      out.close();
+      if(kmlFile.exists())
+      {
+         QApplication::postEvent(theMainWindow->legend(),
+                                 new ossimPlanetQt::KmlFileEvent(kmlFile));
+      }
+   }       
+   else if(test.contains("ossimPlanetQtWms"))
+   {
+      std::vector<ossimPlanetQt::WmsSettingsEvent::WmsSettingsProperties> theSettingsList;
+      
+      ossimRefPtr<ossimXmlNode> node = new ossimXmlNode;
+      std::istringstream in(ossimString(message->data().begin(),
+                                       message->data().end()));
+      if(node->read(in))
+      {
+         const vector<ossimRefPtr<ossimXmlNode> >&      childNodes = node->getChildNodes();
+         ossim_uint32 idx = 0;
+         for(idx = 0; idx < childNodes.size();++idx)
+         {
+            ossimString name;
+            ossimString proxyHost;
+            ossimString proxyPort;
+            ossimString proxyUser;
+            ossimString proxyPassword;
+            ossimString url;
+            ossimString cache;
+            if(childNodes[idx]->getTag() == "Connection")
+            {
+               childNodes[idx]->getChildTextValue(name, "name");
+               childNodes[idx]->getChildTextValue(proxyHost, "proxyHost");
+               childNodes[idx]->getChildTextValue(proxyPort, "proxyPort");
+               childNodes[idx]->getChildTextValue(proxyUser, "proxUser");
+               childNodes[idx]->getChildTextValue(proxyPassword, "proxyPassword");
+               childNodes[idx]->getChildTextValue(url, "url");
+               theSettingsList.push_back(ossimPlanetQt::WmsSettingsEvent::WmsSettingsProperties(name,
+                                                                                                url,
+                                                                                                cache,
+                                                                                                proxyHost,
+                                                                                                proxyPort,
+                                                                                                proxyUser,
+                                                                                                proxyPassword));
+                                                                                                
+               // for now we will not carry along cache
+//                childNodes[idx]->getChildTextValue(name, "cache");
+            }
+         }
+         if(theSettingsList.size())
+         {
+            QApplication::postEvent(theMainWindow,
+                                    new ossimPlanetQt::WmsSettingsEvent(theSettingsList));
+         }
+      }
+      return true;
+   }
+//    else
+//    {
+//       std::cout << "Unhandled message = " << ossimString(message->data().begin(),
+//                                                          message->data().end()) << std::endl;
+//    }
+   return false;
+}
+
+static int terrainTypeToInt(const std::string& type)
+{
+   if(type == "low")
+   {
+      return ossimPlanetTerrain::LOW_TEXTURE_DENSITY; // both elevation and texture are the same integer values
+   }
+   else if(type == "medium-low")
+   {
+      return ossimPlanetTerrain::MEDIUM_LOW_TEXTURE_DENSITY; // both elevation and texture are the same integer values
+   }
+   else if(type == "medium")
+   {
+      return ossimPlanetTerrain::MEDIUM_TEXTURE_DENSITY; // both elevation and texture are the same integer values
+   }
+   else if(type == "medium-high")
+   {
+      return ossimPlanetTerrain::MEDIUM_HIGH_TEXTURE_DENSITY; // both elevation and texture are the same integer values
+   }
+   else if(type == "high")
+   {
+      return ossimPlanetTerrain::HIGH_TEXTURE_DENSITY; // both elevation and texture are the same integer values
+   }
+   else if(type == "no-cull")
+   {
+      return ossimPlanetTerrain::NO_CULL; 
+   }
+   else if(type == "low-cull")
+   {
+      return ossimPlanetTerrain::LOW_CULL; 
+   }
+   else if(type == "medium-low-cull")
+   {
+      return ossimPlanetTerrain::MEDIUM_LOW_CULL; 
+   }
+   else if(type == "medium-cull")
+   {
+      return ossimPlanetTerrain::MEDIUM_CULL; 
+   }
+   else if(type == "medium-high-cull")
+   {
+      return ossimPlanetTerrain::MEDIUM_HIGH_CULL; 
+   }
+   else if(type == "high-cull")
+   {
+      return ossimPlanetTerrain::HIGH_CULL; 
+   }
+   return 0;
+}
+
+ossimPlanetQtMainWindow::ossimPlanetQtMainWindow(QWidget *parent)
+   : QMainWindow(parent),
+     theDefaultNavigationPortType("tcp"),
+     theDefaultDataPortType("tcp")
+{
+   setupUi(this);
+   theIoThread = 0;
+   theLayerOperation = 0;
+   theWmsWindow = 0;
+   theRuler = 0;
+   theActivityWindow = 0;
+   theLargestLogMessageSize = 0;
+   theInitializedFlag = false;
+	theMessageLogDialog = new ossimPlanetQtMessageLog(this);
+	theMessageLogDialog->setWindowFlags(theMessageLogDialog->windowFlags()|Qt::WindowStaysOnTopHint);
+
+	theQtErrorLogStream.setMainWindow(this);
+	theQtWarnLogStream.setMainWindow(this);
+//	theQtDebugLogStream.setMainWindow(this);
+//	theQtInfoLogStream.setMainWindow(this);
+
+   thePlanet = new ossimPlanet;
+   theViewerCallback = new ViewerCallback(this);
+#if 1
+	ossimSetNotifyStream(&theQtErrorLogStream, ossimNotifyFlags_FATAL);
+	ossimSetNotifyStream(&theQtWarnLogStream, ossimNotifyFlags_WARN);
+//	ossimSetNotifyStream(&theQtInfoLogStream, ossimNotifyFlags_NOTICE);
+//	ossimSetNotifyStream(&theQtInfoLogStream, ossimNotifyFlags_INFO);
+//	ossimSetNotifyStream(&theQtDebugLogStream, ossimNotifyFlags_DEBUG);
+#endif
+}
+
+ossimPlanetQtMainWindow::~ossimPlanetQtMainWindow()
+{
+   theGlWidget->viewer()->removeCallback(theViewerCallback.get());
+	theAnnotationLayer->removeCallback(theNodeCallback.get());
+   theKmlLayer->removeCallback(theNodeCallback.get());
+   theVideoLayer->removeCallback(theNodeCallback.get()); 
+	theSousaLayer->removeCallback(theNodeCallback.get());
+	
+	thePlanet = 0;
+	theGlWidget->viewer()->setSceneData(thePlanet.get());
+   if(theIoThread.valid())
+   {
+      theIoThread->removeMessageHandler(theIoMessageHandler.get());
+      if(theIoThread->isRunning())
+      {
+         theIoThread->cancel();
+         while(theIoThread->isRunning());
+      }
+      theIoThread=0;
+   }
+   
+   //theGlWidget->cancelPager();
+	if(theActivityWindow)
+	{
+		theActivityWindow->close();
+		
+	}
+}
+
+osg::ref_ptr<ossimPlanet> ossimPlanetQtMainWindow::planet()
+{
+   return thePlanet;
+}
+
+
+const osg::ref_ptr<ossimPlanet> ossimPlanetQtMainWindow::planet()const
+{
+   return thePlanet;
+}
+
+
+const osg::ref_ptr<ossimPlanetKmlLayer> ossimPlanetQtMainWindow::kmlLayer()const
+{
+   return theKmlLayer.get();
+}
+
+osg::ref_ptr<ossimPlanetKmlLayer> ossimPlanetQtMainWindow::kmlLayer()
+{
+   return theKmlLayer.get();
+}
+
+const osg::ref_ptr<ossimPlanetVideoLayer> ossimPlanetQtMainWindow::videoLayer()const
+{
+   return theVideoLayer;
+}
+
+osg::ref_ptr<ossimPlanetAnnotationLayer> ossimPlanetQtMainWindow::annotationLayer()
+{
+   return theAnnotationLayer;
+}
+
+osg::ref_ptr<ossimPlanetVideoLayer> ossimPlanetQtMainWindow::videoLayer()
+{
+   return theVideoLayer;
+}
+
+ossim_uint32 ossimPlanetQtMainWindow::textureLayerGroupListSize()const
+{
+   return theTextureLayers.size();
+}
+
+osg::ref_ptr<ossimPlanetTextureLayerGroup> ossimPlanetQtMainWindow::textureLayerGroup(ossim_uint32 idx)
+{
+   if(idx < theTextureLayers.size())
+   {
+      return theTextureLayers[idx];
+   }
+
+   return 0;
+}
+
+const osg::ref_ptr<ossimPlanetTextureLayerGroup> ossimPlanetQtMainWindow::textureLayerGroup(ossim_uint32 idx)const
+{
+   if(idx < theTextureLayers.size())
+   {
+      return theTextureLayers[idx];
+   }
+
+   return 0;
+}
+
+ossimPlanetQtLegend* ossimPlanetQtMainWindow::legend()
+{
+   return thePlanetLegend;
+}
+const ossimPlanetQtLegend* ossimPlanetQtMainWindow::legend()const
+{
+   return thePlanetLegend;
+}
+
+ossimPlanetQtViewer* ossimPlanetQtMainWindow::glWidget()
+{
+   return theGlWidget;
+}
+ossimPlanetManipulator* ossimPlanetQtMainWindow::manipulator()
+{
+   return theManipulator.get();
+}
+
+ossimPlanetQtActivityWindow* ossimPlanetQtMainWindow::activityWindow()
+{
+   return theActivityWindow;
+}
+
+const ossimPlanetQtActivityWindow* ossimPlanetQtMainWindow::activityWindow()const
+{
+   return theActivityWindow;
+}
+
+void ossimPlanetQtMainWindow::saveSession(const QString& filename)
+{
+   ossimRefPtr<ossimXmlNode> manipulatorNode = new ossimXmlNode;
+   ossimRefPtr<ossimXmlNode> viewNode        = new ossimXmlNode;
+   ossimRefPtr<ossimXmlNode> orientationNode = new ossimXmlNode;
+   ossimRefPtr<ossimXmlNode> posNode         = new ossimXmlNode;   
+   ossimRefPtr<ossimXmlNode> rootNode = new ossimXmlNode;
+   ossimRefPtr<ossimXmlDocument> document = new ossimXmlDocument;
+   rootNode->setTag("ossimPlanetQt");
+//    rootNode->setTag("object");
+//    rootNode->addAttribute("type", "ossimPlanetQt");
+   ossimRefPtr<ossimXmlNode> legendNode = thePlanetLegend->saveXml();
+   rootNode->addChildNode(legendNode.get());
+   osg::ref_ptr<ossimPlanetLookAt> currentCamera = theGlWidget->viewer()->currentCamera()->clone();
+   manipulatorNode->setTag("ossimPlanetManipulator");
+   manipulatorNode->addChildNode(viewNode.get());
+   viewNode->setTag("View");
+   viewNode->addChildNode("latitude", ossimString::toString(currentCamera->lat()));
+   viewNode->addChildNode("longitude", ossimString::toString(currentCamera->lon()));
+   viewNode->addChildNode("altitude", ossimString::toString(currentCamera->altitude()));
+
+   viewNode->addChildNode("heading", ossimString::toString(currentCamera->heading()));
+   viewNode->addChildNode("pitch", ossimString::toString(currentCamera->pitch()));
+   viewNode->addChildNode("roll", ossimString::toString(currentCamera->roll()));
+   
+   rootNode->addChildNode(manipulatorNode);
+
+   ofstream out(theSessionFilename.c_str());
+   document->initRoot(rootNode.get());
+   
+   out << *document << std::endl;
+
+   setWindowTitle(QString("ossimPlanet Session: ") + filename);
+   
+}
+
+void ossimPlanetQtMainWindow::loadSession(const QString& filename)
+{  
+   ossimRefPtr<ossimXmlDocument> document = new ossimXmlDocument;
+	thePlanetLegend->clear();
+
+	if(theActivityWindow)
+	{
+		theActivityWindow->theActivityWidget->deleteAllActivities();
+	}
+   if(document->openFile(ossimFilename(filename.toStdString())))
+   {
+      theSessionFilename = ossimFilename(filename.toStdString());
+      ossimRefPtr<ossimXmlNode> rootNode = document->getRoot();
+      ossimString attributeValue;
+      if(rootNode->getTag() == "ossimPlanetQt")
+      {
+//         std::vector<ossimRefPtr<ossimXmlNode> >&  childNodes = rootNode->getChildNodes();
+         
+         ossimRefPtr<ossimXmlNode> legend = rootNode->findFirstNode("ossimPlanetQtLegend");
+         ossimRefPtr<ossimXmlNode> manipulator = rootNode->findFirstNode("ossimPlanetManipulator");
+         if(legend.valid())
+         {
+            theTextureLayers[0]->removeLayers(0, theTextureLayers[0]->numberOfLayers());
+            theTextureLayers[1]->removeLayers(0, theTextureLayers[1]->numberOfLayers());
+            thePlanetLegend->populateLegend(legend.get());
+         }
+         if(manipulator.valid())
+         {
+            ossimRefPtr<ossimXmlNode> pos;
+            ossimRefPtr<ossimXmlNode> orient;
+            
+            const vector<ossimRefPtr<ossimXmlNode> >& childNodes = manipulator->getChildNodes();
+            
+            if(childNodes.size() == 1)
+            {
+               ossimRefPtr<ossimXmlNode> lat     = manipulator->findFirstNode("View/latitude");
+               ossimRefPtr<ossimXmlNode> lon     = manipulator->findFirstNode("View/longitude");
+               ossimRefPtr<ossimXmlNode> hgt     = manipulator->findFirstNode("View/altitude");
+               ossimRefPtr<ossimXmlNode> heading = manipulator->findFirstNode("View/heading");
+               ossimRefPtr<ossimXmlNode> pitch   = manipulator->findFirstNode("View/pitch");
+               ossimRefPtr<ossimXmlNode> roll    = manipulator->findFirstNode("View/roll");
+               
+               if(lat.valid(),
+                  lon.valid(),
+                  hgt.valid(),
+                  heading.valid(),
+                  pitch.valid(),
+                  roll.valid())
+               {
+                  ossimString actionString = (ossimString(":navigator gotolatlonelevhpr ") +
+                                              lat->getText() + " " +
+                                              lon->getText() + " " +
+                                              hgt->getText() + " " +
+                                              heading->getText() + " " +
+                                              pitch->getText() + " " +
+                                              roll->getText() + " ");
+                  ossimPlanetDestinationCommandAction(actionString).execute();
+                  
+               }
+            }
+         }
+      }
+      setWindowTitle(QString("ossimPlanet Session: ") + theSessionFilename);
+   }
+   else
+   {
+      // error
+   }
+}
+
+void ossimPlanetQtMainWindow::dropEvent ( QDropEvent * event )
+{
+   thePlanetLegend->dropEvent(event);
+}
+ 
+void ossimPlanetQtMainWindow::dragEnterEvent(QDragEnterEvent *event)
+{
+   thePlanetLegend->dragEnterEvent(event);
+}
+
+
+void ossimPlanetQtMainWindow::sendMessage(const std::string& id,
+                                          const std::string& message,
+                                          const ossimString& messageType)
+{
+   ossim_uint32 idx = 0;
+   std::vector<char> tempMessage(message.begin(), message.end());
+   for(idx = 0; idx < theClientList.size(); ++idx)
+   {
+      if(theClientList[idx]->thePortType == messageType)
+      {
+         theClientList[idx]->theIo->pushMessage(new ossimPlanetMessage(id, tempMessage), messageType=="Data");
+      }
+   }
+}
+
+void ossimPlanetQtMainWindow::addOperation(osg::ref_ptr<ossimPlanetOperation> operation)
+{
+	if(theActivityWindow)
+	{
+		theActivityWindow->theActivityWidget->addOperation(operation.get());
+	}
+}
+
+bool ossimPlanetQtMainWindow::event(QEvent* e)
+{
+   switch(e->type())
+   {
+		case ossimPlanetQt::MESSAGE_EVENT_TYPE:
+		{
+         ossimPlanetQt::MessageEvent* evt = dynamic_cast<ossimPlanetQt::MessageEvent*>(e);
+			if(evt)
+			{
+				// make sure the dialog exists and it's raised to top
+				//
+				switch(evt->messageType())
+				{
+					case ossimPlanetQt::MessageEvent::ERROR_MESSAGE_TYPE:
+					{
+//						QTextCharFormat format = theMessageLogDialog->theMessageLog->currentCharFormat();
+//						format.setForeground(QBrush(QColor(255, 0, 0)));
+//						theMessageLogDialog->theMessageLog->setCurrentCharFormat(format);
+//						theMessageLogDialog->theMessageLog->append(QString("ERROR: ") + QString(evt->message()));
+						theMessageLogDialog->addMessage(evt->message(),
+																  ossimPlanetQtMessageLog::LOG_ERROR);
+						theMessageLogDialog->raise();
+						theMessageLogDialog->show();
+						theMessageLogDialog->showLastMessage();
+						break;
+					}
+					case ossimPlanetQt::MessageEvent::WARNING_MESSAGE_TYPE:
+					{
+						theMessageLogDialog->addMessage(QString("WARNING: ") + QString(evt->message()),
+																  ossimPlanetQtMessageLog::LOG_WARNING);
+						theMessageLogDialog->showLastMessage();
+						break;
+					}
+					case ossimPlanetQt::MessageEvent::INFO_MESSAGE_TYPE:
+					{
+						theMessageLogDialog->addMessage(QString(evt->message()),
+																  ossimPlanetQtMessageLog::LOG_INFO);
+
+						theMessageLogDialog->showLastMessage();
+						break;
+					}
+					case ossimPlanetQt::MessageEvent::DEBUG_MESSAGE_TYPE:
+					{
+						theMessageLogDialog->addMessage(QString(evt->message()),
+						                                               ossimPlanetQtMessageLog::LOG_DEBUG);
+						break;
+					}
+				}
+			}
+         if(evt->message().length() > theLargestLogMessageSize)
+         {
+            theLargestLogMessageSize = evt->message().length();
+            theMessageLogDialog->theMessageLog->resizeColumnToContents(0);
+         }
+			return true;
+		}
+      case ossimPlanetQt::WMS_SETTINGS_EVENT_TYPE:
+      {
+         ossimPlanetQt::WmsSettingsEvent* evt = dynamic_cast<ossimPlanetQt::WmsSettingsEvent*>(e);
+         if(evt)
+         {
+            QStringList keys = ossimPlanetQtApplication::wmsSettingsSubkeyList();//subkeyList(settings, basePath);
+            QString   serversAdded;
+            QString   serversUpdated;
+            const std::vector<ossimPlanetQt::WmsSettingsEvent::WmsSettingsProperties>& propertyList = evt->settingsPropertyList();
+            ossim_uint32 idx = 0;
+            for(idx = 0; idx < propertyList.size();++idx)
+            {
+               if(!keys.contains(propertyList[idx].theName.c_str()))
+               {
+                  if(serversAdded == "")
+                  {
+                     serversAdded += propertyList[idx].theName.c_str();
+                  }
+                  else
+                  {
+                     serversAdded = serversAdded + ", " +  propertyList[idx].theName.c_str();
+                  }
+               }
+               else
+               {
+                  if(serversUpdated == "")
+                  {
+                     serversUpdated += propertyList[idx].theName.c_str();
+                  }
+                  else
+                  {
+                     serversUpdated = serversUpdated + ", " +  propertyList[idx].theName.c_str();
+                  }
+               }
+               QString path = propertyList[idx].theName.c_str();
+               ossimPlanetQtApplication::writeWmsSettingsEntry(path + "/proxyhost", propertyList[idx].theProxyHost.c_str());
+               ossimPlanetQtApplication::writeWmsSettingsEntry(path + "/proxyport", propertyList[idx].theProxyPort.c_str());
+               ossimPlanetQtApplication::writeWmsSettingsEntry(path + "/proxyuser", propertyList[idx].theProxyUser.c_str());
+               ossimPlanetQtApplication::writeWmsSettingsEntry(path + "/proxypassword", propertyList[idx].theProxyPassword.c_str());
+               ossimPlanetQtApplication::writeWmsSettingsEntry(path + "/url", propertyList[idx].theUrl.c_str());
+            }
+            QString message;
+            if(serversAdded!="")
+            {
+               message = "Servers Added: " + serversAdded;
+               if(theWmsWindow)
+               {
+                  theWmsWindow->populateConnectionList();
+               }
+            }
+            if(serversUpdated != "")
+            {
+               if(message!="")
+               {
+                  message +="\n";
+               }
+               message += "Servers Updated: " + serversUpdated;
+            }
+            
+            if(message != "")
+            {
+               QMessageBox::information(this, tr("WMS proxies"),
+                                        message);
+            }
+         }
+         return true;
+      }
+      case QEvent::Show:
+      {
+   
+         if(!theInitializedFlag)
+         {
+            init();
+         }
+         break;
+      }
+      case QEvent::Close:
+      {
+         if(theLayerOperation)
+         {
+            delete theLayerOperation;
+            theLayerOperation = 0;
+         }
+         if(theWmsWindow)
+         {
+            delete theWmsWindow;
+            theWmsWindow = 0;
+         }
+         if(theRuler)
+         {
+            delete theRuler;
+            theRuler = 0;
+         }
+         if(theActivityWindow)
+         {
+            delete theActivityWindow;
+            theActivityWindow = 0;
+         }
+         if(theMessageLogDialog)
+         {
+            delete theMessageLogDialog;
+            theMessageLogDialog = 0;
+         }
+         break;
+      }
+      default:
+      {
+          break;
+      } 
+   }
+   return QMainWindow::event(e);
+}
+
+void ossimPlanetQtMainWindow::on_viewBookmark_triggered( bool /*checked*/ )
+{
+   osg::ref_ptr<ossimPlanetLookAt> lookAt = theGlWidget->viewer()->currentLookAt()->clone();
+   
+   legend()->addBookmark(lookAt, "", "");// use default name and description
+}
+
+void ossimPlanetQtMainWindow::on_viewToggleFullScreen_triggered(bool )
+{
+   if(theIsFullScreen)
+   {
+      theGlWidget->setParent(tabWidget);
+      tabWidget->widget(0)->layout()->addWidget(theGlWidget);
+      if(theFullScreenFrame)
+      {
+         delete theFullScreenFrame;
+      }
+      theFullScreenFrame = 0;
+      releaseKeyboard();
+      theGlWidget->setFocus();
+      theIsFullScreen = false;
+      showNormal();
+   }
+   else
+   {
+       theFullScreenFrame = new QFrame();
+       theFullScreenFrame->setFrameShadow(QFrame::Plain);
+       theFullScreenFrame->setFrameShape(QFrame::NoFrame);
+      tabWidget->widget(0)->layout()->removeWidget(theGlWidget);
+      theGlWidget->setParent(theFullScreenFrame);
+       theFullScreenFrame->showFullScreen();
+      theGlWidget->showFullScreen();
+       theGlWidget->setGeometry(0,
+                                0,
+                                theFullScreenGeometry.width(),
+                                theFullScreenGeometry.height());
+      grabKeyboard();
+      theGlWidget->setFocus();
+      theIsFullScreen = true;
+   }
+}
+
+// void ossimPlanetQtMainWindow::on_viewSaveAsImage_triggered(bool checked)
+// {
+//    QImage image = theGlWidget->grabFrameBuffer();
+
+//    image.save("/var/tmp/myimage.jpg", 0, 100);
+// }
+QString ossimPlanetQtMainWindow::getSaveFile(const QString& title, const QString& extension, const QString& filters, const QString& defaultDir)
+{
+   QFileDialog fileDialog(this, title, defaultDir);
+   if(extension.size()>0)
+   {
+      fileDialog.setDefaultSuffix(extension);
+   }
+   fileDialog.setConfirmOverwrite(true);
+   fileDialog.setAcceptMode(QFileDialog::AcceptSave);
+   if(filters.size() > 0)
+   {
+      fileDialog.setFilter(filters);
+   }
+   if(extension.size() > 0)
+   {
+      fileDialog.setDefaultSuffix(extension);
+   }
+   fileDialog.setReadOnly(true);
+   fileDialog.exec();
+   QStringList files = fileDialog.selectedFiles();
+   if(!files.empty())
+   {
+      return files[0];
+   }
+   return "";
+}
+
+void ossimPlanetQtMainWindow::on_fileSaveViewAsJpeg_triggered(bool )
+{
+   ossimFilename fileDir(ossimPlanetQtApplication::userDirectory().toStdString());
+   if(!theLastViewSaveDirectory.empty())
+   {
+      fileDir = theLastViewSaveDirectory;
+   }
+   
+   QString filename = getSaveFile("Save View As JPEG",
+                                  "jpg",
+                                  "*.jpg",
+                                  fileDir.c_str());
+   
+   if(filename != "")
+   {
+      ossimRefPtr<ossimImageFileWriter> writer = ossimImageWriterFactoryRegistry::instance()->createWriter(ossimString("image/jpeg"));
+
+      if(writer.valid())
+      {
+         ossimFilename file(filename.toStdString());
+         theLastViewSaveDirectory = file.path();
+         file = file.setExtension("jpg");
+         ossimPlanetQtImage img(theGlWidget->grabFrameBuffer());
+         ossimRefPtr<ossimImageData> data = img.getOssimImage();
+         ossimRefPtr<ossimMemoryImageSource> memorySource = new ossimMemoryImageSource();
+         memorySource->setImage(data);
+         memorySource->initialize();
+         ((ossimPropertyInterface*)writer.get())->setProperty("quality", "100");
+         ((ossimPropertyInterface*)writer.get())->setProperty(ossimKeywordNames::CREATE_EXTERNAL_GEOMETRY_KW, "false");
+         ((ossimPropertyInterface*)writer.get())->setProperty(ossimKeywordNames::CREATE_OVERVIEW_KW, "false");
+         
+         writer->setFilename(ossimFilename(file));
+         writer->connectMyInputTo(0, memorySource.get());
+         writer->execute();
+      }
+      else
+      {
+         QMessageBox::warning(this, tr("Save JPEG "),
+                              tr("Unable to create a JPEG writer "));
+         
+      }
+   }
+}
+
+void ossimPlanetQtMainWindow::on_fileSaveViewAsPng_triggered(bool )
+{
+   ossimFilename fileDir(ossimPlanetQtApplication::userDirectory().toStdString());
+   if(!theLastViewSaveDirectory.empty())
+   {
+      fileDir = theLastViewSaveDirectory;
+   }
+
+   QString filename = getSaveFile("Save View As PNG",
+                                  "png",
+                                  "*.png",
+                                  fileDir.c_str());
+   
+   if(filename != "")
+   {
+      ossimRefPtr<ossimImageFileWriter> writer = ossimImageWriterFactoryRegistry::instance()->createWriter(ossimString("image/png"));
+
+      if(writer.valid())
+      {
+         ossimFilename file(filename.toStdString());
+         theLastViewSaveDirectory = file.path();
+         file = file.setExtension("png");
+         ossimPlanetQtImage img(theGlWidget->grabFrameBuffer());
+         ossimRefPtr<ossimImageData> data = img.getOssimImage();
+         ossimRefPtr<ossimMemoryImageSource> memorySource = new ossimMemoryImageSource();
+         memorySource->setImage(data);
+         memorySource->initialize();
+         ((ossimPropertyInterface*)writer.get())->setProperty("quality", "100");
+         ((ossimPropertyInterface*)writer.get())->setProperty(ossimKeywordNames::CREATE_EXTERNAL_GEOMETRY_KW, "false");
+         ((ossimPropertyInterface*)writer.get())->setProperty(ossimKeywordNames::CREATE_OVERVIEW_KW, "false");
+         
+         writer->setFilename(ossimFilename(file));
+         writer->connectMyInputTo(0, memorySource.get());
+         writer->execute();
+      }
+      else
+      {
+         QMessageBox::warning(this, tr("Save PNG "),
+                              tr("Unable to create a PNG writer "));
+         
+      }
+   }
+}
+
+void ossimPlanetQtMainWindow::on_fileSaveViewAsTiff_triggered(bool )
+{
+   ossimFilename fileDir(ossimPlanetQtApplication::userDirectory().toStdString());
+   if(!theLastViewSaveDirectory.empty())
+   {
+      fileDir = theLastViewSaveDirectory;
+   }
+
+   QString filename = getSaveFile("Save View As TIFF",
+                                  "tif",
+                                  "*.tif",
+                                  fileDir.c_str());
+   
+   if(filename != "")
+   {
+      ossimRefPtr<ossimImageFileWriter> writer = ossimImageWriterFactoryRegistry::instance()->createWriter(ossimString("image/tiff"));
+
+      if(writer.valid())
+      {
+         ossimFilename file(filename.toStdString());
+         theLastViewSaveDirectory = file.path();
+         file = file.setExtension("tif");
+         ossimPlanetQtImage img(theGlWidget->grabFrameBuffer());
+         ossimRefPtr<ossimImageData> data = img.getOssimImage();
+         ossimRefPtr<ossimMemoryImageSource> memorySource = new ossimMemoryImageSource();
+         memorySource->setImage(data);
+         memorySource->initialize();
+         ((ossimPropertyInterface*)writer.get())->setProperty(ossimKeywordNames::CREATE_EXTERNAL_GEOMETRY_KW, "false");
+         ((ossimPropertyInterface*)writer.get())->setProperty(ossimKeywordNames::CREATE_OVERVIEW_KW, "false");
+         ((ossimPropertyInterface*)writer.get())->setProperty(ossimKeywordNames::CREATE_OVERVIEW_KW, "false");
+         
+         writer->setFilename(ossimFilename(file));
+         writer->connectMyInputTo(0, memorySource.get());
+         writer->execute();
+      }
+      else
+      {
+         QMessageBox::warning(this, tr("Save TIFF "),
+                              tr("Unable to create a TIFF writer "));
+         
+      }
+   }
+}
+
+
+void ossimPlanetQtMainWindow::on_fileSaveAnimationPath_triggered(bool)
+{
+}
+
+void ossimPlanetQtMainWindow::on_fileLoadAnimationPath_triggered(bool)
+{
+}
+
+void ossimPlanetQtMainWindow::on_viewStartRecordingAnimationPath_triggered(bool)
+{
+   theManipulator->startRecording();
+}
+
+void ossimPlanetQtMainWindow::on_viewStopRecordingAnimationPath_triggered(bool)
+{
+   theManipulator->stopRecording();
+   osg::ref_ptr<osg::AnimationPath> animationPath = new osg::AnimationPath;
+   ostringstream out;
+   theManipulator->saveRecording(out);
+   istringstream in(out.str());
+   animationPath->read(in);
+   thePlanetLegend->addAnimationPath(animationPath);
+}
+
+void ossimPlanetQtMainWindow::on_viewPlayAnimationPath_triggered(bool)
+{
+   theManipulator->playRecording();
+}
+
+
+void ossimPlanetQtMainWindow::on_viewGotoLatLon_triggered( bool )
+{
+   bool ok;
+   QString text = QInputDialog::getText(this,
+      QString("Goto Lat Lon"),
+      QString("Enter Lat Lon and optional height separated by spaces:"),
+      QLineEdit::Normal,
+      QString::null, &ok);
+   if ( ok && !text.isEmpty() )
+   {
+      std::istringstream in(text.toStdString());
+      ossimString lat, lon, height;
+      in >> lat >> lon >> height;
+      lat = lat.trim();
+      lon = lon.trim();
+      height = height.trim();
+      if(height.empty())
+      {
+         ossimPlanetDestinationCommandAction(":navigator gotolatlonnadir " + lat + " " + lon).execute(); 
+      }
+      else
+      {
+         ossimPlanetDestinationCommandAction(":navigator gotolatlonelevnadir " + lat + " " + lon + " " + height).execute(); 
+      }
+   }   
+}
+
+void ossimPlanetQtMainWindow::on_viewGotoAddress_triggered( bool )
+{
+   bool ok;
+   QString text = QInputDialog::getText(this, tr("GeoEncoder Dialog"),
+                                        tr("Enter Address:"), QLineEdit::Normal,
+                                        QDir::home().dirName(), &ok);
+   if (ok && !text.isEmpty())
+   {
+      std::vector<osg::ref_ptr<ossimPlanetGoecoder::ossimPlanetGeocoderLocation> > result;
+      osg::ref_ptr<ossimPlanetYahooGeocoder> geocoder = new ossimPlanetYahooGeocoder;
+      
+      geocoder->getLocationFromAddress(result,
+                                       ossimString(text.toStdString()));
+      if(result.size())
+      {
+         osg::ref_ptr<ossimPlanetLookAt> look = new ossimPlanetLookAt;
+         ossimGpt gpt = result[0]->getLocation();
+         look->setLat(gpt.latd());
+         look->setLon(gpt.lond());
+         look->setPitch(45);
+         look->setRange(20000);
+         ossimPlanetDestinationCommandAction(look->toNavigationString()).execute();
+      }
+   }
+}
+
+void ossimPlanetQtMainWindow::on_fileQuit_triggered(bool )
+{
+   if(theLayerOperation)
+   {
+      delete theLayerOperation;
+      theLayerOperation = 0;
+   }
+   if(theWmsWindow)
+   {
+      delete theWmsWindow;
+      theWmsWindow = 0;
+   }
+   if(theActivityWindow)
+   {
+      delete theActivityWindow;
+      theActivityWindow = 0;
+   }
+   if(theMessageLogDialog)
+   {
+      delete theMessageLogDialog;
+      theMessageLogDialog = 0;
+   }
+   if(theRuler)
+   {
+      delete theRuler;
+      theRuler = 0;
+   }
+   close();
+}
+
+void ossimPlanetQtMainWindow::on_fileOpenImage_triggered( bool )
+{
+   ossimImageHandlerFactoryBase::UniqueStringList stringList;
+   
+   ossimImageHandlerRegistry::instance()->getSupportedExtensions(stringList);
+
+   ossim_uint32 idx = 0;
+   QString extString = "Images(";
+   for(idx = 0; idx < stringList.size(); ++idx)
+   {
+      extString += ("*."+stringList[idx]).c_str();
+      if((idx+1) != stringList.size())
+      {
+         extString += " ";
+      }
+   }
+   extString += ");;Vectors(*shp );;All Files(*)";
+
+   
+   QStringList filenames = QFileDialog::getOpenFileNames(this,
+                                                         "open file dialog",
+                                                         ossimPlanetQtApplication::currentOpenImageDirectory(),
+                                                         extString);
+   if(filenames.size() > 0)
+   {
+      ossimFilename lastFile;
+      ossim_uint32 fileIdx = 0;
+      for(fileIdx = 0; fileIdx < (ossim_uint32)filenames.size();++fileIdx)
+      {
+         ossimPlanetQtOpenImageFileOperation* activity = new ossimPlanetQtOpenImageFileOperation(filenames[fileIdx],
+                                                                                                  thePlanetLegend);
+         theActivityWindow->theActivityWidget->addOperation(activity);
+         lastFile = ossimFilename(filenames[fileIdx].toStdString()).path();
+      }
+      if(!lastFile.empty())
+      {
+         ossimPlanetQtApplication::setCurrentOpenImageDirectory(lastFile.c_str());
+      }
+   }
+}
+
+void ossimPlanetQtMainWindow::on_fileOpenVideo_triggered( bool /*checked*/)
+{
+	QStringList filenames = QFileDialog::getOpenFileNames(this,
+                                                         "open file dialog",
+                                                         ossimPlanetQtApplication::currentOpenVideoDirectory(),
+                                                         "Videos(*.mpg *.mpeg *.mp4 *.m2p *.mpv *.m2v)");
+   if(filenames.size() > 0)
+   {
+      ossim_uint32 fileIdx = 0;
+      ossimFilename lastFile;
+      for(fileIdx = 0; fileIdx < (ossim_uint32)filenames.size();++fileIdx)
+      {
+         ossimFilename file(filenames[fileIdx].toStdString());
+         lastFile = file.path(); 
+			videoLayer()->add(file);
+      }
+      ossimPlanetQtApplication::setCurrentOpenVideoDirectory(lastFile.c_str());
+   }
+}
+
+void ossimPlanetQtMainWindow::on_filePreferences_triggered(bool )
+{
+   if(thePreferences)
+   {
+      thePreferences->show();
+      thePreferences->raise();
+   }
+   else
+   {
+      thePreferences = new ossimPlanetQtPreferences(0);
+      thePreferences->setAttribute(Qt::WA_DeleteOnClose);      
+      thePreferences->show();
+      thePreferences->theAutoHighlightLineOfSiteFlag->setChecked( theAutoHighlightLineOfSiteFlag);
+      connect(thePreferences,
+              SIGNAL(destroyed(QObject*)),
+              this,
+              SLOT(preferencesDestroyed(QObject*)));
+      connect(thePreferences->theStagingCacheDirectory,
+              SIGNAL(textChanged(const QString&)),
+              this,
+              SLOT(setStagingCacheDirectory(const QString&)));
+      connect(thePreferences->theStagingCacheDirectoryButton,
+              SIGNAL(clicked(bool)),
+              this,
+              SLOT(stagingCacheDirectoryButtonClicked(bool)));
+      connect(thePreferences->theAutoHistogramStretchSetting,
+              SIGNAL(activated(const QString&)),
+              this,
+              SLOT(setAutoHistogramStretchSetting(const QString&)));
+      connect(thePreferences->theWmsTimeout,
+              SIGNAL(textChanged(const QString&)),
+              this,
+              SLOT(setWmsTimeout(const QString&)));
+      connect(thePreferences->theHudEnabled,
+              SIGNAL(clicked(bool)),
+              this,
+              SLOT(setHudEnabledFlag(bool)));
+      connect(thePreferences->theAutomaticStagingEnabled,
+              SIGNAL(clicked(bool)),
+              this,
+              SLOT(setAutomaticStagingEnabled(bool)));
+      
+	  // added by russc 4/30/08
+	  connect(thePreferences->archiveMappingEnabled,
+			  SIGNAL(clicked(bool)),
+			  this,
+			  SLOT(setArchiveMappingEnabledFlag(bool)));
+      connect(thePreferences->archiveMappingWidget,
+              SIGNAL(itemChanged( QTableWidgetItem* )),
+              this,
+              SLOT(archiveMappingWidgetItemChanged(QTableWidgetItem*)));
+      connect(thePreferences->archiveAddButton,
+              SIGNAL(clicked(bool)),
+              this,
+              SLOT(archiveAddButtonClicked(bool)));
+      connect(thePreferences->archiveRemoveButton,
+              SIGNAL(clicked(bool)),
+              this,
+              SLOT(archiveRemoveButtonClicked(bool)));
+      
+      connect(thePreferences->theSousaIdentitySetButton,
+              SIGNAL(clicked(bool)),
+              this,
+              SLOT(sousaIdentitySetButtonClicked(bool)));
+      connect(thePreferences->theSousaServerConnectButton,
+              SIGNAL(clicked(bool)),
+              this,
+              SLOT(sousaServerConnectButtonClicked(bool)));
+      connect(thePreferences->theSousaServerAutoConnectOnStart,
+              SIGNAL(clicked(bool)),
+              this,
+              SLOT(sousaServerAutoConnectOnStartClicked(bool)));
+      
+      connect(thePreferences->theAutoHighlightLineOfSiteFlag,
+              SIGNAL(clicked(bool)),
+              this,
+              SLOT(setAutoHighlightLineOfSiteFlag(bool)));              
+      connect(thePreferences->theElevationEnabled,
+              SIGNAL(clicked(bool)),
+              this,
+              SLOT(setElevationEnabledFlag(bool)));
+      connect(thePreferences->theMeshDetail,
+              SIGNAL(valueChanged(int)),
+              this,
+              SLOT(setMeshDetailType(int)));
+      connect(thePreferences->theTextureDetail,
+              SIGNAL(valueChanged(int)),
+              this,
+              SLOT(setTextureDetailType(int)));
+      connect(thePreferences->theTerrainCullingAmount,
+              SIGNAL(valueChanged(int)),
+              this,
+              SLOT(setTerrainCullingType(int)));
+      
+      connect(thePreferences->theElevationMultiplier,
+              SIGNAL(currentIndexChanged(const QString&)),
+              this,
+              SLOT(setHeightExageration(const QString&)));
+      connect(thePreferences->theServerPortWidget,
+              SIGNAL(itemChanged( QTableWidgetItem* )),
+              this,
+              SLOT(serverPortItemChanged(QTableWidgetItem*)));
+      connect(thePreferences->theAddPortButton,
+              SIGNAL(clicked ( bool )),
+              this,
+              SLOT(addPort(bool)));
+      connect(thePreferences->theDeletePortButton,
+              SIGNAL(clicked ( bool )),
+              this,
+              SLOT(deletePort(bool)));
+       connect(thePreferences->theAddClientPortButton,
+              SIGNAL(clicked ( bool )),
+              this,
+              SLOT(addClientPort(bool)));
+      connect(thePreferences->theDeleteClientPortButton,
+              SIGNAL(clicked ( bool )),
+              this,
+              SLOT(deleteClientPort(bool)));
+      connect(thePreferences->theEnableAllClientPortButton,
+              SIGNAL(clicked ( bool )),
+              this,
+              SLOT(enableAllClientPorts(bool)));
+      connect(thePreferences->theDisableAllClientPortButton,
+              SIGNAL(clicked ( bool )),
+              this,
+              SLOT(disableAllClientPorts(bool)));
+      connect(thePreferences->theClientPortWidget,
+             SIGNAL(itemChanged( QTableWidgetItem* )),
+              this,
+              SLOT(clientItemChanged(QTableWidgetItem*)));
+      connect(thePreferences->theViewTransmitRate,
+             SIGNAL(textChanged( const QString& )),
+              this,
+              SLOT(viewTransmitTextChanged(const QString&)));
+      connect(thePreferences->theAutoViewSyncFlag,
+              SIGNAL(stateChanged(int)),
+              this,
+              SLOT(autoViewSyncFlagChanged(int)));
+
+      connect(thePreferences->theEphemerisEnabled,
+              SIGNAL(clicked(bool)),
+              this,
+              SLOT(setEphemerisEnabledFlag(bool)));
+      connect(thePreferences->theEphemerisAutoUpdateToCurrentTime,
+              SIGNAL(clicked(bool)),
+              this,
+              SLOT(setEphemerisAutoUpdateToCurrentTimeFlag(bool)));
+      connect(thePreferences->theSkyEnabled,
+              SIGNAL(clicked(bool)),
+              this,
+              SLOT(setSkyEnabledFlag(bool)));
+      connect(thePreferences->theMoonEnabled,
+              SIGNAL(clicked(bool)),
+              this,
+              SLOT(setMoonEnabledFlag(bool)));
+      connect(thePreferences->theSunLightingEnabled,
+              SIGNAL(clicked(bool)),
+              this,
+              SLOT(setSunlightEnabledFlag(bool)));
+      connect(thePreferences->theVisibility,
+              SIGNAL(valueChanged(int)),
+              this,
+              SLOT(setPercentVisibility(int)));
+      
+      connect(thePreferences->theCloudsEnabled,
+              SIGNAL(clicked(bool)),
+              this,
+              SLOT(setCloudsEnabledFlag(bool)));
+      connect(thePreferences->theCloudAmount,
+              SIGNAL(valueChanged(int)),
+              this,
+              SLOT(setCloudAmount(int)));
+      connect(thePreferences->theCloudSharpness,
+              SIGNAL(valueChanged(int)),
+              this,
+              SLOT(setCloudSharpness(int)));
+      
+      thePreferences->theClientPortWidget->setHorizontalHeaderItem(PREFERENCES_CLIENT_WIDGET_NAME_IDX, new QTableWidgetItem("Name"));
+      thePreferences->theClientPortWidget->setHorizontalHeaderItem(PREFERENCES_CLIENT_WIDGET_IP_IDX, new QTableWidgetItem("IP Address"));
+      thePreferences->theClientPortWidget->setHorizontalHeaderItem(PREFERENCES_CLIENT_WIDGET_PORT_IDX, new QTableWidgetItem("Port"));
+      thePreferences->theClientPortWidget->setHorizontalHeaderItem(PREFERENCES_CLIENT_WIDGET_PORT_TYPE_IDX, new QTableWidgetItem("Type"));
+      
+      thePreferences->theServerPortWidget->setHorizontalHeaderItem(PREFERENCES_SERVER_WIDGET_NAME_IDX, new QTableWidgetItem("Name"));
+      thePreferences->theServerPortWidget->setHorizontalHeaderItem(PREFERENCES_SERVER_WIDGET_IP_IDX, new QTableWidgetItem("IP Address"));
+      thePreferences->theServerPortWidget->setHorizontalHeaderItem(PREFERENCES_SERVER_WIDGET_PORT_IDX, new QTableWidgetItem("Port"));
+      thePreferences->theServerPortWidget->setHorizontalHeaderItem(PREFERENCES_SERVER_WIDGET_PORT_TYPE_IDX, new QTableWidgetItem("Type"));
+      
+	  // added by russc
+	  thePreferences->archiveMappingWidget->setHorizontalHeaderItem(PREFERENCES_ARCHIVE_WIDGET_SOURCE_IDX, new QTableWidgetItem("Source"));
+	  thePreferences->archiveMappingWidget->setHorizontalHeaderItem(PREFERENCES_ARCHIVE_WIDGET_DESTINATION_IDX, new QTableWidgetItem("Destination"));
+
+      populatePreferences();
+   }
+}
+
+void ossimPlanetQtMainWindow::on_fileOpenWms_triggered(bool )
+{
+   if(theWmsWindow)
+   {
+      theWmsWindow->show();
+      theWmsWindow->raise();
+   }
+   else
+   {
+      theWmsWindow = new ossimPlanetQtWmsDialog(0);
+      theWmsWindow->setAttribute(Qt::WA_DeleteOnClose);
+      connect(theWmsWindow,
+              SIGNAL(addButtonHit(ossimPlanetQtWmsDialog*,
+                                  ossimRefPtr<ossimWmsCapabilitiesDocument>,
+                                  ossimPlanetQtWmsDialog::SelectedLayerInfoListType&)),
+              this,
+              SLOT(wmsAddButtonHit(ossimPlanetQtWmsDialog*,
+                                   ossimRefPtr<ossimWmsCapabilitiesDocument>,
+                                   ossimPlanetQtWmsDialog::SelectedLayerInfoListType&)));
+      connect(theWmsWindow,
+              SIGNAL(destroyed(QObject*)),
+              this,
+              SLOT(wmsDialogDestroyed(QObject*)));
+      connect(theWmsWindow->theWmsSynchButton,
+              SIGNAL(clicked(bool)),
+              this,
+              SLOT(wmsSyncCurrentSettings()));
+      connect(theWmsWindow->theWmsSynchAllButton,
+              SIGNAL(clicked(bool)),
+              this,
+              SLOT(wmsSyncAllSettings()));
+      theWmsWindow->show();
+   }
+}
+
+void ossimPlanetQtMainWindow::on_fileOpenKml_triggered( bool )
+{
+   QString extString = "Annotations(*.kml *.kmz *.KML *.KMZ)";
+   
+   QStringList filenames = QFileDialog::getOpenFileNames(this,
+                                                         "Open Kml file dialog",
+                                                         ossimPlanetQtApplication::currentOpenKmlDirectory(),
+                                                         extString);
+   if(filenames.size() > 0)
+   {
+      ossim_uint32 idx = 0;
+
+      ossimFilename lastFile;
+      for(idx = 0; idx < (ossim_uint32)filenames.size(); ++idx)
+      {
+         ossimFilename kmlFilename(filenames[idx].toStdString());
+         kmlLayer()->addKml(kmlFilename);
+         lastFile = kmlFilename.path();
+      }
+      if(!lastFile.empty())
+      {
+         ossimPlanetQtApplication::setCurrentOpenKmlDirectory(lastFile.c_str());
+      }
+   }
+}
+
+void ossimPlanetQtMainWindow::on_openSession_triggered(bool )
+{
+   QString sessionDir = ossimPlanetQtApplication::sessionDirectory();
+   QString filename = QFileDialog::getOpenFileName(this,
+                                                   "Open Session",
+                                                   ossimPlanetQtApplication::sessionDirectory(),
+                                                   "*.session");
+   
+   if(filename != "")
+   {
+      loadSession(filename);
+      ossimPlanetQtApplication::setCurrentOpenSessionDirectory(ossimFilename(filename.toStdString()).path().c_str());
+   }
+}
+
+void ossimPlanetQtMainWindow::on_saveSession_triggered(bool)
+{
+   ossimRefPtr<ossimXmlNode> rootNode = new ossimXmlNode;
+   ossimFilename sessionDir(ossimPlanetQtApplication::sessionDirectory().toStdString());
+   if(!sessionDir.exists())
+   {
+      sessionDir.createDirectory();
+   }
+   if(theSessionFilename == "NONAME")
+   {
+      QString filename = QFileDialog::getSaveFileName(this,
+                                                      "Save Session",
+                                                      sessionDir.c_str(),
+                                                      ".session");
+      if(filename != "")
+      {
+         theSessionFilename = ossimFilename(filename.toStdString());
+      }
+   }
+   if(theSessionFilename != "NONAME")
+   {
+      theSessionFilename.setExtension("session");
+      saveSession(theSessionFilename.c_str());
+      ossimPlanetQtApplication::setCurrentOpenSessionDirectory(theSessionFilename.path().c_str());
+   }
+}
+
+void ossimPlanetQtMainWindow::on_saveSessionAs_triggered(bool)
+{
+   ossimRefPtr<ossimXmlNode> rootNode = new ossimXmlNode;
+   ossimFilename sessionDir(ossimPlanetQtApplication::sessionDirectory().toStdString());
+   if(!sessionDir.exists())
+   {
+      theCurrentOpenSessionPath.createDirectory();
+   }
+
+   QString filename = QFileDialog::getSaveFileName(this,
+                                                   "Save Session",
+                                                   sessionDir.c_str(),
+                                                   ".session");
+   if(filename != "")
+   {
+      theSessionFilename = ossimFilename(filename.toStdString());
+   }
+
+   if(theSessionFilename != "NONAME")
+   {
+      theSessionFilename.setExtension("session");
+      saveSession(theSessionFilename.c_str());
+      setWindowTitle(QString("ossimPlanet Session: ") + theSessionFilename);
+      ossimPlanetQtApplication::setCurrentOpenSessionDirectory(theSessionFilename.path().c_str());
+   }
+}
+
+void ossimPlanetQtMainWindow::on_editLayerOperation_triggered(bool)
+{
+#if 0
+   if(!thePlanet.valid()||
+      !thePlanet->land().valid())
+   {
+      return;
+   }
+   if(!thePlanet->land()->shadersInitialized())
+   {
+      return;
+   }
+   if(theLayerOperation)
+   {
+      theLayerOperation->show();
+      theLayerOperation->raise();
+   }
+   else
+   {
+      theLayerOperation = new ossimPlanetQtLayerOperation(0);
+//       theLayerOperation->setWindowFlags(theLayerOperation->windowFlags()|Qt::WindowStaysOnTopHint);
+      theLayerOperation->setAttribute(Qt::WA_DeleteOnClose);
+//      theLayerOperation->setLand(planet()->land().get());
+      connect(theLayerOperation->theCloseButton,
+              SIGNAL(clicked(bool)),
+              this,
+              SLOT(layerOperationCloseButtonClicked(bool)));
+      theLayerOperation->show();
+   }
+#endif
+}
+
+void ossimPlanetQtMainWindow::on_actionActivity_triggered(bool)
+{
+   theActivityWindow->show();
+   theActivityWindow->raise();
+}
+
+void ossimPlanetQtMainWindow::on_actionMessageLog_triggered(bool)
+{
+	theMessageLogDialog->show();
+	theMessageLogDialog->raise();
+}
+
+void ossimPlanetQtMainWindow::on_viewRefreshTextures_triggered(bool)
+{
+   ossimPlanetTerrain* terrain = theGlWidget->viewer()->terrainLayer();
+   if(terrain)
+   {
+      terrain->refreshImageLayers();
+   }
+#if 0
+   if(thePlanet->land().valid())
+   {
+      thePlanet->land()->resetGraph(0, ossimPlanetLandRefreshType_TEXTURE);
+   }
+#endif
+}
+
+void ossimPlanetQtMainWindow::on_viewRefreshAll_triggered(bool)
+{
+   ossimPlanetTerrain* terrain = theGlWidget->viewer()->terrainLayer();
+   if(terrain)
+   {
+      terrain->resetGraph();
+   }
+   //thePlanet->land()->resetGraph();
+}
+
+void ossimPlanetQtMainWindow::on_viewSyncLocation_triggered(bool)
+{
+   osg::ref_ptr<ossimPlanetLookAt> lookAt = theGlWidget->viewer()->currentLookAt()->clone();
+
+   std::ostringstream out;
+   
+   out << setprecision(20) << ":navigator gotolatlonelevhpr " << lookAt->lat() << " "
+       << lookAt->lon()    << " " << lookAt->altitude()        << " "           << lookAt->heading() 
+       << " " << lookAt->pitch() << " " << lookAt->roll();
+
+   sendMessage("View", out.str(), "Navigation");
+}
+
+void ossimPlanetQtMainWindow::on_toolsRuler_triggered( bool  )
+{
+   if(!theRuler)
+   {
+      theRuler = new ossimPlanetQtRuler(this);
+      theRuler->setWindowFlags(theRuler->windowFlags()|Qt::WindowStaysOnTopHint);
+      theRuler->setAttribute(Qt::WA_DeleteOnClose);
+      theRuler->setGlWidget(theGlWidget);
+      theRuler->setPlanet(thePlanet.get());
+      connect(theRuler->theCloseButton,
+              SIGNAL(clicked(bool)),
+              this,
+              SLOT(rulerCloseButtonClicked(bool)));
+      theRuler->show();
+   }
+   else
+   {
+      theRuler->show();
+      theRuler->raise();
+   }
+}
+
+void ossimPlanetQtMainWindow::on_helpAbout_triggered(bool)
+{
+   ossimPlanetQtAboutDialog* aboutDialog = new ossimPlanetQtAboutDialog(this);
+   aboutDialog->setAttribute(Qt::WA_DeleteOnClose);
+
+   QString version = "OSSIM Planetary Visualization\n\n";
+   
+   version = version + ("Version " + QString(ossimString::toString(OSSIMPLANETQT_MAJOR_VERSION).c_str()) + "." +
+                        QString(ossimString::toString(OSSIMPLANETQT_MINOR_VERSION).c_str()) + "." +
+                        QString(ossimString::toString(OSSIMPLANETQT_PATCH_VERSION).c_str()) + " " +
+                        QString(OSSIMPLANETQT_BUILD_STRING) + " " +
+                        QString(OSSIM_BUILD_DATE));
+   
+   aboutDialog->theVersionInformation->setText(version);
+   aboutDialog->show();
+}
+
+void ossimPlanetQtMainWindow::archiveMappingWidgetItemChanged(QTableWidgetItem* item)
+{
+	int row = thePreferences->archiveMappingWidget->row(item);
+	int col = thePreferences->archiveMappingWidget->column(item);
+
+	ossimPlanetArchiveMapping opam;
+	if( (row > -1) && (row < (int)theArchive->getMappingList().size()) )
+	{
+		// dont need this line of code but we'll see
+		opam = theArchive->getMappingList()[row];
+	}
+
+	switch(col)
+	{
+		case PREFERENCES_ARCHIVE_WIDGET_SOURCE_IDX:
+		{
+			if((row > -1)&&(row < (int)theArchive->getMappingList().size()))
+			{
+				ossimString src = ossimString(thePreferences->theServerPortWidget->item(row, col)->text().toStdString());
+				theArchive->getMappingList()[row].setSource(src); 
+				//opam.setSource(archiveMappingList[row].getSource().c_str());
+			}
+			break;
+		}
+		case PREFERENCES_ARCHIVE_WIDGET_DESTINATION_IDX:
+		{
+			ossimString dest = ossimString(thePreferences->archiveMappingWidget->item(row, col)->text().toStdString());
+			theArchive->getMappingList()[row].setDestination(dest); 
+			//opam.setSource(archiveMappingList[row].getDestination().c_str());            
+			break;
+		}
+	}
+	saveArchiveMappingPreferences();
+	thePreferences->archiveMappingWidget->resizeColumnsToContents();
+}
+
+void ossimPlanetQtMainWindow::archiveAddButtonClicked(bool)
+{
+	thePreferences->archiveMappingWidget->blockSignals(true);
+
+	ossimString src = thePreferences->archiveLineEdit_Src->text().toStdString();
+	ossimString dest = thePreferences->archiveLineEdit_Dest->text().toStdString();
+
+	ossimPlanetArchiveMapping opam = ossimPlanetArchiveMapping();
+
+	// src can be empty, dest cant
+	if( !dest.empty() )
+	{
+		opam.setSource(src);
+		opam.setDestination(dest);
+
+		theArchive->addMapping(opam);
+
+		QString num = "Size: " + theArchive->getMappingList().size();
+		thePreferences->archiveLineEdit_Src->setText(num);
+		populateArchiveMappingPreferences();
+		saveArchiveMappingPreferences();
+	}
+
+	thePreferences->archiveLineEdit_Src->clear();
+	thePreferences->archiveLineEdit_Dest->clear();
+	thePreferences->archiveMappingWidget->blockSignals(false);
+}
+
+void ossimPlanetQtMainWindow::archiveRemoveButtonClicked(bool)
+{
+	thePreferences->archiveMappingWidget->blockSignals(true);
+	QList<QTableWidgetItem *> items = thePreferences->archiveMappingWidget->selectedItems();
+	int idx = 0;
+	int count = items.size() / 2;
+	int row = 0;
+
+	ossimPlanetArchiveMapping opam;
+
+	ossimFilename src;
+	ossimFilename dest;
+
+	if( count == 1 )
+	{
+		row = thePreferences->archiveMappingWidget->row(items[idx]);
+		if((row > -1)&&(row < (int)theArchive->getMappingList().size()))
+		{
+			opam = theArchive->getMappingList()[row];
+			theArchive->removeMapping(opam);
+		}
+	}
+	else if( count > 1 )
+	{
+		for( idx = count-1; idx >= 0; idx-- )
+		{
+			row = items[idx]->row();
+			if( (row > -1) && (row < (int)theArchive->getMappingList().size()) )
+			{
+				opam = theArchive->getMappingList()[row];
+				theArchive->removeMapping(opam);
+			}
+		}
+	}
+
+	populateArchiveMappingPreferences();
+	saveArchiveMappingPreferences();
+	thePreferences->archiveMappingWidget->blockSignals(false);
+}
+
+void ossimPlanetQtMainWindow::sousaIdentitySetButtonClicked(bool )
+{
+   if(theSousaLayer.valid())
+   {
+      ossimString username = thePreferences->theSousaUserName->text().toStdString();
+      ossimString domain = thePreferences->theSousaDomain->text().toStdString();
+      
+      theSousaLayer->setIdentity(username, domain);
+      saveSousaConnectionPreferences();
+   }
+}
+
+void ossimPlanetQtMainWindow::sousaServerConnectButtonClicked(bool)
+{
+   if(theSousaLayer.valid())
+   {
+      ossimString ip, port;
+      ip = thePreferences->theSousaServerIp->text().toStdString();
+      port = thePreferences->theSousaServerPort->text().toStdString();
+      
+      theSousaLayer->setConnection(ip, ip, port, theDefaultDataPortType);
+      saveSousaConnectionPreferences();
+   }
+}
+
+void ossimPlanetQtMainWindow::sousaServerAutoConnectOnStartClicked(bool)
+{
+   saveSousaConnectionPreferences();
+}
+
+void ossimPlanetQtMainWindow::layerOperationCloseButtonClicked(bool)
+{
+   theLayerOperation->close();
+   theLayerOperation=0;
+}
+void ossimPlanetQtMainWindow::rulerCloseButtonClicked(bool)
+{
+   theRuler->close();
+   theRuler=0;
+}
+
+void ossimPlanetQtMainWindow::closeActivity(bool)
+{
+   theActivityWindow->close();
+}
+
+void ossimPlanetQtMainWindow::deleteSelectedActivities(bool)
+{
+	theActivityWindow->theActivityWidget->deleteSelectedActivities();
+}
+
+void ossimPlanetQtMainWindow::wmsDialogDestroyed(QObject* obj)
+{
+   if(theWmsWindow == obj)
+   {
+      theWmsWindow = 0;
+   }
+}
+
+void ossimPlanetQtMainWindow::preferencesDestroyed(QObject* obj)
+{
+   if((thePreferences == obj)||!obj)
+   {
+      if(thePreferences)
+      {
+         thePreferences = 0;
+      }
+   }
+}
+
+void ossimPlanetQtMainWindow::wmsAddButtonHit(ossimPlanetQtWmsDialog* wms,
+                                              ossimRefPtr<ossimWmsCapabilitiesDocument> capabilities,
+                                              ossimPlanetQtWmsDialog::SelectedLayerInfoListType& layers)
+{
+   ossim_uint32 idx = 0;
+   for(idx = 0; idx < layers.size(); ++idx)
+   {
+      osg::ref_ptr<ossimPlanetWmsImageLayer> wmsLayer = new ossimPlanetWmsImageLayer;
+      wmsUrl url(layers[idx].theUrl.string());
+      ossimString tempProtocol;
+      ossimString tempServer;
+      ossimString tempPath;
+      ossimString tempOptions;
+      url.splitUrl(tempProtocol, tempServer, tempPath, tempOptions);
+      tempOptions = tempOptions.trim("&"); // make sure there are no trailing &
+      if(!tempOptions.empty())
+      {
+         tempOptions = tempOptions + "&";
+      }
+      if(layers[idx].theStyle.empty())
+      {
+         tempOptions = tempOptions + "BGCOLOR=0x000000&LAYERS="+layers[idx].theLayer->getName()+"&STYLES="+"&FORMAT="+layers[idx].theImageFormat;
+      }
+      else
+      {
+         tempOptions = tempOptions + "BGCOLOR=0x000000&LAYERS="+layers[idx].theLayer->getName()+"&STYLES="+layers[idx].theStyle+"&FORMAT="+layers[idx].theImageFormat; 
+      }
+      url.mergeUrl(tempProtocol, tempServer, tempPath, tempOptions);
+      wmsLayer->setServer(url.url());
+      wmsLayer->setCacheDirectory(layers[idx].theRootCacheDir);
+      double minLat = -90.0;
+      double maxLat = 90.0;
+      double minLon = -180.0;
+      double maxLon = 180.0;
+      const ossimRefPtr<ossimWmsBoundingBox> box = layers[idx].theLayer->findBoundingBox();
+      if(box.valid())
+      {
+         if(box->isGeographic())
+         {
+            minLat = box->getMinY();
+            minLon = box->getMinX();
+            maxLat = box->getMaxY();
+            maxLon = box->getMaxX();
+         }
+      }
+      wmsLayer->getExtents()->setMinMaxLatLon(minLat, minLon, maxLat, maxLon);
+
+      if(layers[idx].theLayer->getScaleHint().valid())
+      {
+         wmsLayer->getExtents()->setMinMaxScale(layers[idx].theLayer->getScaleHint()->getMin(),
+                                                layers[idx].theLayer->getScaleHint()->getMax());
+      }
+      wmsLayer->dirtyExtents();
+      wmsLayer->setEnableFlag(false);
+      wmsLayer->setName(layers[idx].theDescription);
+      wmsLayer->setProxyHost(layers[idx].theProxyHost);
+      wmsLayer->setProxyPort(layers[idx].theProxyPort);
+      wmsLayer->setProxyUser(layers[idx].theProxyUser);
+      wmsLayer->setProxyPassword(layers[idx].theProxyPassword);
+      
+      wmsLayer->resetLookAt();
+		
+      thePlanetLegend->addTextureLayerToTop(wmsLayer.get());
+      refreshLandTextures(wmsLayer->getExtents().get(),
+                          ossimPlanetLandRefreshType_TEXTURE);
+   }
+}
+
+void ossimPlanetQtMainWindow::wmsSyncCurrentSettings()
+{
+   
+   QString connectionName = ossimPlanetQtApplication::readWmsSettingsEntry("selected");
+
+   std::ostringstream out;
+
+   out << "<ossimPlanetQtWms>"
+       << wmsSettingsToXml(connectionName)
+       << "</ossimPlanetQtWms>";
+
+   sendMessage("", out.str(), "Data");
+}
+
+void ossimPlanetQtMainWindow::wmsSyncAllSettings()
+{
+   QStringList keys = ossimPlanetQtApplication::wmsSettingsSubkeyList();
+   std::ostringstream out;
+   out << "<ossimPlanetQtWms>";
+
+   QStringList::Iterator it = keys.begin();
+   while(it!=keys.end())
+   {
+      out << wmsSettingsToXml(*it);
+      ++it;
+   }
+   out << "</ossimPlanetQtWms>";
+  
+   sendMessage("", out.str(), "Data");
+}
+
+std::string ossimPlanetQtMainWindow::wmsSettingsToXml(const QString& connectionName)const
+{
+   QSettings settings;
+   
+   QString key            = connectionName;
+   QString connStringParts= ossimPlanetQtApplication::readWmsSettingsEntry(key+"/url");
+   QString proxyHost = ossimPlanetQtApplication::readWmsSettingsEntry(key+"/proxyhost");
+   QString proxyPort = ossimPlanetQtApplication::readWmsSettingsEntry(key+"/proxyport");
+   QString proxyUser = ossimPlanetQtApplication::readWmsSettingsEntry(key+"/proxyuser");
+   QString proxyPassword = ossimPlanetQtApplication::readWmsSettingsEntry(key+"/proxypassword");
+   QString url           = ossimPlanetQtApplication::readWmsSettingsEntry(key + "/url");
+   QString cache         = ossimPlanetQtApplication::readWmsSettingsEntry(key+"/cache");
+
+   std::ostringstream out;
+
+   out << "<Connection>"
+       << "<name>"<<connectionName.toStdString() << "</name>"
+       << "<proxyHost>"<<proxyHost.toStdString() << "</proxyHost>"
+       << "<proxyPort>"<<proxyPort.toStdString() << "</proxyPort>"
+       << "<proxyUser>"<<proxyUser.toStdString() << "</proxyUser>"
+       << "<proxyPassword>"<<proxyPassword.toStdString() << "</proxyPassword>"
+       << "<url>"<<url.toStdString()<<"</url>"
+       << "<cache>"<<cache.toStdString() <<"</cache>"
+       << "</Connection>";
+   
+   return out.str();
+}
+
+void ossimPlanetQtMainWindow::init()
+{
+   theCloudSeed     = time(0);
+   theMaxVisibility = 500000;
+   theInitializedFlag = true;
+	theNodeCallback = new ossimPlanetQtMainWindow::NodeCallback(this);
+   theAutoViewSyncRateInSeconds = ossimPlanetQtApplication::autoViewSyncRateInSeconds();
+   theAutoViewSyncFlag = ossimPlanetQtApplication::autoViewSyncFlag();
+   theLastAutoViewSyncTick = 0;
+   setAcceptDrops(true);	   
+   theUpdateHiglightsFlag = true;
+   theAutoHighlightLineOfSiteFlag = ossimPlanetQtApplication::autoHighlightLineOfSitFlag();
+   theWmsWindow = 0;
+   thePreferences    = 0;
+   theLayerOperation = 0; 
+   theRuler          = 0; 
+   QHBoxLayout* layout = new QHBoxLayout;  
+
+   //tabWidget->setLayout(layout);
+   tabWidget->widget(0)->setLayout(layout);
+   QGLFormat format;
+#if (defined(Q_WS_MAC) || defined(Q_WS_WIN))
+   format.setSwapInterval(1);
+#else
+   if(format.swapInterval() >= 0)
+   {
+      format.setSwapInterval(1);
+   }
+#endif
+   format.setOverlay(false);
+   theGlWidget = new ossimPlanetQtViewer(format, tabWidget->widget(0));
+   ossimPlanetViewer* viewer = new ossimPlanetViewer;
+   viewer->setThreadingModel(osgViewer::Viewer::SingleThreaded);
+   theGlWidget->setViewer(viewer);
+   theGlWidget->setMouseTracking(true);
+//   tabWidget->setContentsMargins(0, 0, 0, 0);
+   layout->addWidget(theGlWidget);
+   theGlWidget->setFocusPolicy(Qt::StrongFocus);
+   thePlanet = new ossimPlanet;
+   //thePlanet->setupDefaults();
+   theKmlLayer   = new ossimPlanetKmlLayer;
+   
+   theVideoLayer   = new ossimPlanetVideoLayer;
+   theHudLayer     = new ossimPlanetLatLonHud;
+   theHudLayer->setAutoUpdateFlag(true);
+   theSousaLayer   = new ossimPlanetSousaLayer;
+   theAnnotationLayer = new ossimPlanetAnnotationLayer;
+	
+   
+   
+   ossimPlanetTerrain* terrain = new ossimPlanetTerrain();
+   terrain->initElevation();
+   osg::ref_ptr<ossimPlanetGrid> grid = new ossimPlanetAdjustableCubeGrid(ossimPlanetAdjustableCubeGrid::MEDIUM_CAP);  
+   terrain->setGrid(grid.get());
+   terrain->setElevationDensityType(ossimPlanetTerrain::MEDIUM_LOW_ELEVATION_DENSITY);
+   ossimPlanetMemoryImageCache* cache = new ossimPlanetMemoryImageCache;
+   cache->setMinMaxCacheSizeInMegaBytes(16, 20);
+   terrain->setElevationMemoryCache(cache);
+   thePlanet->addChild(terrain);
+   thePlanet->addChild(theAnnotationLayer.get());
+   thePlanet->addChild(theKmlLayer.get());
+   thePlanet->addChild(theVideoLayer.get());
+   thePlanet->addChild(theSousaLayer.get());
+   thePlanet->addChild(theHudLayer.get());
+   theManipulator = new ossimPlanetManipulator();
+   osg::ref_ptr<osgGA::KeySwitchMatrixManipulator> keyswitchManipulator = new osgGA::KeySwitchMatrixManipulator;
+   keyswitchManipulator->addMatrixManipulator( '1', "Standard", theManipulator.get() );
+//   keyswitchManipulator->addMatrixManipulator( '2', "Trackball", new osgGA::TrackballManipulator() );
+//   keyswitchManipulator->addMatrixManipulator( '3', "Flight", new osgGA::FlightManipulator() );
+//   keyswitchManipulator->addMatrixManipulator( '4', "Drive", new osgGA::DriveManipulator() );
+//   keyswitchManipulator->addMatrixManipulator( '5', "Terrain", new osgGA::TerrainManipulator() );
+   theGlWidget->viewer()->setCameraManipulator(keyswitchManipulator.get());
+   theGlWidget->viewer()->addEventHandler( new osgGA::StateSetManipulator(theGlWidget->viewer()->getCamera()->getOrCreateStateSet()) );
+   theGlWidget->viewer()->addEventHandler(new osgViewer::StatsHandler);
+   theGlWidget->viewer()->setSceneData(thePlanet.get());
+   theGlWidget->viewer()->addCallback(theViewerCallback.get());
+
+   theTextureLayers.resize(2);
+   theGlWidget->viewer()->terrainLayer()->setNumberOfTextureLayers(2);
+   
+   theTextureLayers[0] = new ossimPlanetTextureLayerGroup();
+   theTextureLayers[0]->setName("Image Operation Layer");
+   theTextureLayers[0]->setDescription("Top layer for various applications of GPU algorithms");
+
+   theTextureLayers[1] = new ossimPlanetTextureLayerGroup();
+   theTextureLayers[1]->setName("Image Layers");
+   theTextureLayers[1]->setDescription("Root Image layer used to populate the planetary viewer");
+   theLayerListener = new ossimPlanetQtTextureLayerCallback(this);
+   theTextureLayers[1]->removeLayers(0, theTextureLayers[1]->numberOfLayers());
+   theGlWidget->viewer()->terrainLayer()->setTextureLayer(0, theTextureLayers[1].get());
+   theGlWidget->viewer()->terrainLayer()->setTextureLayer(1, theTextureLayers[0].get());
+//    thePlanet->land()->setReferenceLayer(theTextureLayers[1].get());
+//   thePlanet->land()->overlayLayers()->removeLayers(0, thePlanet->land()->overlayLayers()->numberOfLayers());
+//   thePlanet->land()->overlayLayers()->addTop(theTextureLayers[0].get());
+   theFullScreenFrame = 0;
+
+   thePlanetLegend->setMainWindow(this);
+   theActivityWindow = new ossimPlanetQtActivityWindow(this);
+	theActivityWindow->setWindowFlags(theActivityWindow->windowFlags()|Qt::WindowStaysOnTopHint);
+
+   setFocusPolicy(Qt::StrongFocus);
+
+   connect(theActivityWindow->theCloseButton, SIGNAL(clicked(bool)), this, SLOT(closeActivity(bool)));
+   connect(theActivityWindow->theDeleteButton, SIGNAL(clicked(bool)), this, SLOT(deleteSelectedActivities(bool)));
+
+//   theTimerId = startTimer(1000);
+   theDesktopWidget = new QDesktopWidget;
+  
+  ossim_int32 numScreens = theDesktopWidget->numScreens();
+  if(numScreens)
+  {
+     theFullScreenGeometry = theDesktopWidget->screenGeometry(0);
+  }
+//   for(int i = 0; i < numScreens; ++i)
+//   {
+//      QRect rect = theDesktopWidget->screenGeometry(i);
+//      theFullScreenGeometry = theFullScreenGeometry.united(rect);
+//   }
+//    int w = theFullScreenGeometry.width();
+//    int h = theFullScreenGeometry.height();
+//    if(w > 4096)
+//    {
+//       w = 4096;
+//    }
+//    if(h > 4096)
+//    {
+//       h = 4096;
+//    }
+//    theFullScreenGeometry.setRect(theFullScreenGeometry.x(),
+//                                  theFullScreenGeometry.y(),
+//                                  w, h);
+   theIsFullScreen = false;
+   theSessionFilename = "NONAME";
+   setWindowTitle(QString("ossimPlanet Session: ") + theSessionFilename);
+   theIoThread     = new ossimPlanetIoThread;
+   theIoMessageHandler = new ossimPlanetIoMainWindowMessageHandler(this);
+   theIoThread->addMessageHandler(theIoMessageHandler.get());
+//    theServerThread = new ossimPlanetServerThread;
+//    theServerThread->addMessageHandler(new ossimPlanetQtViewMessageHandler());
+//    theServerThread->addMessageHandler(new ossimPlanetQtUaimMessageHandler(theKmlLayer.get()));
+//    theServerThread->setQueueMessagesFlag(true);
+//    theClientThread = new ossimPlanetClientThread;
+   connect(theGlWidget,
+           SIGNAL(signalDropEvent(QDropEvent*)),
+           this,
+           SLOT(glWidgetDropEvent(QDropEvent*)));
+   connect(theGlWidget,
+           SIGNAL(signalMouseMoveEvent(QMouseEvent*)),
+           this,
+           SLOT(glWidgetMouseMoveEvent(QMouseEvent*)));
+    connect(theGlWidget,
+            SIGNAL(signalMouseReleaseEvent(QMouseEvent*)),
+            this,
+            SLOT(glWidgetMouseReleaseEvent(QMouseEvent*)));
+   connect(theGlWidget,
+           SIGNAL(signalDragEnterEvent(QDragEnterEvent*)),
+           this,
+           SLOT(glWidgetDragEnterEvent(QDragEnterEvent*)));
+
+
+   // now initialize defaults
+   //
+
+   theHudLayer->setCompassTexture(ossimPlanetQtApplication::compassRing());
+//   theHudLayer->setCompassTexture(ossimPlanetQtApplication::compassRing(),
+//                                  ossimPlanetQtApplication::compassRose());
+   
+   theHudLayer->setEnableFlag(ossimPlanetQtApplication::hudEnabled());
+   theGlWidget->viewer()->terrainLayer()->setElevationEnabledFlag(ossimPlanetQtApplication::elevEnabled());
+   theGlWidget->viewer()->terrainLayer()->setElevationExaggeration(ossimPlanetQtApplication::elevExag());
+//   thePlanet->land()->setElevationEnabledFlag(ossimPlanetQtApplication::elevEnabled());
+//   thePlanet->land()->setHeightExag(ossimPlanetQtApplication::elevExag());
+//   thePlanet->land()->setElevationPatchSize(ossimPlanetQtApplication::elevEstimate());
+//   thePlanet->land()->setMaxLevelDetail(ossimPlanetQtApplication::levelOfDetail());
+//   thePlanet->land()->setElevationCacheDir(ossimPlanetQtApplication::elevCacheDir());
+   ///  NHV TEST
+//   thePlanet->land()->setSplitMetricRatio(ossimPlanetQtApplication::splitMetricRatio());
+//   thePlanet->land()->setMipMappingFlag(ossimPlanetQtApplication::mipMapping());
+   std::deque<osg::ref_ptr<ossimPlanetTextureLayer> >& referenceImages = ossimPlanetQtApplication::referenceImages();
+
+   for(ossimPlanetQtApplication::ReferenceImageListType::iterator iter = referenceImages.begin();
+       iter != referenceImages.end(); ++iter)
+   {
+      theTextureLayers[1]->addTop(iter->get());
+   }
+   theTextureLayers[1]->sortByGsd();
+//   thePlanet->land()->resetGraph();
+   legend()->populate();
+	// we will listen after we populte
+   
+   // added by russc 5/6/08
+   // before we load the archiveMappings
+   // create theArchive pointer
+   theArchive = new ossimPlanetArchive();
+
+   loadArchiveMappingFromPreferences();
+   loadServerPortFromPreferences();
+   loadClientPortFromPreferences();
+   theGlWidget->viewer()->terrainLayer()->setElevationDensityType((ossimPlanetTerrain::ElevationDensityType)terrainTypeToInt(ossimPlanetQtApplication::elevationDetailType()));
+   theGlWidget->viewer()->terrainLayer()->setTextureDensityType((ossimPlanetTerrain::TextureDensityType)terrainTypeToInt(ossimPlanetQtApplication::textureDetailType()));
+   theGlWidget->viewer()->terrainLayer()->setCullAmountType((ossimPlanetTerrain::CullAmountType)terrainTypeToInt(ossimPlanetQtApplication::cullAmountType()));
+//   thePlanet->land()->setPathnameAndRegister(":land");
+   theAnnotationLayer->setPathnameAndRegister(":annotation");
+   theSousaLayer->setPathnameAndRegister(":idolbridge");
+   theSousaLayer->setArchive(theArchive);
+   
+   
+	ossimString user = ossimPlanetQtApplication::sousaIdentityUserName().toStdString();
+	ossimString domain = ossimPlanetQtApplication::sousaIdentityDomain().toStdString();
+	if(user.empty())
+	{
+		user = ossimEnvironmentUtility::instance()->getUserName();
+		ossimPlanetQtApplication::setSousaIdentityUserName(user.c_str());
+	}
+	theSousaLayer->setIdentity(user, domain);
+	
+   if(ossimPlanetQtApplication::sousaConnectionAutoConnectOnStart())
+   {
+      ossimString ip = ossimPlanetQtApplication::sousaConnectionIp().toStdString();
+      ossimString port = ossimPlanetQtApplication::sousaConnectionPort().toStdString();
+      if(!ip.empty()&&!port.empty())
+      {
+         theSousaLayer->setConnection(ip, ip, port, theDefaultDataPortType);
+      }
+   }
+   
+   setEphemerisEnabledFlag(ossimPlanetQtApplication::ephemerisEnabled());
+   setEphemerisAutoUpdateToCurrentTimeFlag(ossimPlanetQtApplication::ephemerisAutoUpdateToCurrentTimeFlag());
+   
+   theTextureLayers[0]->addCallback(theLayerListener);
+   theTextureLayers[1]->addCallback(theLayerListener);
+	theAnnotationLayer->addCallback(theNodeCallback.get());
+   theKmlLayer->addCallback(theNodeCallback.get());
+   theVideoLayer->addCallback(theNodeCallback.get()); 
+	theSousaLayer->addCallback(theNodeCallback.get());
+
+}
+
+void ossimPlanetQtMainWindow::populatePreferences()
+{
+   if(planet().valid())
+   {
+      thePreferences->theWmsTimeout->blockSignals(true);
+      thePreferences->theHudEnabled->blockSignals(true);
+      thePreferences->theAutomaticStagingEnabled->blockSignals(true);
+      thePreferences->archiveMappingEnabled->blockSignals(true);
+      thePreferences->theElevationEnabled->blockSignals(true);
+      thePreferences->theMeshDetail->blockSignals(true);
+      thePreferences->theTextureDetail->blockSignals(true);
+      thePreferences->theTerrainCullingAmount->blockSignals(true);
+      thePreferences->theEphemerisEnabled->blockSignals(true);
+      thePreferences->theEphemerisAutoUpdateToCurrentTime->blockSignals(true);
+      thePreferences->theSunLightingEnabled->blockSignals(true);
+      thePreferences->theSkyEnabled->blockSignals(true);
+      thePreferences->theMoonEnabled->blockSignals(true);
+      thePreferences->theVisibility->blockSignals(true);
+      thePreferences->theCloudsEnabled->blockSignals(true);
+      thePreferences->theCloudAmount->blockSignals(true);
+      thePreferences->theCloudSharpness->blockSignals(true);
+      thePreferences->theAutoViewSyncFlag->blockSignals(true);
+      thePreferences->theViewTransmitRate->blockSignals(true);
+      thePreferences->theStagingCacheDirectory->blockSignals(true);
+      thePreferences->theAutoHistogramStretchSetting->blockSignals(true);
+      thePreferences->theAutoHistogramStretchSetting->addItem("None");
+      thePreferences->theAutoHistogramStretchSetting->addItem("Linear Auto Min Max");
+      thePreferences->theAutoHistogramStretchSetting->addItem("1 Standard Deviation");
+      thePreferences->theAutoHistogramStretchSetting->addItem("2 Standard Deviation");
+      thePreferences->theAutoHistogramStretchSetting->addItem("3 Standard Deviation");
+      
+      QString mode = ossimPlanetQtApplication::autoHistogramStretchMode();
+      if(mode == "None")
+      {
+         thePreferences->theAutoHistogramStretchSetting->setCurrentIndex(0);
+      }
+      else if(mode == "Linear Auto Min Max")
+      {
+         thePreferences->theAutoHistogramStretchSetting->setCurrentIndex(1);
+      }
+      else if(mode == "1 Standard Deviation")
+      {
+         thePreferences->theAutoHistogramStretchSetting->setCurrentIndex(2);
+      }
+      else if(mode == "2 Standard Deviation")
+      {
+         thePreferences->theAutoHistogramStretchSetting->setCurrentIndex(3);
+      }
+      else if(mode == "3 Standard Deviation")
+      {
+         thePreferences->theAutoHistogramStretchSetting->setCurrentIndex(4);
+      }
+      
+      thePreferences->theStagingCacheDirectory->setText(ossimPlanetQtApplication::stagingCacheDirectory());
+      thePreferences->theWmsTimeout->setText(QString::number((ossim_uint32)ossimPlanetQtApplication::wmsNetworkTimeoutInSeconds()));
+      thePreferences->theAutoViewSyncFlag->setCheckState(theAutoViewSyncFlag?Qt::Checked:Qt::Unchecked);
+      thePreferences->theViewTransmitRate->setText(ossimString::toString(theAutoViewSyncRateInSeconds).trim('0').c_str());
+      //      int cacheSizeInMegabytes = planet()->land()->getCacheSize()/(1024*1024);
+      
+      thePreferences->theHudEnabled->setChecked(theHudLayer->enableFlag());
+      
+      thePreferences->theAutomaticStagingEnabled->setChecked(ossimPlanetQtApplication::automaticStagingEnabledFlag());
+      // todo: add a parameter within planet to use 	 
+      
+      // archive mapping
+      theArchive->setArchiveMappingEnabledFlag(ossimPlanetQtApplication::archiveMappingEnabled());
+      thePreferences->archiveMappingEnabled->setChecked(ossimPlanetQtApplication::archiveMappingEnabled());
+      thePreferences->theElevationEnabled->setChecked(theGlWidget->viewer()->terrainLayer()->elevationEnabledFlag());
+      thePreferences->theMeshDetail->setValue(terrainTypeToInt(ossimPlanetQtApplication::elevationDetailType()));
+      thePreferences->theTextureDetail->setValue(terrainTypeToInt(ossimPlanetQtApplication::textureDetailType()));
+//      thePreferences->theMeshDetail->setValue((int)theGlWidget->viewer()->terrainLayer()->elevationDensityType());
+//      thePreferences->theTextureDetail->setValue((int)theGlWidget->viewer()->terrainLayer()->textureDensityType());
+      thePreferences->theTerrainCullingAmount->setValue(terrainTypeToInt(ossimPlanetQtApplication::cullAmountType()));
+      if(theGlWidget->viewer()->terrainLayer())
+      {
+         thePreferences->theElevationMultiplier->setCurrentIndex(((int)theGlWidget->viewer()->terrainLayer()->elevationExaggeration())-1);
+      }
+      thePreferences->theEphemerisEnabled->setChecked(ossimPlanetQtApplication::ephemerisEnabled());
+      thePreferences->theEphemerisAutoUpdateToCurrentTime->setChecked(ossimPlanetQtApplication::ephemerisAutoUpdateToCurrentTimeFlag());
+      thePreferences->theSunLightingEnabled->setChecked(ossimPlanetQtApplication::sunlightEnabled());
+      thePreferences->theSkyEnabled->setChecked(ossimPlanetQtApplication::skyEnabled());
+      thePreferences->theMoonEnabled->setChecked(ossimPlanetQtApplication::moonEnabled());
+      thePreferences->theVisibility->setMinimum(0);
+      thePreferences->theVisibility->setMaximum(100);
+      thePreferences->theVisibility->setValue(ossimPlanetQtApplication::percentVisibility());
+      
+      thePreferences->theCloudAmount->setMinimum(-50);
+      thePreferences->theCloudAmount->setMaximum(200);
+      thePreferences->theCloudSharpness->setMinimum(70);
+      thePreferences->theCloudSharpness->setMaximum(99);
+      thePreferences->theCloudAmount->setTracking(false);
+      thePreferences->theCloudSharpness->setTracking(false);
+      thePreferences->theCloudsEnabled->setChecked(ossimPlanetQtApplication::cloudsEnabled());
+      thePreferences->theCloudAmount->setValue(ossimPlanetQtApplication::cloudCoverage());
+      thePreferences->theCloudSharpness->setValue(ossimPlanetQtApplication::cloudSharpness()*100);
+      
+      populateServerPortPreferences();
+      populateClientPortPreferences();
+	   populateArchiveMappingPreferences();
+      populateSousaConnectionPreferences();
+      thePreferences->theWmsTimeout->blockSignals(false);
+      thePreferences->theHudEnabled->blockSignals(false);
+      thePreferences->theAutomaticStagingEnabled->blockSignals(false);
+	   thePreferences->archiveMappingEnabled->blockSignals(false);
+      thePreferences->theElevationEnabled->blockSignals(false);
+      thePreferences->theMeshDetail->blockSignals(false);
+      thePreferences->theTextureDetail->blockSignals(false);
+      thePreferences->theTerrainCullingAmount->blockSignals(false);
+      thePreferences->theEphemerisEnabled->blockSignals(false);
+      thePreferences->theEphemerisAutoUpdateToCurrentTime->blockSignals(false);
+      thePreferences->theSunLightingEnabled->blockSignals(false);
+      thePreferences->theSkyEnabled->blockSignals(false);
+      thePreferences->theMoonEnabled->blockSignals(false);
+      thePreferences->theVisibility->blockSignals(false);
+      thePreferences->theCloudsEnabled->blockSignals(false);
+      thePreferences->theCloudAmount->blockSignals(false);
+      thePreferences->theCloudSharpness->blockSignals(false);
+      thePreferences->theAutoViewSyncFlag->blockSignals(false);
+      thePreferences->theViewTransmitRate->blockSignals(false);
+      thePreferences->theStagingCacheDirectory->blockSignals(false);
+      thePreferences->theAutoHistogramStretchSetting->blockSignals(false);
+   }
+}
+
+void ossimPlanetQtMainWindow::saveServerPortPreferences()
+{
+   ossimPlanetQtApplication::removePreferenceSetting("servers");
+   ossim_uint32 idx = 0;
+   for(idx = 0; idx <theServerList.size();++idx )
+   {
+      QString key("servers/");
+      key = key + QString("%1").arg(idx) + "/";
+      ossimPlanetQtApplication::writePreferenceSetting(key + "name", theServerList[idx]->theName.c_str());
+      ossimPlanetQtApplication::writePreferenceSetting(key + "host", theServerList[idx]->theHost.c_str());
+      ossimPlanetQtApplication::writePreferenceSetting(key + "port", theServerList[idx]->thePort.c_str());
+      ossimPlanetQtApplication::writePreferenceSetting(key + "port-type", theServerList[idx]->thePortType.c_str());
+      ossimPlanetQtApplication::writePreferenceSetting(key + "enable-flag", ossimString::toString(theServerList[idx]->theIo->enableFlag()).c_str());
+   }
+}
+
+void ossimPlanetQtMainWindow::saveClientPortPreferences()
+{
+   ossimPlanetQtApplication::removePreferenceSetting("clients");
+   ossim_uint32 idx = 0;
+   for(idx = 0; idx <theClientList.size();++idx )
+   {
+      QString key("clients/");
+      key = key + QString("%1").arg(idx) + "/";
+      ossimPlanetQtApplication::writePreferenceSetting(key + "name", theClientList[idx]->theName.c_str());
+      ossimPlanetQtApplication::writePreferenceSetting(key + "host", theClientList[idx]->theHost.c_str());
+      ossimPlanetQtApplication::writePreferenceSetting(key + "port", theClientList[idx]->thePort.c_str());
+      ossimPlanetQtApplication::writePreferenceSetting(key + "port-type", theClientList[idx]->thePortType.c_str());
+      ossimPlanetQtApplication::writePreferenceSetting(key + "enable-flag", ossimString::toString(theClientList[idx]->theIo->enableFlag()).c_str());
+   }
+}
+
+void ossimPlanetQtMainWindow::saveArchiveMappingPreferences()
+{
+	ossimPlanetQtApplication::removePreferenceSetting("Sousa/archiveMappings");
+	ossim_uint32 idx = 0;
+	QString src;
+	QString dest;
+
+	for(idx = 0; idx < theArchive->getMappingList().size(); ++idx )
+	{
+		QString key("Sousa/archiveMappings/");
+		key = key + QString("%1").arg(idx) + "/";
+		src = theArchive->getMappingList()[idx].getSource().c_str();
+		dest = theArchive->getMappingList()[idx].getDestination().c_str();
+		ossimPlanetQtApplication::writePreferenceSetting(key + "source", src);
+		ossimPlanetQtApplication::writePreferenceSetting(key + "destination", dest);
+	}
+}
+
+void ossimPlanetQtMainWindow::saveSousaConnectionPreferences()
+{
+   ossimPlanetQtApplication::setSousaIdentityUserName(thePreferences->theSousaUserName->text());
+   ossimPlanetQtApplication::setSousaIdentityDomain(thePreferences->theSousaDomain->text());
+   ossimPlanetQtApplication::setSousaConnectionAutoConnectOnStart(thePreferences->theSousaServerAutoConnectOnStart->checkState()==Qt::Checked);
+   ossimPlanetQtApplication::setSousaConnectionName(thePreferences->theSousaServerIp->text());
+   ossimPlanetQtApplication::setSousaConnectionIp(thePreferences->theSousaServerIp->text());
+   ossimPlanetQtApplication::setSousaConnectionPort(thePreferences->theSousaServerPort->text());
+   ossimPlanetQtApplication::setSousaConnectionPortType(theDefaultDataPortType.c_str());
+   
+}
+
+void ossimPlanetQtMainWindow::loadServerPortFromPreferences()
+{
+   ossim_uint32 idx = 0;
+   for(idx = 0; idx <theServerList.size();++idx )
+   {
+      theIoThread->removeIo(theServerList[idx]->theIo.get());
+   }
+   theServerList.clear();
+   QStringList  serverList = ossimPlanetQtApplication::preferenceSettingsSubkeyList("servers");
+   QStringList::iterator it = serverList.begin();
+   while(it != serverList.end())
+   {
+      QString key = "servers/" + (*it);
+      QString name = ossimPlanetQtApplication::readPreferenceSetting(key + "/name");
+      QString host = ossimPlanetQtApplication::readPreferenceSetting(key + "/host");
+      QString port = ossimPlanetQtApplication::readPreferenceSetting(key + "/port");
+      QString portType = ossimPlanetQtApplication::readPreferenceSetting(key + "/port-type");
+      QString enableFlag = ossimPlanetQtApplication::readPreferenceSetting(key + "/enable-flag");
+      osg::ref_ptr<ossimPlanetQtMainWindow::SocketInfo> socketInfo = new ossimPlanetQtMainWindow::SocketInfo(name.toStdString(),
+                                                                                                             host.toStdString(),
+                                                                                                             port.toStdString(),
+                                                                                                             portType.toStdString());
+      ossimPlanetIoSocketServerChannel* server = new ossimPlanetIoSocketServerChannel();
+      server->setSocket(host.toStdString(),
+                        ossimString(port.toStdString()).toInt32(),
+                        portType=="Navigation"?theDefaultNavigationPortType:theDefaultDataPortType);
+      server->setEnableFlag(ossimString(enableFlag.toStdString()).toBool());
+      socketInfo->theIo = server;
+      theServerList.push_back(socketInfo.get());
+      theIoThread->addIo(socketInfo->theIo.get());
+      if(thePreferences)
+      {
+         populateServerPortPreferences();
+      }
+      ++it;
+   }
+//    ossim_uint32 size = serverList.size();
+}
+
+void ossimPlanetQtMainWindow::loadClientPortFromPreferences()
+{
+   ossim_uint32 idx = 0;
+   for(idx = 0; idx <theClientList.size();++idx )
+   {
+      theIoThread->removeIo(theClientList[idx]->theIo.get());
+   }
+   theClientList.clear();
+   QStringList  clientList = ossimPlanetQtApplication::preferenceSettingsSubkeyList("clients");
+   QStringList::iterator it = clientList.begin();
+   while(it != clientList.end())
+   {
+      QString key = "clients/" + (*it);
+      QString name = ossimPlanetQtApplication::readPreferenceSetting(key + "/name");
+      QString host = ossimPlanetQtApplication::readPreferenceSetting(key + "/host");
+      QString port = ossimPlanetQtApplication::readPreferenceSetting(key + "/port");
+      QString portType = ossimPlanetQtApplication::readPreferenceSetting(key + "/port-type");
+      QString enableFlag = ossimPlanetQtApplication::readPreferenceSetting(key + "/enable-flag");
+      osg::ref_ptr<ossimPlanetQtMainWindow::SocketInfo> socketInfo = new ossimPlanetQtMainWindow::SocketInfo(name.toStdString(),
+                                                                                                             host.toStdString(),
+                                                                                                             port.toStdString(),
+                                                                                                             portType.toStdString());
+      ossimPlanetIoSocket* client = new ossimPlanetIoSocket();
+      client->setAutoReconnectFlag(true);
+      //client->setAutoCloseOnPeerShutdownFlag(false);
+
+      // for now we will make this false.  We need to figure out how to do oberservers on
+      // the TCP type sockets, until ten we will bring all client sockets up in disabled mode
+      //
+      client->setEnableFlag(false);//ossimString(enableFlag.toStdString()).toBool());
+      if(portType == "Data")
+      {
+         client->setMaxBytesToSendPerIo(64*1024);
+      }
+      client->setSocket(host.toStdString(),
+                        ossimString(port.toStdString()).toInt32(),
+                        portType=="Navigation"?theDefaultNavigationPortType:theDefaultDataPortType);
+      socketInfo->theIo = client;
+      theClientList.push_back(socketInfo.get());
+      theIoThread->addIo(socketInfo->theIo.get());
+      if(thePreferences)
+      {
+         populateClientPortPreferences();
+      }
+      ++it;
+   }
+}
+
+void ossimPlanetQtMainWindow::loadArchiveMappingFromPreferences()
+{
+	theArchive->getMappingList().clear();
+	QStringList  mappingList = ossimPlanetQtApplication::preferenceSettingsSubkeyList("Sousa/archiveMappings");
+	QStringList::iterator it = mappingList.begin();
+
+	ossimString source;
+	ossimString destination;
+	QString key;
+	QString src;
+	QString dest;
+	ossimPlanetArchiveMapping opam;
+
+	while(it != mappingList.end())
+	{
+		key = "Sousa/archiveMappings/" + (*it);
+		src = ossimPlanetQtApplication::readPreferenceSetting(key + "/source");
+		dest = ossimPlanetQtApplication::readPreferenceSetting(key + "/destination");
+
+		source = ossimString(src.toStdString());
+		destination = ossimString(dest.toStdString());
+		opam = ossimPlanetArchiveMapping(source, destination);
+		theArchive->addMapping(opam);
+		++it;
+	}
+   theArchive->setArchiveMappingEnabledFlag(ossimPlanetQtApplication::archiveMappingEnabled());
+
+   populateArchiveMappingPreferences();
+}
+
+
+void ossimPlanetQtMainWindow::populateSousaConnectionPreferences()
+{
+   thePreferences->theSousaUserName->blockSignals(true);
+   thePreferences->theSousaDomain->blockSignals(true);
+   thePreferences->theSousaServerAutoConnectOnStart->blockSignals(true);
+   thePreferences->theSousaServerIp->blockSignals(true);
+   thePreferences->theSousaServerIp->blockSignals(true);
+   thePreferences->theSousaServerPort->blockSignals(true);
+
+   thePreferences->theSousaUserName->setText(ossimPlanetQtApplication::sousaIdentityUserName());
+   thePreferences->theSousaDomain->setText(ossimPlanetQtApplication::sousaIdentityDomain());
+   thePreferences->theSousaServerAutoConnectOnStart->setCheckState(ossimPlanetQtApplication::sousaConnectionAutoConnectOnStart()?Qt::Checked:Qt::Unchecked);
+   thePreferences->theSousaServerIp->setText(ossimPlanetQtApplication::sousaConnectionName());
+   thePreferences->theSousaServerIp->setText(ossimPlanetQtApplication::sousaConnectionIp());
+   thePreferences->theSousaServerPort->setText(ossimPlanetQtApplication::sousaConnectionPort());
+
+   thePreferences->theSousaUserName->blockSignals(false);
+   thePreferences->theSousaDomain->blockSignals(false);
+   thePreferences->theSousaServerAutoConnectOnStart->blockSignals(false);
+   thePreferences->theSousaServerIp->blockSignals(false);
+   thePreferences->theSousaServerIp->blockSignals(false);
+   thePreferences->theSousaServerPort->blockSignals(false);
+}
+
+void ossimPlanetQtMainWindow::populateArchiveMappingPreferences()
+{
+	// this will need to be sync'd too
+	if( !thePreferences ) return;
+
+	ossim_uint32 index = 0;
+	thePreferences->archiveMappingWidget->blockSignals(true);
+	thePreferences->archiveMappingWidget->clear();
+	thePreferences->archiveMappingWidget->setColumnCount(PREFERENCES_ARCHIVE_WIDGET_SIZE);
+	thePreferences->archiveMappingWidget->setRowCount(theArchive->getMappingList().size());
+	thePreferences->archiveMappingWidget->setHorizontalHeaderItem(PREFERENCES_ARCHIVE_WIDGET_SOURCE_IDX, new QTableWidgetItem("        Source        "));
+	thePreferences->archiveMappingWidget->setHorizontalHeaderItem(PREFERENCES_ARCHIVE_WIDGET_DESTINATION_IDX, new QTableWidgetItem("         Destination         "));
+	// loop thru the mappings list
+	ossimFilename src;
+	ossimFilename dest;
+	ossimPlanetArchiveMapping opam;
+	for(index = 0; index < theArchive->getMappingList().size(); ++index)
+	{
+		opam = theArchive->getMappingList()[index];
+		src = opam.getSource();
+		dest = opam.getDestination();
+
+		thePreferences->archiveMappingWidget->setItem(index, PREFERENCES_ARCHIVE_WIDGET_SOURCE_IDX,
+													new QTableWidgetItem(src.c_str()));
+
+		thePreferences->archiveMappingWidget->setItem(index, PREFERENCES_ARCHIVE_WIDGET_DESTINATION_IDX,
+													new QTableWidgetItem(dest.c_str()));
+      
+		thePreferences->archiveMappingWidget->setVerticalHeaderItem(index, new QTableWidgetItem(""));
+	}
+	if(theArchive->getMappingList().size()>0)
+	{
+		thePreferences->archiveMappingWidget->resizeColumnsToContents();
+	}
+	thePreferences->archiveMappingWidget->blockSignals(false);
+}
+
+void ossimPlanetQtMainWindow::populateServerPortPreferences()
+{
+   if(!thePreferences) return;
+   ossim_uint32 idx = 0;
+   thePreferences->theServerPortWidget->blockSignals(true);
+   thePreferences->theServerPortWidget->clear();
+   thePreferences->theServerPortWidget->setColumnCount(PREFERENCES_SERVER_WIDGET_SIZE);
+   thePreferences->theServerPortWidget->setRowCount(theServerList.size());
+   thePreferences->theServerPortWidget->setHorizontalHeaderItem(PREFERENCES_SERVER_WIDGET_NAME_IDX, new QTableWidgetItem("        Name        "));
+   thePreferences->theServerPortWidget->setHorizontalHeaderItem(PREFERENCES_SERVER_WIDGET_IP_IDX, new QTableWidgetItem("           Ip           "));
+   thePreferences->theServerPortWidget->setHorizontalHeaderItem(PREFERENCES_SERVER_WIDGET_PORT_IDX, new QTableWidgetItem("        Port        "));
+   thePreferences->theServerPortWidget->setHorizontalHeaderItem(PREFERENCES_SERVER_WIDGET_PORT_TYPE_IDX, new QTableWidgetItem("            Type            "));
+   thePreferences->theServerPortWidget->setHorizontalHeaderItem(PREFERENCES_SERVER_WIDGET_ENABLE_IDX, new QTableWidgetItem("       Enabled       "));
+   QStringList typeList;
+   typeList.push_back("Navigation");
+   typeList.push_back("Data");
+   ossimPlanetIoSocketServerChannel* socket = 0;
+   for(idx = 0; idx <theServerList.size();++idx )
+   {
+      socket = static_cast<ossimPlanetIoSocketServerChannel*>(theServerList[idx]->theIo.get());
+      thePreferences->theServerPortWidget->setItem(idx, PREFERENCES_SERVER_WIDGET_NAME_IDX,
+                                                   new QTableWidgetItem(theServerList[idx]->theName.c_str()));
+      thePreferences->theServerPortWidget->setItem(idx, PREFERENCES_SERVER_WIDGET_IP_IDX,
+                                                   new QTableWidgetItem(theServerList[idx]->theHost.c_str()));
+      thePreferences->theServerPortWidget->setItem(idx, PREFERENCES_SERVER_WIDGET_PORT_IDX,
+                                                   new QTableWidgetItem(theServerList[idx]->thePort.c_str()));
+      thePreferences->theServerPortWidget->setItem(idx, PREFERENCES_SERVER_WIDGET_PORT_TYPE_IDX,
+                                                   new QTableWidgetItem(theServerList[idx]->thePortType.c_str()));
+      thePreferences->theServerPortWidget->setItem(idx, PREFERENCES_SERVER_WIDGET_ENABLE_IDX,
+                                                   new QTableWidgetItem(""));
+      thePreferences->theServerPortWidget->item(idx, PREFERENCES_SERVER_WIDGET_ENABLE_IDX)->setCheckState(theServerList[idx]->theIo->enableFlag()?Qt::Checked:Qt::Unchecked);
+      ossimPlanetQtDropDownDelegate* delegate = new ossimPlanetQtDropDownDelegate;
+      delegate->setChoices(typeList);
+      thePreferences->theServerPortWidget->setItemDelegateForColumn(PREFERENCES_SERVER_WIDGET_PORT_TYPE_IDX, delegate);
+
+      thePreferences->theServerPortWidget->setVerticalHeaderItem(idx, new QTableWidgetItem(""));
+      
+
+      if(socket)
+      {
+         QColor color(0,0,0);
+         if(socket->handle() < 0)
+         {
+            color = QColor(255,0,0);
+         }
+         thePreferences->theServerPortWidget->item(idx, PREFERENCES_SERVER_WIDGET_NAME_IDX)->setForeground(QBrush(color));
+         thePreferences->theServerPortWidget->item(idx, PREFERENCES_SERVER_WIDGET_IP_IDX)->setForeground(QBrush(color));
+         thePreferences->theServerPortWidget->item(idx, PREFERENCES_SERVER_WIDGET_PORT_IDX)->setForeground(QBrush(color));
+         thePreferences->theServerPortWidget->item(idx, PREFERENCES_SERVER_WIDGET_PORT_TYPE_IDX)->setForeground(QBrush(color));
+         thePreferences->theServerPortWidget->item(idx, PREFERENCES_SERVER_WIDGET_ENABLE_IDX)->setForeground(QBrush(color));
+      }
+   }
+   if(theServerList.size()>0)
+   {
+      thePreferences->theServerPortWidget->resizeColumnsToContents();
+   }
+   thePreferences->theServerPortWidget->blockSignals(false);
+}
+
+void ossimPlanetQtMainWindow::populateClientPortPreferences()
+{
+   ossim_uint32 idx = 0;
+   thePreferences->theClientPortWidget->blockSignals(true);
+   thePreferences->theClientPortWidget->clear();
+   thePreferences->theClientPortWidget->setColumnCount(PREFERENCES_CLIENT_WIDGET_SIZE);
+   thePreferences->theClientPortWidget->setRowCount(theClientList.size());
+   thePreferences->theClientPortWidget->setHorizontalHeaderItem(PREFERENCES_CLIENT_WIDGET_NAME_IDX, new QTableWidgetItem("        Name        "));
+   thePreferences->theClientPortWidget->setHorizontalHeaderItem(PREFERENCES_CLIENT_WIDGET_IP_IDX, new QTableWidgetItem("     IP Address     "));
+   thePreferences->theClientPortWidget->setHorizontalHeaderItem(PREFERENCES_CLIENT_WIDGET_PORT_IDX, new QTableWidgetItem("        Port        "));
+   thePreferences->theClientPortWidget->setHorizontalHeaderItem(PREFERENCES_CLIENT_WIDGET_PORT_TYPE_IDX, new QTableWidgetItem("            Type            "));
+   thePreferences->theClientPortWidget->setHorizontalHeaderItem(PREFERENCES_CLIENT_WIDGET_ENABLE_IDX, new QTableWidgetItem("       Enabled       "));
+   QStringList typeList;
+   typeList.push_back("Navigation");
+   typeList.push_back("Data");
+   ossimPlanetIoSocket* socket = 0;
+   for(idx = 0; idx <theClientList.size();++idx )
+   {
+      socket = static_cast<ossimPlanetIoSocket*>(theClientList[idx]->theIo.get());
+      thePreferences->theClientPortWidget->setItem(idx, PREFERENCES_CLIENT_WIDGET_NAME_IDX,
+                                                   new QTableWidgetItem(theClientList[idx]->theName.c_str()));
+      thePreferences->theClientPortWidget->setItem(idx, PREFERENCES_CLIENT_WIDGET_IP_IDX,
+                                                   new QTableWidgetItem(theClientList[idx]->theHost.c_str()));
+      thePreferences->theClientPortWidget->setItem(idx, PREFERENCES_CLIENT_WIDGET_PORT_IDX,
+                                                   new QTableWidgetItem(theClientList[idx]->thePort.c_str()));
+      thePreferences->theClientPortWidget->setItem(idx, PREFERENCES_CLIENT_WIDGET_PORT_TYPE_IDX,
+                                                   new QTableWidgetItem(theClientList[idx]->thePortType.c_str()));
+      thePreferences->theClientPortWidget->setItem(idx, PREFERENCES_CLIENT_WIDGET_ENABLE_IDX,
+                                                   new QTableWidgetItem(""));
+      thePreferences->theClientPortWidget->item(idx,PREFERENCES_CLIENT_WIDGET_ENABLE_IDX)->setCheckState(theClientList[idx]->theIo->enableFlag()?Qt::Checked:Qt::Unchecked);
+      
+      ossimPlanetQtDropDownDelegate* delegate = new ossimPlanetQtDropDownDelegate;
+      delegate->setChoices(typeList);
+      thePreferences->theClientPortWidget->setItemDelegateForColumn(PREFERENCES_CLIENT_WIDGET_PORT_TYPE_IDX, delegate);
+      thePreferences->theClientPortWidget->setVerticalHeaderItem(idx, new QTableWidgetItem(""));
+      
+      if(socket)//check for handle problems
+      {
+         QColor color(0,0,0);
+         if(socket->handle() < 0)
+         {
+            color = QColor(255,0,0);
+         }
+         thePreferences->theClientPortWidget->item(idx, PREFERENCES_CLIENT_WIDGET_NAME_IDX)->setForeground(QBrush(color));
+         thePreferences->theClientPortWidget->item(idx, PREFERENCES_CLIENT_WIDGET_IP_IDX)->setForeground(QBrush(color));
+         thePreferences->theClientPortWidget->item(idx, PREFERENCES_CLIENT_WIDGET_PORT_IDX)->setForeground(QBrush(color));
+         thePreferences->theClientPortWidget->item(idx, PREFERENCES_CLIENT_WIDGET_PORT_TYPE_IDX)->setForeground(QBrush(color));
+         thePreferences->theClientPortWidget->item(idx, PREFERENCES_CLIENT_WIDGET_ENABLE_IDX)->setForeground(QBrush(color));
+     }
+   }
+   if(theClientList.size()>0)
+   {
+      thePreferences->theClientPortWidget->resizeColumnsToContents();
+   }
+   thePreferences->theClientPortWidget->blockSignals(false);
+}
+
+
+void ossimPlanetQtMainWindow::setWmsTimeout(const QString& value)
+{
+   bool ok=true;
+   ossim_uint32 v = value.toLong(&ok);
+   if(ok)
+   {
+      ossimPlanetQtApplication::setWmsNetworkTimeoutInSeconds(v);
+   }
+}
+
+void ossimPlanetQtMainWindow::setStagingCacheDirectory(const QString& value)
+{
+   ossimPlanetQtApplication::setStagingCacheDirectory(value);
+}
+
+void ossimPlanetQtMainWindow::setAutoHistogramStretchSetting(const QString& text)
+{
+   ossimPlanetQtApplication::setAutoHistogramStretchMode(text);
+}
+
+void ossimPlanetQtMainWindow::stagingCacheDirectoryButtonClicked(bool checked)
+{
+   QString dir = QFileDialog::getExistingDirectory(thePreferences, 
+                                                   "Please select the staging cache directory", 
+                                                   ossimPlanetQtApplication::stagingCacheDirectory());
+   if(!dir.isEmpty())
+   {
+      setStagingCacheDirectory(dir);
+      if(thePreferences)
+      {
+         thePreferences->theStagingCacheDirectory->setText(ossimPlanetQtApplication::stagingCacheDirectory());
+      }
+   }
+}
+
+void ossimPlanetQtMainWindow::setHudEnabledFlag(bool flag)
+{
+   ossimPlanetQtApplication::setHudFlag(flag);
+   if(theHudLayer->enableFlag() != flag)
+   {
+      theHudLayer->setEnableFlag(flag);
+   }
+}
+
+void ossimPlanetQtMainWindow::setAutomaticStagingEnabled(bool flag)
+{
+   ossimPlanetQtApplication::setAutomaticStagingEnabledFlag(flag);
+}
+
+void ossimPlanetQtMainWindow::setArchiveMappingEnabledFlag(bool flag)
+{
+	ossimPlanetQtApplication::setArchiveMappingEnabledFlag(flag);
+
+	if( thePreferences->archiveMappingEnabled->isChecked() == true )
+	{
+		thePreferences->archiveLineEdit_Src->setEnabled(true);
+		thePreferences->archiveLineEdit_Dest->setEnabled(true);
+		thePreferences->archiveAddButton->setEnabled(true);
+		thePreferences->archiveRemoveButton->setEnabled(true);
+		thePreferences->archiveMappingWidget->setEnabled(true);
+		
+		theArchive->setArchiveMappingEnabledFlag(true);
+	}
+	else
+	{
+		thePreferences->archiveLineEdit_Src->setEnabled(false);
+		thePreferences->archiveLineEdit_Dest->setEnabled(false);
+		thePreferences->archiveAddButton->setEnabled(false);
+		thePreferences->archiveRemoveButton->setEnabled(false);
+		thePreferences->archiveMappingWidget->setEnabled(false);
+
+		theArchive->setArchiveMappingEnabledFlag(false);
+	}
+}
+void ossimPlanetQtMainWindow::setAutoHighlightLineOfSiteFlag(bool flag)
+{
+   ossimPlanetQtApplication::setAutoHighlightLineOfSitFlag(flag);
+
+   theAutoHighlightLineOfSiteFlag = flag;
+}
+
+void ossimPlanetQtMainWindow::setElevationEnabledFlag(bool flag)
+{
+   ossimPlanetQtApplication::setElevFlag(flag);
+   theGlWidget->viewer()->terrainLayer()->setElevationEnabledFlag(flag);
+   theGlWidget->viewer()->terrainLayer()->refreshElevationLayers();
+#if 0
+   if(planet()->land()->getElevationEnabledFlag() != flag)
+   {
+      planet()->land()->setElevationEnabledFlag(flag);
+      
+      refreshLandTextures();
+   }
+#endif
+}
+
+
+void ossimPlanetQtMainWindow::setTextureDetailType(int value)
+{
+   ossimString valueAsString = "medium";
+   switch(value)
+   {
+      case ossimPlanetTerrain::LOW_TEXTURE_DENSITY:
+      {
+         valueAsString = "low";
+         break;
+      }
+      case ossimPlanetTerrain::MEDIUM_LOW_TEXTURE_DENSITY:
+      {
+         valueAsString = "medium-low";
+         break;
+      }
+      case ossimPlanetTerrain::MEDIUM_TEXTURE_DENSITY:
+      {
+         valueAsString = "medium";
+         break;
+      }
+      case ossimPlanetTerrain::MEDIUM_HIGH_TEXTURE_DENSITY:
+      {
+         valueAsString = "medium-high";
+         break;
+      }
+      case ossimPlanetTerrain::HIGH_TEXTURE_DENSITY:
+      {
+         valueAsString = "high";
+         break;
+      }
+      default:
+      {
+         value =  ossimPlanetTerrain::MEDIUM_TEXTURE_DENSITY;
+      }
+   }
+   ossimPlanetQtApplication::setTextureDetailType(valueAsString);
+   theGlWidget->viewer()->terrainLayer()->setTextureDensityType((ossimPlanetTerrain::TextureDensityType)value);
+   theGlWidget->viewer()->terrainLayer()->refreshImageLayers();
+}
+
+void ossimPlanetQtMainWindow::setMeshDetailType(int value)
+{
+   ossimString valueAsString = "medium";
+   switch(value)
+   {
+      case ossimPlanetTerrain::LOW_ELEVATION_DENSITY:
+      {
+         valueAsString = "low";
+         break;
+      }
+      case ossimPlanetTerrain::MEDIUM_LOW_ELEVATION_DENSITY:
+      {
+         valueAsString = "medium-low";
+         break;
+      }
+      case ossimPlanetTerrain::MEDIUM_ELEVATION_DENSITY:
+      {
+         valueAsString = "medium";
+         break;
+      }
+      case ossimPlanetTerrain::MEDIUM_HIGH_ELEVATION_DENSITY:
+      {
+         valueAsString = "medium-high";
+         break;
+      }
+      case ossimPlanetTerrain::HIGH_ELEVATION_DENSITY:
+      {
+         valueAsString = "high";
+         break;
+      }
+      default:
+      {
+         value =  ossimPlanetTerrain::MEDIUM_ELEVATION_DENSITY;
+      }
+   }
+   ossimPlanetQtApplication::setElevationDetailType(valueAsString);
+   theGlWidget->viewer()->terrainLayer()->setElevationDensityType((ossimPlanetTerrain::ElevationDensityType)value);
+   theGlWidget->viewer()->terrainLayer()->refreshElevationLayers();
+}
+
+void ossimPlanetQtMainWindow::setTerrainCullingType(int value)
+{
+   ossimString valueAsString = "high";
+   switch(value)
+   {
+      case ossimPlanetTerrain::NO_CULL:
+      {
+         valueAsString = "no-cull";
+         break;
+      }
+      case ossimPlanetTerrain::LOW_CULL:
+      {
+         valueAsString = "low-cull";
+         break;
+      }
+      case ossimPlanetTerrain::MEDIUM_LOW_CULL:
+      {
+         valueAsString = "medium-low-cull";
+         break;
+      }
+      case ossimPlanetTerrain::MEDIUM_CULL:
+      {
+         valueAsString = "medium-cull";
+         break;
+      }
+      case ossimPlanetTerrain::MEDIUM_HIGH_CULL:
+      {
+         valueAsString = "medium-high-cull";
+         break;
+      }
+      case ossimPlanetTerrain::HIGH_CULL:
+      {
+         valueAsString = "high-cull";
+         break;
+      }
+      default:
+      {
+         valueAsString = "high-cull";
+         value = ossimPlanetTerrain::HIGH_CULL;
+         break;
+      }
+   }
+   ossimPlanetQtApplication::setCullAmountType(valueAsString);
+   theGlWidget->viewer()->terrainLayer()->setCullAmountType((ossimPlanetTerrain::CullAmountType)value);
+}
+
+void ossimPlanetQtMainWindow::setHeightExageration(const QString& height)
+{
+   double value = ossimString(height.toStdString()).toDouble();
+   ossimPlanetQtApplication::setElevExag(value);
+  
+   if(theGlWidget->viewer()->terrainLayer())
+   {
+      double value = ossimString(height.toStdString()).toDouble();
+      theGlWidget->viewer()->terrainLayer()->setElevationExaggeration(value);
+      theGlWidget->viewer()->terrainLayer()->refreshElevationLayers();
+   }
+#if 0
+   double value = ossimString(height.toStdString()).toDouble();
+   ossimPlanetQtApplication::setElevExag(value);
+   if(planet()->land()->getHeightExag() != value)
+   {
+      planet()->land()->setHeightExag(value);
+      refreshLandTextures();
+   }
+#endif
+}
+
+void ossimPlanetQtMainWindow::setEphemerisEnabledFlag(bool flag)
+{
+   ossimPlanetQtApplication::setEphemerisEnabledFlag(flag);
+   int members = ephemerisMembers();
+   if(flag)
+   {
+      if(!theGlWidget->viewer()->ephemeris())
+      {
+         theGlWidget->viewer()->addEphemeris(members);
+         theGlWidget->viewer()->ephemeris()->setAutoUpdateToCurrentTimeFlag(true);
+         theGlWidget->viewer()->ephemeris()->setAutoUpdateToCurrentTimeFlag(ossimPlanetQtApplication::ephemerisAutoUpdateToCurrentTimeFlag());
+     }
+      setPercentVisibility(ossimPlanetQtApplication::percentVisibility());
+      setCloudsEnabledFlag(ossimPlanetQtApplication::cloudsEnabled());
+   }
+   else
+   {
+      theGlWidget->viewer()->removeEphemeris();
+   }
+   
+   theGlWidget->viewer()->requestRedraw();
+}
+
+void ossimPlanetQtMainWindow::setEphemerisAutoUpdateToCurrentTimeFlag(bool flag)
+{
+   ossimPlanetQtApplication::setEphemerisAutoUpdateToCurrentTimeFlag(flag);
+   if(theGlWidget->viewer()->ephemeris())
+   {
+      theGlWidget->viewer()->ephemeris()->setAutoUpdateToCurrentTimeFlag(flag);
+   }
+}
+
+void ossimPlanetQtMainWindow::setSkyEnabledFlag(bool flag)
+{
+   ossimPlanetQtApplication::setSkyEnabledFlag(flag);
+   if(theGlWidget->viewer()->ephemeris())
+   {
+      theGlWidget->viewer()->ephemeris()->setMembers(ephemerisMembers());
+      theGlWidget->viewer()->requestRedraw();
+   }
+}
+void ossimPlanetQtMainWindow::setMoonEnabledFlag(bool flag)
+{
+   ossimPlanetQtApplication::setMoonEnabledFlag(flag);
+   if(theGlWidget->viewer()->ephemeris())
+   {
+      theGlWidget->viewer()->ephemeris()->setMembers(ephemerisMembers());
+      theGlWidget->viewer()->requestRedraw();
+   }
+}
+
+void ossimPlanetQtMainWindow::setSunlightEnabledFlag(bool flag)
+{
+   ossimPlanetQtApplication::setSunlightEnabledFlag(flag);
+   if(theGlWidget->viewer()->ephemeris())
+   {
+      theGlWidget->viewer()->ephemeris()->setMembers(ephemerisMembers());
+      theGlWidget->viewer()->requestRedraw();
+   }
+}
+
+void ossimPlanetQtMainWindow::setPercentVisibility(int percentValue)
+{
+   ossimPlanetQtApplication::setPercentVisibility(percentValue);
+   if(theGlWidget->viewer()->ephemeris())
+   {
+      if(percentValue == 100)
+      {
+         theGlWidget->viewer()->ephemeris()->setFogEnableFlag(false);
+      }
+      else
+      {
+         double t = static_cast<double>(percentValue)/100.0;
+         theGlWidget->viewer()->ephemeris()->setFogEnableFlag(true);
+         theGlWidget->viewer()->ephemeris()->setVisibility(t*theMaxVisibility);
+      }
+   }
+   theGlWidget->viewer()->requestRedraw();
+}
+
+void ossimPlanetQtMainWindow::setCloudsEnabledFlag(bool flag)
+{
+   ossimPlanetQtApplication::setCloudsEnabledFlag(flag);
+   if(theGlWidget->viewer()->ephemeris())
+   {
+      theCloudSeed = time(0);
+      if(flag)
+      {
+         if(theGlWidget->viewer()->ephemeris()->numberOfCloudLayers() < 1)
+         {
+            theGlWidget->viewer()->ephemeris()->createGlobalCloud(0,
+                                                                  20000,
+                                                                  32,
+                                                                  theCloudSeed,
+                                                                  ossimPlanetQtApplication::cloudCoverage(),
+                                                                  ossimPlanetQtApplication::cloudSharpness());
+            theGlWidget->viewer()->ephemeris()->cloudLayer(0)->setMaxAltitudeToShowClouds(40000);
+            theGlWidget->viewer()->ephemeris()->cloudLayer(0)->setScale(2);
+         }
+         else
+         {
+            theGlWidget->viewer()->ephemeris()->cloudLayer(0)->setEnableFlag(flag);
+         }
+      }
+      else if(theGlWidget->viewer()->ephemeris()->numberOfCloudLayers() > 0)
+      {
+         theGlWidget->viewer()->ephemeris()->cloudLayer(0)->setEnableFlag(flag);
+//         theGlWidget->viewer()->ephemeris()->removeClouds(0, theGlWidget->viewer()->ephemeris()->numberOfCloudLayers());
+      }
+   }
+   theGlWidget->viewer()->requestRedraw();
+}
+
+void ossimPlanetQtMainWindow::setCloudAmount(int value)
+{
+   ossimPlanetQtApplication::setCloudCoverage(value);
+   if(theGlWidget->viewer()->ephemeris())
+   {
+      if(theGlWidget->viewer()->ephemeris()->numberOfCloudLayers()>0)
+      {
+         theGlWidget->viewer()->ephemeris()->cloudLayer(0)->updateTexture(theCloudSeed,
+                                                                          ossimPlanetQtApplication::cloudCoverage(),
+                                                                          ossimPlanetQtApplication::cloudSharpness());
+      }
+   }
+   theGlWidget->viewer()->requestRedraw();
+}
+void ossimPlanetQtMainWindow::setCloudSharpness(int value)
+{
+   ossimPlanetQtApplication::setCloudSharpness(static_cast<double>(value)/100.0);
+   if(theGlWidget->viewer()->ephemeris())
+   {
+      if(theGlWidget->viewer()->ephemeris()->numberOfCloudLayers()>0)
+      {
+         if(theGlWidget->viewer()->ephemeris()->numberOfCloudLayers()>0)
+         {
+            theGlWidget->viewer()->ephemeris()->cloudLayer(0)->updateTexture(theCloudSeed,
+                                                                             ossimPlanetQtApplication::cloudCoverage(),
+                                                                             ossimPlanetQtApplication::cloudSharpness());
+         }
+      }
+   }
+   theGlWidget->viewer()->requestRedraw();
+}
+
+void ossimPlanetQtMainWindow::gotoLocationNadir(double lat, double lon, double height)
+{
+   ossimString actionString = ":navigator gotolatlonelevnadir ";
+   actionString += (ossimString::toString(lat) + " " +
+                    ossimString::toString(lon) + " " +
+                    ossimString::toString(height));
+   
+   ossimPlanetDestinationCommandAction(actionString.c_str()).execute();
+   
+}
+
+void ossimPlanetQtMainWindow::refreshLandTextures(osg::ref_ptr<ossimPlanetExtents> extents,
+                                                  ossimPlanetLandRefreshType refreshType)
+{
+   ossimPlanetTerrain* terrain = theGlWidget->viewer()->terrainLayer();
+   if(terrain)
+   {
+      terrain->refreshImageLayers();
+   }
+#if 0
+   if(thePlanet.valid())
+   {
+      thePlanet->land()->resetGraph(extents.get(), refreshType);
+   }
+#endif
+}
+
+const osg::ref_ptr<ossimPlanetLookAt> ossimPlanetQtMainWindow::getLookAt()const
+{
+	return theGlWidget->viewer()->currentLookAt()->clone();
+}
+
+void ossimPlanetQtMainWindow::keyPressEvent ( QKeyEvent * event )
+{
+   if(theFullScreenFrame)
+   {
+      ((QObject*)theGlWidget)->event(event);
+   }
+}
+
+void ossimPlanetQtMainWindow::keyReleaseEvent ( QKeyEvent * event )
+{
+   if((event->modifiers() == Qt::ControlModifier)&&
+      (event->key()==Qt::Key_F))
+   {
+      on_viewToggleFullScreen_triggered();
+      event->accept();
+   }
+	else if(event->key()==Qt::Key_R)
+	{
+		on_viewRefreshTextures_triggered();
+      event->accept();
+	}
+   if((event->modifiers() == Qt::ControlModifier)&&
+      (event->key()==Qt::Key_B))
+   {
+      on_viewBookmark_triggered();
+   }
+   else if(theFullScreenFrame)
+   {
+      ((QObject*)theGlWidget)->event(event);
+   }
+   
+}
+
+void ossimPlanetQtMainWindow::timerEvent ( QTimerEvent * event )
+{
+   if(event->timerId() == theTimerId)
+   {
+//       std::cout << "<update,cull,draw> = " << (int)(theGlWidget->getUpdateTimeInSeconds()*1000) << ", "
+//                 << (int)(theGlWidget->getCullTimeInSeconds()*1000) << ", "
+//                 << (int)(theGlWidget->getDrawTimeInSeconds()*1000) << "\n";
+      
+//      std::ostringstream out;
+//       double megabyte = 1024*1024;
+//       osg::ref_ptr<ossimPlanetTextureLayer::Stats> stats1 = theTextureLayers[0]->getStats()->clone();
+//       osg::ref_ptr<ossimPlanetTextureLayer::Stats> stats2 = theTextureLayers[1]->getStats()->clone();
+//       ossim_uint64 textureSize      = (stats1->totalTextureSize()+stats2->totalTextureSize());
+//       ossim_uint64 bytesTransferred =  (stats1->bytesTransferred()+stats2->bytesTransferred());
+//      out << "Frames Per Second: " << theGlWidget->getFramesPerSecond();
+//           << "   Total Texture Size = " << (textureSize/megabyte) << " MB\t" 
+//           << "Total transferred = " << (bytesTransferred/megabyte) << " MB\t"
+//           << "Percentage = " <<  (((double)bytesTransferred/(double)textureSize)*100.0) << "%";
+//      statusBar()->showMessage(out.str().c_str());
+
+//      ossimString message;
+//      std::list<QString> messageList;
+//       while(theServerThread->nextMessage(message))
+//       {
+//          messageList.push_back(message.c_str());
+//       }
+      
+//       if(!messageList.empty())
+//       {
+//          theActivityWindow->theActivityWidget->addActivity(new ossimPlanetQtMessageActivity(messageList,
+//                                                                                             thePlanetLegend));
+//       }
+
+      if(theUpdateHiglightsFlag&&theAutoHighlightLineOfSiteFlag)
+      {
+         osg::Vec3d los = thePlanet->getLineOfSiteLatLonHeightPoint();
+         if(!ossim::isnan(los[0])&&
+            !ossim::isnan(los[1])&&
+            !ossim::isnan(los[2]))
+         {
+            thePlanetLegend->selectLayersContainingPosition(los[0], los[1], los[2]);
+//             std::vector<QTreeWidgetItem*> items;
+//             thePlanetLegend->getLayersContainingPosition(items, los[0], los[1], los[2]);
+            
+//             if(items.size())
+//             {
+//                for(std::vector<QTreeWidgetItem*>::iterator iterItems = items.begin();
+//                    iterItems != items.end();
+//                    ++iterItems)
+//                {
+//                   (*iterItems)->setSelected(true);
+//                }
+//             }
+            theUpdateHiglightsFlag = false;
+         }
+         else
+         {
+            thePlanetLegend->unselectItems();
+         }
+      }
+   }
+}
+
+void ossimPlanetQtMainWindow::serverPortItemChanged(QTableWidgetItem* item)
+{
+   int row = thePreferences->theServerPortWidget->row(item);
+   int col = thePreferences->theServerPortWidget->column(item);
+   ossimPlanetIoSocketServerChannel* socket = 0;
+   if((row>-1)&&(row<(int)theServerList.size()))
+   {
+      socket = dynamic_cast<ossimPlanetIoSocketServerChannel*>(theServerList[row]->theIo.get());
+   }
+   if(socket)
+   {
+      switch(col)
+      {
+         case PREFERENCES_SERVER_WIDGET_NAME_IDX:
+         {
+            if((row > -1)&&(row < (int)theServerList.size()))
+            {
+               theServerList[row]->theName = thePreferences->theServerPortWidget->item(row, col)->text().toStdString();
+               socket->setName(theServerList[row]->theName);
+            }
+            break;
+         }
+         case PREFERENCES_SERVER_WIDGET_IP_IDX:
+         {
+            theServerList[row]->theHost = thePreferences->theServerPortWidget->item(row, col)->text().toStdString();
+            socket->setSocket(theServerList[row]->theHost,
+                              theServerList[row]->thePort.toInt32(),
+                              ((theServerList[row]->thePortType=="Navigation"?theDefaultNavigationPortType:theDefaultDataPortType)));
+            break;
+         }
+         case PREFERENCES_SERVER_WIDGET_PORT_IDX:
+         {
+            theServerList[row]->thePort = thePreferences->theServerPortWidget->item(row, col)->text().toStdString();
+            socket->setSocket("",
+                              theServerList[row]->thePort.toInt32(),
+                              ((theServerList[row]->thePortType=="Navigation"?theDefaultNavigationPortType:theDefaultDataPortType)));
+            break;
+         }
+            
+         case PREFERENCES_SERVER_WIDGET_PORT_TYPE_IDX:
+         {
+            theServerList[row]->thePortType = thePreferences->theServerPortWidget->item(row, col)->text().toStdString();
+            socket->setSocket(theServerList[row]->theHost,
+                              theServerList[row]->thePort.toInt32(),
+                              ((theServerList[row]->thePortType=="Navigation"?theDefaultNavigationPortType:theDefaultDataPortType)));
+            break;
+         }
+         case PREFERENCES_SERVER_WIDGET_ENABLE_IDX:
+         {
+            if(thePreferences->theServerPortWidget->item(row, col)->checkState() == Qt::Unchecked)
+            {
+               theServerList[row]->theIo->setEnableFlag(false);
+            }
+            else
+            {
+               theServerList[row]->theIo->setEnableFlag(true);
+            }
+         }
+      }
+      QColor color(0,0,0);
+      if(socket->handle() < 0)
+      {
+         color = QColor(255,0,0);
+      }
+      thePreferences->theServerPortWidget->item(row, PREFERENCES_SERVER_WIDGET_NAME_IDX)->setForeground(QBrush(color));
+      thePreferences->theServerPortWidget->item(row, PREFERENCES_SERVER_WIDGET_IP_IDX)->setForeground(QBrush(color));
+      thePreferences->theServerPortWidget->item(row, PREFERENCES_SERVER_WIDGET_PORT_IDX)->setForeground(QBrush(color));
+      thePreferences->theServerPortWidget->item(row, PREFERENCES_SERVER_WIDGET_PORT_TYPE_IDX)->setForeground(QBrush(color));
+      thePreferences->theServerPortWidget->item(row, PREFERENCES_SERVER_WIDGET_ENABLE_IDX)->setForeground(QBrush(color));
+   }
+   saveServerPortPreferences();
+   thePreferences->theServerPortWidget->resizeColumnsToContents();
+}
+
+void ossimPlanetQtMainWindow::addPort(bool)
+{
+   thePreferences->theServerPortWidget->blockSignals(true);
+   osg::ref_ptr<ossimPlanetQtMainWindow::SocketInfo> socketInfo = new ossimPlanetQtMainWindow::SocketInfo("My Server", "localhost", "8000", "Navigation");
+   ossimPlanetIoSocketServerChannel* server = new ossimPlanetIoSocketServerChannel();
+   server->setSocket("localhost", 8000, theDefaultNavigationPortType);
+   socketInfo->theIo = server;
+   theServerList.push_back(socketInfo.get());
+   theIoThread->addIo(socketInfo->theIo.get());
+   populateServerPortPreferences();
+   saveServerPortPreferences();
+   thePreferences->theServerPortWidget->blockSignals(false);
+}
+
+void ossimPlanetQtMainWindow::deletePort(bool)
+{
+   thePreferences->theServerPortWidget->blockSignals(true);
+   QList<QTableWidgetItem *> items = thePreferences->theServerPortWidget->selectedItems();
+//    QList<QTableWidgetItem *>::iterator iter = items.begin();
+   int count = items.size();
+   int idx = 0;
+   if(count > 0)
+   {
+      for(idx = count-1; idx > -1;--idx)
+      {
+         int row = thePreferences->theServerPortWidget->row(items[idx]);
+         if((row > -1)&&(row < (int)theServerList.size()))
+         {
+            if(theIoThread->removeIo(theServerList[row]->theIo.get()))
+            {
+               theServerList.erase(theServerList.begin() + row);
+            }
+         }
+      }
+      populateServerPortPreferences();
+   }
+   saveServerPortPreferences();
+   thePreferences->theServerPortWidget->blockSignals(false);
+}
+
+void ossimPlanetQtMainWindow::addClientPort(bool)
+{
+   thePreferences->theClientPortWidget->blockSignals(true);
+   osg::ref_ptr<ossimPlanetQtMainWindow::SocketInfo> socketInfo = new ossimPlanetQtMainWindow::SocketInfo("My Socket", "", "8000", "Navigation");
+   ossimPlanetIoSocket* socket = new ossimPlanetIoSocket();
+   socket->setAutoReconnectFlag(true);
+   //socket->setAutoCloseOnPeerShutdownFlag(false);
+   socketInfo->theIo = socket;
+   theClientList.push_back(socketInfo.get());
+   theIoThread->addIo(socketInfo->theIo.get());
+   populateClientPortPreferences();
+   saveClientPortPreferences();
+   thePreferences->theClientPortWidget->blockSignals(false);
+}
+
+void ossimPlanetQtMainWindow::deleteClientPort(bool)
+{
+   thePreferences->theClientPortWidget->blockSignals(true);
+   QList<QTableWidgetItem *> items = thePreferences->theClientPortWidget->selectedItems();
+   int count = items.size();
+   int idx = 0;
+   if(count > 0)
+   {
+      for(idx = count-1; idx > -1;--idx)
+      {
+         int row = thePreferences->theClientPortWidget->row(items[idx]);
+         if((row > -1)&&(row < (int)theClientList.size()))
+         {
+            if(theIoThread->removeIo(theClientList[row]->theIo.get()))
+            {
+               theClientList.erase(theClientList.begin() + row);
+            }
+         }
+      }
+      populateClientPortPreferences();
+   }
+   saveClientPortPreferences();
+   thePreferences->theClientPortWidget->blockSignals(false);
+}
+
+void ossimPlanetQtMainWindow::clientItemChanged(QTableWidgetItem* item)
+{
+   int row = thePreferences->theClientPortWidget->row(item);
+   int col = thePreferences->theClientPortWidget->column(item);
+   ossimPlanetIoSocket* socket = 0;
+   
+   if((row>-1)&&(row<(int)theClientList.size()))
+   {
+      socket = dynamic_cast<ossimPlanetIoSocket*>(theClientList[row]->theIo.get());
+   }
+   if(socket)
+   {
+      if(col == PREFERENCES_CLIENT_WIDGET_NAME_IDX) // name changed
+      {
+         if((row > -1)&&(row < (int)theClientList.size()))
+         {
+            theClientList[row]->theName = thePreferences->theClientPortWidget->item(row, 0)->text().toStdString();
+            socket->setName(theClientList[row]->theName);
+         }
+      }
+      else if(col == PREFERENCES_CLIENT_WIDGET_ENABLE_IDX) // enable disable flag
+      {
+         if(thePreferences->theClientPortWidget->item(row, col)->checkState() == Qt::Unchecked)
+         {
+            theClientList[row]->theIo->setEnableFlag(false);
+         }
+         else
+         {
+            theClientList[row]->theIo->setEnableFlag(true);
+         }
+
+      }
+      else
+      {
+         ossimString test;
+         theClientList[row]->theName     = thePreferences->theClientPortWidget->item(row, PREFERENCES_CLIENT_WIDGET_NAME_IDX)->text().toStdString();
+         theClientList[row]->theHost     = thePreferences->theClientPortWidget->item(row, PREFERENCES_CLIENT_WIDGET_IP_IDX)->text().toStdString();
+         theClientList[row]->thePort     = thePreferences->theClientPortWidget->item(row, PREFERENCES_CLIENT_WIDGET_PORT_IDX)->text().toStdString();
+         theClientList[row]->thePortType = thePreferences->theClientPortWidget->item(row, PREFERENCES_CLIENT_WIDGET_PORT_TYPE_IDX)->text().toStdString();
+         socket->setName(theClientList[row]->theName);
+         test = theDefaultNavigationPortType;
+         if(theClientList[row]->thePortType == "Data")
+         {
+            test = theDefaultDataPortType;
+         }
+         if(test == "tcp")
+         {
+            socket->setMaxBytesToSendPerIo(64*1024);
+         }
+         else
+         {
+            socket->setMaxBytesToSendPerIo(4*1024);
+         }
+         socket->setSocket(theClientList[row]->theHost,
+                           theClientList[row]->thePort.toInt32(),
+                           test);
+      }
+      QColor color(0,0,0);
+      if(socket->handle() < 0)
+      {
+         color = QColor(255,0,0);
+      }
+      thePreferences->theClientPortWidget->item(row, PREFERENCES_CLIENT_WIDGET_NAME_IDX)->setForeground(QBrush(color));
+      thePreferences->theClientPortWidget->item(row, PREFERENCES_CLIENT_WIDGET_IP_IDX)->setForeground(QBrush(color));
+      thePreferences->theClientPortWidget->item(row, PREFERENCES_CLIENT_WIDGET_PORT_IDX)->setForeground(QBrush(color));
+      thePreferences->theClientPortWidget->item(row, PREFERENCES_CLIENT_WIDGET_PORT_TYPE_IDX)->setForeground(QBrush(color));
+      thePreferences->theClientPortWidget->item(row, PREFERENCES_CLIENT_WIDGET_ENABLE_IDX)->setForeground(QBrush(color));
+   }
+   thePreferences->theClientPortWidget->resizeColumnsToContents();
+   saveClientPortPreferences();
+}
+
+void ossimPlanetQtMainWindow::enableAllClientPorts(bool)
+{
+   bool needUpdating = false;
+   ossim_uint32 idx = 0;
+   for(idx = 0; idx < theClientList.size(); ++idx)
+   {
+      if(!theClientList[idx]->theIo->enableFlag())
+      {
+         theClientList[idx]->theIo->setEnableFlag(true);
+         theClientList[idx]->theIo->openIo();
+         needUpdating = true;
+      }
+   }
+   if(needUpdating)
+   {
+      populateClientPortPreferences();
+      saveClientPortPreferences();
+   }
+}
+
+void ossimPlanetQtMainWindow::disableAllClientPorts(bool)
+{
+   bool needUpdating = false;
+   ossim_uint32 idx = 0;
+   for(idx = 0; idx < theClientList.size(); ++idx)
+   {
+      if(theClientList[idx]->theIo->enableFlag())
+      {
+         theClientList[idx]->theIo->setEnableFlag(false);
+         theClientList[idx]->theIo->closeIo();
+         needUpdating = true;
+      }
+   }
+   if(needUpdating)
+   {
+      populateClientPortPreferences();
+      saveClientPortPreferences();
+   }
+}
+
+
+void ossimPlanetQtMainWindow::viewTransmitTextChanged(const QString& value)
+{
+   bool ok;
+   double tempValue = value.toDouble(&ok);
+   theAutoViewSyncRateInSeconds = value.toDouble(&ok);
+   if(ok)
+   {
+      ossimPlanetQtApplication::setAutoViewSyncRateInSeconds(tempValue);
+      theAutoViewSyncRateInSeconds = tempValue;
+   }
+}
+
+void ossimPlanetQtMainWindow::autoViewSyncFlagChanged(int state)
+{
+   theAutoViewSyncFlag = (state==Qt::Unchecked?false:true);
+   ossimPlanetQtApplication::setAutoViewSyncFlag(theAutoViewSyncFlag);
+}
+
+void ossimPlanetQtMainWindow::viewChanged()
+{
+   theUpdateHiglightsFlag = true;
+   osg::ref_ptr<ossimPlanetLookAt> camera = theGlWidget->viewer()->currentCamera()->clone();
+   osg::ref_ptr<ossimPlanetLookAt> lookAt = theGlWidget->viewer()->currentLookAt()->clone();
+   
+   if(theAutoViewSyncFlag)
+   {
+      if(theLastAutoViewSyncTick == 0)
+      {
+         theLastAutoViewSyncTick = osg::Timer::instance()->tick();
+      }
+      else if(osg::Timer::instance()->delta_s(theLastAutoViewSyncTick, osg::Timer::instance()->tick()) >= theAutoViewSyncRateInSeconds)
+      {
+         std::ostringstream out;
+            
+         out << setprecision(20)
+             << "<Set target=\"" << ":navigator\" vref=\"wgs84\">"
+             <<   "<Camera>"
+             <<      "<longitude>" << camera->lon() << "</longitude>"
+             <<      "<latitude>"  << camera->lat() << "</latitude>"
+             <<      "<altitude>" << camera->altitude() << "</altitude>"
+             <<      "<heading>"   << camera->heading() << "</heading>"
+             <<      "<pitch>"     << camera->pitch() << "</pitch>"
+             <<      "<roll>"      << camera->roll() << "</roll>"
+             <<      "<altitudeMode>" << camera->modeToString(camera->altitudeMode()) << "</altitudeMode>"
+             <<   "</Camera>";
+             if(lookAt.valid())
+             {
+                out << lookAt->toKml();
+             }
+         
+         
+           out  << "</Set>";
+//         out << setprecision(20) << ":navigator setlatlonelevhpr " << lat << " "
+//             << lon << " " << height << " " << heading << " " << pitch << " "
+//             << roll << std::endl;
+         sendMessage("View", out.str(), "Navigation");
+         theLastAutoViewSyncTick = 0;
+      }
+   }
+   else
+   {
+      theLastAutoViewSyncTick = 0;
+   }
+   if(theUpdateHiglightsFlag&&theAutoHighlightLineOfSiteFlag)
+   {
+      osg::Vec3d los(lookAt->lat(), lookAt->lon(), lookAt->altitude());
+      if(!ossim::isnan(los[0])&&
+         !ossim::isnan(los[1])&&
+         !ossim::isnan(los[2]))
+      {
+         thePlanetLegend->selectLayersContainingPosition(los[0], los[1], los[2]);
+//             std::vector<QTreeWidgetItem*> items;
+//             thePlanetLegend->getLayersContainingPosition(items, los[0], los[1], los[2]);
+            
+//             if(items.size())
+//             {
+//                for(std::vector<QTreeWidgetItem*>::iterator iterItems = items.begin();
+//                    iterItems != items.end();
+//                    ++iterItems)
+//                {
+//                   (*iterItems)->setSelected(true);
+//                }
+//             }
+         theUpdateHiglightsFlag = false;
+      }
+      else
+      {
+         thePlanetLegend->unselectItems();
+      }
+   }
+//    if(theClientThread->getNumberOfConnections()>0)
+//    {
+//       ostringstream out;
+      
+//       out << setprecision(20) << ":navigator setlatlonelevhpr " << lat << " "
+//           << lon << " " << height << " " << heading << " " << pitch << " "
+//           << roll << std::endl;
+      
+//       theClientThread->broadcastMessage(out.str().c_str());
+//    }
+}
+
+void ossimPlanetQtMainWindow::glWidgetDropEvent(QDropEvent * event)
+{
+   thePlanetLegend->dropEvent(event);
+}
+
+void ossimPlanetQtMainWindow::glWidgetDragEnterEvent(QDragEnterEvent *event)
+{
+   thePlanetLegend->dragEnterEvent(event);
+}
+
+void ossimPlanetQtMainWindow::glWidgetMouseMoveEvent(QMouseEvent* event)
+{
+}
+
+class MyBrowser : public QTextBrowser
+{
+public:
+   class NodeCallback : public ossimPlanetNodeCallback
+   {
+   public:
+      NodeCallback(MyBrowser* browser)
+      :theBrowser(browser)
+      {
+         
+      }
+      virtual void propertyChanged(ossimPlanetNode* node,
+                                   const ossimString& name)
+      {
+         if(theBrowser && (name == "description")&&(theBrowser->theNode == node))
+         {
+            QApplication::postEvent(theBrowser,
+                                    new ossimPlanetQt::NodePropertyEvent(node, name));
+
+         }
+      }
+      virtual void destructingNode(ossimPlanetNode* node)
+      {
+         if(theBrowser)
+         {
+            if(theBrowser->theNode == node)
+            {
+               theBrowser->theNode = 0;
+               if(theBrowser->parent())
+               {
+                  theBrowser->parent()->deleteLater();
+               }
+            }
+         }
+      }
+      void setBrowser(MyBrowser* browser)
+      {
+         theBrowser = browser;
+      }
+   protected:
+      MyBrowser* theBrowser;
+   };
+   friend class NodeCallbck;
+   MyBrowser(QWidget* parent,
+             ossimPlanetNode* node)
+      :QTextBrowser(parent),
+       theNode(node)
+      {
+         theCallback = new NodeCallback(this);
+         if(theNode)
+         {
+            theNode->addCallback(theCallback.get());
+         }
+      }
+   virtual ~MyBrowser()
+   {
+      if(theNode)
+      {
+         theNode->removeCallback(theCallback.get());
+         theNode = 0;
+      }
+   }
+   virtual bool event(QEvent* e)
+   {
+      if(theNode)
+      {
+			ossimPlanetQt::ossimPlanetQtEventId eventId = static_cast<ossimPlanetQt::ossimPlanetQtEventId>(e->type());
+         switch(eventId)
+         {
+            case ossimPlanetQt::NODE_PROPERTY_EVENT_TYPE:
+            {
+               ossimPlanetQt::NodePropertyEvent* propEvent = dynamic_cast<ossimPlanetQt::NodePropertyEvent*>(e);
+               if(propEvent)
+               {
+                  if(propEvent->name() == "description")
+                  {
+                     ossimString description;
+                     theNode->description(description);
+                     setHtml(description.c_str());
+                  }
+               }
+               
+               return true;
+            }
+				default:
+				{
+					break;
+				}
+         }
+      }
+      return QTextBrowser::event(e);
+   }
+   bool loadFile(QImage& image, const ossimFilename& file)
+      {
+         ossimRefPtr<ossimImageHandler> ih = ossimImageHandlerRegistry::instance()->open(file);
+         ossimRefPtr<ossimScalarRemapper> remapper = new ossimScalarRemapper;
+         if(ih.valid())
+         {
+            remapper->connectMyInputTo(0, ih.get());
+            ossimRefPtr<ossimImageData> imageData = remapper->getTile(remapper->getBoundingRect());
+            if((imageData.valid())&&imageData->getBuf()&&
+               (imageData->getDataObjectStatus()!=OSSIM_EMPTY))
+            {
+               image = QImage(imageData->getWidth(),
+                              imageData->getHeight(),
+                              QImage::Format_RGB32);
+
+               memset(image.bits(), '\0', image.numBytes());
+
+               ossim_uint8* bands[3];
+               if(imageData->getNumberOfBands() < 3)
+               {
+                  bands[0] = (ossim_uint8*)imageData->getBuf(0);
+                  bands[1] = (ossim_uint8*)imageData->getBuf(0);
+                  bands[2] = (ossim_uint8*)imageData->getBuf(0);
+               }
+               else
+               {
+                  bands[0] = (ossim_uint8*)imageData->getBuf(0);
+                  bands[1] = (ossim_uint8*)imageData->getBuf(1);
+                  bands[2] = (ossim_uint8*)imageData->getBuf(2);
+                  
+               }
+               if(bands[0]&&bands[1]&&bands[2])
+               {
+                  ossim_uint32* bits = (ossim_uint32*)image.bits();
+                  ossim_uint32 idx = 0;
+                  ossim_uint32 size = imageData->getWidth()*imageData->getHeight();
+                  if(bits)
+                  {
+                     for(idx = 0; idx < size; ++idx)
+                     {
+                        *bits = (ossim_uint32)((0xff<<24)|
+                                               ( (*bands[0])<<16 )|
+                                               ( (*bands[1])<<8) |
+                                               ( (*bands[2])));
+                        ++bits;
+                        ++bands[0];
+                        ++bands[1];
+                        ++bands[2];
+                     }
+                  }
+               }
+            }
+            return true;
+         }
+         
+         return false;
+      }
+   virtual QVariant loadResource ( int type, const QUrl & name )
+      {
+         ossimFilename file;
+         if(type == QTextDocument::ImageResource)
+         {
+            QImage image(QSize(128, 128), QImage::Format_RGB32);
+            memset(image.bits(), '\0', image.numBytes());
+            ossimFilename filenameToProcess(name.toString().toStdString());
+            if(name.scheme() == "http")
+            {
+               QTemporaryFile tempFile;
+               tempFile.open();
+               wmsCurlMemoryStream s(name.toString().toStdString());
+               QImage correctImage;
+               ossimFilename tempFilename(tempFile.fileName().toStdString());
+               if(s.download(tempFilename))
+               {
+                  loadFile(image, tempFilename);
+               }
+            }
+            else if(filenameToProcess.exists())
+            {
+               loadFile(image, filenameToProcess);
+            }
+            return QVariant::fromValue(image);
+         }
+         else if(type == QTextDocument::HtmlResource)
+         {
+            if((name.scheme() == "http")||
+               (name.scheme() == ""))
+            {
+               if(!ossimPlanetQtBrowser::openUrl(name.toString()))
+               {
+               }
+               
+               return QVariant(document()->toHtml());
+            }
+         }
+         return QTextBrowser::loadResource(type, name);
+      }
+   
+protected:
+   ossimPlanetNode* theNode;
+   osg::ref_ptr<NodeCallback> theCallback;
+};
+
+void ossimPlanetQtMainWindow::glWidgetMouseReleaseEvent(QMouseEvent* event)
+{
+
+   std::vector<osg::ref_ptr<ossimPlanetViewer::PickObject> > pickedObjects;
+   
+   if(theGlWidget->viewer()->pickAtWindowCoordinate(pickedObjects, event->x(), theGlWidget->height() - event->y()))
+   {
+      ossim_uint32 idx = 0;
+      for(idx = 0; idx < pickedObjects.size();++idx)
+      {
+         ossimPlanetNode* layer = pickedObjects[idx]->firstPlanetNode();
+         if(layer)
+         {
+            QDialog* dialog = new QDialog;
+            QString s = layer->description().c_str();
+			if(s.isEmpty())
+			{
+				ossimPlanetKmlLayerNode* layerNode = dynamic_cast<ossimPlanetKmlLayerNode*>(layer);
+				if(layerNode)
+				{
+					ossimPlanetKmlFeature* kmlFeature = dynamic_cast<ossimPlanetKmlFeature*>(layerNode->kmlObject().get());
+					if(kmlFeature)
+					{
+						const ossimXmlNode* extendedData = kmlFeature->extendedData();
+						ossimXmlNode::ChildListType dataList;
+						if(extendedData)
+						{
+							extendedData->findChildNodes("Data", dataList);
+							ossim_uint32 idx = 0;
+							if(dataList.size())
+							{
+								s += "<table border='1'>";
+							}
+							ossim_uint32 maxCount = ossim::min((ossim_uint64)dataList.size(),
+								                               (ossim_uint64)20);
+							for(idx = 0; idx < maxCount; ++idx)
+							{
+								s += "<tr>";
+								s += QString("<td>") + dataList[idx]->getAttributeValue("name") + "</td>";
+								s += QString("<td>") + dataList[idx]->getChildTextValue("value") + "</td>";
+								s += "</tr>";
+							}
+							if(dataList.size())
+							{
+								s += "</table>";
+							}
+						}
+					}
+				}
+			}
+            if(!s.isEmpty())
+            {
+               if(!s.isEmpty())
+               {
+                  QTextBrowser* browser = new MyBrowser(dialog, layer);
+                  browser->setHtml(s);
+                  browser->resize(512, 512);
+                  dialog->resize(512, 512);
+                  dialog->setAttribute(Qt::WA_DeleteOnClose);      
+                  dialog->setWindowFlags(dialog->windowFlags()|Qt::WindowStaysOnTopHint);
+                  dialog->show();
+               }
+            }
+            return;
+         }
+      }
+   }
+}
+
+int ossimPlanetQtMainWindow::ephemerisMembers()
+{
+   int members = 0;
+   if(ossimPlanetQtApplication::sunlightEnabled())
+   {
+      members |= ossimPlanetEphemeris::SUN_LIGHT;
+   }
+   if(ossimPlanetQtApplication::skyEnabled())
+   {
+      members |= ossimPlanetEphemeris::SKY;
+   }
+   if(ossimPlanetQtApplication::moonEnabled())
+   {
+      members |= ossimPlanetEphemeris::MOON;
+   }
+   if(ossimPlanetQtApplication::percentVisibility() < 100)
+   {
+      members |= ossimPlanetEphemeris::FOG;
+   }
+   return members;
+}
diff --git a/ossimPlanetQt/src/gui/ossimPlanetQtMessageLog.cpp b/ossimPlanetQt/src/gui/ossimPlanetQtMessageLog.cpp
new file mode 100644
index 0000000..5324441
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ossimPlanetQtMessageLog.cpp
@@ -0,0 +1,73 @@
+
+#include <ossimPlanetQt/ossimPlanetQtMessageLog.h>
+#include <QtGui/QTreeWidgetItem>
+#include <QtGui/QIcon>
+
+ossimPlanetQtMessageLog::ossimPlanetQtMessageLog(QWidget* parent)
+:QDialog(parent)
+{
+	setupUi(this);
+	theMaxNumberOfItems = 1024;
+	theNumberOfItems = 0;
+	connect(this->theCloseButton, SIGNAL(clicked(bool)), this, SLOT(closeButtonClicked(bool)));
+	connect(this->theClearButton, SIGNAL(clicked(bool)), this, SLOT(clearButtonClicked(bool)));
+}
+
+void ossimPlanetQtMessageLog::addMessage(const QString& message,
+													  ossimPlanetQtMessageLog::Type type)
+{
+	++theNumberOfItems;
+	QTreeWidgetItem* item = new QTreeWidgetItem(theMessageLog);
+	switch(type)
+	{
+		case ossimPlanetQtMessageLog::LOG_ERROR:
+		{
+			item->setIcon(0, QIcon(":error"));
+			break;
+		}
+		case ossimPlanetQtMessageLog::LOG_WARNING:
+		{
+			item->setIcon(0, QIcon(":warning"));
+			break;
+		}
+		default:
+		{
+			item->setIcon(0, QIcon(":info"));
+			break;
+		}
+	}
+	item->setText(0, message);
+	
+	adjustItemCount();
+}
+
+void ossimPlanetQtMessageLog::showLastMessage()
+{
+	if(theMessageLog->topLevelItemCount() > 0)
+	{
+		theMessageLog->scrollToItem(theMessageLog->topLevelItem(theMessageLog->topLevelItemCount() -1));
+	}
+}
+
+void ossimPlanetQtMessageLog::closeButtonClicked(bool checked)
+{
+	hide();
+}
+
+void ossimPlanetQtMessageLog::clearButtonClicked(bool checked)
+{
+	theMessageLog->clear();
+}
+
+void ossimPlanetQtMessageLog::adjustItemCount()
+{
+		while(theNumberOfItems > theMaxNumberOfItems)
+		{
+			QTreeWidgetItem* item  = theMessageLog->takeTopLevelItem(0);
+			if(item)
+			{
+				delete item;
+			}
+			--theNumberOfItems;
+		}
+}
diff --git a/ossimPlanetQt/src/gui/ossimPlanetQtNewHttpConnection.cpp b/ossimPlanetQt/src/gui/ossimPlanetQtNewHttpConnection.cpp
new file mode 100644
index 0000000..398a1fd
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ossimPlanetQtNewHttpConnection.cpp
@@ -0,0 +1,43 @@
+#include <ossimPlanetQt/ossimPlanetQtNewHttpConnection.h>
+#include <QtCore/QSettings>
+#include <ossimPlanetQt/ossimPlanetQtApplication.h>
+
+ossimPlanetQtNewHttpConnection::ossimPlanetQtNewHttpConnection(QWidget* parent,
+                                                               const QString& connName,
+                                                               Qt::WFlags fl)
+   :QDialog(parent),
+    theConnectionName(connName)
+{
+   setupUi(this);
+   connect(theCancelButton, SIGNAL(clicked()), this, SLOT(reject()));
+   connect(theOkButton, SIGNAL(clicked()), this, SLOT(saveConnection()));
+   
+   if (!connName.isEmpty())
+   {
+      // populate the dialog with the information stored for the connection
+      // populate the fields with the stored setting parameters
+      
+//       QSettings settings;
+      
+      QString key = connName;
+      theName->setText     (connName);
+      theUrl->setText      (ossimPlanetQtApplication::readWmsSettingsEntry(key+ "/url"));
+      theProxyHost->setText(ossimPlanetQtApplication::readWmsSettingsEntry(key + "/proxyhost"));
+      theProxyPort->setText(ossimPlanetQtApplication::readWmsSettingsEntry(key + "/proxyport"));
+      theProxyUser->setText(ossimPlanetQtApplication::readWmsSettingsEntry(key + "/proxyuser"));
+      theProxyPassword->setText(ossimPlanetQtApplication::readWmsSettingsEntry(key + "/proxypassword"));
+   }
+}
+
+void ossimPlanetQtNewHttpConnection::saveConnection()
+{
+   QString key = theName->text();
+   
+   ossimPlanetQtApplication::writeWmsSettingsEntry(key + "/url", theUrl->text().trimmed());
+   ossimPlanetQtApplication::writeWmsSettingsEntry(key + "/proxyhost", theProxyHost->text().trimmed());
+   ossimPlanetQtApplication::writeWmsSettingsEntry(key + "/proxyport", theProxyPort->text().trimmed());
+   ossimPlanetQtApplication::writeWmsSettingsEntry(key + "/proxyuser", theProxyUser->text().trimmed());
+   ossimPlanetQtApplication::writeWmsSettingsEntry(key + "/proxypassword", theProxyPassword->text().trimmed());
+  
+   accept();
+}
diff --git a/ossimPlanetQt/src/gui/ossimPlanetQtOperation.cpp b/ossimPlanetQt/src/gui/ossimPlanetQtOperation.cpp
new file mode 100644
index 0000000..7254dd7
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ossimPlanetQtOperation.cpp
@@ -0,0 +1,421 @@
+#include <ossimPlanetQt/ossimPlanetQtOperation.h>
+#include <ossimPlanetQt/ossimPlanetQtApplication.h>
+#include <ossimPlanetQt/ossimPlanetQtEvent.h>
+#include <ossimPlanetQt/ossimPlanetQtLegend.h>
+#include <ossimPlanetQt/ossimPlanetQtMainWindow.h>
+#include <ossimPlanetQt/ossimPlanetQtActivityWidget.h>
+#include <QtGui/QApplication>
+#include <ossim/imaging/ossimOverviewBuilderFactoryRegistry.h>
+#include <ossim/imaging/ossimOverviewBuilderBase.h>
+#include <ossim/imaging/ossimHistogramWriter.h>
+#include <ossim/imaging/ossimImageHistogramSource.h>
+ossimPlanetQtOperation::ossimPlanetQtOperation()
+:theWidget(0)
+{
+}
+
+void ossimPlanetQtOperation::postMessage(const QString& msg,
+													  int type)const
+{
+	if(theWidget)
+	{
+		QWidget* root = theWidget;
+		while(root->parentWidget())
+		{
+			root = root->parentWidget();
+		}
+		QApplication::postEvent(root, new ossimPlanetQt::MessageEvent(msg,
+																						  (ossimPlanetQt::MessageEvent::MessageType)type));
+	}
+}
+
+void ossimPlanetQtOperation::adjustToWriteableLocation(ossimFilename& file)const
+{
+	if(file.path().isWriteable())
+	{
+		return;
+	}
+	ossimString drivePart;
+	ossimString pathPart;
+	ossimString filePart;
+	ossimString extPart;
+	
+	file.split(drivePart, pathPart, filePart, extPart);
+	
+	ossimFilename stagingCache(ossimPlanetQtApplication::stagingCacheDirectory().toStdString().c_str());
+	
+	if(!stagingCache.empty())
+	{
+		stagingCache = stagingCache.dirCat(pathPart);
+		if(!stagingCache.exists())
+		{
+			stagingCache.createDirectory();
+		}
+		stagingCache = stagingCache.dirCat(filePart);
+		stagingCache += ossimFilename("." + extPart);
+		
+		file = stagingCache;
+	}
+}
+
+void ossimPlanetQtOperation::adjustToStagerLocation(ossimFilename& file)const
+{
+	ossimString drivePart;
+	ossimString pathPart;
+	ossimString filePart;
+	ossimString extPart;
+	
+	file.split(drivePart, pathPart, filePart, extPart);
+	
+	ossimFilename stagingCache(ossimPlanetQtApplication::stagingCacheDirectory().toStdString().c_str());
+	
+	if(!stagingCache.empty())
+	{
+		stagingCache = stagingCache.dirCat(pathPart);
+		if(!stagingCache.exists())
+		{
+			stagingCache.createDirectory();
+		}
+		stagingCache = stagingCache.dirCat(filePart);
+		stagingCache += ossimFilename("." + extPart);
+		
+		file = stagingCache;
+	}
+}
+
+ossimPlanetQtOssimImageStagerOperation::ossimPlanetQtOssimImageStagerOperation(ossimPlanetOssimImageLayer* layer, 
+                                                                               ossimPlanetQtLegend* legend)
+:ossimPlanetQtOperation(),
+theLayer(layer),
+theLegend(legend),
+theCurrentProcessInterface(0)
+{
+   setStatus("Ready to stage image " + theLayer->getHandler()->getFilename());
+}
+
+void ossimPlanetQtOssimImageStagerOperation::run()
+{
+   if(theLayer->getHandler().valid()&&
+		(theLayer->isStateSet(ossimPlanetTextureLayer_NO_OVERVIEWS)||
+		 theLayer->isStateSet(ossimPlanetTextureLayer_NO_HISTOGRAMS)))
+   {
+		ossimRefPtr<ossimImageHandler> handler = (ossimImageHandler*)(theLayer->getHandler()->dup());
+		
+		if(theLayer->isStateSet(ossimPlanetTextureLayer_NO_OVERVIEWS))
+		{
+         theStagerMessage = "Building overview for file: " + handler->getFilename() + "\n";
+			buildOverviews(handler.get());
+		}
+		if(theLayer->isStateSet(ossimPlanetTextureLayer_NO_HISTOGRAMS)&&
+			(!theLayer->getHandler()->getClassName().contains("OgrGdal")))
+		{
+         theStagerMessage = "Building histogram for file: " + handler->getFilename() + "\n";
+			buildHistograms(handler.get());
+		}
+   }
+}
+
+void ossimPlanetQtOssimImageStagerOperation::processProgressEvent(ossimProcessProgressEvent& event)
+{
+	OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theStagerMutex);
+	if(state() == ossimPlanetOperation::CANCELED_STATE)
+	{
+		if(theCurrentProcessInterface)
+		{
+			theCurrentProcessInterface->abort();
+		}
+	}
+   setStatus(theStagerMessage + ossimString::toString((ossim_uint32)(event.getPercentComplete())) +
+             "% " + event.getMessage().c_str());
+}
+
+
+void ossimPlanetQtOssimImageStagerOperation::buildOverviews(ossimImageHandler* handler)
+{
+	ossimRefPtr<ossimOverviewBuilderBase> builder = ossimOverviewBuilderFactoryRegistry::instance()->createBuilder("ossim_tiff_box");
+	builder->setInputSource(handler);
+	theFilename = handler->getFilename();
+	ossimFilename overviewFile = handler->createDefaultOverviewFilename();
+	adjustToWriteableLocation(overviewFile);
+	builder->addListener((ossimProcessListener*)this);
+	theFilename = overviewFile;
+	if(overviewFile.path().isWriteable())
+	{
+		builder->setOutputFile(overviewFile);
+		theCurrentProcessInterface = builder.get();
+		builder->execute();
+	}
+	builder->removeListener((ossimProcessListener*)this);	
+	if(overviewFile.exists())
+	{
+		theLayer->setOverviewFile(overviewFile);
+	}
+	theCurrentProcessInterface = 0;
+}
+
+void ossimPlanetQtOssimImageStagerOperation::buildHistograms(ossimImageHandler* handler)
+{
+	ossimFilename histogramFile = handler->createDefaultHistogramFilename();
+	adjustToWriteableLocation(histogramFile);
+	ossimRefPtr<ossimImageHistogramSource> histoSource = new ossimImageHistogramSource;
+	ossimRefPtr<ossimHistogramWriter> writer = new ossimHistogramWriter;
+	histoSource->connectMyInputTo(0, handler);
+	histoSource->enableSource();
+	histoSource->setComputationMode(OSSIM_HISTO_MODE_FAST);
+	writer->connectMyInputTo(0, histoSource.get());
+	theFilename = histogramFile;
+	
+	writer->setFilename(histogramFile);
+	writer->addListener((ossimProcessListener*)this);
+	theCurrentProcessInterface = writer.get();
+	writer->execute();
+	writer->removeListener((ossimProcessListener*)this);
+	theCurrentProcessInterface = 0;
+	if(histogramFile.exists())
+	{
+		theLayer->setHistogramFile(histogramFile);
+		theLayer->setHistogramStretchEnableFlag(true);
+	}
+}
+
+ossimPlanetQtOpenImageFileOperation::ossimPlanetQtOpenImageFileOperation(const QString& file,
+                                                                         ossimPlanetQtLegend* legend)
+:ossimPlanetQtOperation(),
+theLegend(legend)
+{
+	theFileList.push_back(ossimString(file.toStdString().c_str())); 
+   setStatus("ready to open " + file.toStdString());
+}
+
+void ossimPlanetQtOpenImageFileOperation::run()
+{
+   theCurrentFileIdx = 0;
+   theExtents = 0;
+   theLayers.clear();
+   ossim_uint32 fileTotal = theFileList.size();
+   while(theCurrentFileIdx < fileTotal)
+   {
+      ossimString baseOpeningStatus = ossimString("opening file: ") + theFileList[theCurrentFileIdx];
+      setStatus(baseOpeningStatus);
+      QApplication::postEvent(theWidget, new ossimPlanetQtActivityWidget::QtOperationEvent(this, 
+                                                                                           ossimPlanetQtActivityWidget::STATUS_TYPE));
+      // do not gorup them we will open individually
+      osg::ref_ptr<ossimPlanetTextureLayer> textureLayer = ossimPlanetTextureLayerRegistry::instance()->createLayer(theFileList[theCurrentFileIdx], false);
+      if(textureLayer.valid()&&!textureLayer->isStateSet(ossimPlanetTextureLayer_NO_GEOM))
+      {
+         if(!textureLayer->getLookAt().valid())
+         {
+            textureLayer->resetLookAt();
+         }
+         osg::ref_ptr<ossimPlanetOssimImageLayer> imageLayer = dynamic_cast<ossimPlanetOssimImageLayer*>(textureLayer.get());
+         if(imageLayer.valid())
+         {
+            ossim_uint32 entryIdx = 0;
+            ossim_uint32 numberOfEntries = imageLayer->getNumberOfEntries();
+            do
+            {
+               if(!imageLayer->isStateSet(ossimPlanetTextureLayer_NO_GEOM)&&
+                  !imageLayer->isStateSet(ossimPlanetTextureLayer_NO_SOURCE_DATA))
+               {
+                  ossimString baseOpeningStatus = ossimString("opening file: ") + theFileList[theCurrentFileIdx] + "\nentry: " + ossimString::toString(entryIdx);
+                  setStatus(baseOpeningStatus);
+                  QApplication::postEvent(theWidget, new ossimPlanetQtActivityWidget::QtOperationEvent(this, 
+                                                                                                       ossimPlanetQtActivityWidget::STATUS_TYPE));
+                  QString stretchMode = ossimPlanetQtApplication::autoHistogramStretchMode();
+                  if(imageLayer->getHandler().valid())
+                  {
+                     ossimFilename histogramFile = imageLayer->getHandler()->createDefaultHistogramFilename();
+                     ossimFilename overviewFile  = imageLayer->getHandler()->createDefaultOverviewFilename();
+                     adjustToStagerLocation(histogramFile);
+                     adjustToStagerLocation(overviewFile);
+                     
+                     if(imageLayer->isStateSet(ossimPlanetTextureLayer_NO_HISTOGRAMS)&&
+                        histogramFile.exists())
+                     {
+                        imageLayer->setHistogramFile(histogramFile);
+                     }
+                     if(imageLayer->isStateSet(ossimPlanetTextureLayer_NO_OVERVIEWS)&&
+                        overviewFile.exists())
+                     {
+                        imageLayer->setOverviewFile(overviewFile);
+                     }
+                  }
+                  if(!stretchMode.isEmpty())
+                  {
+                     imageLayer->setHistogramStretchMode(stretchMode.toStdString());
+                     if(stretchMode!="None")
+                     {
+                        imageLayer->setHistogramStretchEnableFlag(true);
+                     }
+                     else
+                     {
+                        imageLayer->setHistogramStretchEnableFlag(false);
+                     }
+                  }
+                  if(theLegend)
+                  {
+                     QApplication::postEvent(theLegend, new ossimPlanetQt::ImageLayerEvent(imageLayer.get(),
+                                                                                           ossimPlanetQt::ImageLayerEvent::ADD));
+                  }
+               }
+               ++entryIdx;
+               if(entryIdx < numberOfEntries)
+               {
+                  imageLayer = new ossimPlanetOssimImageLayer();
+                  imageLayer->openImage(theFileList[theCurrentFileIdx], entryIdx);
+               }
+            }while(entryIdx < numberOfEntries);
+            setStatus(ossimString("finished  opening file: ") + theFileList[theCurrentFileIdx]);
+            QApplication::postEvent(theWidget, new ossimPlanetQtActivityWidget::QtOperationEvent(this, 
+                                                                                                 ossimPlanetQtActivityWidget::STATUS_TYPE));
+         }
+      }
+      else if(!textureLayer.valid())
+      {
+			postMessage(QString("Unable to open file ") + QString(theFileList[theCurrentFileIdx].c_str()),
+							ossimPlanetQt::MessageEvent::ERROR_MESSAGE_TYPE);
+      }
+      else if(textureLayer->isStateSet(ossimPlanetTextureLayer_NO_GEOM))
+      {
+			postMessage(QString("No geometry found for file ") + QString(theFileList[theCurrentFileIdx].c_str()),
+							ossimPlanetQt::MessageEvent::ERROR_MESSAGE_TYPE);
+      }
+      else
+      {
+			postMessage(QString("Unable to open file ") + QString(theFileList[theCurrentFileIdx].c_str()),
+							ossimPlanetQt::MessageEvent::ERROR_MESSAGE_TYPE);
+      }
+      ++theCurrentFileIdx;
+   }
+}
+
+
+ossimPlanetQtOpenImageFileFromLayerOperation::ossimPlanetQtOpenImageFileFromLayerOperation(osg::ref_ptr<ossimPlanetOssimImageLayer> layer,
+																														 const ossimFilename& name,
+																														 ossim_int32 entry)
+:ossimPlanetQtOperation(),
+theLayer(layer),
+theFilename(name),
+theEntry(entry)
+{
+	
+}
+
+void ossimPlanetQtOpenImageFileFromLayerOperation::run()
+{
+   setStatus("Opening " + theFilename);
+	
+   if(theLayer.valid())
+   {
+      if(theLayer->openImage(theFilename, theEntry))
+      {
+         ossimPlanetOssimImageLayer* imageLayer = dynamic_cast<ossimPlanetOssimImageLayer*>(theLayer.get());
+         if(imageLayer)
+         {
+            QString stretchMode = ossimPlanetQtApplication::autoHistogramStretchMode();
+            if(!stretchMode.isEmpty())
+            {
+               imageLayer->setHistogramStretchMode(stretchMode.toStdString());
+               if(stretchMode!="None")
+               {
+                  imageLayer->setHistogramStretchEnableFlag(true);
+               }
+               else
+               {
+                  imageLayer->setHistogramStretchEnableFlag(false);
+               }
+            }
+         }
+         if(theLayer->getHandler().valid())
+         {
+				ossimString drivePart;
+				ossimString pathPart;
+				ossimString filePart;
+				ossimString extPart;
+				ossimFilename histogramFile = imageLayer->getHandler()->createDefaultHistogramFilename();
+				ossimFilename overviewFile  = imageLayer->getHandler()->createDefaultOverviewFilename();
+				
+            if(!overviewFile.exists())
+            {
+					adjustToStagerLocation(overviewFile);
+               if(overviewFile.exists())
+               {
+                  theLayer->getHandler()->openOverview(overviewFile);
+                  theLayer->dirtyExtents();
+               }
+            }
+				if(!histogramFile.exists())
+				{
+					adjustToStagerLocation(histogramFile);
+               if(histogramFile.exists())
+               {
+                  theLayer->setHistogramFile(histogramFile);
+               }
+				}
+         }
+      }
+      if(!theName.empty())
+      {
+         theLayer->setName(theName);
+      }
+      if(!theDescription.empty())
+      {
+         theLayer->setDescription(theDescription);
+      }
+      if(theSavedLookAt.valid())
+      {
+         theLayer->setLookAt(theSavedLookAt);
+      }
+      else
+      {
+         theLayer->resetLookAt();
+      }
+   }
+}
+
+ossimPlanetQtOpenImageFileFromLayerXmlOperation::ossimPlanetQtOpenImageFileFromLayerXmlOperation(osg::ref_ptr<ossimPlanetOssimImageLayer> layer,
+                                                                                                 ossimRefPtr<ossimXmlNode> node,
+                                                                                                 ossimPlanetQtLegend* legend)
+:ossimPlanetQtOperation(),
+theLayer(layer),
+theXmlNode(node),
+theLegend(legend)
+{
+   ossimRefPtr<ossimXmlNode> filenameNode = theXmlNode->findFirstNode("filename");
+   ossimRefPtr<ossimXmlNode> name         = theXmlNode->findFirstNode("name");
+   ossimRefPtr<ossimXmlNode> description  = theXmlNode->findFirstNode("desciption");
+   if(filenameNode.valid())
+   {
+      theFilename = filenameNode->getText();
+   }
+   if(name.valid())
+   {
+      theName = name->getText();
+   }
+   else
+   {
+      theName = theFilename.file();
+   }
+   if(description.valid()) theDescription = description->getText();
+   theInitializeGuiFlag = true;
+   theItem = 0;
+}
+
+void ossimPlanetQtOpenImageFileFromLayerXmlOperation::run()
+{
+   setStatus("Opening image " + theFilename);
+	
+   if(theLayer.valid())
+   {
+      theLayer->loadXml(theXmlNode);
+      if(!theLayer->getLookAt().valid())
+      {
+         theLayer->resetLookAt();
+      }
+   }
+}
+void ossimPlanetQtOpenImageFileFromLayerXmlOperation::setItem(ossimPlanetQtLegendTextureItem* item)
+{
+	theItem = item;
+}
+
diff --git a/ossimPlanetQt/src/gui/ossimPlanetQtPreferences.cpp b/ossimPlanetQt/src/gui/ossimPlanetQtPreferences.cpp
new file mode 100644
index 0000000..c1ad8da
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ossimPlanetQtPreferences.cpp
@@ -0,0 +1,12 @@
+#include <ossimPlanetQt/ossimPlanetQtPreferences.h>
+
+ossimPlanetQtPreferences::ossimPlanetQtPreferences(QWidget *parent)
+   : QDialog(parent)
+{
+   setupUi(this);
+}
+
+void ossimPlanetQtPreferences::on_theOkButton_clicked(bool checked)
+{
+   close();
+}
diff --git a/ossimPlanetQt/src/gui/ossimPlanetQtRuler.cpp b/ossimPlanetQt/src/gui/ossimPlanetQtRuler.cpp
new file mode 100644
index 0000000..41c80a0
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ossimPlanetQtRuler.cpp
@@ -0,0 +1,437 @@
+#include <ossimPlanetQt/ossimPlanetQtRuler.h>
+#include <ossimPlanetQt/ossimPlanetQtGlWidget.h>
+//#include <ossimPlanet/ossimPlanetLand.h>
+#include <QtGui/QMessageBox>
+#include <QtGui/QMouseEvent>
+#include <QtGui/QCheckBox>
+#include <QtGui/QAbstractItemView>
+#include <QtGui/QHeaderView>
+#include <ossimPlanet/ossimPlanetLayer.h>
+#include <osg/Geode>
+#include <osg/CameraNode>
+#include <osg/Drawable>
+#include <osg/io_utils>
+#include <ossim/base/ossimUnitConversionTool.h>
+#include <ossim/base/ossimUnitTypeLut.h>
+#include <ossim/base/ossimPolygon.h>
+#include <ossim/base/ossimDrect.h>
+
+enum UNIT_IDX_TYPE
+{
+   KILOMETERS_IDX = 0,
+   METERS_IDX,
+   CENTIMETERS_IDX,
+   MILLIMETERS_IDX,
+   MILES_IDX,
+   YARDS_IDX,
+   FEET_IDX,
+   INCHES_IDX
+};
+
+class ossimPlanetMeasureToolDrawable : public osg::Drawable
+{
+public:
+   virtual osg::Object* cloneType() const
+      {
+         return new ossimPlanetMeasureToolDrawable;
+      }
+   ossimPlanetMeasureToolDrawable()
+      {
+         thePointsValidFlag = false;
+      }
+   virtual osg::Object* clone(const osg::CopyOp&) const
+      {
+         return new ossimPlanetMeasureToolDrawable(*this);
+      }
+   virtual void drawImplementation(osg::RenderInfo& state) const
+      {
+         if(thePointsValidFlag)
+         {
+            glColor3f(1.0, 1.0, 0.0);
+            glLineWidth(1.0);
+//            glEnable(GL_LINE_SMOOTH);
+//            glEnable(GL_POINT_SMOOTH);
+            glBegin(GL_LINES);
+              glVertex2d(theStartPoint[0], theStartPoint[1]);
+              glVertex2d(theEndPoint[0], theEndPoint[1]);
+            glEnd();
+            glPointSize(5.0);
+            glBegin(GL_POINTS);
+              glVertex2d(theStartPoint[0], theStartPoint[1]);
+              glVertex2d(theEndPoint[0], theEndPoint[1]);
+            glEnd();
+            
+         }
+      }
+
+   void setPointsValidFlag(bool flag)
+      {
+         thePointsValidFlag = flag;
+      }
+   
+   void setPoints(const osg::Vec3d& startPt,
+                  const osg::Vec3d& endPt)
+      {
+         theStartPoint = startPt;
+         theEndPoint   = endPt;
+      }
+protected:
+   bool thePointsValidFlag;
+   osg::Vec3d theStartPoint;
+   osg::Vec3d theEndPoint;
+};
+
+class ossimPlanetMeasureTool : public ossimPlanetLayer
+{
+public:
+   ossimPlanetMeasureTool();
+   virtual void traverse(osg::NodeVisitor& nv);
+   virtual void execute(const ossimPlanetAction& action)
+   {
+      ossimPlanetLayer::execute(action);
+   }
+   void setPointsValidFlag(bool flag)
+      {
+         thePointsValidFlag = flag;
+      }
+   void setPoints(const osg::Vec3d& startPt,
+                  const osg::Vec3d& endPt);
+protected:
+   bool                        thePointsValidFlag;
+   osg::Vec3d                  theStartPoint;
+   osg::Vec3d                  theEndPoint;
+   osg::ref_ptr<osg::Viewport> theViewport;
+   osg::ref_ptr<osg::CameraNode> theCameraNode;
+   osg::Geode* theGeode;
+   ossimPlanetMeasureToolDrawable* theDrawable;
+   mutable OpenThreads::Mutex theMutex;
+};
+
+ossimPlanetMeasureTool::ossimPlanetMeasureTool()
+{
+   thePointsValidFlag = false;
+   theCameraNode = new osg::CameraNode;
+   theCameraNode->setReferenceFrame(osg::Transform::ABSOLUTE_RF);
+   theCameraNode->setProjectionMatrix(osg::Matrix::ortho2D(0,1024,0,1024));
+   theCameraNode->setViewMatrix(osg::Matrix::identity());
+   theCameraNode->setClearMask(GL_DEPTH_BUFFER_BIT);
+   theCameraNode->setRenderOrder(osg::CameraNode::POST_RENDER);
+   theDrawable = new ossimPlanetMeasureToolDrawable;
+   theGeode = new osg::Geode();
+   osg::StateSet* stateset = theGeode->getOrCreateStateSet();
+   stateset->setMode(GL_LIGHTING,
+                     osg::StateAttribute::OFF);
+   stateset->setMode(GL_COLOR_MATERIAL,
+                     osg::StateAttribute::OFF);
+   theGeode->setCullingActive(false);
+   theDrawable->setSupportsDisplayList(false);
+   theGeode->addDrawable(theDrawable);
+   theCameraNode->addChild(theGeode);
+   addChild(theCameraNode.get());
+
+}
+
+void ossimPlanetMeasureTool::setPoints(const osg::Vec3d& startPt,
+                                       const osg::Vec3d& endPt)
+
+{
+	setRedrawFlag(true);
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+   theStartPoint = startPt;
+   theEndPoint   = endPt;
+}
+
+void ossimPlanetMeasureTool::traverse(osg::NodeVisitor& nv)
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+   switch(nv.getVisitorType())
+   {
+      case osg::NodeVisitor::UPDATE_VISITOR:
+      {
+         if(theViewport.valid())
+         {
+            theCameraNode->setProjectionMatrix(osg::Matrix::ortho2D(theViewport->x(),
+                                                                    theViewport->width(),
+                                                                    theViewport->y(),
+                                                                    theViewport->height()));
+         }
+         
+         break;
+      }
+      case osg::NodeVisitor::CULL_VISITOR:
+      {
+         osgUtil::CullVisitor* cullVisitor = dynamic_cast<osgUtil::CullVisitor*>(&nv);
+         if(cullVisitor)
+         {
+            int x = cullVisitor->getViewport()->x();
+            int y = cullVisitor->getViewport()->y();
+            int w = cullVisitor->getViewport()->width();
+            int h = cullVisitor->getViewport()->height();
+            if(!theViewport.valid())
+            {
+               theViewport = new osg::Viewport(x,y,w,h);
+            }
+            else
+            {
+               if( (theViewport->x() != x)||
+                   (theViewport->y() != y)||
+                   (theViewport->width() != w)||
+                   (theViewport->height() != h))
+               {
+                  theViewport->setViewport(x, y, w, h);
+               }
+            }
+            theDrawable->setPointsValidFlag(thePointsValidFlag);
+            if(thePointsValidFlag)
+            {
+               const osg::RefMatrix* m = cullVisitor->getMVPW();
+
+               osg::Vec3d startPt = theStartPoint*(*m);
+               osg::Vec3d endPt   = theEndPoint*(*m);
+
+               
+               
+               theDrawable->setPoints(startPt, endPt);
+            }
+         }
+         break;
+      }
+      case osg::NodeVisitor::EVENT_VISITOR:
+      {
+#if 0
+         osgGA::EventVisitor* ev = dynamic_cast<osgGA::EventVisitor*>(&nv);
+         if(ev)
+         {
+            const osgGA::EventVisitor::EventList& eventList = ev->getEvents();
+            osgGA::EventVisitor::EventList::const_iterator iter = eventList.begin();
+            if(eventList.size())
+            {
+               if(((*iter)->getEventType() == osgGA::GUIEventAdapter::FRAME))
+               {
+                  ev->getActionAdapter()->requestRedraw();
+               }
+            }
+         }
+#endif
+         break;
+      }
+   }
+   ossimPlanetLayer::traverse(nv);
+}
+
+
+ossimPlanetQtRuler::ossimPlanetQtRuler(QWidget* parent)
+   :QDialog(parent)
+{
+   setupUi(this);
+   theGlWidget = 0;
+   theFirstPointSet = false;
+   theLength->horizontalHeader()->setHidden(1);
+   theLength->verticalHeader()->setHidden(1);
+//    theLength->item(0, 1)->setText("meters");
+   theTool = new ossimPlanetMeasureTool;
+   theTool->ref();
+   theLength->setRowCount(8);
+   theLength->setColumnCount(2);
+   
+   theLength->setItem(KILOMETERS_IDX, 0, new QTableWidgetItem("0.0"));
+   theLength->setItem(KILOMETERS_IDX, 1, new QTableWidgetItem("km"));   
+
+   theLength->setItem(METERS_IDX, 0, new QTableWidgetItem("0.0"));
+   theLength->setItem(METERS_IDX, 1, new QTableWidgetItem("m"));   
+
+   theLength->setItem(CENTIMETERS_IDX, 0, new QTableWidgetItem("0.0"));
+   theLength->setItem(CENTIMETERS_IDX, 1, new QTableWidgetItem("cm"));
+
+   theLength->setItem(MILLIMETERS_IDX, 0, new QTableWidgetItem("0.0"));
+   theLength->setItem(MILLIMETERS_IDX, 1, new QTableWidgetItem("mm"));
+
+   theLength->setItem(MILES_IDX, 0, new QTableWidgetItem("0.0"));
+   theLength->setItem(MILES_IDX, 1, new QTableWidgetItem("mi"));
+
+   theLength->setItem(YARDS_IDX, 0, new QTableWidgetItem("0.0"));
+   theLength->setItem(YARDS_IDX, 1, new QTableWidgetItem("yd"));
+
+   theLength->setItem(FEET_IDX, 0, new QTableWidgetItem("0.0"));
+   theLength->setItem(FEET_IDX, 1, new QTableWidgetItem("ft"));
+
+   theLength->setItem(INCHES_IDX, 0, new QTableWidgetItem("0.0"));
+   theLength->setItem(INCHES_IDX, 1, new QTableWidgetItem("in"));
+
+   //    theUnits->addItem(ossimUnitTypeLut::instance()->getEntryString(OSSIM_METERS).c_str());
+//    theUnits->addItem(ossimUnitTypeLut::instance()->getEntryString(OSSIM_KILOMETERS).c_str());
+//    theUnits->addItem(ossimUnitTypeLut::instance()->getEntryString(OSSIM_CENTIMETERS).c_str());
+//    theUnits->addItem(ossimUnitTypeLut::instance()->getEntryString(OSSIM_MILLIMETERS).c_str());
+//    theUnits->addItem(ossimUnitTypeLut::instance()->getEntryString(OSSIM_MICRONS).c_str());
+//    theUnits->addItem(ossimUnitTypeLut::instance()->getEntryString(OSSIM_MILES).c_str());
+//    theUnits->addItem(ossimUnitTypeLut::instance()->getEntryString(OSSIM_YARDS).c_str());
+//    theUnits->addItem(ossimUnitTypeLut::instance()->getEntryString(OSSIM_FEET).c_str());
+//    theUnits->addItem(ossimUnitTypeLut::instance()->getEntryString(OSSIM_US_SURVEY_FEET).c_str());
+//    theUnits->addItem(ossimUnitTypeLut::instance()->getEntryString(OSSIM_INCHES).c_str());
+//    theUnits->addItem(ossimUnitTypeLut::instance()->getEntryString(OSSIM_DEGREES).c_str());
+//    theUnits->addItem(ossimUnitTypeLut::instance()->getEntryString(OSSIM_MINUTES).c_str());
+//    theUnits->addItem(ossimUnitTypeLut::instance()->getEntryString(OSSIM_SECONDS).c_str());
+//    theUnits->view()->setWindowFlags(theUnits->view()->windowFlags()|Qt::WindowStaysOnTopHint);
+   connect(theMouseNavigationCheckBox, SIGNAL(stateChanged(int)), this, SLOT(mouseNavStateChange(int)));
+   setDistance();
+   theLength->resizeColumnToContents(1);
+//    connect(theUnits->view(), SIGNAL( activated ( const QModelIndex)), this, SLOT(dropDownActivated()));
+}
+
+ossimPlanetQtRuler::~ossimPlanetQtRuler()
+{
+   if(theGlWidget)
+   {
+      theGlWidget->setMouseNavigationFlag(true);
+      theGlWidget->setCursor(Qt::ArrowCursor);
+   }
+   if(theTool&&thePlanet.valid())   
+   {
+      if(thePlanet.valid())
+      {
+         thePlanet->removeChild(theTool);
+      }
+      theTool->unref();
+      theTool = 0;
+   }
+   theModel = 0;
+   thePlanet = 0;
+}
+
+void ossimPlanetQtRuler::setPlanet(osg::ref_ptr<ossimPlanet> planet)
+{
+   if(thePlanet.valid())
+   {
+      thePlanet->removeChild(theTool);
+   }
+   thePlanet    = planet.get();
+   if(thePlanet.valid())
+   {
+      thePlanet->addChild(theTool);
+      theModel = thePlanet->model().get();
+   }
+   else
+   {
+      theModel = 0;
+   }
+}
+
+void ossimPlanetQtRuler::setGlWidget(ossimPlanetQtViewer* widget)
+{
+   theGlWidget = widget;
+   if(theGlWidget)
+   {
+      theGlWidget->setMouseTracking(true);
+      theGlWidget->setCursor(Qt::CrossCursor);
+      theFirstPointSet = false;
+      theMouseNavigationCheckBox->blockSignals(true);
+      theMouseNavigationCheckBox->setCheckState(theGlWidget->getMouseNavigationFlag()?Qt::Checked:Qt::Unchecked);
+      theMouseNavigationCheckBox->blockSignals(false);
+      connect(theGlWidget, SIGNAL(signalMouseMoveEvent(QMouseEvent*)),
+              this, SLOT(glWidgetSignalMouseMoveEvent(QMouseEvent*)));
+      connect(theGlWidget, SIGNAL(signalMouseReleaseEvent(QMouseEvent*)),
+              this, SLOT(glWidgetSignalMouseReleaseEvent(QMouseEvent*)));
+      connect(theGlWidget, SIGNAL(signalMousePressEvent(QMouseEvent*)),
+              this, SLOT(glWidgetSignalMousePressEvent(QMouseEvent*)));
+//       setDistance();
+   }
+}
+
+void ossimPlanetQtRuler::glWidgetSignalMouseMoveEvent(QMouseEvent* e)
+{
+   if(theFirstPointSet)
+   {
+      osg::Vec3d pt;
+      if(theGlWidget->viewer()->getLatLonHeightAtWindowCoordinate(theEndPointLatLonHgt, e->x(), theGlWidget->height() - e->y()))
+      {
+         theModel->forward(theEndPointLatLonHgt, theEndPointXYZ);
+         setDistance();
+         theTool->setPoints(theStartPointXYZ, theEndPointXYZ);
+			theTool->setRedrawFlag(true);
+      }
+   }
+}
+
+void ossimPlanetQtRuler::glWidgetSignalMousePressEvent(QMouseEvent* e)
+{
+  if(!theGlWidget->getMouseNavigationFlag())
+   {
+      theFirstPointSet = false;
+      if(e->button() == Qt::LeftButton)
+      {
+         if(theGlWidget->viewer()->getLatLonHeightAtWindowCoordinate(theStartPointLatLonHgt, e->x(), theGlWidget->height() - e->y()))
+         {
+            theFirstPointSet = true;
+            theGlWidget->setMouseTracking(true);
+            theModel->forward(theStartPointLatLonHgt, theStartPointXYZ);
+            theEndPointXYZ = theStartPointXYZ;
+            theEndPointLatLonHgt = theStartPointLatLonHgt;
+            theTool->setPoints(theStartPointXYZ, theEndPointXYZ);
+            theTool->setPointsValidFlag(true);
+            setDistance();
+         }
+      }
+   }
+}
+
+void ossimPlanetQtRuler::glWidgetSignalMouseReleaseEvent(QMouseEvent* e)
+{
+   if(e->button() == Qt::LeftButton)
+   {
+      if(!theFirstPointSet)
+      {
+         if(theGlWidget->viewer()->getLatLonHeightAtWindowCoordinate(theStartPointLatLonHgt, e->x(), theGlWidget->height() - e->y()))
+         {
+            theFirstPointSet = true;
+            theGlWidget->setMouseTracking(true);
+            theModel->forward(theStartPointLatLonHgt, theStartPointXYZ);
+            theEndPointXYZ = theStartPointXYZ;
+            theEndPointLatLonHgt = theStartPointLatLonHgt;
+            theTool->setPoints(theStartPointXYZ, theEndPointXYZ);
+            theTool->setPointsValidFlag(true);
+				theTool->setRedrawFlag(true);
+            setDistance();
+         }
+      }
+      else
+      {
+         osg::Vec3d endPt;
+         if(theGlWidget->viewer()->getLatLonHeightAtWindowCoordinate(endPt, e->x(), theGlWidget->height() - e->y()))
+         {
+            theEndPointLatLonHgt = endPt; 
+            theModel->forward(theEndPointLatLonHgt, theEndPointXYZ);
+            setDistance();
+            theTool->setPoints(theStartPointXYZ, theEndPointXYZ);
+         }
+         theGlWidget->setMouseTracking(false);
+         theFirstPointSet = false;
+      }
+   }
+}
+
+void ossimPlanetQtRuler::mouseNavStateChange(int state)
+{
+   if(theGlWidget)
+   {
+      theGlWidget->setMouseNavigationFlag(theMouseNavigationCheckBox->checkState()!=Qt::Unchecked);
+   }
+}
+
+void ossimPlanetQtRuler::setDistance()
+{
+   if(theModel.valid())
+   {
+      double meters = (theStartPointXYZ-theEndPointXYZ).length()*theModel->getNormalizationScale();
+      ossimUnitConversionTool conversionTool(meters, OSSIM_METERS);
+      theLength->item(KILOMETERS_IDX, 0)->setText(ossimString::toString(conversionTool.getKilometers()).c_str());
+      theLength->item(METERS_IDX, 0)->setText(ossimString::toString(conversionTool.getMeters()).c_str());
+      theLength->item(CENTIMETERS_IDX, 0)->setText(ossimString::toString(conversionTool.getCentimeters()).c_str());
+      theLength->item(MILLIMETERS_IDX, 0)->setText(ossimString::toString(conversionTool.getMillimeters()).c_str());
+      theLength->item(MILES_IDX, 0)->setText(ossimString::toString(conversionTool.getMiles()).c_str());
+      theLength->item(YARDS_IDX, 0)->setText(ossimString::toString(conversionTool.getYards()).c_str());
+      theLength->item(FEET_IDX, 0)->setText(ossimString::toString(conversionTool.getFeet()).c_str());
+      theLength->item(INCHES_IDX, 0)->setText(ossimString::toString(conversionTool.getInches()).c_str());
+      theLength->resizeColumnToContents(0);
+   }
+}
+
diff --git a/ossimPlanetQt/src/gui/ossimPlanetQtVideoControlWidget.cpp b/ossimPlanetQt/src/gui/ossimPlanetQtVideoControlWidget.cpp
new file mode 100644
index 0000000..337ab82
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ossimPlanetQtVideoControlWidget.cpp
@@ -0,0 +1,113 @@
+#include <ossimPlanetQt/ossimPlanetQtVideoControlWidget.h>
+#include <iostream>
+
+ossimPlanetQtVideoControlWidget::ossimPlanetQtVideoControlWidget(QWidget * parent,
+                                                                 Qt::WindowFlags f)
+   :QWidget(parent, f)
+{
+   setupUi(this);
+//    theCallback = new ossimPlanetQtVideoControlCallback((Ui::ossimPlanetQtVideoControlWidget*)this);
+}
+
+ossimPlanetQtVideoControlWidget::~ossimPlanetQtVideoControlWidget()
+{
+   if(theVideoLayerNode.valid())
+   {
+//       theVideoLayerNode->removeCallback(theCallback.get());
+//       theCallback->theVideoLayerNode = 0;
+   }
+}
+
+void ossimPlanetQtVideoControlWidget::setVideoLayerNode(osg::ref_ptr<ossimPlanetVideoLayerNode> videoNode)
+{
+   if(theVideoLayerNode.valid())
+   {
+//       theVideoLayerNode->removeCallback(theCallback.get());
+      // need to unset callbacks
+   }
+   
+   theVideoLayerNode = videoNode;
+//    theCallback->theUi = this;
+//    theCallback->theVideoLayerNode = videoNode;
+   
+   init();
+}
+
+void ossimPlanetQtVideoControlWidget::init()
+{
+   theReferenceTimeSlider->setSliderPosition(0);
+   if(theVideoLayerNode.valid())
+   {
+//       theCallback->theSliderValue = (int)theVideoLayerNode->referenceTime();
+//       theReferenceTimeSlider->setRange(0, (int)theVideoLayerNode->duration());
+//       theReferenceTimeSlider->setValue(theCallback->theSliderValue);
+//       theVideoLayerNode->addCallback(theCallback.get());
+
+      switch(theVideoLayerNode->status())
+      {
+         case ossimPlanetVideoLayerNode::STATUS_PLAYING:
+         {
+            thePlayButton->setText("||");  
+            break;
+         }
+         case ossimPlanetVideoLayerNode::STATUS_PAUSED:
+         {
+            thePlayButton->setText(">");
+            break;
+         }
+         default:
+         {
+            thePlayButton->setText(">");
+            break;
+         }
+      }
+   }
+}
+
+void ossimPlanetQtVideoControlWidget::on_theReferenceTimeSlider_valueChanged(int value)
+{
+   if(theVideoLayerNode.valid())
+   {
+     theVideoLayerNode->setReferenceTime(value);
+   }
+}
+
+void ossimPlanetQtVideoControlWidget::on_theReferenceTimeSlider_sliderPressed()
+{
+   if(theCallback.valid())
+   {
+      theCallback->setEnableFlag(false);
+   }
+}
+
+void ossimPlanetQtVideoControlWidget::on_theReferenceTimeSlider_sliderReleased()
+{
+   if(theCallback.valid())
+   {
+      theCallback->setEnableFlag(true);
+   }
+}
+
+void ossimPlanetQtVideoControlWidget::on_thePlayButton_clicked(bool)
+{
+   if(!theVideoLayerNode.valid()) return;
+   if(thePlayButton->text() == "||")
+   {
+      thePlayButton->setText(">");
+      theVideoLayerNode->pause();
+   }
+   else
+   {
+      thePlayButton->setText("||");
+      theVideoLayerNode->play();
+   }
+}
+
+void ossimPlanetQtVideoControlWidget::on_theFrameStepLeftButton_clicked(bool)
+{
+   
+}
+
+void ossimPlanetQtVideoControlWidget::on_theFrameStepRightButton_clicked(bool)
+{
+}
diff --git a/ossimPlanetQt/src/gui/ossimPlanetQtWmsDialog.cpp b/ossimPlanetQt/src/gui/ossimPlanetQtWmsDialog.cpp
new file mode 100644
index 0000000..7ae091f
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ossimPlanetQtWmsDialog.cpp
@@ -0,0 +1,545 @@
+#include <ossimPlanetQt/ossimPlanetQtWmsDialog.h>
+#include <QtCore/QSettings>
+#include <wms/wmsClient.h>
+#include <QtGui/QButtonGroup>
+#include <QtGui/QRadioButton>
+#include <QtGui/QHeaderView>
+#include <QtGui/QHBoxLayout>
+#include <QtGui/QMessageBox>
+#include <QtGui/QTreeWidgetItemIterator>
+#include <QtGui/QFileDialog>
+#include <ossimPlanetQt/ossimPlanetQtNewHttpConnection.h>
+#include <ossim/base/ossimEnvironmentUtility.h>
+#include <ossimPlanetQt/ossimPlanetQtApplication.h>
+
+ossimPlanetQtWmsDialog::ossimPlanetQtWmsDialog(QWidget* parent)
+   :QDialog(parent)
+{
+   setupUi(this);
+   setupHeaderLabels();
+   theImageFormatGroup  = new QButtonGroup;
+   theImageFormatLayout = new QHBoxLayout;
+   theGroupImageEncoding->setLayout(theImageFormatLayout);
+   connect(theImageFormatGroup,
+           SIGNAL(buttonClicked(QAbstractButton*)),
+           this,
+           SLOT(imageFormatButtonClicked(QAbstractButton*)));
+           
+   populateConnectionList();
+}
+
+void ossimPlanetQtWmsDialog::populateImageFormats()
+{
+   if(theCurrentCapabilities.valid())
+   {
+      clearFormatButtons();
+      const ossimRefPtr<ossimWmsGetMap> getMap = theCurrentCapabilities->getRequestGetMap();
+      if(getMap.valid())
+      {
+         const ossimWmsStringListType& formatTypes = getMap->getFormatTypes();
+         ossim_uint32 idx = 0;
+         for(idx = 0; idx < formatTypes.size(); ++idx)
+         {
+            ossimString tempType = formatTypes[idx];
+            tempType = tempType.downcase();
+            if(tempType.contains("image/"))
+            {
+               tempType = tempType.substitute("image/", "");
+            }
+            QRadioButton* btn = new QRadioButton (tempType.c_str());
+            theImageFormatGroup->addButton(btn, idx);
+            theImageFormatLayout->addWidget(btn);
+            if(idx == 0)
+            {
+               theImageFormat = ("image/"+tempType);
+               btn->setChecked(true);
+            }
+         }
+      }
+      else  // we need some format
+      {
+         QRadioButton* btn = new QRadioButton("jpeg");
+         theImageFormatGroup->addButton(btn, 0);
+         theImageFormatLayout->addWidget(btn);
+         btn->setChecked(true);
+         theImageFormat = "image/jpeg";
+         btn = new QRadioButton("png");
+         theImageFormatGroup->addButton(btn, 1);
+         theImageFormatLayout->addWidget(btn);
+      }
+      theImageFormatLayout->addStretch();
+   }
+}
+void ossimPlanetQtWmsDialog::populateConnectionList()
+{
+//   QSettings settings;
+  
+  QStringList keys = ossimPlanetQtApplication::wmsSettingsSubkeyList();//subkeyList(settings, "/ossim/connections-wms");
+  
+  QStringList::Iterator it = keys.begin();
+  theServerConnections->clear();
+
+  while(it!=keys.end())
+  {
+     theServerConnections->addItem(*it);
+     ++it;
+  }
+  setConnectionListPosition();
+  
+  if(keys.begin()==keys.end())
+  {
+     // No connections - disable various buttons
+     theConnectServerButton->setEnabled(false);
+     theEditServerButton->setEnabled(false);
+     theDeleteServerButton->setEnabled(false);
+  }
+  else
+  {
+     // Connections - enable various buttons
+     theConnectServerButton->setEnabled(true);
+     theEditServerButton->setEnabled(true);
+     theDeleteServerButton->setEnabled(true);
+  }
+}
+
+void ossimPlanetQtWmsDialog::setConnectionListPosition()
+{
+//   QSettings settings;
+   QString toSelect = ossimPlanetQtApplication::readWmsSettingsEntry("selected");//"/ossim/connections-wms/selected");
+   bool set = false;
+   for (int i = 0; ((i < theServerConnections->count())&&!set); ++i)
+   {
+      if (theServerConnections->itemText(i) == toSelect)
+      {
+         theServerConnections->setCurrentIndex(i);
+         set = true;
+      }
+   }
+   // If we couldn't find the stored item, but there are some, 
+   // default to the last item (this makes some sense when deleting
+   // items as it allows the user to repeatidly click on delete to
+   // remove a whole lot of items).
+   if (!set && theServerConnections->count() > 0)
+   {
+      // If toSelect is null, then the selected connection wasn't found
+      // by QSettings, which probably means that this is the first time
+      // the user has used qgis with database connections, so default to
+      // the first in the list of connetions. Otherwise default to the last.
+      if (toSelect.isNull())
+         theServerConnections->setCurrentIndex(0);
+      else
+         theServerConnections->setCurrentIndex(theServerConnections->count()-1);
+   }
+   populateCacheDir();
+}
+
+void ossimPlanetQtWmsDialog::setupHeaderLabels()
+{
+   QStringList headerLabels;
+
+   headerLabels.push_back("Id");
+   headerLabels.push_back("Name");
+   headerLabels.push_back("Title");
+   headerLabels.push_back("Abstract");
+   theLayersList->setColumnCount(4);
+   theLayersList->setHeaderLabels(headerLabels);
+}
+
+void ossimPlanetQtWmsDialog::serverChanged()
+{
+  // Remember which server was selected.
+//   QSettings settings;
+//   settings.setValue("/ossim/connections-wms/selected", 
+//                     theServerConnections->currentText());
+   ossimPlanetQtApplication::writeWmsSettingsEntry("selected",
+                                                   theServerConnections->currentText());
+  populateCacheDir();
+}
+
+void ossimPlanetQtWmsDialog::on_theAddButton_clicked(bool /*checked*/)
+{
+   if(theCacheDir->text() == "")
+   {
+      QMessageBox::warning(this,
+                           QString("Directory Cache Not Set"),
+                           QString("Please specify a directory cache for this server\n"),
+                           QMessageBox::Ok,
+                           QMessageBox::NoButton);
+      return;
+   }
+   
+   emit addButtonHit(this, theCurrentCapabilities, theSelectedLayers);
+}
+
+void ossimPlanetQtWmsDialog::on_theCloseButton_clicked(bool /*checked*/)
+{
+   close();
+}
+
+void ossimPlanetQtWmsDialog::on_theAddDefaultServersButton_clicked(bool /*checked*/)
+{
+  QMap<QString, QString> exampleServers;
+  exampleServers["NASA"]       = "http://neowms.sci.gsfc.nasa.gov/wms/wms?Version=1.1.1&Service=WMS&Request=GetCapabilities";
+  exampleServers["NASA (JPL)"] = "http://wms.jpl.nasa.gov/wms.cgi?Version=1.1.1&Service=WMS&Request=GetCapabilities";
+  exampleServers["BMNG"]       = "http://wms.telascience.org/cgi-bin/bmng_wms_t?Version=1.1.1&Service=WMS&Request=GetCapabilities";
+
+//   QSettings settings;
+  QString   servers;
+//   QString basePath("/ossim/connections-wms/");
+  QStringList keys = ossimPlanetQtApplication::wmsSettingsSubkeyList();//subkeyList(settings, basePath);
+  
+  for (QMap<QString, QString>::const_iterator i = exampleServers.constBegin();
+       i != exampleServers.constEnd();
+       ++i)
+  {
+     // Only do a server if it's name doesn't already exist.
+//     QStringList keys = settings.subkeyList(basePath);
+     
+     if (!keys.contains(i.key()))
+     {
+        if(servers == "")
+        {
+           servers += i.key();
+        }
+        else
+        {
+           servers = servers + ", " + i.key();
+        }
+        ossimPlanetQtApplication::writeWmsSettingsEntry(i.key()+"/proxyhost", "");
+        ossimPlanetQtApplication::writeWmsSettingsEntry(i.key()+"/proxyport", "");
+        ossimPlanetQtApplication::writeWmsSettingsEntry(i.key()+"/proxyuser", "");
+        ossimPlanetQtApplication::writeWmsSettingsEntry(i.key()+"/proxypassword", "");
+        ossimPlanetQtApplication::writeWmsSettingsEntry(i.key()+"/url", i.value());
+     }
+  }
+  populateConnectionList();
+  if(servers != "")
+  {
+     QMessageBox::information(this, tr("WMS proxies"),
+                              tr("<p>Several WMS servers ") + servers + tr(" have been added to the server list. Note that the proxy fields have been left blank and if you access the internet via a web proxy, you will need to individually set the proxy fields with appropriate values.</p>"));
+  }
+  else
+  {
+     QMessageBox::information(this, tr("WMS proxies"),
+                              tr("<p>Default WMS servers already exist. The current list was not changed</p>"));
+  }
+
+}
+
+void ossimPlanetQtWmsDialog::on_theServerConnections_activated(int)
+{
+   serverChanged();
+}
+
+void ossimPlanetQtWmsDialog::on_theConnectServerButton_clicked(bool)
+{
+  // populate the table list
+//   QSettings settings;
+
+//   QString key = "/ossim/connections-wms/" + theServerConnections->currentText();
+   
+   QString connStringParts = ossimPlanetQtApplication::readWmsSettingsEntry(theServerConnections->currentText() + "/url");//readEntry(settings, key + "/url");
+   QString proxyHost = ossimPlanetQtApplication::readWmsSettingsEntry(theServerConnections->currentText() + "/proxyhost");//readEntry(settings, key + "/proxyhost");
+   QString proxyPort = ossimPlanetQtApplication::readWmsSettingsEntry(theServerConnections->currentText() + "/proxyport");//readEntry(settings, key + "/proxyport");
+   QString proxyUser = ossimPlanetQtApplication::readWmsSettingsEntry(theServerConnections->currentText() + "/proxyuser");//readEntry(settings, key + "/proxyuser");
+   QString proxyPassword = ossimPlanetQtApplication::readWmsSettingsEntry(theServerConnections->currentText() + "/proxypassword");//readEntry(settings, key + "/proxypassword");
+   theConnectionInfo = connStringParts;
+   theConnectionName = theServerConnections->currentText();
+   wmsClient client;
+   client.setTimeout(static_cast<ossim_uint32>(ossimPlanetQtApplication::wmsNetworkTimeoutInSeconds()));
+   client.setMaxNumberRetry(0);
+   client.setProxyHost(proxyHost.toStdString());
+   client.setProxyPort(proxyPort.toStdString());
+   client.setProxyUser(proxyUser.toStdString());
+   client.setProxyPassword(proxyPassword.toStdString());
+   if(client.getCapabilities(theConnectionInfo.toStdString()))
+   {
+      ossimRefPtr<ossimWmsCapabilitiesDocument> cap = new ossimWmsCapabilitiesDocument;
+      ossimString buf = client.getStream()->getBufferAsString();
+      if(cap->read(buf))
+      {
+         theCurrentCapabilities = cap.get();
+         populateImageFormats();
+         populateLayerList();
+      }
+      else if(buf.size() > 0)
+      {
+         std::cout << "*****************Error: The Result is not a capabilitites string*******************\n" << buf << std::endl;
+      }
+   }
+   else
+   {
+      QMessageBox::information(this,
+                               "Get Capabilities",
+                               "Unable to get capabilities from " +theConnectionInfo,
+                               QMessageBox::Ok);
+      
+   }
+}
+
+void ossimPlanetQtWmsDialog::on_theNewServerButton_clicked(bool)
+{
+  ossimPlanetQtNewHttpConnection *nc = new ossimPlanetQtNewHttpConnection(this);
+  nc->setWindowTitle("New WMS Connection");
+  if(nc->exec())
+  {
+     populateConnectionList();
+  }
+}
+
+void ossimPlanetQtWmsDialog::on_theEditServerButton_clicked(bool)
+{
+   ossimPlanetQtNewHttpConnection *nc = new ossimPlanetQtNewHttpConnection(this,
+                                                                           theServerConnections->currentText());
+   nc->theName->setReadOnly(true);
+   nc->setWindowTitle("Edit WMS Connection");
+   if(nc->exec())
+   {
+      nc->saveConnection();
+   }
+}
+
+void ossimPlanetQtWmsDialog::on_theDeleteServerButton_clicked(bool)
+{
+//    QSettings settings;
+//    QString key = "/ossim/connections-wms/" + theServerConnections->currentText();
+   QString msg =(tr("Are you sure you want to remove the ") +
+                 theServerConnections->currentText() +
+                 tr(" connection and all associated settings?"));
+  QMessageBox::StandardButton result = QMessageBox::information(this,
+                                                                tr("Confirm Delete"),
+                                                                msg,
+                                                                QMessageBox::Ok | QMessageBox::Cancel);
+  if(result == QMessageBox::Ok)
+  {
+     ossimPlanetQtApplication::removeWmsSettingsKey(theServerConnections->currentText());
+     theServerConnections->removeItem(theServerConnections->currentIndex());
+     setConnectionListPosition();
+  }
+ 
+}
+
+void ossimPlanetQtWmsDialog::on_theLayersList_itemSelectionChanged()
+{
+   setSelectedItemsInfo();
+}
+
+void ossimPlanetQtWmsDialog::on_theCacheDirButton_clicked(bool /*checked*/)
+{
+   QString directory = QFileDialog::getExistingDirectory(this,
+                                                         "Choose wms cache location",
+                                                         theCacheDir->text());
+   if(directory!="")
+   {
+      theCacheDir->setText(directory);
+   }
+}
+
+void ossimPlanetQtWmsDialog::on_theCacheDir_textChanged(const QString& value)
+{
+//    QSettings settings;
+//    QString key = "/ossim/connections-wms/" + theServerConnections->currentText()+"/cache";
+//    settings.setValue(key,
+//                      value);
+   ossimPlanetQtApplication::writeWmsSettingsEntry(theServerConnections->currentText()+"/cache",
+                                                   value);
+}
+
+void ossimPlanetQtWmsDialog::imageFormatButtonClicked(QAbstractButton* button)
+{
+   if(button)
+   {
+      theImageFormat = ("image/" + button->text()).toStdString();
+      theImageFormat = theImageFormat.downcase();
+      setSelectedItemsInfo();
+   }
+}
+
+void ossimPlanetQtWmsDialog::populateCacheDir()
+{
+   theCacheDir->blockSignals(true);
+//    QSettings settings;
+//    QString key = "/ossim/connections-wms/" + theServerConnections->currentText()+"/cache";
+   QString entry = ossimPlanetQtApplication::readWmsSettingsEntry(theServerConnections->currentText()+"/cache");//readEntry(settings, key);
+   entry = entry.simplified();
+   if(entry=="")
+   {
+      ossimFilename file = ossimEnvironmentUtility::instance()->getUserOssimSupportDir();
+      file = file.dirCat("planet");
+      file = file.dirCat("wms");
+      file = file.dirCat("cache");
+      ossimPlanetQtApplication::writeWmsSettingsEntry(theServerConnections->currentText()+"/cache", file.c_str());
+//       QSettings settings;
+//       settings.setValue("/ossim/connections-wms/"+ theServerConnections->currentText()+"/cache", 
+//                         file.c_str());
+      entry = file.c_str();
+
+   }
+   theCacheDir->setText(entry);
+   theCacheDir->blockSignals(false);
+}
+
+void ossimPlanetQtWmsDialog::setSelectedItemsInfo()
+{
+   theSelectedLayers.clear();
+   
+   if(!theCurrentCapabilities.valid())
+   {
+      return;
+   }
+   QTreeWidgetItemIterator iter(theLayersList, QTreeWidgetItemIterator::Selected);
+   theSelectedLayers.clear();
+   ossimString urlGetMap;
+   ossimRefPtr<ossimWmsGetMap> getMap = theCurrentCapabilities->getRequestGetMap();
+   if(getMap.valid())
+   {
+      urlGetMap = getMap->getUrl();
+   }
+   if(urlGetMap.empty())
+   {
+      urlGetMap = theConnectionInfo.toStdString();
+      // we will try the capabilities url for the get map
+   }
+   WmsLayerSelectionInfoType info;
+   info.theUrl   = urlGetMap;
+   info.theImageFormat = theImageFormat;
+   bool validToAdd = false;
+//    QSettings settings;
+//    QString key(("/ossim/connections-wms/" + theServerConnections->currentText().toStdString()).c_str());
+   QString proxyHost = ossimPlanetQtApplication::readWmsSettingsEntry(theServerConnections->currentText()+"/proxyhost");//readEntry(settings, key + "/proxyhost");
+   QString proxyPort = ossimPlanetQtApplication::readWmsSettingsEntry(theServerConnections->currentText()+"/proxyport");//readEntry(settings, key + "/proxyport");
+   QString proxyUser = ossimPlanetQtApplication::readWmsSettingsEntry(theServerConnections->currentText()+"/proxyuser");//readEntry(settings, key + "/proxyuser");
+   QString proxyPassword = ossimPlanetQtApplication::readWmsSettingsEntry(theServerConnections->currentText()+"/proxypassword");//readEntry(settings, key + "/proxypassword");
+   while(*iter)
+   {
+      validToAdd = true;
+      QString layerId;
+      info.theLayer = 0;
+      info.theStyle = "";
+      if((*iter)->parent()) // this is a style item
+      {
+         layerId = (*iter)->parent()->text(0);
+         info.theStyle = (*iter)->text(1).toStdString();
+         // use the parent to get the layer id
+      }
+      else if(!(*iter)->isExpanded()) // use the first child style if the current selected layer is not expanded
+      {
+         layerId = (*iter)->text(0);
+         ossimString style;
+         if((*iter)->childCount()>0)
+         {
+            if((*iter)->child(0))
+            {
+               info.theStyle = (*iter)->child(0)->text(1).toStdString();
+            }
+         }
+      }
+      else
+      {
+         validToAdd = false;
+      }
+      
+      if(validToAdd)
+      {
+         NamedLayerMapType::iterator layerIter = theNamedLayersMap.find(layerId.toUInt());
+         if(layerIter!=theNamedLayersMap.end())
+         {
+            ossimFilename dirCache;
+            wmsUrl url(info.theUrl.string());
+            ossimString urlString = url.server();
+            dirCache = ossimFilename(theCacheDir->text().toStdString());
+            info.theRootCacheDir = dirCache;
+            info.theLayer = layerIter->second;
+            if(info.theStyle.empty())
+            {
+               info.theDescription = (theServerConnections->currentText().toStdString()+
+                                      ": " +
+                                      info.theLayer->getName());
+            }
+            else
+            {
+               info.theDescription = (theServerConnections->currentText().toStdString()+
+                                      ": " +
+                                      info.theLayer->getName() + " " + info.theStyle);
+            }
+            info.theProxyHost = proxyHost.toStdString();
+            info.theProxyPort = proxyPort.toStdString();
+            info.theProxyUser = proxyUser.toStdString();
+            info.theProxyPassword = proxyPassword.toStdString();
+            theSelectedLayers.push_back(info);
+         }
+      }
+      
+      ++iter;
+   }
+}
+
+void ossimPlanetQtWmsDialog::populateLayerList()
+{
+   theLayersList->clear();
+   setupHeaderLabels();
+   if(!theCurrentCapabilities.valid()) return;
+   if(!theCurrentCapabilities->getCapability().valid()) return;
+   ossim_uint32 idx = 0;
+   theNamedLayers.clear();
+   theNamedLayersMap.clear();
+   theCurrentCapabilities->getCapability()->getNamedLayers(theNamedLayers);
+
+   ossim_uint32 idIdx = 0;
+   for(idx =0; idx < theNamedLayers.size();++idx)
+   {
+      QTreeWidgetItem* item =  new QTreeWidgetItem(theLayersList);
+      item->setText(0, QString::number(idIdx));
+      item->setText(1, QString(theNamedLayers[idx]->getName().c_str()).simplified());
+      item->setText(2, QString(theNamedLayers[idx]->getTitle().c_str()).simplified());
+      item->setText(3, QString(theNamedLayers[idx]->getAbstract().c_str()).simplified());
+      ossim_uint32 styleIdx = 0;
+      const ossimWmsStyleListType& styles = theNamedLayers[idx]->getStyles();
+      theNamedLayersMap.insert(std::make_pair(idIdx, theNamedLayers[idx]));
+      ++idIdx;
+      for(styleIdx = 0; styleIdx < styles.size(); ++styleIdx)
+      {
+         QTreeWidgetItem* styleItem =  new QTreeWidgetItem(item);
+         styleItem->setText(0, QString::number(idIdx));
+         styleItem->setText(1, QString(styles[styleIdx]->getName().c_str()).simplified());
+         styleItem->setText(2, QString(styles[styleIdx]->getTitle().c_str()).simplified());
+         styleItem->setText(3, QString(styles[styleIdx]->getAbstract().c_str()).simplified());
+         ++idIdx;
+      }
+   }
+   theLayersList->resizeColumnToContents(0);
+   theLayersList->resizeColumnToContents(1);
+   theLayersList->resizeColumnToContents(2);
+   theLayersList->resizeColumnToContents(3);
+}
+
+
+// QStringList ossimPlanetQtWmsDialog::subkeyList(QSettings& settings, const QString& key)
+// {
+//    settings.beginGroup(key);
+//    QStringList result = settings.childGroups();
+//    settings.endGroup();
+
+//    return result;
+// }
+
+// QString ossimPlanetQtWmsDialog::readEntry(QSettings& settings, const QString& key)
+// { 
+//    return settings.value(key, "").toString();  
+// }
+
+void ossimPlanetQtWmsDialog::clearFormatButtons()
+{
+   QList<QAbstractButton *> buttons = theImageFormatGroup->buttons();
+   for(QList<QAbstractButton *>::iterator iter = buttons.begin();
+       iter != buttons.end();++iter)
+   {
+      theImageFormatGroup->removeButton(*iter);
+      delete *iter;
+   }
+   QLayoutItem *child;
+   while ((child = theImageFormatLayout->takeAt(0)) != 0)
+   {  
+      delete child;
+   }
+}
diff --git a/ossimPlanetQt/src/gui/ui/ossimPlanetQtAboutDialog.ui b/ossimPlanetQt/src/gui/ui/ossimPlanetQtAboutDialog.ui
new file mode 100644
index 0000000..a9fd285
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ui/ossimPlanetQtAboutDialog.ui
@@ -0,0 +1,39 @@
+<ui version="4.0" >
+ <class>ossimPlanetQtAboutDialog</class>
+ <widget class="QDialog" name="ossimPlanetQtAboutDialog" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>354</width>
+    <height>143</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>About</string>
+  </property>
+  <layout class="QVBoxLayout" >
+   <property name="margin" >
+    <number>9</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item>
+    <widget class="QLabel" name="theVersionInformation" >
+     <property name="text" >
+      <string/>
+     </property>
+     <property name="alignment" >
+      <set>Qt::AlignCenter</set>
+     </property>
+     <property name="wordWrap" >
+      <bool>false</bool>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/ossimPlanetQt/src/gui/ui/ossimPlanetQtActivityWindow.ui b/ossimPlanetQt/src/gui/ui/ossimPlanetQtActivityWindow.ui
new file mode 100644
index 0000000..b39ed8c
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ui/ossimPlanetQtActivityWindow.ui
@@ -0,0 +1,95 @@
+<ui version="4.0" >
+ <class>ossimPlanetQtActivityWindow</class>
+ <widget class="QDialog" name="ossimPlanetQtActivityWindow" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>400</width>
+    <height>300</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Activity Window</string>
+  </property>
+  <layout class="QVBoxLayout" >
+   <item>
+    <widget class="ossimPlanetQtActivityWidget" name="theActivityWidget" >
+     <property name="sizePolicy" >
+      <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="selectionMode" >
+      <enum>QAbstractItemView::MultiSelection</enum>
+     </property>
+     <property name="columnCount" >
+      <number>1</number>
+     </property>
+     <column>
+      <property name="text" >
+       <string>0</string>
+      </property>
+     </column>
+    </widget>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" >
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" >
+        <size>
+         <width>81</width>
+         <height>62</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="theDeleteButton" >
+       <property name="text" >
+        <string>Delete</string>
+       </property>
+       <property name="autoDefault" >
+        <bool>false</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="theCloseButton" >
+       <property name="text" >
+        <string>Close</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" >
+        <size>
+         <width>101</width>
+         <height>62</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>ossimPlanetQtActivityWidget</class>
+   <extends>QTreeWidget</extends>
+   <header>ossimPlanetQtActivityWidget.h</header>
+  </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/ossimPlanetQt/src/gui/ui/ossimPlanetQtLayerOperation.ui b/ossimPlanetQt/src/gui/ui/ossimPlanetQtLayerOperation.ui
new file mode 100644
index 0000000..159ff64
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ui/ossimPlanetQtLayerOperation.ui
@@ -0,0 +1,147 @@
+<ui version="4.0" >
+ <class>ossimPlanetQtLayerOperation</class>
+ <widget class="QDialog" name="ossimPlanetQtLayerOperation" >
+  <property name="windowModality" >
+   <enum>Qt::WindowModal</enum>
+  </property>
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>652</width>
+    <height>344</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Layer Operation</string>
+  </property>
+  <layout class="QVBoxLayout" >
+   <item>
+    <widget class="QGroupBox" name="theOperationTypeGroupBox" >
+     <property name="sizePolicy" >
+      <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title" >
+      <string>Operation Type</string>
+     </property>
+     <layout class="QHBoxLayout" >
+      <item>
+       <widget class="QComboBox" name="theOperationType" />
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="theParameterGroupBox" >
+     <property name="title" >
+      <string>Parameter</string>
+     </property>
+     <layout class="QHBoxLayout" >
+      <item>
+       <widget class="QStackedWidget" name="theParameterStack" >
+        <property name="currentIndex" >
+         <number>1</number>
+        </property>
+        <widget class="QWidget" name="Opacity" >
+         <layout class="QVBoxLayout" >
+          <item>
+           <layout class="QHBoxLayout" >
+            <item>
+             <layout class="QVBoxLayout" >
+              <item>
+               <widget class="QLabel" name="theOpacityReferenceLayerLabel" >
+                <property name="text" >
+                 <string>Reference Layer</string>
+                </property>
+               </widget>
+              </item>
+             </layout>
+            </item>
+            <item>
+             <widget class="QSlider" name="theOpacitySlider" >
+              <property name="maximum" >
+               <number>100</number>
+              </property>
+              <property name="value" >
+               <number>50</number>
+              </property>
+              <property name="orientation" >
+               <enum>Qt::Horizontal</enum>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <layout class="QVBoxLayout" >
+              <item>
+               <widget class="QLabel" name="theOpacityTopLayerLabel" >
+                <property name="text" >
+                 <string>Top Layer</string>
+                </property>
+               </widget>
+              </item>
+             </layout>
+            </item>
+           </layout>
+          </item>
+         </layout>
+        </widget>
+        <widget class="QWidget" name="Swipe" >
+         <layout class="QHBoxLayout" >
+          <item>
+           <widget class="QSlider" name="theSwipeSlider" >
+            <property name="minimum" >
+             <number>-1024</number>
+            </property>
+            <property name="maximum" >
+             <number>1024</number>
+            </property>
+            <property name="singleStep" >
+             <number>1</number>
+            </property>
+            <property name="orientation" >
+             <enum>Qt::Horizontal</enum>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+        <widget class="QWidget" name="ChangeDetectionPage" >
+         <layout class="QVBoxLayout" />
+        </widget>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" >
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" >
+        <size>
+         <width>131</width>
+         <height>31</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="theCloseButton" >
+       <property name="text" >
+        <string>Close</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/ossimPlanetQt/src/gui/ui/ossimPlanetQtMainWindow.ui b/ossimPlanetQt/src/gui/ui/ossimPlanetQtMainWindow.ui
new file mode 100644
index 0000000..c6b9849
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ui/ossimPlanetQtMainWindow.ui
@@ -0,0 +1,485 @@
+<ui version="4.0" >
+ <class>ossimPlanetQtMainWindow</class>
+ <widget class="QMainWindow" name="ossimPlanetQtMainWindow" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>1233</width>
+    <height>736</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>OSSIM Planetary Visualization</string>
+  </property>
+  <widget class="QWidget" name="centralwidget" >
+   <layout class="QVBoxLayout" >
+    <item>
+     <widget class="QSplitter" name="canvasLegendSplit" >
+      <property name="sizePolicy" >
+       <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+        <horstretch>0</horstretch>
+        <verstretch>0</verstretch>
+       </sizepolicy>
+      </property>
+      <property name="frameShape" >
+       <enum>QFrame::NoFrame</enum>
+      </property>
+      <property name="frameShadow" >
+       <enum>QFrame::Plain</enum>
+      </property>
+      <property name="lineWidth" >
+       <number>1</number>
+      </property>
+      <property name="orientation" >
+       <enum>Qt::Horizontal</enum>
+      </property>
+      <widget class="QSplitter" name="legendOverviewSplit" >
+       <property name="sizePolicy" >
+        <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="minimumSize" >
+        <size>
+         <width>0</width>
+         <height>0</height>
+        </size>
+       </property>
+       <property name="orientation" >
+        <enum>Qt::Vertical</enum>
+       </property>
+       <widget class="QToolBox" name="toolBox" >
+        <property name="sizePolicy" >
+         <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="font" >
+         <font>
+          <family>Arial</family>
+          <pointsize>7</pointsize>
+          <weight>50</weight>
+          <italic>false</italic>
+          <bold>false</bold>
+          <underline>false</underline>
+          <strikeout>false</strikeout>
+         </font>
+        </property>
+        <property name="frameShape" >
+         <enum>QFrame::NoFrame</enum>
+        </property>
+        <property name="frameShadow" >
+         <enum>QFrame::Raised</enum>
+        </property>
+        <property name="currentIndex" >
+         <number>0</number>
+        </property>
+        <widget class="QWidget" name="legendPage" >
+         <property name="geometry" >
+          <rect>
+           <x>0</x>
+           <y>0</y>
+           <width>280</width>
+           <height>561</height>
+          </rect>
+         </property>
+         <attribute name="label" >
+          <string>Legend</string>
+         </attribute>
+         <layout class="QHBoxLayout" >
+          <item>
+           <widget class="ossimPlanetQtLegend" name="thePlanetLegend" >
+            <property name="font" >
+             <font>
+              <family>Arial</family>
+              <pointsize>12</pointsize>
+              <weight>50</weight>
+              <italic>false</italic>
+              <bold>false</bold>
+              <underline>false</underline>
+              <strikeout>false</strikeout>
+             </font>
+            </property>
+            <property name="autoFillBackground" >
+             <bool>false</bool>
+            </property>
+            <property name="verticalScrollBarPolicy" >
+             <enum>Qt::ScrollBarAsNeeded</enum>
+            </property>
+            <property name="horizontalScrollBarPolicy" >
+             <enum>Qt::ScrollBarAsNeeded</enum>
+            </property>
+            <property name="autoScroll" >
+             <bool>true</bool>
+            </property>
+            <property name="indentation" >
+             <number>15</number>
+            </property>
+            <property name="rootIsDecorated" >
+             <bool>true</bool>
+            </property>
+            <property name="columnCount" >
+             <number>2</number>
+            </property>
+            <column>
+             <property name="text" >
+              <string>0</string>
+             </property>
+            </column>
+            <column>
+             <property name="text" >
+              <string>1</string>
+             </property>
+            </column>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </widget>
+       <widget class="QFrame" name="overviewFrame" >
+        <property name="frameShape" >
+         <enum>QFrame::StyledPanel</enum>
+        </property>
+        <property name="frameShadow" >
+         <enum>QFrame::Raised</enum>
+        </property>
+       </widget>
+      </widget>
+      <widget class="QTabWidget" name="tabWidget" >
+       <property name="sizePolicy" >
+        <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+         <horstretch>1</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="minimumSize" >
+        <size>
+         <width>0</width>
+         <height>0</height>
+        </size>
+       </property>
+       <property name="font" >
+        <font>
+         <family>Arial</family>
+         <pointsize>10</pointsize>
+         <weight>50</weight>
+         <italic>false</italic>
+         <bold>false</bold>
+         <underline>false</underline>
+         <strikeout>false</strikeout>
+        </font>
+       </property>
+       <property name="tabPosition" >
+        <enum>QTabWidget::East</enum>
+       </property>
+       <property name="tabShape" >
+        <enum>QTabWidget::Rounded</enum>
+       </property>
+       <widget class="QWidget" name="Planet View" >
+        <attribute name="title" >
+         <string>Planet View</string>
+        </attribute>
+       </widget>
+      </widget>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QMenuBar" name="menubar" >
+   <property name="geometry" >
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>1233</width>
+     <height>22</height>
+    </rect>
+   </property>
+   <widget class="QMenu" name="menuEdit" >
+    <property name="title" >
+     <string>Edit</string>
+    </property>
+    <addaction name="editLayerOperation" />
+   </widget>
+   <widget class="QMenu" name="menuTools" >
+    <property name="title" >
+     <string>Tools</string>
+    </property>
+    <addaction name="toolsRuler" />
+   </widget>
+   <widget class="QMenu" name="menuWindow" >
+    <property name="title" >
+     <string>Window</string>
+    </property>
+    <addaction name="actionActivity" />
+    <addaction name="actionMessageLog" />
+   </widget>
+   <widget class="QMenu" name="menuHelp" >
+    <property name="title" >
+     <string>Help</string>
+    </property>
+    <addaction name="helpAbout" />
+   </widget>
+   <widget class="QMenu" name="menuView" >
+    <property name="title" >
+     <string>View</string>
+    </property>
+    <addaction name="viewToggleFullScreen" />
+    <addaction name="separator" />
+    <addaction name="viewBookmark" />
+    <addaction name="viewGotoLatLon" />
+    <addaction name="viewGotoAddress" />
+    <addaction name="separator" />
+    <addaction name="viewStartRecordingAnimationPath" />
+    <addaction name="viewStopRecordingAnimationPath" />
+    <addaction name="viewPlayAnimationPath" />
+    <addaction name="separator" />
+    <addaction name="viewRefreshTextures" />
+    <addaction name="viewRefreshAll" />
+    <addaction name="separator" />
+    <addaction name="viewSyncLocation" />
+   </widget>
+   <widget class="QMenu" name="menuFile" >
+    <property name="title" >
+     <string>File</string>
+    </property>
+    <addaction name="filePreferences" />
+    <addaction name="separator" />
+    <addaction name="fileOpenImage" />
+    <addaction name="fileOpenVideo" />
+    <addaction name="fileOpenWms" />
+    <addaction name="fileOpenKml" />
+    <addaction name="openSession" />
+    <addaction name="separator" />
+    <addaction name="saveSession" />
+    <addaction name="saveSessionAs" />
+    <addaction name="separator" />
+    <addaction name="fileSaveViewAsJpeg" />
+    <addaction name="fileSaveViewAsPng" />
+    <addaction name="fileSaveViewAsTiff" />
+    <addaction name="separator" />
+    <addaction name="fileSaveAnimationPath" />
+    <addaction name="fileLoadAnimationPath" />
+    <addaction name="separator" />
+    <addaction name="fileQuit" />
+   </widget>
+   <addaction name="menuFile" />
+   <addaction name="menuView" />
+   <addaction name="menuEdit" />
+   <addaction name="menuWindow" />
+   <addaction name="menuTools" />
+   <addaction name="menuHelp" />
+  </widget>
+  <widget class="QStatusBar" name="statusbar" />
+  <action name="fileOpenImage" >
+   <property name="text" >
+    <string>Open Image</string>
+   </property>
+  </action>
+  <action name="fileOpenWms" >
+   <property name="text" >
+    <string>Open Wms</string>
+   </property>
+  </action>
+  <action name="viewGotoLatLon" >
+   <property name="text" >
+    <string>Goto Lat Lon</string>
+   </property>
+  </action>
+  <action name="viewGotoAddress" >
+   <property name="text" >
+    <string>Goto Address</string>
+   </property>
+  </action>
+  <action name="filePreferences" >
+   <property name="text" >
+    <string>Preferences</string>
+   </property>
+  </action>
+  <action name="viewToggleFullScreen" >
+   <property name="text" >
+    <string>Toggle Full Screen</string>
+   </property>
+   <property name="iconText" >
+    <string>Toggle Full Screen</string>
+   </property>
+   <property name="toolTip" >
+    <string>Toggle Full Screen</string>
+   </property>
+  </action>
+  <action name="editLayerOperation" >
+   <property name="text" >
+    <string>Layer Operation</string>
+   </property>
+  </action>
+  <action name="actionActivity" >
+   <property name="text" >
+    <string>Activity</string>
+   </property>
+  </action>
+  <action name="resetStats" >
+   <property name="text" >
+    <string>Reset Stats</string>
+   </property>
+  </action>
+  <action name="saveSession" >
+   <property name="text" >
+    <string>Save</string>
+   </property>
+  </action>
+  <action name="openSession" >
+   <property name="text" >
+    <string>Open Session</string>
+   </property>
+  </action>
+  <action name="saveSessionAs" >
+   <property name="text" >
+    <string>Save as</string>
+   </property>
+  </action>
+  <action name="toolsRuler" >
+   <property name="text" >
+    <string>Ruler</string>
+   </property>
+  </action>
+  <action name="fileQuit" >
+   <property name="text" >
+    <string>Quit</string>
+   </property>
+  </action>
+  <action name="viewRefreshTextures" >
+   <property name="text" >
+    <string>Refresh textures</string>
+   </property>
+  </action>
+  <action name="viewRefreshAll" >
+   <property name="text" >
+    <string>Refresh All</string>
+   </property>
+  </action>
+  <action name="helpAbout" >
+   <property name="text" >
+    <string>About</string>
+   </property>
+  </action>
+  <action name="actionJpeg" >
+   <property name="text" >
+    <string>Jpeg</string>
+   </property>
+  </action>
+  <action name="fileSaveViewAsJpeg" >
+   <property name="text" >
+    <string>Save View As JPEG</string>
+   </property>
+   <property name="iconText" >
+    <string>Save View As JPEG</string>
+   </property>
+   <property name="toolTip" >
+    <string>Save View As JPEG</string>
+   </property>
+  </action>
+  <action name="fileSaveViewAsPng" >
+   <property name="text" >
+    <string>Save View As PNG</string>
+   </property>
+  </action>
+  <action name="viewSaveAsTiff" >
+   <property name="text" >
+    <string>TIFF</string>
+   </property>
+  </action>
+  <action name="fileSaveViewAsTiff" >
+   <property name="text" >
+    <string>Save View As TIFF</string>
+   </property>
+   <property name="iconText" >
+    <string>Save View As TIFF</string>
+   </property>
+   <property name="toolTip" >
+    <string>Save View As TIFF</string>
+   </property>
+  </action>
+  <action name="viewStartRecordingAnimationPath" >
+   <property name="text" >
+    <string>Start Recording Animation Path</string>
+   </property>
+  </action>
+  <action name="viewStopRecordingAnimationPath" >
+   <property name="text" >
+    <string>Stop Recording Animation Path</string>
+   </property>
+  </action>
+  <action name="actionSave_Recording" >
+   <property name="text" >
+    <string>Save Current Recording</string>
+   </property>
+  </action>
+  <action name="fileSaveAnimationPath" >
+   <property name="enabled" >
+    <bool>false</bool>
+   </property>
+   <property name="text" >
+    <string>Save Animation Path</string>
+   </property>
+  </action>
+  <action name="fileLoadAnimationPath" >
+   <property name="enabled" >
+    <bool>false</bool>
+   </property>
+   <property name="text" >
+    <string>Load Animation Path</string>
+   </property>
+  </action>
+  <action name="viewPlayAnimationPath" >
+   <property name="text" >
+    <string>Play Animation Path</string>
+   </property>
+  </action>
+  <action name="viewSyncGoto" >
+   <property name="text" >
+    <string>Goto</string>
+   </property>
+  </action>
+  <action name="viewSyncSet" >
+   <property name="text" >
+    <string>Set</string>
+   </property>
+  </action>
+  <action name="viewSyncLocation" >
+   <property name="text" >
+    <string>Sync Location</string>
+   </property>
+  </action>
+  <action name="fileOpenKml" >
+   <property name="text" >
+    <string>Open Kml</string>
+   </property>
+  </action>
+  <action name="actionMessageLog" >
+   <property name="text" >
+    <string>Message Log</string>
+   </property>
+  </action>
+  <action name="fileOpenVideo" >
+   <property name="text" >
+    <string>Open Video</string>
+   </property>
+  </action>
+  <action name="viewBookmark" >
+   <property name="text" >
+    <string>Bookmark</string>
+   </property>
+  </action>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>ossimPlanetQtLegend</class>
+   <extends>QTreeWidget</extends>
+   <header>ossimPlanetQt/ossimPlanetQtLegend.h</header>
+  </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/ossimPlanetQt/src/gui/ui/ossimPlanetQtMessageLog.ui b/ossimPlanetQt/src/gui/ui/ossimPlanetQtMessageLog.ui
new file mode 100644
index 0000000..04a4fd3
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ui/ossimPlanetQtMessageLog.ui
@@ -0,0 +1,79 @@
+<ui version="4.0" >
+ <class>ossimPlanetQtMessageLog</class>
+ <widget class="QDialog" name="ossimPlanetQtMessageLog" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>745</width>
+    <height>279</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Message Log</string>
+  </property>
+  <layout class="QVBoxLayout" >
+   <item>
+    <widget class="QTreeWidget" name="theMessageLog" >
+     <property name="horizontalScrollBarPolicy" >
+      <enum>Qt::ScrollBarAsNeeded</enum>
+     </property>
+     <column>
+      <property name="text" >
+       <string/>
+      </property>
+     </column>
+    </widget>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" >
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" >
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="theClearButton" >
+       <property name="text" >
+        <string>Clear</string>
+       </property>
+       <property name="autoDefault" >
+        <bool>false</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="theCloseButton" >
+       <property name="text" >
+        <string>Close</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" >
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/ossimPlanetQt/src/gui/ui/ossimPlanetQtNewHttpConnection.ui b/ossimPlanetQt/src/gui/ui/ossimPlanetQtNewHttpConnection.ui
new file mode 100644
index 0000000..cc90e6a
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ui/ossimPlanetQtNewHttpConnection.ui
@@ -0,0 +1,265 @@
+<ui version="4.0" >
+ <class>ossimPlanetQtNewHttpConnection</class>
+ <widget class="QDialog" name="ossimPlanetQtNewHttpConnection" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>481</width>
+    <height>258</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Dialog</string>
+  </property>
+  <layout class="QHBoxLayout" >
+   <property name="margin" >
+    <number>9</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item>
+    <widget class="QGroupBox" name="groupBox" >
+     <property name="title" >
+      <string>Connection Information</string>
+     </property>
+     <layout class="QGridLayout" >
+      <property name="margin" >
+       <number>9</number>
+      </property>
+      <property name="spacing" >
+       <number>6</number>
+      </property>
+      <item row="5" column="1" >
+       <widget class="QLineEdit" name="theProxyPassword" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>7</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>1</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="toolTip" >
+         <string>Password for your HTTP proxy (optional)</string>
+        </property>
+        <property name="echoMode" >
+         <enum>QLineEdit::Password</enum>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0" >
+       <widget class="QLabel" name="TextLabel1_3" >
+        <property name="text" >
+         <string>Proxy Host</string>
+        </property>
+        <property name="margin" >
+         <number>5</number>
+        </property>
+        <property name="buddy" >
+         <cstring>theProxyHost</cstring>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0" >
+       <widget class="QLabel" name="TextLabel1_3_2" >
+        <property name="text" >
+         <string>Proxy Port</string>
+        </property>
+        <property name="margin" >
+         <number>5</number>
+        </property>
+        <property name="buddy" >
+         <cstring>theProxyPort</cstring>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1" >
+       <widget class="QLineEdit" name="theName" >
+        <property name="minimumSize" >
+         <size>
+          <width>0</width>
+          <height>0</height>
+         </size>
+        </property>
+        <property name="toolTip" >
+         <string>Name of the new connection</string>
+        </property>
+        <property name="frame" >
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1" >
+       <widget class="QLineEdit" name="theProxyHost" >
+        <property name="toolTip" >
+         <string>Name of your HTTP proxy (optional)</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0" >
+       <widget class="QLabel" name="TextLabel1" >
+        <property name="text" >
+         <string>URL</string>
+        </property>
+        <property name="margin" >
+         <number>5</number>
+        </property>
+        <property name="buddy" >
+         <cstring>theUrl</cstring>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="1" >
+       <widget class="QLineEdit" name="theProxyUser" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>7</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>1</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="toolTip" >
+         <string>Your user name for the HTTP proxy (optional)</string>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="1" >
+       <widget class="QLineEdit" name="theProxyPort" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>7</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>1</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="toolTip" >
+         <string>Port number of your HTTP proxy (optional)</string>
+        </property>
+        <property name="maxLength" >
+         <number>5</number>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="0" >
+       <widget class="QLabel" name="TextLabel1_3_3" >
+        <property name="text" >
+         <string>Proxy User</string>
+        </property>
+        <property name="margin" >
+         <number>5</number>
+        </property>
+        <property name="buddy" >
+         <cstring>theProxyUser</cstring>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0" >
+       <widget class="QLabel" name="TextLabel1_2" >
+        <property name="text" >
+         <string>Name</string>
+        </property>
+        <property name="margin" >
+         <number>5</number>
+        </property>
+        <property name="buddy" >
+         <cstring>theName</cstring>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="0" >
+       <widget class="QLabel" name="TextLabel1_3_4" >
+        <property name="text" >
+         <string>Proxy Password</string>
+        </property>
+        <property name="margin" >
+         <number>5</number>
+        </property>
+        <property name="buddy" >
+         <cstring>theProxyPassword</cstring>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1" >
+       <widget class="QLineEdit" name="theUrl" >
+        <property name="toolTip" >
+         <string>HTTP address of the Web Map Server</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <layout class="QVBoxLayout" >
+     <property name="margin" >
+      <number>0</number>
+     </property>
+     <property name="spacing" >
+      <number>6</number>
+     </property>
+     <item>
+      <widget class="QPushButton" name="theOkButton" >
+       <property name="text" >
+        <string>OK</string>
+       </property>
+       <property name="shortcut" >
+        <string/>
+       </property>
+       <property name="autoDefault" >
+        <bool>true</bool>
+       </property>
+       <property name="default" >
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="theCancelButton" >
+       <property name="text" >
+        <string>Cancel</string>
+       </property>
+       <property name="shortcut" >
+        <string/>
+       </property>
+       <property name="autoDefault" >
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Vertical</enum>
+       </property>
+       <property name="sizeType" >
+        <enum>QSizePolicy::Expanding</enum>
+       </property>
+       <property name="sizeHint" >
+        <size>
+         <width>0</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <tabstops>
+  <tabstop>theName</tabstop>
+  <tabstop>theUrl</tabstop>
+  <tabstop>theProxyHost</tabstop>
+  <tabstop>theProxyPort</tabstop>
+  <tabstop>theProxyUser</tabstop>
+  <tabstop>theProxyPassword</tabstop>
+  <tabstop>theOkButton</tabstop>
+  <tabstop>theCancelButton</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/ossimPlanetQt/src/gui/ui/ossimPlanetQtPreferences.ui b/ossimPlanetQt/src/gui/ui/ossimPlanetQtPreferences.ui
new file mode 100644
index 0000000..8991586
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ui/ossimPlanetQtPreferences.ui
@@ -0,0 +1,1057 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ossimPlanetQtPreferences</class>
+ <widget class="QDialog" name="ossimPlanetQtPreferences">
+  <property name="windowModality">
+   <enum>Qt::WindowModal</enum>
+  </property>
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>674</width>
+    <height>447</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>OSSIM 3D Visualization preferences</string>
+  </property>
+  <layout class="QVBoxLayout">
+   <item>
+    <widget class="QTabWidget" name="theTabWidget">
+     <property name="currentIndex">
+      <number>0</number>
+     </property>
+     <widget class="QWidget" name="General">
+      <attribute name="title">
+       <string>General</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="verticalLayout">
+       <item>
+        <widget class="QCheckBox" name="theHudEnabled">
+         <property name="text">
+          <string>Enable hud</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QCheckBox" name="theAutoHighlightLineOfSiteFlag">
+         <property name="enabled">
+          <bool>true</bool>
+         </property>
+         <property name="text">
+          <string>Auto Highlight Layers Based on Line Of Site Intersection</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <layout class="QHBoxLayout">
+         <item>
+          <widget class="QLabel" name="theWmsTimeoutLabel">
+           <property name="text">
+            <string>WMS Timeout (seconds): </string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QLineEdit" name="theWmsTimeout"/>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <widget class="QGroupBox" name="groupBox_3">
+         <property name="title">
+          <string>Staging</string>
+         </property>
+         <layout class="QVBoxLayout">
+          <item>
+           <widget class="QCheckBox" name="theAutomaticStagingEnabled">
+            <property name="text">
+             <string>Enable automatic staging</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <layout class="QHBoxLayout">
+            <item>
+             <widget class="QLabel" name="theStagingCacheDirectoryLabel">
+              <property name="text">
+               <string>Staging cache directory:</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QLineEdit" name="theStagingCacheDirectory"/>
+            </item>
+            <item>
+             <widget class="QPushButton" name="theStagingCacheDirectoryButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+              <property name="autoDefault">
+               <bool>false</bool>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </item>
+          <item>
+           <layout class="QHBoxLayout">
+            <item>
+             <widget class="QLabel" name="theAutoHistogramStretchSettingLabel">
+              <property name="text">
+               <string>Auto Histogram Stretch Setting:</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QComboBox" name="theAutoHistogramStretchSetting"/>
+            </item>
+           </layout>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <spacer name="verticalSpacer_2">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>54</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="Terrain">
+      <attribute name="title">
+       <string>Terrain</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="verticalLayout_2">
+       <item>
+        <widget class="QCheckBox" name="theElevationEnabled">
+         <property name="text">
+          <string>Enable elevation</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <layout class="QHBoxLayout" name="_2">
+         <property name="spacing">
+          <number>6</number>
+         </property>
+         <property name="topMargin">
+          <number>0</number>
+         </property>
+         <property name="bottomMargin">
+          <number>0</number>
+         </property>
+         <item>
+          <widget class="QLabel" name="theElevationMuliplierLabel">
+           <property name="text">
+            <string>Elevation Multiplier:</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QComboBox" name="theElevationMultiplier">
+           <item>
+            <property name="text">
+             <string>1</string>
+            </property>
+           </item>
+           <item>
+            <property name="text">
+             <string>2</string>
+            </property>
+           </item>
+           <item>
+            <property name="text">
+             <string>3</string>
+            </property>
+           </item>
+           <item>
+            <property name="text">
+             <string>4</string>
+            </property>
+           </item>
+           <item>
+            <property name="text">
+             <string>5</string>
+            </property>
+           </item>
+           <item>
+            <property name="text">
+             <string>6</string>
+            </property>
+           </item>
+           <item>
+            <property name="text">
+             <string>7</string>
+            </property>
+           </item>
+           <item>
+            <property name="text">
+             <string>8</string>
+            </property>
+           </item>
+           <item>
+            <property name="text">
+             <string>9</string>
+            </property>
+           </item>
+           <item>
+            <property name="text">
+             <string>10</string>
+            </property>
+           </item>
+          </widget>
+         </item>
+         <item>
+          <spacer>
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>171</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <widget class="QGroupBox" name="groupBox_4">
+         <property name="title">
+          <string>Mesh detail</string>
+         </property>
+         <layout class="QHBoxLayout" name="horizontalLayout_4">
+          <item>
+           <layout class="QHBoxLayout" name="horizontalLayout">
+            <item>
+             <widget class="QLabel" name="theMeshDetailLowLabel">
+              <property name="text">
+               <string>Low</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QSlider" name="theMeshDetail">
+              <property name="minimum">
+               <number>0</number>
+              </property>
+              <property name="maximum">
+               <number>4</number>
+              </property>
+              <property name="pageStep">
+               <number>1</number>
+              </property>
+              <property name="orientation">
+               <enum>Qt::Horizontal</enum>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QLabel" name="theMeshDetailHighLabel">
+              <property name="text">
+               <string>High</string>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <widget class="QGroupBox" name="groupBox_5">
+         <property name="title">
+          <string>Texture detail</string>
+         </property>
+         <layout class="QHBoxLayout" name="horizontalLayout_3">
+          <item>
+           <layout class="QHBoxLayout" name="horizontalLayout_2">
+            <item>
+             <widget class="QLabel" name="theTextureDetailLowLabel">
+              <property name="text">
+               <string>Low</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QSlider" name="theTextureDetail">
+              <property name="maximum">
+               <number>4</number>
+              </property>
+              <property name="pageStep">
+               <number>1</number>
+              </property>
+              <property name="orientation">
+               <enum>Qt::Horizontal</enum>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QLabel" name="theTextureDetailHighLabel">
+              <property name="text">
+               <string>High</string>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <widget class="QGroupBox" name="groupBox_6">
+         <property name="title">
+          <string>Terrain Pruning Amount</string>
+         </property>
+         <layout class="QHBoxLayout" name="horizontalLayout_6">
+          <item>
+           <layout class="QHBoxLayout" name="horizontalLayout_5">
+            <item>
+             <widget class="QLabel" name="theTerrainCullingAmountLowLabel">
+              <property name="text">
+               <string>Low</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QSlider" name="theTerrainCullingAmount">
+              <property name="maximum">
+               <number>5</number>
+              </property>
+              <property name="pageStep">
+               <number>1</number>
+              </property>
+              <property name="orientation">
+               <enum>Qt::Horizontal</enum>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QLabel" name="theTerrainCullingAmountHighLabel">
+              <property name="text">
+               <string>High</string>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <spacer name="verticalSpacer">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>40</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="Environment">
+      <attribute name="title">
+       <string>Environment</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="verticalLayout_6">
+       <item>
+        <layout class="QHBoxLayout" name="horizontalLayout_10">
+         <item>
+          <widget class="QCheckBox" name="theEphemerisEnabled">
+           <property name="text">
+            <string>Enable Ephemeris</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QCheckBox" name="theEphemerisAutoUpdateToCurrentTime">
+           <property name="enabled">
+            <bool>true</bool>
+           </property>
+           <property name="text">
+            <string>Auto update to current time</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <widget class="QGroupBox" name="theEphemerisMembersGroup">
+         <property name="title">
+          <string>Members</string>
+         </property>
+         <layout class="QHBoxLayout" name="horizontalLayout_11">
+          <item>
+           <widget class="QCheckBox" name="theSunLightingEnabled">
+            <property name="enabled">
+             <bool>true</bool>
+            </property>
+            <property name="text">
+             <string>Sun lighting</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QCheckBox" name="theSkyEnabled">
+            <property name="enabled">
+             <bool>true</bool>
+            </property>
+            <property name="text">
+             <string>Sky</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QCheckBox" name="theMoonEnabled">
+            <property name="enabled">
+             <bool>true</bool>
+            </property>
+            <property name="text">
+             <string>Moon</string>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <widget class="QGroupBox" name="groupBox_7">
+         <property name="title">
+          <string>Visibility</string>
+         </property>
+         <layout class="QVBoxLayout" name="verticalLayout_4">
+          <item>
+           <layout class="QHBoxLayout" name="horizontalLayout_7">
+            <item>
+             <widget class="QLabel" name="theLowVisibilityLabel">
+              <property name="text">
+               <string>Low</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QSlider" name="theVisibility">
+              <property name="maximum">
+               <number>100</number>
+              </property>
+              <property name="orientation">
+               <enum>Qt::Horizontal</enum>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QLabel" name="theHighVisibilityLabel">
+              <property name="text">
+               <string>High</string>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <widget class="QGroupBox" name="groupBox_8">
+         <property name="title">
+          <string>Cloud Parameters</string>
+         </property>
+         <layout class="QVBoxLayout" name="verticalLayout_5">
+          <item>
+           <widget class="QCheckBox" name="theCloudsEnabled">
+            <property name="text">
+             <string>Enabled</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <layout class="QHBoxLayout" name="horizontalLayout_8">
+            <item>
+             <widget class="QLabel" name="label">
+              <property name="text">
+               <string>Light</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QSlider" name="theCloudAmount">
+              <property name="maximum">
+               <number>200</number>
+              </property>
+              <property name="pageStep">
+               <number>1</number>
+              </property>
+              <property name="orientation">
+               <enum>Qt::Horizontal</enum>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QLabel" name="label_2">
+              <property name="text">
+               <string>Heavy</string>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </item>
+          <item>
+           <layout class="QHBoxLayout" name="horizontalLayout_9">
+            <item>
+             <widget class="QLabel" name="label_3">
+              <property name="text">
+               <string>Hard</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QSlider" name="theCloudSharpness">
+              <property name="minimum">
+               <number>50</number>
+              </property>
+              <property name="maximum">
+               <number>100</number>
+              </property>
+              <property name="pageStep">
+               <number>1</number>
+              </property>
+              <property name="orientation">
+               <enum>Qt::Horizontal</enum>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QLabel" name="label_4">
+              <property name="text">
+               <string>Soft</string>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <spacer name="verticalSpacer_4">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>4</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="tab">
+      <attribute name="title">
+       <string>Sync</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="verticalLayout_3">
+       <item>
+        <layout class="QHBoxLayout">
+         <item>
+          <widget class="QCheckBox" name="theAutoViewSyncFlag">
+           <property name="text">
+            <string>Auto View Sync</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <spacer>
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>40</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item>
+          <layout class="QHBoxLayout">
+           <item>
+            <widget class="QLabel" name="theViewTransmitRateLabel">
+             <property name="text">
+              <string>Transmit every</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <layout class="QHBoxLayout">
+             <item>
+              <widget class="QLineEdit" name="theViewTransmitRate"/>
+             </item>
+             <item>
+              <widget class="QLabel" name="theViewTransmitRateUnitLabel">
+               <property name="text">
+                <string>seconds</string>
+               </property>
+              </widget>
+             </item>
+            </layout>
+           </item>
+          </layout>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <spacer name="verticalSpacer_3">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>301</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="Server">
+      <attribute name="title">
+       <string>Listener</string>
+      </attribute>
+      <layout class="QVBoxLayout">
+       <item>
+        <widget class="QTableWidget" name="theServerPortWidget">
+         <property name="focusPolicy">
+          <enum>Qt::StrongFocus</enum>
+         </property>
+         <column>
+          <property name="text">
+           <string>Name</string>
+          </property>
+         </column>
+         <column>
+          <property name="text">
+           <string>Port</string>
+          </property>
+         </column>
+         <column>
+          <property name="text">
+           <string>Type </string>
+          </property>
+         </column>
+        </widget>
+       </item>
+       <item>
+        <layout class="QHBoxLayout">
+         <item>
+          <widget class="QPushButton" name="theAddPortButton">
+           <property name="text">
+            <string> + </string>
+           </property>
+           <property name="autoDefault">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QPushButton" name="theDeletePortButton">
+           <property name="text">
+            <string> - </string>
+           </property>
+           <property name="autoDefault">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <spacer>
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>341</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+        </layout>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="Client">
+      <attribute name="title">
+       <string>Broadcast</string>
+      </attribute>
+      <layout class="QVBoxLayout">
+       <item>
+        <widget class="QTableWidget" name="theClientPortWidget">
+         <property name="focusPolicy">
+          <enum>Qt::StrongFocus</enum>
+         </property>
+         <property name="columnCount">
+          <number>4</number>
+         </property>
+         <column>
+          <property name="text">
+           <string>Name</string>
+          </property>
+         </column>
+         <column>
+          <property name="text">
+           <string>Address</string>
+          </property>
+         </column>
+         <column>
+          <property name="text">
+           <string>Port</string>
+          </property>
+         </column>
+         <column>
+          <property name="text">
+           <string>Type (udp or tcp)</string>
+          </property>
+         </column>
+        </widget>
+       </item>
+       <item>
+        <layout class="QHBoxLayout">
+         <item>
+          <widget class="QPushButton" name="theAddClientPortButton">
+           <property name="text">
+            <string> + </string>
+           </property>
+           <property name="autoDefault">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QPushButton" name="theDeleteClientPortButton">
+           <property name="text">
+            <string> - </string>
+           </property>
+           <property name="autoDefault">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QPushButton" name="theEnableAllClientPortButton">
+           <property name="text">
+            <string>Enable All</string>
+           </property>
+           <property name="autoDefault">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QPushButton" name="theDisableAllClientPortButton">
+           <property name="text">
+            <string>Disable All</string>
+           </property>
+           <property name="autoDefault">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <spacer>
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>161</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+        </layout>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="Sousa">
+      <attribute name="title">
+       <string>Sousa</string>
+      </attribute>
+      <layout class="QVBoxLayout">
+       <item>
+        <widget class="QTabWidget" name="tabWidget">
+         <property name="currentIndex">
+          <number>0</number>
+         </property>
+         <widget class="QWidget" name="Connection">
+          <attribute name="title">
+           <string>Connection</string>
+          </attribute>
+          <layout class="QVBoxLayout">
+           <item>
+            <widget class="QGroupBox" name="theSousaIdentityGroup">
+             <property name="title">
+              <string>Identity</string>
+             </property>
+             <layout class="QVBoxLayout">
+              <item>
+               <layout class="QHBoxLayout">
+                <item>
+                 <layout class="QGridLayout">
+                  <item row="0" column="0">
+                   <widget class="QLabel" name="theSousaUserNameLabel">
+                    <property name="text">
+                     <string>User name:</string>
+                    </property>
+                   </widget>
+                  </item>
+                  <item row="0" column="1">
+                   <widget class="QLineEdit" name="theSousaUserName"/>
+                  </item>
+                  <item row="1" column="0">
+                   <widget class="QLabel" name="theSousaDomainLabel">
+                    <property name="text">
+                     <string>Domain:</string>
+                    </property>
+                   </widget>
+                  </item>
+                  <item row="1" column="1">
+                   <widget class="QLineEdit" name="theSousaDomain"/>
+                  </item>
+                 </layout>
+                </item>
+                <item>
+                 <widget class="QPushButton" name="theSousaIdentitySetButton">
+                  <property name="text">
+                   <string>set</string>
+                  </property>
+                  <property name="autoDefault">
+                   <bool>false</bool>
+                  </property>
+                 </widget>
+                </item>
+               </layout>
+              </item>
+             </layout>
+            </widget>
+           </item>
+           <item>
+            <widget class="QGroupBox" name="groupBox_2">
+             <property name="title">
+              <string>Server</string>
+             </property>
+             <layout class="QHBoxLayout">
+              <item>
+               <layout class="QHBoxLayout">
+                <item>
+                 <layout class="QGridLayout">
+                  <item row="0" column="0">
+                   <widget class="QLabel" name="theSousaServerIpLabel">
+                    <property name="text">
+                     <string>Ip:</string>
+                    </property>
+                   </widget>
+                  </item>
+                  <item row="0" column="1">
+                   <widget class="QLineEdit" name="theSousaServerIp"/>
+                  </item>
+                  <item row="1" column="0">
+                   <widget class="QLabel" name="theSousaServerPortLabel">
+                    <property name="text">
+                     <string>Port:</string>
+                    </property>
+                   </widget>
+                  </item>
+                  <item row="1" column="1">
+                   <widget class="QLineEdit" name="theSousaServerPort"/>
+                  </item>
+                 </layout>
+                </item>
+                <item>
+                 <widget class="QPushButton" name="theSousaServerConnectButton">
+                  <property name="text">
+                   <string>Connect</string>
+                  </property>
+                  <property name="autoDefault">
+                   <bool>false</bool>
+                  </property>
+                 </widget>
+                </item>
+               </layout>
+              </item>
+              <item>
+               <widget class="QCheckBox" name="theSousaServerAutoConnectOnStart">
+                <property name="text">
+                 <string>Auto Connect on Start</string>
+                </property>
+               </widget>
+              </item>
+             </layout>
+            </widget>
+           </item>
+          </layout>
+         </widget>
+         <widget class="QWidget" name="ArchiveMapping">
+          <attribute name="title">
+           <string>Archive Mapping</string>
+          </attribute>
+          <layout class="QVBoxLayout">
+           <item>
+            <widget class="QCheckBox" name="archiveMappingEnabled">
+             <property name="text">
+              <string>Enabled</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QGroupBox" name="groupBox">
+             <property name="title">
+              <string>Path</string>
+             </property>
+             <layout class="QVBoxLayout">
+              <item>
+               <layout class="QHBoxLayout">
+                <item>
+                 <layout class="QGridLayout">
+                  <item row="0" column="0">
+                   <widget class="QLabel" name="archiveLabel_Src">
+                    <property name="text">
+                     <string>Source:</string>
+                    </property>
+                   </widget>
+                  </item>
+                  <item row="0" column="1" colspan="2">
+                   <widget class="QLineEdit" name="archiveLineEdit_Src"/>
+                  </item>
+                  <item row="1" column="0" colspan="2">
+                   <widget class="QLabel" name="archiveLabel_Dest">
+                    <property name="text">
+                     <string>Destination:</string>
+                    </property>
+                   </widget>
+                  </item>
+                  <item row="1" column="2">
+                   <widget class="QLineEdit" name="archiveLineEdit_Dest"/>
+                  </item>
+                 </layout>
+                </item>
+                <item>
+                 <widget class="QPushButton" name="archiveAddButton">
+                  <property name="text">
+                   <string>+</string>
+                  </property>
+                 </widget>
+                </item>
+               </layout>
+              </item>
+             </layout>
+            </widget>
+           </item>
+           <item>
+            <layout class="QHBoxLayout">
+             <item>
+              <widget class="QTableWidget" name="archiveMappingWidget">
+               <property name="focusPolicy">
+                <enum>Qt::StrongFocus</enum>
+               </property>
+               <property name="showDropIndicator" stdset="0">
+                <bool>false</bool>
+               </property>
+               <property name="dragDropOverwriteMode">
+                <bool>false</bool>
+               </property>
+               <property name="alternatingRowColors">
+                <bool>true</bool>
+               </property>
+               <property name="selectionMode">
+                <enum>QAbstractItemView::SingleSelection</enum>
+               </property>
+               <property name="selectionBehavior">
+                <enum>QAbstractItemView::SelectRows</enum>
+               </property>
+               <property name="textElideMode">
+                <enum>Qt::ElideRight</enum>
+               </property>
+               <property name="columnCount">
+                <number>2</number>
+               </property>
+               <column>
+                <property name="text">
+                 <string>Source Path</string>
+                </property>
+               </column>
+               <column>
+                <property name="text">
+                 <string>Destination Path</string>
+                </property>
+               </column>
+              </widget>
+             </item>
+             <item>
+              <widget class="QPushButton" name="archiveRemoveButton">
+               <property name="text">
+                <string> - </string>
+               </property>
+              </widget>
+             </item>
+            </layout>
+           </item>
+          </layout>
+         </widget>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+    </widget>
+   </item>
+   <item>
+    <layout class="QHBoxLayout">
+     <item>
+      <spacer>
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="theOkButton">
+       <property name="text">
+        <string>Ok</string>
+       </property>
+       <property name="autoDefault">
+        <bool>false</bool>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/ossimPlanetQt/src/gui/ui/ossimPlanetQtRuler.ui b/ossimPlanetQt/src/gui/ui/ossimPlanetQtRuler.ui
new file mode 100644
index 0000000..83266c0
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ui/ossimPlanetQtRuler.ui
@@ -0,0 +1,123 @@
+<ui version="4.0" >
+ <class>ossimPlanetQtRuler</class>
+ <widget class="QDialog" name="ossimPlanetQtRuler" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>438</width>
+    <height>358</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Ruler</string>
+  </property>
+  <layout class="QVBoxLayout" >
+   <property name="margin" >
+    <number>9</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item>
+    <widget class="QLabel" name="theLengthLabel" >
+     <property name="text" >
+      <string>Length:</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" >
+     <property name="margin" >
+      <number>0</number>
+     </property>
+     <property name="spacing" >
+      <number>6</number>
+     </property>
+     <item>
+      <widget class="QTableWidget" name="theLength" >
+       <property name="editTriggers" >
+        <set>QAbstractItemView::NoEditTriggers</set>
+       </property>
+       <property name="showGrid" >
+        <bool>false</bool>
+       </property>
+       <column>
+        <property name="text" >
+         <string>Value</string>
+        </property>
+       </column>
+       <column>
+        <property name="text" >
+         <string>units</string>
+        </property>
+       </column>
+      </widget>
+     </item>
+     <item>
+      <layout class="QVBoxLayout" >
+       <property name="margin" >
+        <number>0</number>
+       </property>
+       <property name="spacing" >
+        <number>6</number>
+       </property>
+       <item>
+        <spacer>
+         <property name="orientation" >
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" >
+          <size>
+           <width>20</width>
+           <height>40</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <layout class="QVBoxLayout" >
+         <property name="margin" >
+          <number>0</number>
+         </property>
+         <property name="spacing" >
+          <number>6</number>
+         </property>
+         <item>
+          <widget class="QCheckBox" name="theMouseNavigationCheckBox" >
+           <property name="text" >
+            <string>Mouse navigation</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QPushButton" name="theCloseButton" >
+           <property name="text" >
+            <string>Close</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <spacer>
+         <property name="orientation" >
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" >
+          <size>
+           <width>20</width>
+           <height>40</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/ossimPlanetQt/src/gui/ui/ossimPlanetQtVideoControlWidget.ui b/ossimPlanetQt/src/gui/ui/ossimPlanetQtVideoControlWidget.ui
new file mode 100644
index 0000000..ed50baa
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ui/ossimPlanetQtVideoControlWidget.ui
@@ -0,0 +1,109 @@
+<ui version="4.0" >
+ <class>ossimPlanetQtVideoControlWidget</class>
+ <widget class="QWidget" name="ossimPlanetQtVideoControlWidget" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>326</width>
+    <height>50</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Form</string>
+  </property>
+  <property name="autoFillBackground" >
+   <bool>true</bool>
+  </property>
+  <layout class="QHBoxLayout" >
+   <item>
+    <layout class="QHBoxLayout" >
+     <item>
+      <widget class="QToolButton" name="thePlayButton" >
+       <property name="autoFillBackground" >
+        <bool>true</bool>
+       </property>
+       <property name="text" >
+        <string>></string>
+       </property>
+       <property name="checkable" >
+        <bool>false</bool>
+       </property>
+       <property name="checked" >
+        <bool>false</bool>
+       </property>
+       <property name="autoRaise" >
+        <bool>true</bool>
+       </property>
+       <property name="arrowType" >
+        <enum>Qt::NoArrow</enum>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QSlider" name="theReferenceTimeSlider" >
+       <property name="minimumSize" >
+        <size>
+         <width>128</width>
+         <height>0</height>
+        </size>
+       </property>
+       <property name="autoFillBackground" >
+        <bool>true</bool>
+       </property>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QToolButton" name="theFrameStepLeftButton" >
+       <property name="autoFillBackground" >
+        <bool>true</bool>
+       </property>
+       <property name="text" >
+        <string><|</string>
+       </property>
+       <property name="checkable" >
+        <bool>false</bool>
+       </property>
+       <property name="checked" >
+        <bool>false</bool>
+       </property>
+       <property name="autoRaise" >
+        <bool>true</bool>
+       </property>
+       <property name="arrowType" >
+        <enum>Qt::NoArrow</enum>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QToolButton" name="theFrameStepRightButton" >
+       <property name="autoFillBackground" >
+        <bool>true</bool>
+       </property>
+       <property name="text" >
+        <string>|></string>
+       </property>
+       <property name="checkable" >
+        <bool>false</bool>
+       </property>
+       <property name="checked" >
+        <bool>false</bool>
+       </property>
+       <property name="autoRaise" >
+        <bool>true</bool>
+       </property>
+       <property name="arrowType" >
+        <enum>Qt::NoArrow</enum>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/ossimPlanetQt/src/gui/ui/ossimPlanetQtWmsDialog.ui b/ossimPlanetQt/src/gui/ui/ossimPlanetQtWmsDialog.ui
new file mode 100644
index 0000000..713e01f
--- /dev/null
+++ b/ossimPlanetQt/src/gui/ui/ossimPlanetQtWmsDialog.ui
@@ -0,0 +1,253 @@
+<ui version="4.0" >
+ <class>ossimPlanetQtWmsDialog</class>
+ <widget class="QDialog" name="ossimPlanetQtWmsDialog" >
+  <property name="windowModality" >
+   <enum>Qt::WindowModal</enum>
+  </property>
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>846</width>
+    <height>646</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>WMS Server definitions</string>
+  </property>
+  <layout class="QVBoxLayout" >
+   <item>
+    <widget class="QGroupBox" name="GroupBox1" >
+     <property name="title" >
+      <string>Server Connections</string>
+     </property>
+     <layout class="QVBoxLayout" >
+      <item>
+       <widget class="QComboBox" name="theServerConnections" />
+      </item>
+      <item>
+       <layout class="QHBoxLayout" >
+        <item>
+         <widget class="QPushButton" name="theConnectServerButton" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+          <property name="text" >
+           <string>C&onnect</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QPushButton" name="theNewServerButton" >
+          <property name="text" >
+           <string>&New</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QPushButton" name="theEditServerButton" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+          <property name="text" >
+           <string>Edit</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QPushButton" name="theDeleteServerButton" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+          <property name="text" >
+           <string>Delete</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QPushButton" name="theAddDefaultServersButton" >
+          <property name="statusTip" >
+           <string>Adds a few example WMS servers</string>
+          </property>
+          <property name="whatsThis" >
+           <string comment="Adds several example WMS servers to the list" />
+          </property>
+          <property name="text" >
+           <string>Add default servers</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QPushButton" name="theWmsSynchButton" >
+          <property name="statusTip" >
+           <string>Adds a few example WMS servers</string>
+          </property>
+          <property name="whatsThis" >
+           <string comment="Adds several example WMS servers to the list" />
+          </property>
+          <property name="text" >
+           <string>Sync</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QPushButton" name="theWmsSynchAllButton" >
+          <property name="statusTip" >
+           <string>Adds a few example WMS servers</string>
+          </property>
+          <property name="whatsThis" >
+           <string comment="Adds several example WMS servers to the list" />
+          </property>
+          <property name="text" >
+           <string>Sync all</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <spacer>
+          <property name="orientation" >
+           <enum>Qt::Horizontal</enum>
+          </property>
+          <property name="sizeType" >
+           <enum>QSizePolicy::Expanding</enum>
+          </property>
+          <property name="sizeHint" >
+           <size>
+            <width>141</width>
+            <height>30</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" >
+     <item>
+      <widget class="QLabel" name="theCacheDirLabel_2" >
+       <property name="text" >
+        <string>Cache Dir:</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QLineEdit" name="theCacheDir" />
+     </item>
+     <item>
+      <widget class="QPushButton" name="theCacheDirButton" >
+       <property name="text" >
+        <string>...</string>
+       </property>
+       <property name="autoDefault" >
+        <bool>false</bool>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="theGroupImageEncoding" >
+     <property name="sizePolicy" >
+      <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="minimumSize" >
+      <size>
+       <width>16</width>
+       <height>64</height>
+      </size>
+     </property>
+     <property name="title" >
+      <string>Image encoding</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox2" >
+     <property name="title" >
+      <string>Layers</string>
+     </property>
+     <layout class="QVBoxLayout" >
+      <item>
+       <widget class="QTreeWidget" name="theLayersList" >
+        <property name="selectionMode" >
+         <enum>QAbstractItemView::ExtendedSelection</enum>
+        </property>
+        <property name="sortingEnabled" >
+         <bool>true</bool>
+        </property>
+        <property name="columnCount" >
+         <number>4</number>
+        </property>
+        <column>
+         <property name="text" >
+          <string>1</string>
+         </property>
+        </column>
+        <column>
+         <property name="text" >
+          <string>1</string>
+         </property>
+        </column>
+        <column>
+         <property name="text" >
+          <string>2</string>
+         </property>
+        </column>
+        <column>
+         <property name="text" >
+          <string>3</string>
+         </property>
+        </column>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" >
+     <item>
+      <widget class="QPushButton" name="theAddButton" >
+       <property name="text" >
+        <string>Add</string>
+       </property>
+       <property name="autoDefault" >
+        <bool>false</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="theCloseButton" >
+       <property name="text" >
+        <string>Close</string>
+       </property>
+       <property name="autoDefault" >
+        <bool>false</bool>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <tabstops>
+  <tabstop>theServerConnections</tabstop>
+  <tabstop>theConnectServerButton</tabstop>
+  <tabstop>theNewServerButton</tabstop>
+  <tabstop>theEditServerButton</tabstop>
+  <tabstop>theDeleteServerButton</tabstop>
+  <tabstop>theAddDefaultServersButton</tabstop>
+  <tabstop>theCacheDir</tabstop>
+  <tabstop>theCacheDirButton</tabstop>
+  <tabstop>theLayersList</tabstop>
+  <tabstop>theAddButton</tabstop>
+  <tabstop>theCloseButton</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/ossimPlanetQt/src/src.pro b/ossimPlanetQt/src/src.pro
new file mode 100644
index 0000000..27e075e
--- /dev/null
+++ b/ossimPlanetQt/src/src.pro
@@ -0,0 +1,216 @@
+TEMPLATE	= lib
+LANGUAGE	= C++
+QT += opengl
+CONFIG	+= qt warn_on release
+
+DEFINES	+= _FILE_OFFSET_BITS=64 _LARGE_FILES
+
+HEADERS	+=  ../include/ossimPlanetQt/ossimPlanetQtAboutDialog.h \
+	../include/ossimPlanetQt/ossimPlanetQtActivityItem.h \
+	../include/ossimPlanetQt/ossimPlanetQtActivityWidget.h \
+	../include/ossimPlanetQt/ossimPlanetQtActivityThreadQueueItem.h \
+	../include/ossimPlanetQt/ossimPlanetQtActivityWindow.h \
+	../include/ossimPlanetQt/ossimPlanetQtAlertLayer.h \
+	../include/ossimPlanetQt/ossimPlanetQtApplication.h \
+	../include/ossimPlanetQt/ossimPlanetQtDropDownDelegate.h \
+	../include/ossimPlanetQt/ossimPlanetQtImage.h \
+	../include/ossimPlanetQt/ossimPlanetQtLayerOperation.h \
+	../include/ossimPlanetQt/ossimPlanetQtLegend.h \
+        ../include/ossimPlanetQt/ossimPlanetQtLegendAnimationPathItem.h \
+	../include/ossimPlanetQt/ossimPlanetQtLegendItem.h \
+	../include/ossimPlanetQt/ossimPlanetQtLegendLocationInfo.h \
+	../include/ossimPlanetQt/ossimPlanetQtLegendNodeItem.h \
+	../include/ossimPlanetQt/ossimPlanetQtLegendTextureItem.h \
+	../include/ossimPlanetQt/ossimPlanetQtLegendKmlItem.h \
+	../include/ossimPlanetQt/ossimPlanetQtLegendVideoItem.h \
+	../include/ossimPlanetQt/ossimPlanetQtMainWindow.h \
+	../include/ossimPlanetQt/ossimPlanetQtMessageLog.h \
+	../include/ossimPlanetQt/ossimPlanetQtNewHttpConnection.h \
+	../include/ossimPlanetQt/ossimPlanetQtOperation.h \
+	../include/ossimPlanetQt/ossimPlanetQtPreferences.h \
+	../include/ossimPlanetQt/ossimPlanetQtGlWidget.h \
+	../include/ossimPlanetQt/ossimPlanetQtActionAdapter.h \
+	../include/ossimPlanetQt/ossimPlanetQtRuler.h \
+	../include/ossimPlanetQt/ossimPlanetQtVersion.h \
+	../include/ossimPlanetQt/ossimPlanetQtVideoControlWidget.h \
+	../include/ossimPlanetQt/ossimPlanetQtWmsDialog.h 
+
+SOURCES	+= core/ossimPlanetQtImage.cpp \
+	gui/ossimPlanetQtAboutDialog.cpp \
+	gui/ossimPlanetQtActivityItem.cpp \
+	gui/ossimPlanetQtActivityThread.cpp \
+	gui/ossimPlanetQtActivityThreadQueueItem.cpp \
+	gui/ossimPlanetQtActivityWindow.cpp \
+	gui/ossimPlanetQtActivityWidget.cpp \
+	gui/ossimPlanetQtAlertLayer.cpp \
+	gui/ossimPlanetQtApplication.cpp \
+	gui/ossimPlanetQtDropDownDelegate.cpp \
+	gui/ossimPlanetQtLayerOperation.cpp \
+	gui/ossimPlanetQtLegend.cpp \
+        gui/ossimPlanetQtLegendAnimationPathItem.cpp \
+	gui/ossimPlanetQtLegendItem.cpp \
+	gui/ossimPlanetQtLegendTextureItem.cpp \
+	gui/ossimPlanetQtLegendNodeItem.cpp \
+	gui/ossimPlanetQtLegendKmlItem.cpp \
+	gui/ossimPlanetQtLegendVideoItem.cpp \
+	gui/ossimPlanetQtMainWindow.cpp \
+	gui/ossimPlanetQtMessageLog.cpp \
+	gui/ossimPlanetQtNewHttpConnection.cpp \
+	gui/ossimPlanetQtOperation.cpp \
+	gui/ossimPlanetQtPreferences.cpp \
+	gui/ossimPlanetQtGlWidget.cpp \
+	gui/ossimPlanetQtRuler.cpp \
+	gui/ossimPlanetQtVideoControlWidget.cpp \
+	gui/ossimPlanetQtWmsDialog.cpp 
+
+
+FORMS	= gui/ui/ossimPlanetQtAboutDialog.ui \
+	  gui/ui/ossimPlanetQtActivityWindow.ui \
+	  gui/ui/ossimPlanetQtLayerOperation.ui \
+	  gui/ui/ossimPlanetQtMainWindow.ui \
+	  gui/ui/ossimPlanetQtMessageLog.ui \
+	  gui/ui/ossimPlanetQtNewHttpConnection.ui \
+	  gui/ui/ossimPlanetQtPreferences.ui \ 
+	  gui/ui/ossimPlanetQtRuler.ui \ 
+	  gui/ui/ossimPlanetQtVideoControlWidget.ui \
+	  gui/ui/ossimPlanetQtWmsDialog.ui 
+
+###
+# $Id: src.pro 16958 2010-04-02 19:41:41Z gpotts $
+#
+# NOTE:  
+# You should set environment variables for include paths and linking:
+# "OSSIM_HOME" 
+# "OSSIM_QT_HOME"
+# "LIBTIFF_HOME" Needed if tiff includes are not in standard place like 
+#                /usr/include.
+###
+
+
+UI_HEADERS_DIR= ../include/ossimPlanetQt/
+UI_SOURCE_DIR= gui/ui
+MOC_DIR = moc
+OBJECTS_DIR = obj
+
+INCLUDEPATH += ../include
+###
+# $Id: src.pro 16958 2010-04-02 19:41:41Z gpotts $
+#
+# NOTE:  
+# You should set environment variables for include paths and linking:
+# "OSSIM_HOME"
+# "OSSIM_QT_HOME"
+# For windows all you need is
+# EARTH_PACKAGE
+###
+VERSION         = 1.8.4
+TARGET		= ossimPlanetQt
+DESTDIR		= ../lib
+
+win32 {
+INCLUDEPATH += ..\..\ossim\include ..\..\ossimPlanet\include ..\..\libwms\include  ..\..\ossim_dependencies\include
+TEMPLATE = vclib
+  DEFINES += OSSIMPLANETQT_LIBRARY
+ DEFINES +=  NOMINMAX
+#  QMAKE_CXXFLAGS = -EHsc -GR
+  LIBS	=  -L$(OSSIM_HOME)\lib -L$(OSSIM_HOME)\projects\vs\release\lib
+LIBS += -L$(OSSIM_DEPENDENCIES)\lib  
+LIBS += -losgText -losgGA -losgDB -losgViewer -losgUtil -losg -lossim -llibwms -lossimPlanet -lOpenThreads 
+#  INCLUDEPATH += c:/msys/1.0/local/include/ossim c:/Devel/svn/ossim/ossimPlanet/include c:/msys/1.0/local/include
+#  DESTDIR = $(EARTH_PACKAGE)\ossim_qt\lib
+#  DEPENDPATH += $(EARTH_PACKAGE)\ossim\include
+}
+
+else:mac {
+
+CONFIG += x86 x86_64
+
+  QMAKE_LFLAGS += -F$(OSSIM_BUILD) -F/Library/Frameworks 
+  QMAKE_CFLAGS += -F$(OSSIM_BUILD) 
+  QMAKE_CXXFLAGS += -F$(OSSIM_BUILD) 
+  LIBS += -framework ossimPlanet -framework ossim -framework wms -framework osgDB -framework osgGA -framework osgUtil -framework osgText -framework osgViewer -framework osg  -framework OpenThreads
+ QMAKE_LFLAGS_SONAME  = -Wl,-install_name, at executable_path/../Frameworks/
+  DEFINES += __USE_OSX_AGL_IMPLEMENTATION__ 
+  CONFIG += lib_bundle
+  FRAMEWORK_HEADERS.version = Versions
+  FRAMEWORK_HEADERS.files +=../include/ossimPlanetQt/ossimPlanetQtApplication.h \
+        ../include/ossimPlanetQt/ossimPlanetQtAboutDialog.h \
+	../include/ossimPlanetQt/ossimPlanetQtActivityItem.h \
+	../include/ossimPlanetQt/ossimPlanetQtActivityWidget.h \
+	../include/ossimPlanetQt/ossimPlanetQtActivityThreadQueueItem.h \
+	../include/ossimPlanetQt/ossimPlanetQtActivityWindow.h \
+	../include/ossimPlanetQt/ossimPlanetQtAlertLayer.h \
+	../include/ossimPlanetQt/ossimPlanetQtApplication.h \
+	../include/ossimPlanetQt/ossimPlanetQtDropDownDelegate.h \
+	../include/ossimPlanetQt/ossimPlanetQtImage.h \
+	../include/ossimPlanetQt/ossimPlanetQtLayerOperation.h \
+	../include/ossimPlanetQt/ossimPlanetQtLegend.h \
+        ../include/ossimPlanetQt/ossimPlanetQtLegendAnimationPathItem.h \
+	../include/ossimPlanetQt/ossimPlanetQtLegendItem.h \
+	../include/ossimPlanetQt/ossimPlanetQtLegendLocationInfo.h \
+	../include/ossimPlanetQt/ossimPlanetQtLegendNodeItem.h \
+	../include/ossimPlanetQt/ossimPlanetQtLegendTextureItem.h \
+	../include/ossimPlanetQt/ossimPlanetQtLegendKmlItem.h \
+	../include/ossimPlanetQt/ossimPlanetQtLegendVideoItem.h \
+	../include/ossimPlanetQt/ossimPlanetQtMainWindow.h \
+	../include/ossimPlanetQt/ossimPlanetQtMessageLog.h \
+	../include/ossimPlanetQt/ossimPlanetQtNewHttpConnection.h \
+	../include/ossimPlanetQt/ossimPlanetQtOperation.h \
+	../include/ossimPlanetQt/ossimPlanetQtPreferences.h \
+	../include/ossimPlanetQt/ossimPlanetQtGlWidget.h \
+	../include/ossimPlanetQt/ossimPlanetQtActionAdapter.h \
+	../include/ossimPlanetQt/ossimPlanetQtRuler.h \
+	../include/ossimPlanetQt/ossimPlanetQtVersion.h \
+	../include/ossimPlanetQt/ossimPlanetQtVideoControlWidget.h \
+	../include/ossimPlanetQt/ossimPlanetQtWmsDialog.h \
+        ../include/ossimPlanetQt/ui_ossimPlanetQtMainWindow.h \
+        ../include/ossimPlanetQt/ui_ossimPlanetQtPreferences.h
+  FRAMEWORK_HEADERS.path = Headers
+  QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS
+  TARGET=ossimPlanetQt
+  target.path = $(OSSIM_BUILD)
+}
+
+else:unix {
+  ###
+  # Relies upon OSSIM_DEV_HOME environment variable being set.  Also this uses
+  # OpenThreads.  Take out/edit as necessary.
+  # 
+  # You can edit "INSTALL_PREFIX" to point to install location for libraries.
+  ###
+  isEmpty(INSTALL_PREFIX){
+      INSTALL_PREFIX=/usr/local
+  }
+
+  ###
+  # LOCAL_ROOT A place where your local compiled stuff is installed like
+  # libtiff, geotiff, OpenSceneGraph and so on...
+  ###
+  #LOCAL_ROOT=/usr/local
+
+  # uncomment the next line if INSTALL_HERE defined
+  # LOCAL_ROOT=$$(INSTALL_HERE)
+  ###
+  # DESTDIR Where the libraries go when you type "make".
+  ###
+  DESTDIR = ../lib
+
+  ###
+  # For "make clean" so we clean out the libraries in the DESTDIR.
+  ###
+  QMAKE_CLEAN += ../lib/lib*
+
+  # uncomment next line if you have INSTALL_HERE defined
+  # INSTALL_PREFIX=$$(INSTALL_HERE)
+  ###
+  # The make install target like "/usr/local"
+  ###
+  target.path = $$INSTALL_PREFIX/lib
+  INSTALLS += target
+
+  INCLUDEPATH += $$(OSSIM_DEV_HOME)/ossimPlanet/include $$(OSSIM_DEV_HOME)/ossim/include $$(LOCAL_ROOT)/include 
+
+  LIBS += -L$$(OSSIM_DEV_HOME)/ossimPlanet/lib -L$$(OSSIM_DEV_HOME)/ossimPlanet/lib/Linux64 -L$$(OSSIM_DEV_HOME)/libwms/lib/Linux64 -L$$(OSSIM_DEV_HOME)/OpenSceneGraph-2.8.2/lib -L$$(OSSIM_DEV_HOME)/ossim/lib -L$$LOCAL_ROOT/lib -lossimPlanet -lwms -losgDB -losgGA -losgUtil -losgText -losg  -lossim -lOpenThreads -lgeotiff -ltiff -lossimPredator
+
+  DEPENDPATH += $$(OSSIM_DEV_HOME)/ossimPlanet/include $$(OSSIM_DEV_HOME)/ossim/include
+}
diff --git a/ossimPlanetQt/xcode/ossimPlanetQt/English.lproj/InfoPlist.strings b/ossimPlanetQt/xcode/ossimPlanetQt/English.lproj/InfoPlist.strings
new file mode 100644
index 0000000..76404db
Binary files /dev/null and b/ossimPlanetQt/xcode/ossimPlanetQt/English.lproj/InfoPlist.strings differ
diff --git a/ossimPlanetQt/xcode/ossimPlanetQt/Info.plist b/ossimPlanetQt/xcode/ossimPlanetQt/Info.plist
new file mode 100644
index 0000000..f068bd1
--- /dev/null
+++ b/ossimPlanetQt/xcode/ossimPlanetQt/Info.plist
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleExecutable</key>
+	<string>ossimPlanetQt</string>
+	<key>CFBundleIconFile</key>
+	<string></string>
+	<key>CFBundleIdentifier</key>
+	<string>com.apple.carbonframeworktemplate</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundlePackageType</key>
+	<string>FMWK</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>1.0</string>
+        <key>CFBundleShortVersionString</key>
+        <string>1.0</string>
+	<key>CSResourcesFileMapped</key>
+	<true/>
+</dict>
+</plist>
diff --git a/ossimPlanetQt/xcode/ossimPlanetQt/Resources/ossimPlanetQtApp-Info.plist b/ossimPlanetQt/xcode/ossimPlanetQt/Resources/ossimPlanetQtApp-Info.plist
new file mode 100644
index 0000000..3ba93b5
--- /dev/null
+++ b/ossimPlanetQt/xcode/ossimPlanetQt/Resources/ossimPlanetQtApp-Info.plist
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleExecutable</key>
+	<string>${EXECUTABLE_NAME}</string>
+	<key>CFBundleIdentifier</key>
+	<string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleShortVersionString</key>
+	<string>1.0</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>1</string>
+	<key>LSMinimumSystemVersion</key>
+	<string>${MACOSX_DEPLOYMENT_TARGET}</string>
+	<key>NSMainNibFile</key>
+	<string>MainMenu</string>
+	<key>NSPrincipalClass</key>
+	<string>NSApplication</string>
+</dict>
+</plist>
diff --git a/ossimPlanetQt/xcode/ossimPlanetQt/icons/ImageLinker.icns b/ossimPlanetQt/xcode/ossimPlanetQt/icons/ImageLinker.icns
new file mode 100644
index 0000000..932d65b
Binary files /dev/null and b/ossimPlanetQt/xcode/ossimPlanetQt/icons/ImageLinker.icns differ
diff --git a/ossimPlanetQt/xcode/ossimPlanetQt/main.c b/ossimPlanetQt/xcode/ossimPlanetQt/main.c
new file mode 100644
index 0000000..416b14d
--- /dev/null
+++ b/ossimPlanetQt/xcode/ossimPlanetQt/main.c
@@ -0,0 +1,3 @@
+/* This is the default source file for new frameworks. */
+
+/* You can either fill in code here or remove this and create or add new files. */
diff --git a/ossimPlanetQt/xcode/ossimPlanetQt/ossimPlanetQt.xcodeproj/project.pbxproj b/ossimPlanetQt/xcode/ossimPlanetQt/ossimPlanetQt.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..08693f2
--- /dev/null
+++ b/ossimPlanetQt/xcode/ossimPlanetQt/ossimPlanetQt.xcodeproj/project.pbxproj
@@ -0,0 +1,2365 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 42;
+	objects = {
+
+/* Begin PBXAggregateTarget section */
+		43D50344110A04BA00FDB366 /* All */ = {
+			isa = PBXAggregateTarget;
+			buildConfigurationList = 43D50352110A04D000FDB366 /* Build configuration list for PBXAggregateTarget "All" */;
+			buildPhases = (
+			);
+			dependencies = (
+				43D5034E110A04C400FDB366 /* PBXTargetDependency */,
+				43D50350110A04C400FDB366 /* PBXTargetDependency */,
+			);
+			name = All;
+			productName = All;
+		};
+		43D50359110A053100FDB366 /* Clean */ = {
+			isa = PBXAggregateTarget;
+			buildConfigurationList = 43D50362110A056100FDB366 /* Build configuration list for PBXAggregateTarget "Clean" */;
+			buildPhases = (
+				43D50361110A053F00FDB366 /* clean files */,
+			);
+			dependencies = (
+			);
+			name = Clean;
+			productName = Clean;
+		};
+/* End PBXAggregateTarget section */
+
+/* Begin PBXBuildFile section */
+		186EF5ED0B1DB62E00F7886A /* ossimPlanetQtLayerOperation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 186EF5CE0B1DB62E00F7886A /* ossimPlanetQtLayerOperation.cpp */; };
+		186EF5EE0B1DB62E00F7886A /* ossimPlanetQtWmsDialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 186EF5CF0B1DB62E00F7886A /* ossimPlanetQtWmsDialog.cpp */; };
+		186EF5EF0B1DB62E00F7886A /* ossimPlanetQtApplication.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 186EF5D00B1DB62E00F7886A /* ossimPlanetQtApplication.cpp */; };
+		186EF5F00B1DB62E00F7886A /* ossimPlanetQtGlWidget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 186EF5D10B1DB62E00F7886A /* ossimPlanetQtGlWidget.cpp */; };
+		186EF5F10B1DB62E00F7886A /* ossimPlanetQtLegend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 186EF5D20B1DB62E00F7886A /* ossimPlanetQtLegend.cpp */; };
+		186EF5F20B1DB62E00F7886A /* ossimPlanetQtLegendItem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 186EF5D30B1DB62E00F7886A /* ossimPlanetQtLegendItem.cpp */; };
+		186EF5F30B1DB62E00F7886A /* ossimPlanetQtLegendTextureItem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 186EF5D40B1DB62E00F7886A /* ossimPlanetQtLegendTextureItem.cpp */; };
+		186EF5F40B1DB62E00F7886A /* ossimPlanetQtMainWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 186EF5D50B1DB62E00F7886A /* ossimPlanetQtMainWindow.cpp */; };
+		186EF5F50B1DB62E00F7886A /* ossimPlanetQtPreferences.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 186EF5D60B1DB62E00F7886A /* ossimPlanetQtPreferences.cpp */; };
+		186EF6100B1DB66400F7886A /* ossimPlanet.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 186EF60F0B1DB65B00F7886A /* ossimPlanet.framework */; };
+		186EF6F70B1DBB0800F7886A /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 186EF6860B1DBB0100F7886A /* ossim.framework */; };
+		4307F53D0BBD90B40079E358 /* ossimPlanetQtLegendKmlItem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4307F53C0BBD90B40079E358 /* ossimPlanetQtLegendKmlItem.cpp */; };
+		430D55190C68AF5900FA8F6C /* ossimPlanetQtDropDownDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 430D55180C68AF5900FA8F6C /* ossimPlanetQtDropDownDelegate.cpp */; };
+		430D551B0C68AF8500FA8F6C /* ossimPlanetQtDropDownDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 430D551A0C68AF8500FA8F6C /* ossimPlanetQtDropDownDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		4317612F0B690A0E008D4A90 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4317612E0B690A0E008D4A90 /* OpenGL.framework */; };
+		43717FCB0BCEF4640002D30E /* osg.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43717FCA0BCEF4640002D30E /* osg.framework */; };
+		437180620BCEF4700002D30E /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437180610BCEF4700002D30E /* Openthreads.framework */; };
+		4371806E0BCEF4860002D30E /* osgUtil.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4371806D0BCEF4860002D30E /* osgUtil.framework */; };
+		4371808F0BCEF4940002D30E /* osgGA.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4371808E0BCEF4940002D30E /* osgGA.framework */; };
+		437180A80BCEF4A10002D30E /* osgText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437180A70BCEF4A10002D30E /* osgText.framework */; };
+		437180B30BCEF4B00002D30E /* osgDB.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437180B20BCEF4B00002D30E /* osgDB.framework */; };
+		43C8A7A6110A001C0095AEE2 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43C8A7A4110A001C0095AEE2 /* main.cpp */; };
+		43C8A7A7110A001C0095AEE2 /* qrc_ossimPlanetQt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43C8A7A5110A001C0095AEE2 /* qrc_ossimPlanetQt.cpp */; };
+		43C8A7A8110A003E0095AEE2 /* ossimPlanetQt.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossimPlanetQt.framework */; };
+		43C8A7D1110A004C0095AEE2 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437180610BCEF4700002D30E /* Openthreads.framework */; };
+		43C8A7DF110A00510095AEE2 /* ossimPredator.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EEB5EDBA0D0F2EA5000CF6B2 /* ossimPredator.framework */; };
+		43C8A7E4110A00530095AEE2 /* wms.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EE69A3730B28849E00C91DD1 /* wms.framework */; };
+		43C8A7E5110A00560095AEE2 /* ossimPlanet.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 186EF60F0B1DB65B00F7886A /* ossimPlanet.framework */; };
+		43C8A7FA110A00E40095AEE2 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 186EF6860B1DBB0100F7886A /* ossim.framework */; };
+		43CD236C0D1186C8004CF3EE /* ossimPlanetQtLegendVideoItem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43CD236B0D1186C8004CF3EE /* ossimPlanetQtLegendVideoItem.cpp */; };
+		43CD237E0D1187E1004CF3EE /* ossimPlanetQtLegendVideoItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 43CD237D0D1187E1004CF3EE /* ossimPlanetQtLegendVideoItem.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		43FC557C0B7CBD1400B57002 /* ossimPlanetQtAlertLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43FC557B0B7CBD1400B57002 /* ossimPlanetQtAlertLayer.cpp */; };
+		8D07F2BE0486CC7A007CD1D0 /* ossimPlanetQt_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = 32BAE0B70371A74B00C91783 /* ossimPlanetQt_Prefix.pch */; settings = {ATTRIBUTES = (Public, ); }; };
+		8D07F2C00486CC7A007CD1D0 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; };
+		EE022B850BF8E8C600F55360 /* ossimPlanetQtAboutDialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE022B840BF8E8C600F55360 /* ossimPlanetQtAboutDialog.cpp */; };
+		EE086D990D40D88E0097C6AB /* osgViewer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EE086D980D40D88E0097C6AB /* osgViewer.framework */; };
+		EE69A3740B2884A200C91DD1 /* wms.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EE69A3730B28849E00C91DD1 /* wms.framework */; };
+		EE6F833A0BE77C3B0090E263 /* moc_ossimPlanetQtNewHttpConnection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE6F83390BE77C3B0090E263 /* moc_ossimPlanetQtNewHttpConnection.cpp */; };
+		EE6F833C0BE77C480090E263 /* ossimPlanetQtNewHttpConnection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE6F833B0BE77C480090E263 /* ossimPlanetQtNewHttpConnection.cpp */; };
+		EE7958BA0DA6863800155345 /* ossimPlanetQtMessageLog.h in Headers */ = {isa = PBXBuildFile; fileRef = EE7958B90DA6863800155345 /* ossimPlanetQtMessageLog.h */; };
+		EE7958BC0DA687D500155345 /* ossimPlanetQtMessageLog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE7958BB0DA687D500155345 /* ossimPlanetQtMessageLog.cpp */; };
+		EE7958C90DA688CF00155345 /* moc_ossimPlanetQtMessageLog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE7958C80DA688CF00155345 /* moc_ossimPlanetQtMessageLog.cpp */; };
+		EE7959390DA6954F00155345 /* ui_ossimPlanetQtMessageLog.h in Headers */ = {isa = PBXBuildFile; fileRef = EE7959380DA6954F00155345 /* ui_ossimPlanetQtMessageLog.h */; };
+		EE9171830D171000006DB941 /* ossimPlanetQtVideoControlWidget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE9171820D171000006DB941 /* ossimPlanetQtVideoControlWidget.cpp */; };
+		EE9171850D171030006DB941 /* ossimPlanetQtVideoControlWidget.h in Headers */ = {isa = PBXBuildFile; fileRef = EE9171840D171030006DB941 /* ossimPlanetQtVideoControlWidget.h */; };
+		EE91719A0D17119D006DB941 /* moc_ossimPlanetQtVideoControlWidget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE9171990D17119D006DB941 /* moc_ossimPlanetQtVideoControlWidget.cpp */; };
+		EE9173F90C57A80500B25F44 /* ossimPlanetQtEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = EE9173F80C57A80500B25F44 /* ossimPlanetQtEvent.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EE9B7F6A0C21C2EC002ABF88 /* ossimPlanetQtLegendAnimationPathItem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE9B7F690C21C2EC002ABF88 /* ossimPlanetQtLegendAnimationPathItem.cpp */; };
+		EE9B7F6C0C21C2F8002ABF88 /* ossimPlanetQtLegendAnimationPathItem.h in Headers */ = {isa = PBXBuildFile; fileRef = EE9B7F6B0C21C2F8002ABF88 /* ossimPlanetQtLegendAnimationPathItem.h */; };
+		EE9D27980DD9C37B005A8951 /* ossimPlanetQtLegendNodeItem.h in Headers */ = {isa = PBXBuildFile; fileRef = EE9D27970DD9C37B005A8951 /* ossimPlanetQtLegendNodeItem.h */; };
+		EE9D279E0DD9C43D005A8951 /* ossimPlanetQtLegendNodeItem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE9D279C0DD9C43D005A8951 /* ossimPlanetQtLegendNodeItem.cpp */; };
+		EEB5EDBB0D0F2EB5000CF6B2 /* ossimPredator.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EEB5EDBA0D0F2EA5000CF6B2 /* ossimPredator.framework */; };
+		EEBE2C960B4D38A40092FA3F /* ossimPlanetQtActivityWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EEBE2C950B4D38A40092FA3F /* ossimPlanetQtActivityWindow.cpp */; };
+		EEBE2C980B4D38AE0092FA3F /* ossimPlanetQtActivityWidget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EEBE2C970B4D38AE0092FA3F /* ossimPlanetQtActivityWidget.cpp */; };
+		EEBE2CBB0B4D52D20092FA3F /* ossimPlanetQtActivityItem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EEBE2CBA0B4D52D20092FA3F /* ossimPlanetQtActivityItem.cpp */; };
+		EEBE2D130B4D5A3B0092FA3F /* ossimPlanetQtActivityThreadQueueItem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EEBE2D120B4D5A3B0092FA3F /* ossimPlanetQtActivityThreadQueueItem.cpp */; };
+		EEBE2D390B4D63770092FA3F /* ossimPlanetQtActivityThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EEBE2D380B4D63770092FA3F /* ossimPlanetQtActivityThread.cpp */; };
+		EEBE2DAE0B4D8AA10092FA3F /* moc_ossimPlanetQtPreferences.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EEBE2DA40B4D8AA10092FA3F /* moc_ossimPlanetQtPreferences.cpp */; };
+		EEBE2DAF0B4D8AA10092FA3F /* moc_ossimPlanetQtActivityWidget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EEBE2DA50B4D8AA10092FA3F /* moc_ossimPlanetQtActivityWidget.cpp */; };
+		EEBE2DB00B4D8AA10092FA3F /* moc_ossimPlanetQtActivityThreadQueueItem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EEBE2DA60B4D8AA10092FA3F /* moc_ossimPlanetQtActivityThreadQueueItem.cpp */; };
+		EEBE2DB10B4D8AA10092FA3F /* moc_ossimPlanetQtWmsDialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EEBE2DA70B4D8AA10092FA3F /* moc_ossimPlanetQtWmsDialog.cpp */; };
+		EEBE2DB20B4D8AA10092FA3F /* moc_ossimPlanetQtLegend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EEBE2DA80B4D8AA10092FA3F /* moc_ossimPlanetQtLegend.cpp */; };
+		EEBE2DB30B4D8AA10092FA3F /* moc_ossimPlanetQtActivityWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EEBE2DA90B4D8AA10092FA3F /* moc_ossimPlanetQtActivityWindow.cpp */; };
+		EEBE2DB40B4D8AA10092FA3F /* moc_ossimPlanetQtGlWidget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EEBE2DAA0B4D8AA10092FA3F /* moc_ossimPlanetQtGlWidget.cpp */; };
+		EEBE2DB60B4D8AA10092FA3F /* moc_ossimPlanetQtLayerOperation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EEBE2DAC0B4D8AA10092FA3F /* moc_ossimPlanetQtLayerOperation.cpp */; };
+		EEBE2DB70B4D8AA10092FA3F /* moc_ossimPlanetQtMainWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EEBE2DAD0B4D8AA10092FA3F /* moc_ossimPlanetQtMainWindow.cpp */; };
+		EEC4310B0BFB42A4004209D5 /* ossimPlanetQtImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EEC4310A0BFB42A4004209D5 /* ossimPlanetQtImage.cpp */; };
+		EED67AA40B67B69D00C0CE5A /* ossimPlanetQtRuler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EED67AA30B67B69D00C0CE5A /* ossimPlanetQtRuler.cpp */; };
+		EED67AA60B67B6AC00C0CE5A /* moc_ossimPlanetQtRuler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EED67AA50B67B6AC00C0CE5A /* moc_ossimPlanetQtRuler.cpp */; };
+		EEE852660C170E8000ED8550 /* ossimPlanetQtWmsDialog.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE852450C170E8000ED8550 /* ossimPlanetQtWmsDialog.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEE852670C170E8000ED8550 /* ossimPlanetQtVersion.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE852460C170E8000ED8550 /* ossimPlanetQtVersion.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEE852680C170E8000ED8550 /* ossimPlanetQtRuler.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE852470C170E8000ED8550 /* ossimPlanetQtRuler.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEE852690C170E8000ED8550 /* ossimPlanetQtActivityItem.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE852480C170E8000ED8550 /* ossimPlanetQtActivityItem.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEE8526A0C170E8000ED8550 /* ui_ossimPlanetQtWmsDialog.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE852490C170E8000ED8550 /* ui_ossimPlanetQtWmsDialog.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEE8526B0C170E8000ED8550 /* ossimPlanetQtAboutDialog.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE8524A0C170E8000ED8550 /* ossimPlanetQtAboutDialog.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEE8526C0C170E8000ED8550 /* ossimPlanetQtGlWidget.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE8524B0C170E8000ED8550 /* ossimPlanetQtGlWidget.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEE8526D0C170E8000ED8550 /* ossimPlanetQtMainWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE8524C0C170E8000ED8550 /* ossimPlanetQtMainWindow.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEE8526E0C170E8000ED8550 /* ossimPlanetQtActionAdapter.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE8524D0C170E8000ED8550 /* ossimPlanetQtActionAdapter.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEE8526F0C170E8000ED8550 /* ui_ossimPlanetQtLayerOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE8524E0C170E8000ED8550 /* ui_ossimPlanetQtLayerOperation.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEE852700C170E8000ED8550 /* ui_ossimPlanetQtActivityWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE8524F0C170E8000ED8550 /* ui_ossimPlanetQtActivityWindow.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEE852710C170E8000ED8550 /* ossimPlanetQtLegendTextureItem.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE852500C170E8000ED8550 /* ossimPlanetQtLegendTextureItem.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEE852720C170E8000ED8550 /* ossimPlanetQtNewHttpConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE852510C170E8000ED8550 /* ossimPlanetQtNewHttpConnection.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEE852730C170E8000ED8550 /* ui_ossimPlanetQtRuler.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE852520C170E8000ED8550 /* ui_ossimPlanetQtRuler.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEE852740C170E8000ED8550 /* ui_ossimPlanetQtPreferences.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE852530C170E8000ED8550 /* ui_ossimPlanetQtPreferences.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEE852750C170E8000ED8550 /* ossimPlanetQtActivityThreadQueueItem.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE852540C170E8000ED8550 /* ossimPlanetQtActivityThreadQueueItem.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEE852760C170E8000ED8550 /* ui_ossimPlanetQtAboutDialog.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE852550C170E8000ED8550 /* ui_ossimPlanetQtAboutDialog.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEE852770C170E8000ED8550 /* ossimPlanetQtAlertLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE852560C170E8000ED8550 /* ossimPlanetQtAlertLayer.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEE852780C170E8000ED8550 /* ossimPlanetQtActivityWidget.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE852570C170E8000ED8550 /* ossimPlanetQtActivityWidget.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEE852790C170E8000ED8550 /* ui_ossimPlanetQtNewHttpConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE852580C170E8000ED8550 /* ui_ossimPlanetQtNewHttpConnection.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEE8527A0C170E8000ED8550 /* ui_ossimPlanetQtMainWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE852590C170E8000ED8550 /* ui_ossimPlanetQtMainWindow.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEE8527B0C170E8000ED8550 /* ossimPlanetQtActivityWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE8525A0C170E8000ED8550 /* ossimPlanetQtActivityWindow.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEE8527C0C170E8000ED8550 /* ossimPlanetQtActivityThread.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE8525B0C170E8000ED8550 /* ossimPlanetQtActivityThread.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEE8527D0C170E8000ED8550 /* ossimPlanetQtLegendKmlItem.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE8525C0C170E8000ED8550 /* ossimPlanetQtLegendKmlItem.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEE8527E0C170E8000ED8550 /* ossimPlanetQtLegendItem.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE8525D0C170E8000ED8550 /* ossimPlanetQtLegendItem.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEE8527F0C170E8000ED8550 /* ossimPlanetQtPreferences.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE8525E0C170E8000ED8550 /* ossimPlanetQtPreferences.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEE852800C170E8000ED8550 /* ossimPlanetQtLayerOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE8525F0C170E8000ED8550 /* ossimPlanetQtLayerOperation.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEE852810C170E8000ED8550 /* ossimPlanetQtImage.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE852600C170E8000ED8550 /* ossimPlanetQtImage.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEE852820C170E8000ED8550 /* ossimPlanetQtLegend.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE852610C170E8000ED8550 /* ossimPlanetQtLegend.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEE852830C170E8000ED8550 /* ossimPlanetQtApplication.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE852620C170E8000ED8550 /* ossimPlanetQtApplication.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEE852840C170E8000ED8550 /* ossimPlanetQtLegendLocationInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE852630C170E8000ED8550 /* ossimPlanetQtLegendLocationInfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEE852850C170E8000ED8550 /* ossimPlanetQtLegendLocatioInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE852640C170E8000ED8550 /* ossimPlanetQtLegendLocatioInfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEE852860C170E8000ED8550 /* ossimPlanetQtExport.h in Headers */ = {isa = PBXBuildFile; fileRef = EEE852650C170E8000ED8550 /* ossimPlanetQtExport.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EEF048BD0D9BEDE600F6897F /* ossimPlanetQtOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = EEF048BC0D9BEDE600F6897F /* ossimPlanetQtOperation.h */; };
+		EEF048C00D9BF9B500F6897F /* ossimPlanetQtOperation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EEF048BF0D9BF9B500F6897F /* ossimPlanetQtOperation.cpp */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+		186EF60E0B1DB65B00F7886A /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF60A0B1DB65B00F7886A /* ossimPlanet.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 8D07F2C80486CC7A007CD1D0;
+			remoteInfo = ossimPlanet;
+		};
+		186EF6850B1DBB0100F7886A /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 8D07F2C80486CC7A007CD1D0;
+			remoteInfo = ossim;
+		};
+		433A4CE1100CEDAC000B969C /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF60A0B1DB65B00F7886A /* ossimPlanet.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 433A4CD8100CED8D000B969C;
+			remoteInfo = ossimplanettest;
+		};
+		434D0D791019DF9100761D13 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF60A0B1DB65B00F7886A /* ossimPlanet.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
+			remoteInfo = ossimPlanet;
+		};
+		437A56030E789BBE000D89D5 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = EE69A36E0B28849E00C91DD1 /* libwms.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 1FD5B7C80E75D3DC00FBD730;
+			remoteInfo = wmsurl;
+		};
+		437A56050E789BBE000D89D5 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = EE69A36E0B28849E00C91DD1 /* libwms.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 1FD5B7EA0E75D46700FBD730;
+			remoteInfo = wmscapabilities.cpp;
+		};
+		437A56070E789BBE000D89D5 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = EE69A36E0B28849E00C91DD1 /* libwms.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 1FD5B7FE0E75D4C500FBD730;
+			remoteInfo = wmsgetmap;
+		};
+		43C6E5D70FF005CB004B52F7 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF60A0B1DB65B00F7886A /* ossimPlanet.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 43C6E2910FEFB4D8004B52F7;
+			remoteInfo = ossimplanetklv;
+		};
+		43C6E5D90FF005CB004B52F7 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF60A0B1DB65B00F7886A /* ossimPlanet.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 43C6E29C0FEFB4E9004B52F7;
+			remoteInfo = ossimplanetviewer;
+		};
+		43C8A7941109FFCB0095AEE2 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
+			remoteInfo = ossimPlanetQt;
+		};
+		43C8A7961109FFCB0095AEE2 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF60A0B1DB65B00F7886A /* ossimPlanet.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
+			remoteInfo = ossimPlanet;
+		};
+		43C8A7981109FFCB0095AEE2 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = EEB5EDB50D0F2EA5000CF6B2 /* ossimPredator.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
+			remoteInfo = ossimPredator;
+		};
+		43C8A79A1109FFCB0095AEE2 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
+			remoteInfo = ossim;
+		};
+		43C8A79C1109FFCB0095AEE2 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = EE69A36E0B28849E00C91DD1 /* libwms.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = 8DC2EF4F0486A6940098B216;
+			remoteInfo = wms;
+		};
+		43C95013104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 433628031042E368002A87C7;
+			remoteInfo = "template-app";
+		};
+		43C95015104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 433628151042E3B0002A87C7;
+			remoteInfo = "ossim-adrg-dump";
+		};
+		43C95017104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 433628371042E3F6002A87C7;
+			remoteInfo = "ossim-applanix2ogeom";
+		};
+		43C95019104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 433628551042E461002A87C7;
+			remoteInfo = "ossim-band-merge";
+		};
+		43C9501B104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 433628741042E4AC002A87C7;
+			remoteInfo = "ossim-btoa";
+		};
+		43C9501D104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 433628861042E4D1002A87C7;
+			remoteInfo = "ossim-chgkwval";
+		};
+		43C9501F104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 4336289F1042E52A002A87C7;
+			remoteInfo = "ossim-cmm";
+		};
+		43C95021104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 433628B91042E560002A87C7;
+			remoteInfo = "ossim-computeSrtmStats";
+		};
+		43C95023104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 433628D61042E59C002A87C7;
+			remoteInfo = "ossim-correl";
+		};
+		43C95025104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 433628F11042E5D1002A87C7;
+			remoteInfo = "ossim-create-cg";
+		};
+		43C95027104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 4336290B1042E607002A87C7;
+			remoteInfo = "ossim-create-histo";
+		};
+		43C9502F104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 433629811042E712002A87C7;
+			remoteInfo = "ossim-dms2deg";
+		};
+		43C95031104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 4336299D1042E759002A87C7;
+			remoteInfo = "ossim-dump-ocg";
+		};
+		43C95033104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 433629B51042E77C002A87C7;
+			remoteInfo = "ossim-ecg2ocg";
+		};
+		43C95035104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 433629D01042E7B1002A87C7;
+			remoteInfo = "ossim-extract-vertices";
+		};
+		43C95037104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 433629E41042E807002A87C7;
+			remoteInfo = "ossim-foo";
+		};
+		43C9503B104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 43362A2D1042E88F002A87C7;
+			remoteInfo = "ossim-height";
+		};
+		43C9503D104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 43362A4B1042E8BD002A87C7;
+			remoteInfo = "ossim-icp";
+		};
+		43C9503F104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 43362A631042E8EE002A87C7;
+			remoteInfo = "ossim-igen";
+		};
+		43C95041104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 43362A7D1042E914002A87C7;
+			remoteInfo = "ossim-img2md";
+		};
+		43C95043104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 43362A9A1042E955002A87C7;
+			remoteInfo = "ossim-img2rr";
+		};
+		43C95045104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 43362AB41042E981002A87C7;
+			remoteInfo = "ossim-info";
+		};
+		43C95047104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 43362AD21042EA43002A87C7;
+			remoteInfo = "ossim-modopt";
+		};
+		43C95049104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 43362AEF1042EA81002A87C7;
+			remoteInfo = "ossim-mosaic";
+		};
+		43C9504F104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 43362B471042EB45002A87C7;
+			remoteInfo = "ossim-ogeom2ogeom";
+		};
+		43C95051104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 43362B641042EB70002A87C7;
+			remoteInfo = "ossim-orthoigen";
+		};
+		43C95053104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 43362B801042EB9B002A87C7;
+			remoteInfo = "ossim-pixelflip";
+		};
+		43C95055104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 43362B9B1042EBCE002A87C7;
+			remoteInfo = "ossim-prune";
+		};
+		43C95059104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 43362BD21042EC26002A87C7;
+			remoteInfo = "ossim-rejout";
+		};
+		43C9505B104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 43362BEE1042EC50002A87C7;
+			remoteInfo = "ossim-senint";
+		};
+		43C9505D104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 43362C081042EC80002A87C7;
+			remoteInfo = "ossim-space-imaging";
+		};
+		43C9505F104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 43362C221042ECAF002A87C7;
+			remoteInfo = "ossim-swapbytes";
+		};
+		43C95061104C34A000145CDF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 43362C3C1042ECD6002A87C7;
+			remoteInfo = "ossim-tfw2ogeom";
+		};
+		43D5034D110A04C400FDB366 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
+			remoteInfo = ossimPlanetQt;
+		};
+		43D5034F110A04C400FDB366 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 43C8A7871109FF750095AEE2;
+			remoteInfo = ossimplanet;
+		};
+		EE69A3720B28849E00C91DD1 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = EE69A36E0B28849E00C91DD1 /* libwms.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 8DC2EF5B0486A6940098B216;
+			remoteInfo = wms;
+		};
+		EEB5EDB90D0F2EA5000CF6B2 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = EEB5EDB50D0F2EA5000CF6B2 /* ossimPredator.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = EE3F868B0D0DBB2300DFD3DF;
+			remoteInfo = ossimPredator;
+		};
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+		089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+		186EF5C80B1DB60E00F7886A /* common_settings.xcconfig */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xcconfig; name = common_settings.xcconfig; path = ../../../ossim/xcode/ossim/common_settings.xcconfig; sourceTree = SOURCE_ROOT; };
+		186EF5CE0B1DB62E00F7886A /* ossimPlanetQtLayerOperation.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPlanetQtLayerOperation.cpp; sourceTree = "<group>"; };
+		186EF5CF0B1DB62E00F7886A /* ossimPlanetQtWmsDialog.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPlanetQtWmsDialog.cpp; sourceTree = "<group>"; };
+		186EF5D00B1DB62E00F7886A /* ossimPlanetQtApplication.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPlanetQtApplication.cpp; sourceTree = "<group>"; };
+		186EF5D10B1DB62E00F7886A /* ossimPlanetQtGlWidget.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPlanetQtGlWidget.cpp; sourceTree = "<group>"; };
+		186EF5D20B1DB62E00F7886A /* ossimPlanetQtLegend.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPlanetQtLegend.cpp; sourceTree = "<group>"; };
+		186EF5D30B1DB62E00F7886A /* ossimPlanetQtLegendItem.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPlanetQtLegendItem.cpp; sourceTree = "<group>"; };
+		186EF5D40B1DB62E00F7886A /* ossimPlanetQtLegendTextureItem.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPlanetQtLegendTextureItem.cpp; sourceTree = "<group>"; };
+		186EF5D50B1DB62E00F7886A /* ossimPlanetQtMainWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPlanetQtMainWindow.cpp; sourceTree = "<group>"; };
+		186EF5D60B1DB62E00F7886A /* ossimPlanetQtPreferences.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPlanetQtPreferences.cpp; sourceTree = "<group>"; };
+		186EF60A0B1DB65B00F7886A /* ossimPlanet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ossimPlanet.xcodeproj; path = ../../../ossimPlanet/xcode/ossimPlanet/ossimPlanet.xcodeproj; sourceTree = SOURCE_ROOT; };
+		186EF6450B1DBB0100F7886A /* ossim.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ossim.xcodeproj; path = ../../../ossim/xcode/ossim/ossim.xcodeproj; sourceTree = SOURCE_ROOT; };
+		32BAE0B70371A74B00C91783 /* ossimPlanetQt_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQt_Prefix.pch; sourceTree = "<group>"; };
+		4307F53C0BBD90B40079E358 /* ossimPlanetQtLegendKmlItem.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPlanetQtLegendKmlItem.cpp; sourceTree = "<group>"; };
+		430D55180C68AF5900FA8F6C /* ossimPlanetQtDropDownDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPlanetQtDropDownDelegate.cpp; sourceTree = "<group>"; };
+		430D551A0C68AF8500FA8F6C /* ossimPlanetQtDropDownDelegate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtDropDownDelegate.h; sourceTree = "<group>"; };
+		4317612E0B690A0E008D4A90 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
+		43717FCA0BCEF4640002D30E /* osg.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = osg.framework; path = ../../../ossim_dependencies/Frameworks/osg.framework; sourceTree = SOURCE_ROOT; };
+		437180610BCEF4700002D30E /* Openthreads.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Openthreads.framework; path = ../../../ossim_dependencies/Frameworks/Openthreads.framework; sourceTree = SOURCE_ROOT; };
+		4371806D0BCEF4860002D30E /* osgUtil.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = osgUtil.framework; path = ../../../ossim_dependencies/Frameworks/osgUtil.framework; sourceTree = SOURCE_ROOT; };
+		4371808E0BCEF4940002D30E /* osgGA.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = osgGA.framework; path = ../../../ossim_dependencies/Frameworks/osgGA.framework; sourceTree = SOURCE_ROOT; };
+		437180A70BCEF4A10002D30E /* osgText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = osgText.framework; path = ../../../ossim_dependencies/Frameworks/osgText.framework; sourceTree = SOURCE_ROOT; };
+		437180B20BCEF4B00002D30E /* osgDB.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = osgDB.framework; path = ../../../ossim_dependencies/Frameworks/osgDB.framework; sourceTree = SOURCE_ROOT; };
+		43C8A7881109FF750095AEE2 /* ossimplanet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ossimplanet.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		43C8A78A1109FF750095AEE2 /* ossimplanet-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ossimplanet-Info.plist"; sourceTree = "<group>"; };
+		43C8A7A4110A001C0095AEE2 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = ../../apps/ossimplanet/main.cpp; sourceTree = SOURCE_ROOT; };
+		43C8A7A5110A001C0095AEE2 /* qrc_ossimPlanetQt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = qrc_ossimPlanetQt.cpp; path = ../../apps/ossimplanet/qrc_ossimPlanetQt.cpp; sourceTree = SOURCE_ROOT; };
+		43CD236B0D1186C8004CF3EE /* ossimPlanetQtLegendVideoItem.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPlanetQtLegendVideoItem.cpp; sourceTree = "<group>"; };
+		43CD237D0D1187E1004CF3EE /* ossimPlanetQtLegendVideoItem.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtLegendVideoItem.h; sourceTree = "<group>"; };
+		43FC557B0B7CBD1400B57002 /* ossimPlanetQtAlertLayer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPlanetQtAlertLayer.cpp; sourceTree = "<group>"; };
+		8D07F2C70486CC7A007CD1D0 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
+		8D07F2C80486CC7A007CD1D0 /* ossimPlanetQt.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ossimPlanetQt.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+		EE022B840BF8E8C600F55360 /* ossimPlanetQtAboutDialog.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPlanetQtAboutDialog.cpp; sourceTree = "<group>"; };
+		EE086D980D40D88E0097C6AB /* osgViewer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = osgViewer.framework; path = ../../../ossim_dependencies/Frameworks/osgViewer.framework; sourceTree = SOURCE_ROOT; };
+		EE69A36E0B28849E00C91DD1 /* libwms.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = libwms.xcodeproj; path = ../../../libwms/xcode/libwms/libwms.xcodeproj; sourceTree = SOURCE_ROOT; };
+		EE6F83390BE77C3B0090E263 /* moc_ossimPlanetQtNewHttpConnection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = moc_ossimPlanetQtNewHttpConnection.cpp; sourceTree = "<group>"; };
+		EE6F833B0BE77C480090E263 /* ossimPlanetQtNewHttpConnection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPlanetQtNewHttpConnection.cpp; sourceTree = "<group>"; };
+		EE7958B90DA6863800155345 /* ossimPlanetQtMessageLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtMessageLog.h; sourceTree = "<group>"; };
+		EE7958BB0DA687D500155345 /* ossimPlanetQtMessageLog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPlanetQtMessageLog.cpp; sourceTree = "<group>"; };
+		EE7958C80DA688CF00155345 /* moc_ossimPlanetQtMessageLog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = moc_ossimPlanetQtMessageLog.cpp; sourceTree = "<group>"; };
+		EE7959380DA6954F00155345 /* ui_ossimPlanetQtMessageLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ui_ossimPlanetQtMessageLog.h; sourceTree = "<group>"; };
+		EE9171820D171000006DB941 /* ossimPlanetQtVideoControlWidget.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPlanetQtVideoControlWidget.cpp; sourceTree = "<group>"; };
+		EE9171840D171030006DB941 /* ossimPlanetQtVideoControlWidget.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtVideoControlWidget.h; sourceTree = "<group>"; };
+		EE9171990D17119D006DB941 /* moc_ossimPlanetQtVideoControlWidget.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = moc_ossimPlanetQtVideoControlWidget.cpp; sourceTree = "<group>"; };
+		EE9173F80C57A80500B25F44 /* ossimPlanetQtEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtEvent.h; sourceTree = "<group>"; };
+		EE9B7F690C21C2EC002ABF88 /* ossimPlanetQtLegendAnimationPathItem.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPlanetQtLegendAnimationPathItem.cpp; sourceTree = "<group>"; };
+		EE9B7F6B0C21C2F8002ABF88 /* ossimPlanetQtLegendAnimationPathItem.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtLegendAnimationPathItem.h; sourceTree = "<group>"; };
+		EE9D27970DD9C37B005A8951 /* ossimPlanetQtLegendNodeItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtLegendNodeItem.h; sourceTree = "<group>"; };
+		EE9D279C0DD9C43D005A8951 /* ossimPlanetQtLegendNodeItem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPlanetQtLegendNodeItem.cpp; sourceTree = "<group>"; };
+		EEB5EDB50D0F2EA5000CF6B2 /* ossimPredator.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ossimPredator.xcodeproj; path = ../../../ossimPredator/xcode/ossimPredator/ossimPredator.xcodeproj; sourceTree = SOURCE_ROOT; };
+		EEBE2C950B4D38A40092FA3F /* ossimPlanetQtActivityWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPlanetQtActivityWindow.cpp; sourceTree = "<group>"; };
+		EEBE2C970B4D38AE0092FA3F /* ossimPlanetQtActivityWidget.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPlanetQtActivityWidget.cpp; sourceTree = "<group>"; };
+		EEBE2CBA0B4D52D20092FA3F /* ossimPlanetQtActivityItem.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPlanetQtActivityItem.cpp; sourceTree = "<group>"; };
+		EEBE2D120B4D5A3B0092FA3F /* ossimPlanetQtActivityThreadQueueItem.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPlanetQtActivityThreadQueueItem.cpp; sourceTree = "<group>"; };
+		EEBE2D380B4D63770092FA3F /* ossimPlanetQtActivityThread.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPlanetQtActivityThread.cpp; sourceTree = "<group>"; };
+		EEBE2DA40B4D8AA10092FA3F /* moc_ossimPlanetQtPreferences.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = moc_ossimPlanetQtPreferences.cpp; sourceTree = "<group>"; };
+		EEBE2DA50B4D8AA10092FA3F /* moc_ossimPlanetQtActivityWidget.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = moc_ossimPlanetQtActivityWidget.cpp; sourceTree = "<group>"; };
+		EEBE2DA60B4D8AA10092FA3F /* moc_ossimPlanetQtActivityThreadQueueItem.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = moc_ossimPlanetQtActivityThreadQueueItem.cpp; sourceTree = "<group>"; };
+		EEBE2DA70B4D8AA10092FA3F /* moc_ossimPlanetQtWmsDialog.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = moc_ossimPlanetQtWmsDialog.cpp; sourceTree = "<group>"; };
+		EEBE2DA80B4D8AA10092FA3F /* moc_ossimPlanetQtLegend.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = moc_ossimPlanetQtLegend.cpp; sourceTree = "<group>"; };
+		EEBE2DA90B4D8AA10092FA3F /* moc_ossimPlanetQtActivityWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = moc_ossimPlanetQtActivityWindow.cpp; sourceTree = "<group>"; };
+		EEBE2DAA0B4D8AA10092FA3F /* moc_ossimPlanetQtGlWidget.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = moc_ossimPlanetQtGlWidget.cpp; sourceTree = "<group>"; };
+		EEBE2DAC0B4D8AA10092FA3F /* moc_ossimPlanetQtLayerOperation.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = moc_ossimPlanetQtLayerOperation.cpp; sourceTree = "<group>"; };
+		EEBE2DAD0B4D8AA10092FA3F /* moc_ossimPlanetQtMainWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = moc_ossimPlanetQtMainWindow.cpp; sourceTree = "<group>"; };
+		EEC4310A0BFB42A4004209D5 /* ossimPlanetQtImage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ossimPlanetQtImage.cpp; path = core/ossimPlanetQtImage.cpp; sourceTree = "<group>"; };
+		EED67AA30B67B69D00C0CE5A /* ossimPlanetQtRuler.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPlanetQtRuler.cpp; sourceTree = "<group>"; };
+		EED67AA50B67B6AC00C0CE5A /* moc_ossimPlanetQtRuler.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = moc_ossimPlanetQtRuler.cpp; sourceTree = "<group>"; };
+		EEE852450C170E8000ED8550 /* ossimPlanetQtWmsDialog.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtWmsDialog.h; sourceTree = "<group>"; };
+		EEE852460C170E8000ED8550 /* ossimPlanetQtVersion.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtVersion.h; sourceTree = "<group>"; };
+		EEE852470C170E8000ED8550 /* ossimPlanetQtRuler.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtRuler.h; sourceTree = "<group>"; };
+		EEE852480C170E8000ED8550 /* ossimPlanetQtActivityItem.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtActivityItem.h; sourceTree = "<group>"; };
+		EEE852490C170E8000ED8550 /* ui_ossimPlanetQtWmsDialog.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ui_ossimPlanetQtWmsDialog.h; sourceTree = "<group>"; };
+		EEE8524A0C170E8000ED8550 /* ossimPlanetQtAboutDialog.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtAboutDialog.h; sourceTree = "<group>"; };
+		EEE8524B0C170E8000ED8550 /* ossimPlanetQtGlWidget.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtGlWidget.h; sourceTree = "<group>"; };
+		EEE8524C0C170E8000ED8550 /* ossimPlanetQtMainWindow.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtMainWindow.h; sourceTree = "<group>"; };
+		EEE8524D0C170E8000ED8550 /* ossimPlanetQtActionAdapter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtActionAdapter.h; sourceTree = "<group>"; };
+		EEE8524E0C170E8000ED8550 /* ui_ossimPlanetQtLayerOperation.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ui_ossimPlanetQtLayerOperation.h; sourceTree = "<group>"; };
+		EEE8524F0C170E8000ED8550 /* ui_ossimPlanetQtActivityWindow.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ui_ossimPlanetQtActivityWindow.h; sourceTree = "<group>"; };
+		EEE852500C170E8000ED8550 /* ossimPlanetQtLegendTextureItem.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtLegendTextureItem.h; sourceTree = "<group>"; };
+		EEE852510C170E8000ED8550 /* ossimPlanetQtNewHttpConnection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtNewHttpConnection.h; sourceTree = "<group>"; };
+		EEE852520C170E8000ED8550 /* ui_ossimPlanetQtRuler.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ui_ossimPlanetQtRuler.h; sourceTree = "<group>"; };
+		EEE852530C170E8000ED8550 /* ui_ossimPlanetQtPreferences.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ui_ossimPlanetQtPreferences.h; sourceTree = "<group>"; };
+		EEE852540C170E8000ED8550 /* ossimPlanetQtActivityThreadQueueItem.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtActivityThreadQueueItem.h; sourceTree = "<group>"; };
+		EEE852550C170E8000ED8550 /* ui_ossimPlanetQtAboutDialog.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ui_ossimPlanetQtAboutDialog.h; sourceTree = "<group>"; };
+		EEE852560C170E8000ED8550 /* ossimPlanetQtAlertLayer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtAlertLayer.h; sourceTree = "<group>"; };
+		EEE852570C170E8000ED8550 /* ossimPlanetQtActivityWidget.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtActivityWidget.h; sourceTree = "<group>"; };
+		EEE852580C170E8000ED8550 /* ui_ossimPlanetQtNewHttpConnection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ui_ossimPlanetQtNewHttpConnection.h; sourceTree = "<group>"; };
+		EEE852590C170E8000ED8550 /* ui_ossimPlanetQtMainWindow.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ui_ossimPlanetQtMainWindow.h; sourceTree = "<group>"; };
+		EEE8525A0C170E8000ED8550 /* ossimPlanetQtActivityWindow.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtActivityWindow.h; sourceTree = "<group>"; };
+		EEE8525B0C170E8000ED8550 /* ossimPlanetQtActivityThread.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtActivityThread.h; sourceTree = "<group>"; };
+		EEE8525C0C170E8000ED8550 /* ossimPlanetQtLegendKmlItem.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtLegendKmlItem.h; sourceTree = "<group>"; };
+		EEE8525D0C170E8000ED8550 /* ossimPlanetQtLegendItem.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtLegendItem.h; sourceTree = "<group>"; };
+		EEE8525E0C170E8000ED8550 /* ossimPlanetQtPreferences.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtPreferences.h; sourceTree = "<group>"; };
+		EEE8525F0C170E8000ED8550 /* ossimPlanetQtLayerOperation.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtLayerOperation.h; sourceTree = "<group>"; };
+		EEE852600C170E8000ED8550 /* ossimPlanetQtImage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtImage.h; sourceTree = "<group>"; };
+		EEE852610C170E8000ED8550 /* ossimPlanetQtLegend.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtLegend.h; sourceTree = "<group>"; };
+		EEE852620C170E8000ED8550 /* ossimPlanetQtApplication.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtApplication.h; sourceTree = "<group>"; };
+		EEE852630C170E8000ED8550 /* ossimPlanetQtLegendLocationInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtLegendLocationInfo.h; sourceTree = "<group>"; };
+		EEE852640C170E8000ED8550 /* ossimPlanetQtLegendLocatioInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtLegendLocatioInfo.h; sourceTree = "<group>"; };
+		EEE852650C170E8000ED8550 /* ossimPlanetQtExport.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtExport.h; sourceTree = "<group>"; };
+		EEF048BC0D9BEDE600F6897F /* ossimPlanetQtOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimPlanetQtOperation.h; sourceTree = "<group>"; };
+		EEF048BF0D9BF9B500F6897F /* ossimPlanetQtOperation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPlanetQtOperation.cpp; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		43C8A7861109FF750095AEE2 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				43C8A7FA110A00E40095AEE2 /* ossim.framework in Frameworks */,
+				43C8A7E5110A00560095AEE2 /* ossimPlanet.framework in Frameworks */,
+				43C8A7E4110A00530095AEE2 /* wms.framework in Frameworks */,
+				43C8A7DF110A00510095AEE2 /* ossimPredator.framework in Frameworks */,
+				43C8A7D1110A004C0095AEE2 /* Openthreads.framework in Frameworks */,
+				43C8A7A8110A003E0095AEE2 /* ossimPlanetQt.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		8D07F2C30486CC7A007CD1D0 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				EEB5EDBB0D0F2EB5000CF6B2 /* ossimPredator.framework in Frameworks */,
+				EE69A3740B2884A200C91DD1 /* wms.framework in Frameworks */,
+				186EF6100B1DB66400F7886A /* ossimPlanet.framework in Frameworks */,
+				186EF6F70B1DBB0800F7886A /* ossim.framework in Frameworks */,
+				4317612F0B690A0E008D4A90 /* OpenGL.framework in Frameworks */,
+				43717FCB0BCEF4640002D30E /* osg.framework in Frameworks */,
+				437180620BCEF4700002D30E /* Openthreads.framework in Frameworks */,
+				4371806E0BCEF4860002D30E /* osgUtil.framework in Frameworks */,
+				4371808F0BCEF4940002D30E /* osgGA.framework in Frameworks */,
+				437180A80BCEF4A10002D30E /* osgText.framework in Frameworks */,
+				437180B30BCEF4B00002D30E /* osgDB.framework in Frameworks */,
+				EE086D990D40D88E0097C6AB /* osgViewer.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		034768DDFF38A45A11DB9C8B /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				8D07F2C80486CC7A007CD1D0 /* ossimPlanetQt.framework */,
+				43C8A7881109FF750095AEE2 /* ossimplanet.app */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		0867D691FE84028FC02AAC07 /* ossimPlanetQt */ = {
+			isa = PBXGroup;
+			children = (
+				186EF5C80B1DB60E00F7886A /* common_settings.xcconfig */,
+				08FB77ACFE841707C02AAC07 /* Source */,
+				089C1665FE841158C02AAC07 /* Resources */,
+				0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */,
+				034768DDFF38A45A11DB9C8B /* Products */,
+				43C8A78A1109FF750095AEE2 /* ossimplanet-Info.plist */,
+			);
+			name = ossimPlanetQt;
+			sourceTree = "<group>";
+		};
+		0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */ = {
+			isa = PBXGroup;
+			children = (
+				EE086D980D40D88E0097C6AB /* osgViewer.framework */,
+				EEB5EDB50D0F2EA5000CF6B2 /* ossimPredator.xcodeproj */,
+				437180B20BCEF4B00002D30E /* osgDB.framework */,
+				437180A70BCEF4A10002D30E /* osgText.framework */,
+				4371808E0BCEF4940002D30E /* osgGA.framework */,
+				4371806D0BCEF4860002D30E /* osgUtil.framework */,
+				437180610BCEF4700002D30E /* Openthreads.framework */,
+				43717FCA0BCEF4640002D30E /* osg.framework */,
+				4317612E0B690A0E008D4A90 /* OpenGL.framework */,
+				EE69A36E0B28849E00C91DD1 /* libwms.xcodeproj */,
+				186EF6450B1DBB0100F7886A /* ossim.xcodeproj */,
+				186EF60A0B1DB65B00F7886A /* ossimPlanet.xcodeproj */,
+			);
+			name = "External Frameworks and Libraries";
+			sourceTree = "<group>";
+		};
+		089C1665FE841158C02AAC07 /* Resources */ = {
+			isa = PBXGroup;
+			children = (
+				8D07F2C70486CC7A007CD1D0 /* Info.plist */,
+				089C1666FE841158C02AAC07 /* InfoPlist.strings */,
+			);
+			name = Resources;
+			sourceTree = "<group>";
+		};
+		08FB77ACFE841707C02AAC07 /* Source */ = {
+			isa = PBXGroup;
+			children = (
+				43C8A7A2110A00000095AEE2 /* apps */,
+				186EF5CB0B1DB62E00F7886A /* ossimPlanetQt */,
+				32BAE0B70371A74B00C91783 /* ossimPlanetQt_Prefix.pch */,
+			);
+			name = Source;
+			sourceTree = "<group>";
+		};
+		186EF5CB0B1DB62E00F7886A /* ossimPlanetQt */ = {
+			isa = PBXGroup;
+			children = (
+				186EF5DE0B1DB62E00F7886A /* includes */,
+				186EF5CC0B1DB62E00F7886A /* src */,
+			);
+			name = ossimPlanetQt;
+			sourceTree = "<group>";
+		};
+		186EF5CC0B1DB62E00F7886A /* src */ = {
+			isa = PBXGroup;
+			children = (
+				EEC431070BFB4288004209D5 /* core */,
+				186EF5CD0B1DB62E00F7886A /* gui */,
+				186EF5D70B1DB62E00F7886A /* moc */,
+			);
+			name = src;
+			path = ../../src;
+			sourceTree = SOURCE_ROOT;
+		};
+		186EF5CD0B1DB62E00F7886A /* gui */ = {
+			isa = PBXGroup;
+			children = (
+				EE9171820D171000006DB941 /* ossimPlanetQtVideoControlWidget.cpp */,
+				43CD236B0D1186C8004CF3EE /* ossimPlanetQtLegendVideoItem.cpp */,
+				430D55180C68AF5900FA8F6C /* ossimPlanetQtDropDownDelegate.cpp */,
+				EE9B7F690C21C2EC002ABF88 /* ossimPlanetQtLegendAnimationPathItem.cpp */,
+				EE022B840BF8E8C600F55360 /* ossimPlanetQtAboutDialog.cpp */,
+				EE6F833B0BE77C480090E263 /* ossimPlanetQtNewHttpConnection.cpp */,
+				4307F53C0BBD90B40079E358 /* ossimPlanetQtLegendKmlItem.cpp */,
+				43FC557B0B7CBD1400B57002 /* ossimPlanetQtAlertLayer.cpp */,
+				EED67AA30B67B69D00C0CE5A /* ossimPlanetQtRuler.cpp */,
+				EEBE2D380B4D63770092FA3F /* ossimPlanetQtActivityThread.cpp */,
+				EEBE2D120B4D5A3B0092FA3F /* ossimPlanetQtActivityThreadQueueItem.cpp */,
+				EEBE2CBA0B4D52D20092FA3F /* ossimPlanetQtActivityItem.cpp */,
+				EEBE2C970B4D38AE0092FA3F /* ossimPlanetQtActivityWidget.cpp */,
+				EEBE2C950B4D38A40092FA3F /* ossimPlanetQtActivityWindow.cpp */,
+				186EF5CE0B1DB62E00F7886A /* ossimPlanetQtLayerOperation.cpp */,
+				186EF5CF0B1DB62E00F7886A /* ossimPlanetQtWmsDialog.cpp */,
+				186EF5D00B1DB62E00F7886A /* ossimPlanetQtApplication.cpp */,
+				186EF5D10B1DB62E00F7886A /* ossimPlanetQtGlWidget.cpp */,
+				186EF5D20B1DB62E00F7886A /* ossimPlanetQtLegend.cpp */,
+				186EF5D30B1DB62E00F7886A /* ossimPlanetQtLegendItem.cpp */,
+				186EF5D40B1DB62E00F7886A /* ossimPlanetQtLegendTextureItem.cpp */,
+				186EF5D50B1DB62E00F7886A /* ossimPlanetQtMainWindow.cpp */,
+				186EF5D60B1DB62E00F7886A /* ossimPlanetQtPreferences.cpp */,
+				EEF048BF0D9BF9B500F6897F /* ossimPlanetQtOperation.cpp */,
+				EE7958BB0DA687D500155345 /* ossimPlanetQtMessageLog.cpp */,
+				EE9D279C0DD9C43D005A8951 /* ossimPlanetQtLegendNodeItem.cpp */,
+			);
+			path = gui;
+			sourceTree = "<group>";
+		};
+		186EF5D70B1DB62E00F7886A /* moc */ = {
+			isa = PBXGroup;
+			children = (
+				EE7958C80DA688CF00155345 /* moc_ossimPlanetQtMessageLog.cpp */,
+				EE9171990D17119D006DB941 /* moc_ossimPlanetQtVideoControlWidget.cpp */,
+				EE6F83390BE77C3B0090E263 /* moc_ossimPlanetQtNewHttpConnection.cpp */,
+				EED67AA50B67B6AC00C0CE5A /* moc_ossimPlanetQtRuler.cpp */,
+				EEBE2DA40B4D8AA10092FA3F /* moc_ossimPlanetQtPreferences.cpp */,
+				EEBE2DA50B4D8AA10092FA3F /* moc_ossimPlanetQtActivityWidget.cpp */,
+				EEBE2DA60B4D8AA10092FA3F /* moc_ossimPlanetQtActivityThreadQueueItem.cpp */,
+				EEBE2DA70B4D8AA10092FA3F /* moc_ossimPlanetQtWmsDialog.cpp */,
+				EEBE2DA80B4D8AA10092FA3F /* moc_ossimPlanetQtLegend.cpp */,
+				EEBE2DA90B4D8AA10092FA3F /* moc_ossimPlanetQtActivityWindow.cpp */,
+				EEBE2DAA0B4D8AA10092FA3F /* moc_ossimPlanetQtGlWidget.cpp */,
+				EEBE2DAC0B4D8AA10092FA3F /* moc_ossimPlanetQtLayerOperation.cpp */,
+				EEBE2DAD0B4D8AA10092FA3F /* moc_ossimPlanetQtMainWindow.cpp */,
+			);
+			path = moc;
+			sourceTree = "<group>";
+		};
+		186EF5DE0B1DB62E00F7886A /* includes */ = {
+			isa = PBXGroup;
+			children = (
+				186EF5DF0B1DB62E00F7886A /* ossimPlanetQt */,
+			);
+			name = includes;
+			sourceTree = "<group>";
+		};
+		186EF5DF0B1DB62E00F7886A /* ossimPlanetQt */ = {
+			isa = PBXGroup;
+			children = (
+				EE7959380DA6954F00155345 /* ui_ossimPlanetQtMessageLog.h */,
+				EE9171840D171030006DB941 /* ossimPlanetQtVideoControlWidget.h */,
+				43CD237D0D1187E1004CF3EE /* ossimPlanetQtLegendVideoItem.h */,
+				430D551A0C68AF8500FA8F6C /* ossimPlanetQtDropDownDelegate.h */,
+				EE9173F80C57A80500B25F44 /* ossimPlanetQtEvent.h */,
+				EE9B7F6B0C21C2F8002ABF88 /* ossimPlanetQtLegendAnimationPathItem.h */,
+				EEE852450C170E8000ED8550 /* ossimPlanetQtWmsDialog.h */,
+				EEE852460C170E8000ED8550 /* ossimPlanetQtVersion.h */,
+				EEE852470C170E8000ED8550 /* ossimPlanetQtRuler.h */,
+				EEE852480C170E8000ED8550 /* ossimPlanetQtActivityItem.h */,
+				EEE852490C170E8000ED8550 /* ui_ossimPlanetQtWmsDialog.h */,
+				EEE8524A0C170E8000ED8550 /* ossimPlanetQtAboutDialog.h */,
+				EEE8524B0C170E8000ED8550 /* ossimPlanetQtGlWidget.h */,
+				EEE8524C0C170E8000ED8550 /* ossimPlanetQtMainWindow.h */,
+				EEE8524D0C170E8000ED8550 /* ossimPlanetQtActionAdapter.h */,
+				EEE8524E0C170E8000ED8550 /* ui_ossimPlanetQtLayerOperation.h */,
+				EEE8524F0C170E8000ED8550 /* ui_ossimPlanetQtActivityWindow.h */,
+				EEE852500C170E8000ED8550 /* ossimPlanetQtLegendTextureItem.h */,
+				EEE852510C170E8000ED8550 /* ossimPlanetQtNewHttpConnection.h */,
+				EEE852520C170E8000ED8550 /* ui_ossimPlanetQtRuler.h */,
+				EEE852530C170E8000ED8550 /* ui_ossimPlanetQtPreferences.h */,
+				EEE852540C170E8000ED8550 /* ossimPlanetQtActivityThreadQueueItem.h */,
+				EEE852550C170E8000ED8550 /* ui_ossimPlanetQtAboutDialog.h */,
+				EEE852560C170E8000ED8550 /* ossimPlanetQtAlertLayer.h */,
+				EEE852570C170E8000ED8550 /* ossimPlanetQtActivityWidget.h */,
+				EEE852580C170E8000ED8550 /* ui_ossimPlanetQtNewHttpConnection.h */,
+				EEE852590C170E8000ED8550 /* ui_ossimPlanetQtMainWindow.h */,
+				EEE8525A0C170E8000ED8550 /* ossimPlanetQtActivityWindow.h */,
+				EEE8525B0C170E8000ED8550 /* ossimPlanetQtActivityThread.h */,
+				EEE8525C0C170E8000ED8550 /* ossimPlanetQtLegendKmlItem.h */,
+				EEE8525D0C170E8000ED8550 /* ossimPlanetQtLegendItem.h */,
+				EEE8525E0C170E8000ED8550 /* ossimPlanetQtPreferences.h */,
+				EEE8525F0C170E8000ED8550 /* ossimPlanetQtLayerOperation.h */,
+				EEE852600C170E8000ED8550 /* ossimPlanetQtImage.h */,
+				EEE852610C170E8000ED8550 /* ossimPlanetQtLegend.h */,
+				EEE852620C170E8000ED8550 /* ossimPlanetQtApplication.h */,
+				EEE852630C170E8000ED8550 /* ossimPlanetQtLegendLocationInfo.h */,
+				EEE852640C170E8000ED8550 /* ossimPlanetQtLegendLocatioInfo.h */,
+				EEE852650C170E8000ED8550 /* ossimPlanetQtExport.h */,
+				EEF048BC0D9BEDE600F6897F /* ossimPlanetQtOperation.h */,
+				EE7958B90DA6863800155345 /* ossimPlanetQtMessageLog.h */,
+				EE9D27970DD9C37B005A8951 /* ossimPlanetQtLegendNodeItem.h */,
+			);
+			name = ossimPlanetQt;
+			path = ../../include/ossimPlanetQt;
+			sourceTree = SOURCE_ROOT;
+		};
+		186EF60B0B1DB65B00F7886A /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				186EF60F0B1DB65B00F7886A /* ossimPlanet.framework */,
+				43C6E5D80FF005CB004B52F7 /* ossimplanetklv */,
+				43C6E5DA0FF005CB004B52F7 /* ossimplanetviewer */,
+				433A4CE2100CEDAC000B969C /* ossimplanettest */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		186EF6460B1DBB0100F7886A /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				186EF6860B1DBB0100F7886A /* ossim.framework */,
+				43C95014104C34A000145CDF /* template-app */,
+				43C95016104C34A000145CDF /* ossim-adrg-dump */,
+				43C95018104C34A000145CDF /* ossim-applanix2ogeom */,
+				43C9501A104C34A000145CDF /* ossim-band-merge */,
+				43C9501C104C34A000145CDF /* ossim-btoa */,
+				43C9501E104C34A000145CDF /* template-app */,
+				43C95020104C34A000145CDF /* ossim-cmm */,
+				43C95022104C34A000145CDF /* ossim-computeSrtmStats */,
+				43C95024104C34A000145CDF /* ossim-correl */,
+				43C95026104C34A000145CDF /* ossim-create-cg */,
+				43C95028104C34A000145CDF /* ossim-create-histo */,
+				43C95030104C34A000145CDF /* ossim-dms2deg */,
+				43C95032104C34A000145CDF /* ossim-dump-ocg */,
+				43C95034104C34A000145CDF /* ossim-ecg2ocg */,
+				43C95036104C34A000145CDF /* ossim-extract-vertices */,
+				43C95038104C34A000145CDF /* ossim-foo */,
+				43C9503C104C34A000145CDF /* ossim-height */,
+				43C9503E104C34A000145CDF /* ossim-icp */,
+				43C95040104C34A000145CDF /* ossim-igen */,
+				43C95042104C34A000145CDF /* ossim-img2md */,
+				43C95044104C34A000145CDF /* ossim-img2rr */,
+				43C95046104C34A000145CDF /* ossim-info */,
+				43C95048104C34A000145CDF /* ossim-modopt */,
+				43C9504A104C34A000145CDF /* ossim-mosaic */,
+				43C95050104C34A000145CDF /* ossim-ogeom2ogeom */,
+				43C95052104C34A000145CDF /* ossim-orthoigen */,
+				43C95054104C34A000145CDF /* ossim-pixelflip */,
+				43C95056104C34A000145CDF /* ossim-prune */,
+				43C9505A104C34A000145CDF /* ossim-rejout */,
+				43C9505C104C34A000145CDF /* ossim-senint */,
+				43C9505E104C34A000145CDF /* ossim-space-imaging */,
+				43C95060104C34A000145CDF /* ossim-swapbytes */,
+				43C95062104C34A000145CDF /* ossim-tfw2ogeom */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		43C8A79E1109FFEA0095AEE2 /* ossimplanet */ = {
+			isa = PBXGroup;
+			children = (
+				43C8A7A4110A001C0095AEE2 /* main.cpp */,
+				43C8A7A5110A001C0095AEE2 /* qrc_ossimPlanetQt.cpp */,
+			);
+			name = ossimplanet;
+			sourceTree = "<group>";
+		};
+		43C8A7A2110A00000095AEE2 /* apps */ = {
+			isa = PBXGroup;
+			children = (
+				43C8A79E1109FFEA0095AEE2 /* ossimplanet */,
+			);
+			name = apps;
+			sourceTree = "<group>";
+		};
+		EE69A36F0B28849E00C91DD1 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				EE69A3730B28849E00C91DD1 /* wms.framework */,
+				437A56040E789BBE000D89D5 /* wmsurl */,
+				437A56060E789BBE000D89D5 /* wmscapabilities.cpp */,
+				437A56080E789BBE000D89D5 /* wmsgetmap */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		EEB5EDB60D0F2EA5000CF6B2 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				EEB5EDBA0D0F2EA5000CF6B2 /* ossimPredator.framework */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		EEC431070BFB4288004209D5 /* core */ = {
+			isa = PBXGroup;
+			children = (
+				EEC4310A0BFB42A4004209D5 /* ossimPlanetQtImage.cpp */,
+			);
+			name = core;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+		8D07F2BD0486CC7A007CD1D0 /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				8D07F2BE0486CC7A007CD1D0 /* ossimPlanetQt_Prefix.pch in Headers */,
+				EEE852660C170E8000ED8550 /* ossimPlanetQtWmsDialog.h in Headers */,
+				EEE852670C170E8000ED8550 /* ossimPlanetQtVersion.h in Headers */,
+				EEE852680C170E8000ED8550 /* ossimPlanetQtRuler.h in Headers */,
+				EEE852690C170E8000ED8550 /* ossimPlanetQtActivityItem.h in Headers */,
+				EEE8526A0C170E8000ED8550 /* ui_ossimPlanetQtWmsDialog.h in Headers */,
+				EEE8526B0C170E8000ED8550 /* ossimPlanetQtAboutDialog.h in Headers */,
+				EEE8526C0C170E8000ED8550 /* ossimPlanetQtGlWidget.h in Headers */,
+				EEE8526D0C170E8000ED8550 /* ossimPlanetQtMainWindow.h in Headers */,
+				EEE8526E0C170E8000ED8550 /* ossimPlanetQtActionAdapter.h in Headers */,
+				EEE8526F0C170E8000ED8550 /* ui_ossimPlanetQtLayerOperation.h in Headers */,
+				EEE852700C170E8000ED8550 /* ui_ossimPlanetQtActivityWindow.h in Headers */,
+				EEE852710C170E8000ED8550 /* ossimPlanetQtLegendTextureItem.h in Headers */,
+				EEE852720C170E8000ED8550 /* ossimPlanetQtNewHttpConnection.h in Headers */,
+				EEE852730C170E8000ED8550 /* ui_ossimPlanetQtRuler.h in Headers */,
+				EEE852740C170E8000ED8550 /* ui_ossimPlanetQtPreferences.h in Headers */,
+				EEE852750C170E8000ED8550 /* ossimPlanetQtActivityThreadQueueItem.h in Headers */,
+				EEE852760C170E8000ED8550 /* ui_ossimPlanetQtAboutDialog.h in Headers */,
+				EEE852770C170E8000ED8550 /* ossimPlanetQtAlertLayer.h in Headers */,
+				EEE852780C170E8000ED8550 /* ossimPlanetQtActivityWidget.h in Headers */,
+				EEE852790C170E8000ED8550 /* ui_ossimPlanetQtNewHttpConnection.h in Headers */,
+				EEE8527A0C170E8000ED8550 /* ui_ossimPlanetQtMainWindow.h in Headers */,
+				EEE8527B0C170E8000ED8550 /* ossimPlanetQtActivityWindow.h in Headers */,
+				EEE8527C0C170E8000ED8550 /* ossimPlanetQtActivityThread.h in Headers */,
+				EEE8527D0C170E8000ED8550 /* ossimPlanetQtLegendKmlItem.h in Headers */,
+				EEE8527E0C170E8000ED8550 /* ossimPlanetQtLegendItem.h in Headers */,
+				EEE8527F0C170E8000ED8550 /* ossimPlanetQtPreferences.h in Headers */,
+				EEE852800C170E8000ED8550 /* ossimPlanetQtLayerOperation.h in Headers */,
+				EEE852810C170E8000ED8550 /* ossimPlanetQtImage.h in Headers */,
+				EEE852820C170E8000ED8550 /* ossimPlanetQtLegend.h in Headers */,
+				EEE852830C170E8000ED8550 /* ossimPlanetQtApplication.h in Headers */,
+				EEE852840C170E8000ED8550 /* ossimPlanetQtLegendLocationInfo.h in Headers */,
+				EEE852850C170E8000ED8550 /* ossimPlanetQtLegendLocatioInfo.h in Headers */,
+				EEE852860C170E8000ED8550 /* ossimPlanetQtExport.h in Headers */,
+				EE9B7F6C0C21C2F8002ABF88 /* ossimPlanetQtLegendAnimationPathItem.h in Headers */,
+				EE9173F90C57A80500B25F44 /* ossimPlanetQtEvent.h in Headers */,
+				430D551B0C68AF8500FA8F6C /* ossimPlanetQtDropDownDelegate.h in Headers */,
+				43CD237E0D1187E1004CF3EE /* ossimPlanetQtLegendVideoItem.h in Headers */,
+				EE9171850D171030006DB941 /* ossimPlanetQtVideoControlWidget.h in Headers */,
+				EEF048BD0D9BEDE600F6897F /* ossimPlanetQtOperation.h in Headers */,
+				EE7958BA0DA6863800155345 /* ossimPlanetQtMessageLog.h in Headers */,
+				EE7959390DA6954F00155345 /* ui_ossimPlanetQtMessageLog.h in Headers */,
+				EE9D27980DD9C37B005A8951 /* ossimPlanetQtLegendNodeItem.h in Headers */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+		43C8A7871109FF750095AEE2 /* ossimplanet */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 43C8A7931109FF760095AEE2 /* Build configuration list for PBXNativeTarget "ossimplanet" */;
+			buildPhases = (
+				43C8A7841109FF750095AEE2 /* Resources */,
+				43C8A7851109FF750095AEE2 /* Sources */,
+				43C8A7861109FF750095AEE2 /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				43C8A7951109FFCB0095AEE2 /* PBXTargetDependency */,
+				43C8A7971109FFCB0095AEE2 /* PBXTargetDependency */,
+				43C8A7991109FFCB0095AEE2 /* PBXTargetDependency */,
+				43C8A79B1109FFCB0095AEE2 /* PBXTargetDependency */,
+				43C8A79D1109FFCB0095AEE2 /* PBXTargetDependency */,
+			);
+			name = ossimplanet;
+			productName = ossimplanet;
+			productReference = 43C8A7881109FF750095AEE2 /* ossimplanet.app */;
+			productType = "com.apple.product-type.application";
+		};
+		8D07F2BC0486CC7A007CD1D0 /* ossimPlanetQt */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 4FADC24208B4156D00ABE55E /* Build configuration list for PBXNativeTarget "ossimPlanetQt" */;
+			buildPhases = (
+				4303D1890B227E9600CFC6B3 /* make file generation */,
+				4303D18B0B227ECB00CFC6B3 /* ui, moc and resource file generation */,
+				8D07F2BD0486CC7A007CD1D0 /* Headers */,
+				8D07F2BF0486CC7A007CD1D0 /* Resources */,
+				8D07F2C10486CC7A007CD1D0 /* Sources */,
+				8D07F2C30486CC7A007CD1D0 /* Frameworks */,
+				8D07F2C50486CC7A007CD1D0 /* Rez */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				434D0D7A1019DF9100761D13 /* PBXTargetDependency */,
+			);
+			name = ossimPlanetQt;
+			productInstallPath = "$(HOME)/Library/Frameworks";
+			productName = ossimPlanetQt;
+			productReference = 8D07F2C80486CC7A007CD1D0 /* ossimPlanetQt.framework */;
+			productType = "com.apple.product-type.framework";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		0867D690FE84028FC02AAC07 /* Project object */ = {
+			isa = PBXProject;
+			buildConfigurationList = 4FADC24608B4156D00ABE55E /* Build configuration list for PBXProject "ossimPlanetQt" */;
+			compatibilityVersion = "Xcode 2.4";
+			hasScannedForEncodings = 1;
+			mainGroup = 0867D691FE84028FC02AAC07 /* ossimPlanetQt */;
+			productRefGroup = 034768DDFF38A45A11DB9C8B /* Products */;
+			projectDirPath = "";
+			projectReferences = (
+				{
+					ProductGroup = EE69A36F0B28849E00C91DD1 /* Products */;
+					ProjectRef = EE69A36E0B28849E00C91DD1 /* libwms.xcodeproj */;
+				},
+				{
+					ProductGroup = 186EF6460B1DBB0100F7886A /* Products */;
+					ProjectRef = 186EF6450B1DBB0100F7886A /* ossim.xcodeproj */;
+				},
+				{
+					ProductGroup = 186EF60B0B1DB65B00F7886A /* Products */;
+					ProjectRef = 186EF60A0B1DB65B00F7886A /* ossimPlanet.xcodeproj */;
+				},
+				{
+					ProductGroup = EEB5EDB60D0F2EA5000CF6B2 /* Products */;
+					ProjectRef = EEB5EDB50D0F2EA5000CF6B2 /* ossimPredator.xcodeproj */;
+				},
+			);
+			projectRoot = "";
+			targets = (
+				43D50359110A053100FDB366 /* Clean */,
+				43D50344110A04BA00FDB366 /* All */,
+				8D07F2BC0486CC7A007CD1D0 /* ossimPlanetQt */,
+				43C8A7871109FF750095AEE2 /* ossimplanet */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXReferenceProxy section */
+		186EF60F0B1DB65B00F7886A /* ossimPlanet.framework */ = {
+			isa = PBXReferenceProxy;
+			fileType = wrapper.framework;
+			path = ossimPlanet.framework;
+			remoteRef = 186EF60E0B1DB65B00F7886A /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		186EF6860B1DBB0100F7886A /* ossim.framework */ = {
+			isa = PBXReferenceProxy;
+			fileType = wrapper.framework;
+			path = ossim.framework;
+			remoteRef = 186EF6850B1DBB0100F7886A /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		433A4CE2100CEDAC000B969C /* ossimplanettest */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = ossimplanettest;
+			remoteRef = 433A4CE1100CEDAC000B969C /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		437A56040E789BBE000D89D5 /* wmsurl */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = wmsurl;
+			remoteRef = 437A56030E789BBE000D89D5 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		437A56060E789BBE000D89D5 /* wmscapabilities.cpp */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = wmscapabilities.cpp;
+			remoteRef = 437A56050E789BBE000D89D5 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		437A56080E789BBE000D89D5 /* wmsgetmap */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = wmsgetmap;
+			remoteRef = 437A56070E789BBE000D89D5 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C6E5D80FF005CB004B52F7 /* ossimplanetklv */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = ossimplanetklv;
+			remoteRef = 43C6E5D70FF005CB004B52F7 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C6E5DA0FF005CB004B52F7 /* ossimplanetviewer */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = ossimplanetviewer;
+			remoteRef = 43C6E5D90FF005CB004B52F7 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C95014104C34A000145CDF /* template-app */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "template-app";
+			remoteRef = 43C95013104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C95016104C34A000145CDF /* ossim-adrg-dump */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "ossim-adrg-dump";
+			remoteRef = 43C95015104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C95018104C34A000145CDF /* ossim-applanix2ogeom */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "ossim-applanix2ogeom";
+			remoteRef = 43C95017104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C9501A104C34A000145CDF /* ossim-band-merge */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "ossim-band-merge";
+			remoteRef = 43C95019104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C9501C104C34A000145CDF /* ossim-btoa */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "ossim-btoa";
+			remoteRef = 43C9501B104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C9501E104C34A000145CDF /* template-app */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "template-app";
+			remoteRef = 43C9501D104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C95020104C34A000145CDF /* ossim-cmm */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "ossim-cmm";
+			remoteRef = 43C9501F104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C95022104C34A000145CDF /* ossim-computeSrtmStats */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "ossim-computeSrtmStats";
+			remoteRef = 43C95021104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C95024104C34A000145CDF /* ossim-correl */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "ossim-correl";
+			remoteRef = 43C95023104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C95026104C34A000145CDF /* ossim-create-cg */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "ossim-create-cg";
+			remoteRef = 43C95025104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C95028104C34A000145CDF /* ossim-create-histo */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "ossim-create-histo";
+			remoteRef = 43C95027104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C95030104C34A000145CDF /* ossim-dms2deg */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "ossim-dms2deg";
+			remoteRef = 43C9502F104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C95032104C34A000145CDF /* ossim-dump-ocg */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "ossim-dump-ocg";
+			remoteRef = 43C95031104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C95034104C34A000145CDF /* ossim-ecg2ocg */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "ossim-ecg2ocg";
+			remoteRef = 43C95033104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C95036104C34A000145CDF /* ossim-extract-vertices */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "ossim-extract-vertices";
+			remoteRef = 43C95035104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C95038104C34A000145CDF /* ossim-foo */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "ossim-foo";
+			remoteRef = 43C95037104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C9503C104C34A000145CDF /* ossim-height */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "ossim-height";
+			remoteRef = 43C9503B104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C9503E104C34A000145CDF /* ossim-icp */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "ossim-icp";
+			remoteRef = 43C9503D104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C95040104C34A000145CDF /* ossim-igen */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "ossim-igen";
+			remoteRef = 43C9503F104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C95042104C34A000145CDF /* ossim-img2md */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "ossim-img2md";
+			remoteRef = 43C95041104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C95044104C34A000145CDF /* ossim-img2rr */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "ossim-img2rr";
+			remoteRef = 43C95043104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C95046104C34A000145CDF /* ossim-info */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "ossim-info";
+			remoteRef = 43C95045104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C95048104C34A000145CDF /* ossim-modopt */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "ossim-modopt";
+			remoteRef = 43C95047104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C9504A104C34A000145CDF /* ossim-mosaic */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "ossim-mosaic";
+			remoteRef = 43C95049104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C95050104C34A000145CDF /* ossim-ogeom2ogeom */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "ossim-ogeom2ogeom";
+			remoteRef = 43C9504F104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C95052104C34A000145CDF /* ossim-orthoigen */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "ossim-orthoigen";
+			remoteRef = 43C95051104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C95054104C34A000145CDF /* ossim-pixelflip */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "ossim-pixelflip";
+			remoteRef = 43C95053104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C95056104C34A000145CDF /* ossim-prune */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "ossim-prune";
+			remoteRef = 43C95055104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C9505A104C34A000145CDF /* ossim-rejout */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "ossim-rejout";
+			remoteRef = 43C95059104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C9505C104C34A000145CDF /* ossim-senint */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "ossim-senint";
+			remoteRef = 43C9505B104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C9505E104C34A000145CDF /* ossim-space-imaging */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "ossim-space-imaging";
+			remoteRef = 43C9505D104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C95060104C34A000145CDF /* ossim-swapbytes */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "ossim-swapbytes";
+			remoteRef = 43C9505F104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		43C95062104C34A000145CDF /* ossim-tfw2ogeom */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "ossim-tfw2ogeom";
+			remoteRef = 43C95061104C34A000145CDF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		EE69A3730B28849E00C91DD1 /* wms.framework */ = {
+			isa = PBXReferenceProxy;
+			fileType = wrapper.framework;
+			path = wms.framework;
+			remoteRef = EE69A3720B28849E00C91DD1 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		EEB5EDBA0D0F2EA5000CF6B2 /* ossimPredator.framework */ = {
+			isa = PBXReferenceProxy;
+			fileType = wrapper.framework;
+			path = ossimPredator.framework;
+			remoteRef = EEB5EDB90D0F2EA5000CF6B2 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+/* End PBXReferenceProxy section */
+
+/* Begin PBXResourcesBuildPhase section */
+		43C8A7841109FF750095AEE2 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		8D07F2BF0486CC7A007CD1D0 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				8D07F2C00486CC7A007CD1D0 /* InfoPlist.strings in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXRezBuildPhase section */
+		8D07F2C50486CC7A007CD1D0 /* Rez */ = {
+			isa = PBXRezBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXRezBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+		4303D1890B227E9600CFC6B3 /* make file generation */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			name = "make file generation";
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "export PLANET_QT_DIR=$SRCROOT/../..\nexport QTDIR=$QT4DIR\nexport QT_INSTALL_BINS=$QT4DIR/bin\nexport QMAKE_RCC=$QT4DIR/bin/rcc\nexport DYLD_FRAMEWORK_PATH=$UNIV_DEP/Frameworks:DYLD_FRAMEWORK_PATH\nexport QMAKE_MAC_SDK=$SDKROOT\nexport QMAKE_MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET\n\n\necho =================================$QT4DIR==========================\n/bin/rm -f $PLANET_QT_DIR/apps/Makefile\n/bin/rm -f $PLANET_QT_DIR/apps/ossimplanet/Makefile\n/bin/rm - [...]
+		};
+		4303D18B0B227ECB00CFC6B3 /* ui, moc and resource file generation */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			name = "ui, moc and resource file generation";
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "export PLANET_QT_DIR=$SRCROOT/../..\nexport QTDIR=$QT4DIR\nexport QT_INSTALL_BINS=$QT4DIR/bin\nexport DYLD_FRAMEWORK_PATH=$UNIV_DEP/Frameworks:DYLD_FRAMEWORK_PATH\nexport QMAKE_MAC_SDK=$SDKROOT\nexport QMAKE_MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET\nexport PATH=$QT4DIR/bin:$PATH\n\ncd $PLANET_QT_DIR/src\nmake INCPATH=\"$INCLUDE_PATH\" compiler_uic_make_all\nmake INCPATH=\"$INCLUDE_PATH\" compiler_moc_header_make_all\nmake INCPATH=\"$INCLUDE_PATH\" mocables\n\n [...]
+		};
+		43D50361110A053F00FDB366 /* clean files */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			name = "clean files";
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "export PLANET_QT_DIR=$SRCROOT/../..\nexport QTDIR=$QT4DIR\nexport QMAKESPEC=$QT4DIR/mkspecs/macx-g++\nexport QT_INSTALL_BINS=$QT4DIR/bin\nexport QMAKE_RCC=$QT4DIR/bin/rcc\nexport DYLD_FRAMEWORK_PATH=$UNIV_DEP/Frameworks:DYLD_FRAMEWORK_PATH\nexport QMAKE_MAC_SDK=$SDKROOT\nexport QMAKE_MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET\n\n\necho =================================$QT4DIR==========================\ncd $PLANET_QT_DIR\nmake clean\ncd apps/\nmake clean\n";
+		};
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		43C8A7851109FF750095AEE2 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				43C8A7A6110A001C0095AEE2 /* main.cpp in Sources */,
+				43C8A7A7110A001C0095AEE2 /* qrc_ossimPlanetQt.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		8D07F2C10486CC7A007CD1D0 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				186EF5ED0B1DB62E00F7886A /* ossimPlanetQtLayerOperation.cpp in Sources */,
+				186EF5EE0B1DB62E00F7886A /* ossimPlanetQtWmsDialog.cpp in Sources */,
+				186EF5EF0B1DB62E00F7886A /* ossimPlanetQtApplication.cpp in Sources */,
+				186EF5F00B1DB62E00F7886A /* ossimPlanetQtGlWidget.cpp in Sources */,
+				186EF5F10B1DB62E00F7886A /* ossimPlanetQtLegend.cpp in Sources */,
+				186EF5F20B1DB62E00F7886A /* ossimPlanetQtLegendItem.cpp in Sources */,
+				186EF5F30B1DB62E00F7886A /* ossimPlanetQtLegendTextureItem.cpp in Sources */,
+				186EF5F40B1DB62E00F7886A /* ossimPlanetQtMainWindow.cpp in Sources */,
+				186EF5F50B1DB62E00F7886A /* ossimPlanetQtPreferences.cpp in Sources */,
+				EEBE2C960B4D38A40092FA3F /* ossimPlanetQtActivityWindow.cpp in Sources */,
+				EEBE2C980B4D38AE0092FA3F /* ossimPlanetQtActivityWidget.cpp in Sources */,
+				EEBE2CBB0B4D52D20092FA3F /* ossimPlanetQtActivityItem.cpp in Sources */,
+				EEBE2D130B4D5A3B0092FA3F /* ossimPlanetQtActivityThreadQueueItem.cpp in Sources */,
+				EEBE2D390B4D63770092FA3F /* ossimPlanetQtActivityThread.cpp in Sources */,
+				EEBE2DAE0B4D8AA10092FA3F /* moc_ossimPlanetQtPreferences.cpp in Sources */,
+				EEBE2DAF0B4D8AA10092FA3F /* moc_ossimPlanetQtActivityWidget.cpp in Sources */,
+				EEBE2DB00B4D8AA10092FA3F /* moc_ossimPlanetQtActivityThreadQueueItem.cpp in Sources */,
+				EEBE2DB10B4D8AA10092FA3F /* moc_ossimPlanetQtWmsDialog.cpp in Sources */,
+				EEBE2DB20B4D8AA10092FA3F /* moc_ossimPlanetQtLegend.cpp in Sources */,
+				EEBE2DB30B4D8AA10092FA3F /* moc_ossimPlanetQtActivityWindow.cpp in Sources */,
+				EEBE2DB40B4D8AA10092FA3F /* moc_ossimPlanetQtGlWidget.cpp in Sources */,
+				EEBE2DB60B4D8AA10092FA3F /* moc_ossimPlanetQtLayerOperation.cpp in Sources */,
+				EEBE2DB70B4D8AA10092FA3F /* moc_ossimPlanetQtMainWindow.cpp in Sources */,
+				EED67AA40B67B69D00C0CE5A /* ossimPlanetQtRuler.cpp in Sources */,
+				EED67AA60B67B6AC00C0CE5A /* moc_ossimPlanetQtRuler.cpp in Sources */,
+				43FC557C0B7CBD1400B57002 /* ossimPlanetQtAlertLayer.cpp in Sources */,
+				4307F53D0BBD90B40079E358 /* ossimPlanetQtLegendKmlItem.cpp in Sources */,
+				EE6F833A0BE77C3B0090E263 /* moc_ossimPlanetQtNewHttpConnection.cpp in Sources */,
+				EE6F833C0BE77C480090E263 /* ossimPlanetQtNewHttpConnection.cpp in Sources */,
+				EE022B850BF8E8C600F55360 /* ossimPlanetQtAboutDialog.cpp in Sources */,
+				EEC4310B0BFB42A4004209D5 /* ossimPlanetQtImage.cpp in Sources */,
+				EE9B7F6A0C21C2EC002ABF88 /* ossimPlanetQtLegendAnimationPathItem.cpp in Sources */,
+				430D55190C68AF5900FA8F6C /* ossimPlanetQtDropDownDelegate.cpp in Sources */,
+				43CD236C0D1186C8004CF3EE /* ossimPlanetQtLegendVideoItem.cpp in Sources */,
+				EE9171830D171000006DB941 /* ossimPlanetQtVideoControlWidget.cpp in Sources */,
+				EE91719A0D17119D006DB941 /* moc_ossimPlanetQtVideoControlWidget.cpp in Sources */,
+				EEF048C00D9BF9B500F6897F /* ossimPlanetQtOperation.cpp in Sources */,
+				EE7958BC0DA687D500155345 /* ossimPlanetQtMessageLog.cpp in Sources */,
+				EE7958C90DA688CF00155345 /* moc_ossimPlanetQtMessageLog.cpp in Sources */,
+				EE9D279E0DD9C43D005A8951 /* ossimPlanetQtLegendNodeItem.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+		434D0D7A1019DF9100761D13 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = ossimPlanet;
+			targetProxy = 434D0D791019DF9100761D13 /* PBXContainerItemProxy */;
+		};
+		43C8A7951109FFCB0095AEE2 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 8D07F2BC0486CC7A007CD1D0 /* ossimPlanetQt */;
+			targetProxy = 43C8A7941109FFCB0095AEE2 /* PBXContainerItemProxy */;
+		};
+		43C8A7971109FFCB0095AEE2 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = ossimPlanet;
+			targetProxy = 43C8A7961109FFCB0095AEE2 /* PBXContainerItemProxy */;
+		};
+		43C8A7991109FFCB0095AEE2 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = ossimPredator;
+			targetProxy = 43C8A7981109FFCB0095AEE2 /* PBXContainerItemProxy */;
+		};
+		43C8A79B1109FFCB0095AEE2 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = ossim;
+			targetProxy = 43C8A79A1109FFCB0095AEE2 /* PBXContainerItemProxy */;
+		};
+		43C8A79D1109FFCB0095AEE2 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = wms;
+			targetProxy = 43C8A79C1109FFCB0095AEE2 /* PBXContainerItemProxy */;
+		};
+		43D5034E110A04C400FDB366 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 8D07F2BC0486CC7A007CD1D0 /* ossimPlanetQt */;
+			targetProxy = 43D5034D110A04C400FDB366 /* PBXContainerItemProxy */;
+		};
+		43D50350110A04C400FDB366 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 43C8A7871109FF750095AEE2 /* ossimplanet */;
+			targetProxy = 43D5034F110A04C400FDB366 /* PBXContainerItemProxy */;
+		};
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+		089C1666FE841158C02AAC07 /* InfoPlist.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				089C1667FE841158C02AAC07 /* English */,
+			);
+			name = InfoPlist.strings;
+			sourceTree = "<group>";
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		18A9BD020CDA15DF00F4581A /* DebugNativeLeopard */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 186EF5C80B1DB60E00F7886A /* common_settings.xcconfig */;
+			buildSettings = {
+				ARCHS = "$(NATIVE_ARCH)";
+				GCC_MODEL_TUNING = "";
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = (
+					$DEV_HOME_PATH/ossimPlanetQt/include,
+					$DEV_HOME_PATH/ossim/include,
+					$DEV_HOME_PATH/libwms/include,
+					$DEV_HOME_PATH/ossimPlanet/include,
+					$DEV_HOME_PATH/ossimPlanetQt/include,
+					$UNIV_HEADER_DEP,
+				);
+				LIBRARY_SEARCH_PATHS = "$(QT4_PATH)/lib";
+				MACH_O_TYPE = mh_dylib;
+				OTHER_CFLAGS = "-g";
+				OTHER_CPLUSPLUSFLAGS = "-g";
+				OTHER_LDFLAGS = /usr/lib/libz.dylib;
+				PREBINDING = YES;
+				PRIVATE_HEADERS_FOLDER_PATH = "";
+				PRODUCT_NAME = "";
+				PUBLIC_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/Headers";
+				REZ_SEARCH_PATHS = (
+					"$(OSSIM_HOME_PATH)/xcode/ossim/Resources",
+					"$(REZ_SEARCH_PATHS)/**",
+				);
+				SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
+				USER_HEADER_SEARCH_PATHS = "$(UNIV_STATICLIB_DEP) /usr/X11R6/lib";
+				WRAPPER_EXTENSION = "";
+			};
+			name = DebugNativeLeopard;
+		};
+		18A9BD030CDA15DF00F4581A /* DebugNativeLeopard */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = "$(inherited)";
+				COPY_PHASE_STRIP = NO;
+				DYLIB_COMPATIBILITY_VERSION = 1;
+				DYLIB_CURRENT_VERSION = 1;
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(UNIV_DEP)/Frameworks",
+					"$(QT4DIR)/lib",
+				);
+				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"/usr/local/Trolltech/Qt-4.1.4/lib\"";
+				FRAMEWORK_SEARCH_PATHS_QUOTED_2 = "\"/usr/local/Trolltech/Qt-4.2.2/lib\"";
+				FRAMEWORK_SEARCH_PATHS_QUOTED_3 = "\"/usr/local/Trolltech/Qt-4.2.2/lib\"";
+				FRAMEWORK_SEARCH_PATHS_QUOTED_4 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
+				FRAMEWORK_SEARCH_PATHS_QUOTED_5 = "\"$(SRCROOT)/../../../ossim_dependencies/qt4.2/Frameworks\"";
+				FRAMEWORK_VERSION = A;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = "";
+				GCC_OPTIMIZATION_LEVEL = s;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = ossimPlanetQt_Prefix.pch;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"$(inherited)",
+					__OSSIM_DARWIN__,
+					__MACOSX__,
+					"_FILE_OFFSET_BITS=64",
+					_LARGE_FILES,
+				);
+				INFOPLIST_FILE = Info.plist;
+				INSTALL_PATH = "@executable_path/../Frameworks";
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(LIBRARY_SEARCH_PATHS_QUOTED_1)",
+					"$(LIBRARY_SEARCH_PATHS_QUOTED_2)",
+				);
+				LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SYSTEM_DEVELOPER_DIR)/qt/lib\"";
+				LIBRARY_SEARCH_PATHS_QUOTED_2 = "\"$(SRCROOT)/../../../ossim_dependencies/lib\"";
+				LIBRARY_STYLE = DYNAMIC;
+				MACH_O_TYPE = mh_dylib;
+				OTHER_CFLAGS = "-Wno-long-double";
+				OTHER_LDFLAGS = (
+					"-framework",
+					QtGui,
+					"-framework",
+					QtCore,
+					"-framework",
+					QtOpenGL,
+					/usr/lib/libz.dylib,
+				);
+				PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = YES;
+				PRODUCT_NAME = ossimPlanetQt;
+				WRAPPER_EXTENSION = framework;
+				ZERO_LINK = NO;
+			};
+			name = DebugNativeLeopard;
+		};
+		18B28C950CD57B08008F45B2 /* ReleaseLeopard */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 186EF5C80B1DB60E00F7886A /* common_settings.xcconfig */;
+			buildSettings = {
+				ARCHS = (
+					i386,
+					ppc,
+				);
+				GCC_MODEL_TUNING = "";
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = (
+					$DEV_HOME_PATH/ossimPlanetQt/include,
+					$DEV_HOME_PATH/ossim/include,
+					$DEV_HOME_PATH/libwms/include,
+					$DEV_HOME_PATH/ossimPlanet/include,
+					$DEV_HOME_PATH/ossimPlanetQt/include,
+					$UNIV_HEADER_DEP,
+				);
+				INSTALL_PATH = "@executable_path/../Frameworks";
+				LIBRARY_SEARCH_PATHS = "$(QT4_PATH)/lib";
+				MACH_O_TYPE = mh_dylib;
+				OTHER_CFLAGS = "-g";
+				OTHER_CPLUSPLUSFLAGS = "-g";
+				OTHER_LDFLAGS = /usr/lib/libz.dylib;
+				PREBINDING = YES;
+				PRIVATE_HEADERS_FOLDER_PATH = "";
+				PRODUCT_NAME = "";
+				PUBLIC_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/Headers";
+				REZ_SEARCH_PATHS = (
+					"$(OSSIM_HOME_PATH)/xcode/ossim/Resources",
+					"$(REZ_SEARCH_PATHS)/**",
+				);
+				SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
+				USER_HEADER_SEARCH_PATHS = "";
+				WRAPPER_EXTENSION = "";
+			};
+			name = ReleaseLeopard;
+		};
+		18B28C960CD57B08008F45B2 /* ReleaseLeopard */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = "$(inherited)";
+				DYLIB_COMPATIBILITY_VERSION = 1;
+				DYLIB_CURRENT_VERSION = 1;
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(UNIV_DEP)/Frameworks",
+					"$(QT4DIR)/lib",
+				);
+				FRAMEWORK_VERSION = A;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+				GCC_MODEL_TUNING = "";
+				GCC_OPTIMIZATION_LEVEL = s;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = ossimPlanetQt_Prefix.pch;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"$(inherited)",
+					__OSSIM_DARWIN__,
+					__MACOSX__,
+					"_FILE_OFFSET_BITS=64",
+					_LARGE_FILES,
+				);
+				HEADER_SEARCH_PATHS = (
+					"$(QT4DIR)/include",
+					"$(DEV_HOME_PATH)/ossimPlanetQt/include",
+					"$(QT4_PATH)/include",
+					"$(DEV_HOME_PATH)/ossim/include",
+					"$(DEV_HOME_PATH)/libwms/include",
+					"$(DEV_HOME_PATH)/ossimPlanet/include",
+					"$(DEV_HOME_PATH)/ossimPlanetQt/include",
+					"$(UNIV_HEADER_DEP)",
+				);
+				INFOPLIST_FILE = Info.plist;
+				INSTALL_PATH = "@executable_path/../Frameworks";
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(LIBRARY_SEARCH_PATHS_QUOTED_1)",
+					"$(LIBRARY_SEARCH_PATHS_QUOTED_1)",
+				);
+				LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/lib\"";
+				LIBRARY_STYLE = DYNAMIC;
+				MACH_O_TYPE = mh_dylib;
+				OTHER_CFLAGS = "-Wno-long-double";
+				OTHER_LDFLAGS = (
+					"-framework",
+					QtGui,
+					"-framework",
+					QtCore,
+					"-framework",
+					QtOpenGL,
+					/usr/lib/libz.dylib,
+				);
+				PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = YES;
+				PRODUCT_NAME = ossimPlanetQt;
+				STRIP_INSTALLED_PRODUCT = YES;
+				WRAPPER_EXTENSION = framework;
+				ZERO_LINK = NO;
+			};
+			name = ReleaseLeopard;
+		};
+		18E4E59D0BE7805D00C8442B /* DebugNative */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = "$(inherited)";
+				COPY_PHASE_STRIP = NO;
+				DYLIB_COMPATIBILITY_VERSION = 1;
+				DYLIB_CURRENT_VERSION = 1;
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(UNIV_DEP)/Frameworks",
+					"$(QT4DIR)/lib",
+				);
+				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"/usr/local/Trolltech/Qt-4.1.4/lib\"";
+				FRAMEWORK_SEARCH_PATHS_QUOTED_2 = "\"/usr/local/Trolltech/Qt-4.2.2/lib\"";
+				FRAMEWORK_SEARCH_PATHS_QUOTED_3 = "\"/usr/local/Trolltech/Qt-4.2.2/lib\"";
+				FRAMEWORK_SEARCH_PATHS_QUOTED_4 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
+				FRAMEWORK_SEARCH_PATHS_QUOTED_5 = "\"$(SRCROOT)/../../../ossim_dependencies/qt4.2/Frameworks\"";
+				FRAMEWORK_VERSION = A;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = "";
+				GCC_OPTIMIZATION_LEVEL = s;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = ossimPlanetQt_Prefix.pch;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"$(inherited)",
+					__OSSIM_DARWIN__,
+					__MACOSX__,
+					"_FILE_OFFSET_BITS=64",
+					_LARGE_FILES,
+				);
+				INFOPLIST_FILE = Info.plist;
+				INSTALL_PATH = "@executable_path/../Frameworks";
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(LIBRARY_SEARCH_PATHS_QUOTED_1)",
+					"$(LIBRARY_SEARCH_PATHS_QUOTED_2)",
+				);
+				LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SYSTEM_DEVELOPER_DIR)/qt/lib\"";
+				LIBRARY_SEARCH_PATHS_QUOTED_2 = "\"$(SRCROOT)/../../../ossim_dependencies/lib\"";
+				LIBRARY_STYLE = DYNAMIC;
+				MACH_O_TYPE = mh_dylib;
+				OTHER_CFLAGS = "-Wno-long-double";
+				OTHER_LDFLAGS = (
+					"-framework",
+					QtGui,
+					"-framework",
+					QtCore,
+					"-framework",
+					QtOpenGL,
+					/usr/lib/libz.dylib,
+				);
+				PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = YES;
+				PRODUCT_NAME = ossimPlanetQt;
+				WRAPPER_EXTENSION = framework;
+				ZERO_LINK = NO;
+			};
+			name = DebugNative;
+		};
+		18E4E59E0BE7805D00C8442B /* DebugNative */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 186EF5C80B1DB60E00F7886A /* common_settings.xcconfig */;
+			buildSettings = {
+				ARCHS = "$(NATIVE_ARCH)";
+				GCC_MODEL_TUNING = "";
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = (
+					$DEV_HOME_PATH/ossimPlanetQt/include,
+					$DEV_HOME_PATH/ossim/include,
+					$DEV_HOME_PATH/libwms/include,
+					$DEV_HOME_PATH/ossimPlanet/include,
+					$DEV_HOME_PATH/ossimPlanetQt/include,
+					$UNIV_HEADER_DEP,
+				);
+				LIBRARY_SEARCH_PATHS = "$(QT4_PATH)/lib";
+				MACH_O_TYPE = mh_dylib;
+				OTHER_CFLAGS = "-g";
+				OTHER_CPLUSPLUSFLAGS = "-g";
+				OTHER_LDFLAGS = /usr/lib/libz.dylib;
+				PREBINDING = YES;
+				PRIVATE_HEADERS_FOLDER_PATH = "";
+				PRODUCT_NAME = "";
+				PUBLIC_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/Headers";
+				REZ_SEARCH_PATHS = (
+					"$(OSSIM_HOME_PATH)/xcode/ossim/Resources",
+					"$(REZ_SEARCH_PATHS)/**",
+				);
+				SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+				USER_HEADER_SEARCH_PATHS = "$(UNIV_STATICLIB_DEP) /usr/X11R6/lib";
+				WRAPPER_EXTENSION = "";
+			};
+			name = DebugNative;
+		};
+		43C8A78B1109FF750095AEE2 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
+				);
+				FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
+				INFOPLIST_FILE = "ossimplanet-Info.plist";
+				INSTALL_PATH = "$(HOME)/Applications";
+				OTHER_LDFLAGS = (
+					"-framework",
+					Foundation,
+					"-framework",
+					AppKit,
+				);
+				PREBINDING = NO;
+				PRODUCT_NAME = ossimplanet;
+			};
+			name = Debug;
+		};
+		43C8A78C1109FF750095AEE2 /* DebugNative */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
+				);
+				FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
+				INFOPLIST_FILE = "ossimplanet-Info.plist";
+				INSTALL_PATH = "$(HOME)/Applications";
+				OTHER_LDFLAGS = (
+					"-framework",
+					Foundation,
+					"-framework",
+					AppKit,
+				);
+				PREBINDING = NO;
+				PRODUCT_NAME = ossimplanet;
+			};
+			name = DebugNative;
+		};
+		43C8A78D1109FF750095AEE2 /* DebugNativeLeopard */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
+				);
+				FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
+				INFOPLIST_FILE = "ossimplanet-Info.plist";
+				INSTALL_PATH = "$(HOME)/Applications";
+				OTHER_LDFLAGS = (
+					"-framework",
+					Foundation,
+					"-framework",
+					AppKit,
+				);
+				PREBINDING = NO;
+				PRODUCT_NAME = ossimplanet;
+			};
+			name = DebugNativeLeopard;
+		};
+		43C8A78E1109FF750095AEE2 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(UNIV_DEP)/Frameworks",
+				);
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = G4;
+				GCC_PRECOMPILE_PREFIX_HEADER = NO;
+				INFOPLIST_FILE = "Resources/ossimPlanetQtApp-Info.plist";
+				INSTALL_PATH = "$(HOME)/Applications";
+				MACH_O_TYPE = mh_execute;
+				OTHER_CFLAGS = "";
+				OTHER_CPLUSPLUSFLAGS = "";
+				OTHER_LDFLAGS = (
+					"$(inherited)",
+					"-framework",
+					OpenGL,
+					"-framework",
+					QtGui,
+					"-framework",
+					QtOpenGL,
+					"-framework",
+					QtCore,
+				);
+				PREBINDING = NO;
+				PRODUCT_NAME = ossimplanet;
+				WRAPPER_EXTENSION = app;
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		43C8A78F1109FF750095AEE2 /* ReleaseLeopard */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
+				);
+				FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
+				INFOPLIST_FILE = "ossimplanet-Info.plist";
+				INSTALL_PATH = "$(HOME)/Applications";
+				OTHER_LDFLAGS = (
+					"-framework",
+					Foundation,
+					"-framework",
+					AppKit,
+				);
+				PREBINDING = NO;
+				PRODUCT_NAME = ossimplanet;
+			};
+			name = ReleaseLeopard;
+		};
+		43D50348110A04BA00FDB366 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				COPY_PHASE_STRIP = NO;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				PRODUCT_NAME = All;
+			};
+			name = Debug;
+		};
+		43D50349110A04BA00FDB366 /* DebugNative */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				PRODUCT_NAME = All;
+			};
+			name = DebugNative;
+		};
+		43D5034A110A04BA00FDB366 /* DebugNativeLeopard */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				PRODUCT_NAME = All;
+			};
+			name = DebugNativeLeopard;
+		};
+		43D5034B110A04BA00FDB366 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				PRODUCT_NAME = All;
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		43D5034C110A04BA00FDB366 /* ReleaseLeopard */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				PRODUCT_NAME = All;
+			};
+			name = ReleaseLeopard;
+		};
+		43D5035B110A053100FDB366 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				COPY_PHASE_STRIP = NO;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				PRODUCT_NAME = Clean;
+			};
+			name = Debug;
+		};
+		43D5035C110A053100FDB366 /* DebugNative */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				PRODUCT_NAME = Clean;
+			};
+			name = DebugNative;
+		};
+		43D5035D110A053100FDB366 /* DebugNativeLeopard */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				PRODUCT_NAME = Clean;
+			};
+			name = DebugNativeLeopard;
+		};
+		43D5035E110A053100FDB366 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				PRODUCT_NAME = Clean;
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		43D5035F110A053100FDB366 /* ReleaseLeopard */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				PRODUCT_NAME = Clean;
+			};
+			name = ReleaseLeopard;
+		};
+		4FADC24308B4156D00ABE55E /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = "$(inherited)";
+				COPY_PHASE_STRIP = NO;
+				DYLIB_COMPATIBILITY_VERSION = 1;
+				DYLIB_CURRENT_VERSION = 1;
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(UNIV_DEP)/Frameworks",
+					"$(QT4DIR)/lib",
+				);
+				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"/usr/local/Trolltech/Qt-4.1.4/lib\"";
+				FRAMEWORK_SEARCH_PATHS_QUOTED_2 = "\"/usr/local/Trolltech/Qt-4.2.2/lib\"";
+				FRAMEWORK_SEARCH_PATHS_QUOTED_3 = "\"/usr/local/Trolltech/Qt-4.2.2/lib\"";
+				FRAMEWORK_SEARCH_PATHS_QUOTED_4 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
+				FRAMEWORK_SEARCH_PATHS_QUOTED_5 = "\"$(SRCROOT)/../../../ossim_dependencies/qt4.2/Frameworks\"";
+				FRAMEWORK_VERSION = A;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = "";
+				GCC_OPTIMIZATION_LEVEL = s;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = ossimPlanetQt_Prefix.pch;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"$(inherited)",
+					__OSSIM_DARWIN__,
+					__MACOSX__,
+					"_FILE_OFFSET_BITS=64",
+					_LARGE_FILES,
+				);
+				INFOPLIST_FILE = Info.plist;
+				INSTALL_PATH = "@executable_path/../Frameworks";
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(LIBRARY_SEARCH_PATHS_QUOTED_1)",
+					"$(LIBRARY_SEARCH_PATHS_QUOTED_2)",
+				);
+				LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SYSTEM_DEVELOPER_DIR)/qt/lib\"";
+				LIBRARY_SEARCH_PATHS_QUOTED_2 = "\"$(SRCROOT)/../../../ossim_dependencies/lib\"";
+				LIBRARY_STYLE = DYNAMIC;
+				MACH_O_TYPE = mh_dylib;
+				OTHER_CFLAGS = "-Wno-long-double";
+				OTHER_LDFLAGS = (
+					"-framework",
+					QtGui,
+					"-framework",
+					QtCore,
+					"-framework",
+					QtOpenGL,
+					/usr/lib/libz.dylib,
+				);
+				PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = YES;
+				PRODUCT_NAME = ossimPlanetQt;
+				WRAPPER_EXTENSION = framework;
+				ZERO_LINK = NO;
+			};
+			name = Debug;
+		};
+		4FADC24408B4156D00ABE55E /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = "$(inherited)";
+				DYLIB_COMPATIBILITY_VERSION = 1;
+				DYLIB_CURRENT_VERSION = 1;
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(UNIV_DEP)/Frameworks",
+					"$(QT4DIR)/lib",
+				);
+				FRAMEWORK_VERSION = A;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+				GCC_MODEL_TUNING = "";
+				GCC_OPTIMIZATION_LEVEL = "$(inherited)";
+				GCC_PRECOMPILE_PREFIX_HEADER = NO;
+				GCC_PREFIX_HEADER = "";
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"$(inherited)",
+					__OSSIM_DARWIN__,
+					__MACOSX__,
+					"_FILE_OFFSET_BITS=64",
+					_LARGE_FILES,
+				);
+				HEADER_SEARCH_PATHS = (
+					"$(QT4DIR)/include",
+					"$(DEV_HOME_PATH)/ossimPlanetQt/include",
+					"$(QT4_PATH)/include",
+					"$(DEV_HOME_PATH)/ossim/include",
+					"$(DEV_HOME_PATH)/libwms/include",
+					"$(DEV_HOME_PATH)/ossimPlanet/include",
+					"$(DEV_HOME_PATH)/ossimPlanetQt/include",
+					"$(UNIV_HEADER_DEP)",
+				);
+				INFOPLIST_FILE = Info.plist;
+				INSTALL_PATH = "@executable_path/../Frameworks";
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(LIBRARY_SEARCH_PATHS_QUOTED_1)",
+					"$(LIBRARY_SEARCH_PATHS_QUOTED_1)",
+				);
+				LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/lib\"";
+				LIBRARY_STYLE = DYNAMIC;
+				MACH_O_TYPE = mh_dylib;
+				OTHER_CFLAGS = "$(inherited)";
+				OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
+				OTHER_LDFLAGS = (
+					"$(inherited)",
+					"-framework",
+					QtGui,
+					"-framework",
+					QtOpenGL,
+					"-framework",
+					QtCore,
+				);
+				PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = YES;
+				PRODUCT_NAME = ossimPlanetQt;
+				SDKROOT = "$(inherited)";
+				STRIP_INSTALLED_PRODUCT = YES;
+				WRAPPER_EXTENSION = framework;
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		4FADC24708B4156D00ABE55E /* Debug */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 186EF5C80B1DB60E00F7886A /* common_settings.xcconfig */;
+			buildSettings = {
+				ARCHS = (
+					i386,
+					ppc,
+				);
+				GCC_MODEL_TUNING = "";
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = (
+					$DEV_HOME_PATH/ossimPlanetQt/include,
+					$DEV_HOME_PATH/ossim/include,
+					$DEV_HOME_PATH/libwms/include,
+					$DEV_HOME_PATH/ossimPlanet/include,
+					$DEV_HOME_PATH/ossimPlanetQt/include,
+					$UNIV_HEADER_DEP,
+				);
+				LIBRARY_SEARCH_PATHS = "$(QT4_PATH)/lib";
+				MACH_O_TYPE = mh_dylib;
+				OTHER_CFLAGS = "-g";
+				OTHER_CPLUSPLUSFLAGS = "-g";
+				OTHER_LDFLAGS = /usr/lib/libz.dylib;
+				PREBINDING = YES;
+				PRIVATE_HEADERS_FOLDER_PATH = "";
+				PRODUCT_NAME = "";
+				PUBLIC_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/Headers";
+				REZ_SEARCH_PATHS = (
+					"$(OSSIM_HOME_PATH)/xcode/ossim/Resources",
+					"$(REZ_SEARCH_PATHS)/**",
+				);
+				SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+				USER_HEADER_SEARCH_PATHS = "$(UNIV_STATICLIB_DEP) /usr/X11R6/lib";
+				WRAPPER_EXTENSION = "";
+			};
+			name = Debug;
+		};
+		4FADC24808B4156D00ABE55E /* Release */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 186EF5C80B1DB60E00F7886A /* common_settings.xcconfig */;
+			buildSettings = {
+				ARCHS = "$(inherited)";
+				DYLIB_COMPATIBILITY_VERSION = "$(OSSIM_VERSION_COMPATIBILITY_NUMBER)";
+				DYLIB_CURRENT_VERSION = "$(OSSIM_VERSION_NUMBER)";
+				GCC_MODEL_TUNING = "$(inherited)";
+				GCC_OPTIMIZATION_LEVEL = 3;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				GENERATE_PKGINFO_FILE = YES;
+				HEADER_SEARCH_PATHS = (
+					$DEV_HOME_PATH/ossimPlanetQt/include,
+					$DEV_HOME_PATH/ossim/include,
+					$DEV_HOME_PATH/libwms/include,
+					$DEV_HOME_PATH/ossimPlanet/include,
+					$DEV_HOME_PATH/ossimPlanetQt/include,
+					$UNIV_HEADER_DEP,
+				);
+				INSTALL_PATH = "@executable_path/../Frameworks";
+				LIBRARY_SEARCH_PATHS = (
+					/Library/Frameworks,
+					/System/Library/Frameworks/,
+				);
+				MACH_O_TYPE = mh_dylib;
+				OTHER_CFLAGS = (
+					"-g",
+					"-pipe",
+					"-D__USE_OSX_AGL_IMPLEMENTATION__",
+					"-DQT_NO_DEBUG",
+					"-DQT_OPENGL_LIB",
+					"-DQT_GUI_LIB",
+					"-DQT_CORE_LIB",
+					"-DQT_SHARED",
+				);
+				OTHER_CPLUSPLUSFLAGS = (
+					"-g",
+					"-pipe",
+					"-D__USE_OSX_AGL_IMPLEMENTATION__",
+					"-DQT_NO_DEBUG",
+					"-DQT_OPENGL_LIB",
+					"-DQT_GUI_LIB",
+					"-DQT_CORE_LIB",
+					"-DQT_SHARED",
+				);
+				OTHER_LDFLAGS = "-headerpad_max_install_names";
+				PREBINDING = NO;
+				PRIVATE_HEADERS_FOLDER_PATH = "";
+				PRODUCT_NAME = "";
+				PUBLIC_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/Headers";
+				REZ_SEARCH_PATHS = (
+					"$(OSSIM_HOME_PATH)/xcode/ossim/Resources",
+					"$(REZ_SEARCH_PATHS)/**",
+				);
+				SDKROOT = "$(inherited)";
+				SKIP_INSTALL = YES;
+				STRIP_INSTALLED_PRODUCT = NO;
+				USER_HEADER_SEARCH_PATHS = "";
+				WRAPPER_EXTENSION = "";
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		43C8A7931109FF760095AEE2 /* Build configuration list for PBXNativeTarget "ossimplanet" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				43C8A78B1109FF750095AEE2 /* Debug */,
+				43C8A78C1109FF750095AEE2 /* DebugNative */,
+				43C8A78D1109FF750095AEE2 /* DebugNativeLeopard */,
+				43C8A78E1109FF750095AEE2 /* Release */,
+				43C8A78F1109FF750095AEE2 /* ReleaseLeopard */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		43D50352110A04D000FDB366 /* Build configuration list for PBXAggregateTarget "All" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				43D50348110A04BA00FDB366 /* Debug */,
+				43D50349110A04BA00FDB366 /* DebugNative */,
+				43D5034A110A04BA00FDB366 /* DebugNativeLeopard */,
+				43D5034B110A04BA00FDB366 /* Release */,
+				43D5034C110A04BA00FDB366 /* ReleaseLeopard */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		43D50362110A056100FDB366 /* Build configuration list for PBXAggregateTarget "Clean" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				43D5035B110A053100FDB366 /* Debug */,
+				43D5035C110A053100FDB366 /* DebugNative */,
+				43D5035D110A053100FDB366 /* DebugNativeLeopard */,
+				43D5035E110A053100FDB366 /* Release */,
+				43D5035F110A053100FDB366 /* ReleaseLeopard */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		4FADC24208B4156D00ABE55E /* Build configuration list for PBXNativeTarget "ossimPlanetQt" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				4FADC24308B4156D00ABE55E /* Debug */,
+				18E4E59D0BE7805D00C8442B /* DebugNative */,
+				18A9BD030CDA15DF00F4581A /* DebugNativeLeopard */,
+				4FADC24408B4156D00ABE55E /* Release */,
+				18B28C960CD57B08008F45B2 /* ReleaseLeopard */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		4FADC24608B4156D00ABE55E /* Build configuration list for PBXProject "ossimPlanetQt" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				4FADC24708B4156D00ABE55E /* Debug */,
+				18E4E59E0BE7805D00C8442B /* DebugNative */,
+				18A9BD020CDA15DF00F4581A /* DebugNativeLeopard */,
+				4FADC24808B4156D00ABE55E /* Release */,
+				18B28C950CD57B08008F45B2 /* ReleaseLeopard */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
+}
diff --git a/ossimPlanetQt/xcode/ossimPlanetQt/ossimPlanetQt_Prefix.pch b/ossimPlanetQt/xcode/ossimPlanetQt/ossimPlanetQt_Prefix.pch
new file mode 100644
index 0000000..9057411
--- /dev/null
+++ b/ossimPlanetQt/xcode/ossimPlanetQt/ossimPlanetQt_Prefix.pch
@@ -0,0 +1,5 @@
+//
+// Prefix header for all source files of the 'ossimPlanetQt' target in the 'ossimPlanetQt' project.
+//
+
+#include <Carbon/Carbon.h>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/ossim-planet-qt.git



More information about the Pkg-grass-devel mailing list