llfloaterimport.h

Go to the documentation of this file.
00001 
00032 // llfloaterimport.h
00033 //              
00034 // copyright 2005, linden research inc
00035 
00036 #ifndef LL_LLFLOATERIMPORT_H
00037 #define LL_LLFLOATERIMPORT_H
00038 
00039 #include "lldynamictexture.h"
00040 #include "llfloater.h"
00041 #include "llresizehandle.h"
00042 #include "llscrolllistctrl.h"
00043 #include "lluploaddialog.h"
00044 #include "llxmlnode.h"
00045 #include "llquaternion.h"
00046 
00047 class LLComboBox;
00048 class LLJoint;
00049 class LLViewerJointMesh;
00050 class LLVOAvatar;
00051 class LLTextBox;
00052 
00053 struct ImportAssetInfo
00054 {
00055         LLString Name;
00056         LLString Desc;
00057         LLString FilenameAndPath;
00058         LLString SourcePath;
00059         std::vector<LLString> ImageFileQueue;
00060         std::vector<LLString> OldImageIDList;
00061         std::vector<LLString> NewImageIDList;
00062 };
00063 
00064 class LLFloaterImport : public LLFloater
00065 {
00066 public:
00067         LLFloaterImport(const std::string filename);
00068         virtual ~LLFloaterImport();
00069 
00070         virtual BOOL postBuild();
00071         
00072         static void setOKText(const char* text) { sOKText = text; }
00073 
00074         void recalcCost();
00075 
00076         static LLUUID sImportRequestID;
00077 
00078 protected:
00079         LLXMLNodePtr            mObjectFile;
00080 
00081         LLScrollListCtrl*       mImportList;
00082         LLLineEditor*           mNameEditor;
00083         LLLineEditor*           mDescEditor;
00084         LLButton*                       mOKBtn;
00085         LLButton*                       mCancelBtn;
00086         LLTextBox*                      mImageLabel;
00087 
00088         LLString                        mFilenameAndPath;
00089         LLString                        mFilename;
00090         LLString                        mFilePath;
00091         LLString                        mInventoryPath;
00092 
00093         typedef std::map<LLUUID, LLPointer<LLImageRaw> > image_map_t;
00094         image_map_t                     mPreviewImages;
00095         LLPointer<LLImageRaw> mCurrentPreviewImage;
00096         GLuint                          mGLName;
00097 
00098         LLUploadDialog*         mImportDialog;
00099 
00100 protected:
00101         static LLString sOKText;
00102 
00103         static void             onBtnOK(void*);
00104         static void             onBtnCancel(void*);
00105 
00106         static void asset_uploaded_callback(const LLUUID& uuid, void* user_data, S32 result, LLExtStat ext_status);
00107         static void finishImport(ImportAssetInfo *fp);
00108 
00109         void draw();
00110         void LoadPreviewImage(LLString image_path, LLUUID image_uuid);
00111         BOOL handleMouseDown(S32 x, S32 y, MASK mask);
00112 };
00113 
00114 #endif  // LL_LLFLOATERIMPORT_H

Generated on Thu Jul 1 06:08:34 2010 for Second Life Viewer by  doxygen 1.4.7