Cloud: Apply clang format
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -27,73 +27,100 @@
|
||||
#include <Base/Reader.h>
|
||||
#include <Base/Writer.h>
|
||||
|
||||
#include <xercesc/dom/DOM.hpp>
|
||||
#include <xercesc/framework/MemBufInputSource.hpp>
|
||||
#include <xercesc/framework/XMLPScanToken.hpp>
|
||||
#include <xercesc/parsers/XercesDOMParser.hpp>
|
||||
#include <xercesc/dom/DOM.hpp>
|
||||
#include <xercesc/sax/HandlerBase.hpp>
|
||||
#include <xercesc/sax2/Attributes.hpp>
|
||||
#include <xercesc/sax2/DefaultHandler.hpp>
|
||||
|
||||
|
||||
XERCES_CPP_NAMESPACE_BEGIN
|
||||
class DOMNode;
|
||||
class DOMText;
|
||||
class DOMNode;
|
||||
class DOMText;
|
||||
XERCES_CPP_NAMESPACE_END
|
||||
|
||||
namespace Cloud {
|
||||
namespace Cloud
|
||||
{
|
||||
|
||||
struct AmzData {
|
||||
std::string digest;
|
||||
char dateFormatted[256];
|
||||
char ContentType[256];
|
||||
char Host[256];
|
||||
char *MD5;
|
||||
struct AmzData
|
||||
{
|
||||
std::string digest;
|
||||
char dateFormatted[256];
|
||||
char ContentType[256];
|
||||
char Host[256];
|
||||
char* MD5;
|
||||
};
|
||||
|
||||
struct AmzDatav4 {
|
||||
std::string digest;
|
||||
char dateFormattedS[256];
|
||||
char dateFormattedD[256];
|
||||
char ContentType[256];
|
||||
char Host[256];
|
||||
std::string Region;
|
||||
char *MD5;
|
||||
char *SHA256Sum;
|
||||
struct AmzDatav4
|
||||
{
|
||||
std::string digest;
|
||||
char dateFormattedS[256];
|
||||
char dateFormattedD[256];
|
||||
char ContentType[256];
|
||||
char Host[256];
|
||||
std::string Region;
|
||||
char* MD5;
|
||||
char* SHA256Sum;
|
||||
};
|
||||
|
||||
std::string getHexValue(unsigned char *input, unsigned int HMACLength);
|
||||
void eraseSubStr(std::string & Str, const std::string & toErase);
|
||||
size_t CurlWrite_CallbackFunc_StdString(void *contents, size_t size, size_t nmemb, std::string *s);
|
||||
struct AmzData *ComputeDigestAmzS3v2(char *operation, char *data_type, const char *target, const char *Secret, const char *ptr, long size);
|
||||
struct AmzDatav4 *ComputeDigestAmzS3v4(char *operation, const char *server, char *data_type, const char *target, const char *Secret, const char *ptr, long size, char *parameters, std::string Region);
|
||||
struct curl_slist *BuildHeaderAmzS3v2(const char *URL, const char *TCPPort, const char *PublicKey, struct AmzData *Data);
|
||||
struct curl_slist *BuildHeaderAmzS3v4(const char *URL, const char *PublicKey, struct AmzDatav4 *Data);
|
||||
char *MD5Sum(const char *ptr, long size);
|
||||
char *SHA256Sum(const char *ptr, long size);
|
||||
std::string getHexValue(unsigned char* input, unsigned int HMACLength);
|
||||
void eraseSubStr(std::string& Str, const std::string& toErase);
|
||||
size_t CurlWrite_CallbackFunc_StdString(void* contents, size_t size, size_t nmemb, std::string* s);
|
||||
struct AmzData* ComputeDigestAmzS3v2(char* operation,
|
||||
char* data_type,
|
||||
const char* target,
|
||||
const char* Secret,
|
||||
const char* ptr,
|
||||
long size);
|
||||
struct AmzDatav4* ComputeDigestAmzS3v4(char* operation,
|
||||
const char* server,
|
||||
char* data_type,
|
||||
const char* target,
|
||||
const char* Secret,
|
||||
const char* ptr,
|
||||
long size,
|
||||
char* parameters,
|
||||
std::string Region);
|
||||
struct curl_slist* BuildHeaderAmzS3v2(const char* URL,
|
||||
const char* TCPPort,
|
||||
const char* PublicKey,
|
||||
struct AmzData* Data);
|
||||
struct curl_slist*
|
||||
BuildHeaderAmzS3v4(const char* URL, const char* PublicKey, struct AmzDatav4* Data);
|
||||
char* MD5Sum(const char* ptr, long size);
|
||||
char* SHA256Sum(const char* ptr, long size);
|
||||
|
||||
class CloudAppExport CloudReader
|
||||
{
|
||||
public:
|
||||
CloudReader(const char* URL, const char* AccessKey, const char* SecretKey, const char* TCPPort, const char* Bucket,std::string ProtocolVersion, std::string Region);
|
||||
CloudReader(const char* URL,
|
||||
const char* AccessKey,
|
||||
const char* SecretKey,
|
||||
const char* TCPPort,
|
||||
const char* Bucket,
|
||||
std::string ProtocolVersion,
|
||||
std::string Region);
|
||||
virtual ~CloudReader();
|
||||
int file=0;
|
||||
int continuation=0;
|
||||
int truncated=0;
|
||||
int file = 0;
|
||||
int continuation = 0;
|
||||
int truncated = 0;
|
||||
|
||||
struct FileEntry
|
||||
{
|
||||
char FileName[1024];
|
||||
std::stringstream FileStream;
|
||||
int touch=0;
|
||||
int touch = 0;
|
||||
};
|
||||
void checkText(XERCES_CPP_NAMESPACE_QUALIFIER DOMText* text);
|
||||
void checkXML(XERCES_CPP_NAMESPACE_QUALIFIER DOMNode* node);
|
||||
void checkElement(XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* element);
|
||||
void addFile(struct Cloud::CloudReader::FileEntry *new_entry);
|
||||
struct FileEntry *GetEntry(std::string FileName);
|
||||
void DownloadFile(Cloud::CloudReader::FileEntry *entry);
|
||||
void addFile(struct Cloud::CloudReader::FileEntry* new_entry);
|
||||
struct FileEntry* GetEntry(std::string FileName);
|
||||
void DownloadFile(Cloud::CloudReader::FileEntry* entry);
|
||||
int isTouched(std::string FileName);
|
||||
|
||||
protected:
|
||||
std::list<Cloud::CloudReader::FileEntry*> FileList;
|
||||
char* NextFileName;
|
||||
@@ -106,46 +133,47 @@ protected:
|
||||
std::string Region;
|
||||
};
|
||||
|
||||
class Module : public Py::ExtensionModule<Module>
|
||||
class Module: public Py::ExtensionModule<Module>
|
||||
{
|
||||
public:
|
||||
Module() : Py::ExtensionModule<Module>("Cloud")
|
||||
Module()
|
||||
: Py::ExtensionModule<Module>("Cloud")
|
||||
{
|
||||
add_varargs_method("URL",&Module::sCloudURL,
|
||||
"URL(string) -- Connect to a Cloud Storage service."
|
||||
);
|
||||
add_varargs_method("URL",
|
||||
&Module::sCloudURL,
|
||||
"URL(string) -- Connect to a Cloud Storage service.");
|
||||
|
||||
add_varargs_method("TokenAuth",&Module::sCloudTokenAuth,
|
||||
"TokenAuth(string) -- Token Authorization string."
|
||||
);
|
||||
add_varargs_method("TokenAuth",
|
||||
&Module::sCloudTokenAuth,
|
||||
"TokenAuth(string) -- Token Authorization string.");
|
||||
|
||||
add_varargs_method("TokenSecret",&Module::sCloudTokenSecret,
|
||||
"TokenSecret(string) -- Token Secret string."
|
||||
);
|
||||
|
||||
add_varargs_method("TCPPort",&Module::sCloudTCPPort,
|
||||
"TCPPort(string) -- Port number."
|
||||
);
|
||||
add_varargs_method("TokenSecret",
|
||||
&Module::sCloudTokenSecret,
|
||||
"TokenSecret(string) -- Token Secret string.");
|
||||
|
||||
add_varargs_method("Save",&Module::sCloudSave,
|
||||
"Save(string) -- Save the active document to the Cloud."
|
||||
);
|
||||
add_varargs_method("TCPPort", &Module::sCloudTCPPort, "TCPPort(string) -- Port number.");
|
||||
|
||||
add_varargs_method("Restore",&Module::sCloudRestore,
|
||||
"Restore(string) -- Restore to the active document from the Cloud."
|
||||
);
|
||||
add_varargs_method("Save",
|
||||
&Module::sCloudSave,
|
||||
"Save(string) -- Save the active document to the Cloud.");
|
||||
|
||||
add_varargs_method("ProtocolVersion",&Module::sCloudProtocolVersion,
|
||||
"ProtocolVersion(string) -- Specify Amazon s3 protocol version (2 or 4)"
|
||||
);
|
||||
add_varargs_method("Region",&Module::sCloudRegion,
|
||||
"Region(string) -- Specify Amazon s3 Region"
|
||||
);
|
||||
add_varargs_method("Restore",
|
||||
&Module::sCloudRestore,
|
||||
"Restore(string) -- Restore to the active document from the Cloud.");
|
||||
|
||||
initialize("This module is the Cloud module."); // register with Python
|
||||
add_varargs_method(
|
||||
"ProtocolVersion",
|
||||
&Module::sCloudProtocolVersion,
|
||||
"ProtocolVersion(string) -- Specify Amazon s3 protocol version (2 or 4)");
|
||||
add_varargs_method("Region",
|
||||
&Module::sCloudRegion,
|
||||
"Region(string) -- Specify Amazon s3 Region");
|
||||
|
||||
initialize("This module is the Cloud module.");// register with Python
|
||||
}
|
||||
|
||||
virtual ~Module() {}
|
||||
virtual ~Module()
|
||||
{}
|
||||
|
||||
App::PropertyString URL;
|
||||
App::PropertyString TCPPort;
|
||||
@@ -158,16 +186,14 @@ public:
|
||||
void LinkXSetValue(std::string filename);
|
||||
|
||||
private:
|
||||
Py::Object sCloudURL (const Py::Tuple& args);
|
||||
Py::Object sCloudTokenAuth (const Py::Tuple& args);
|
||||
Py::Object sCloudTokenSecret (const Py::Tuple& args);
|
||||
Py::Object sCloudTCPPort (const Py::Tuple& args);
|
||||
Py::Object sCloudSave (const Py::Tuple& args);
|
||||
Py::Object sCloudRestore (const Py::Tuple& args);
|
||||
Py::Object sCloudProtocolVersion (const Py::Tuple& args);
|
||||
Py::Object sCloudRegion (const Py::Tuple& args);
|
||||
|
||||
|
||||
Py::Object sCloudURL(const Py::Tuple& args);
|
||||
Py::Object sCloudTokenAuth(const Py::Tuple& args);
|
||||
Py::Object sCloudTokenSecret(const Py::Tuple& args);
|
||||
Py::Object sCloudTCPPort(const Py::Tuple& args);
|
||||
Py::Object sCloudSave(const Py::Tuple& args);
|
||||
Py::Object sCloudRestore(const Py::Tuple& args);
|
||||
Py::Object sCloudProtocolVersion(const Py::Tuple& args);
|
||||
Py::Object sCloudRegion(const Py::Tuple& args);
|
||||
};
|
||||
|
||||
PyObject* initModule()
|
||||
@@ -178,20 +204,29 @@ PyObject* initModule()
|
||||
|
||||
// This class is writing files to an S3 cloud storage class
|
||||
|
||||
class CloudAppExport CloudWriter : public Base::Writer
|
||||
class CloudAppExport CloudWriter: public Base::Writer
|
||||
{
|
||||
public:
|
||||
int print=0;
|
||||
char errorCode[1024]="";
|
||||
CloudWriter(const char* URL, const char* TokenAuth, const char* TokenSecret, const char* TCPPort, const char* Bucket, std::string ProtocolVersion, std::string Region);
|
||||
int print = 0;
|
||||
char errorCode[1024] = "";
|
||||
CloudWriter(const char* URL,
|
||||
const char* TokenAuth,
|
||||
const char* TokenSecret,
|
||||
const char* TCPPort,
|
||||
const char* Bucket,
|
||||
std::string ProtocolVersion,
|
||||
std::string Region);
|
||||
virtual ~CloudWriter();
|
||||
void pushCloud(const char *FileName, const char *data, long size);
|
||||
void pushCloud(const char* FileName, const char* data, long size);
|
||||
void putNextEntry(const char* file);
|
||||
void createBucket();
|
||||
virtual void writeFiles(void);
|
||||
|
||||
virtual std::ostream &Stream(void){return FileStream;}
|
||||
virtual bool shouldWrite(const std::string& name, const Base::Persistence *Object) const;
|
||||
virtual std::ostream& Stream(void)
|
||||
{
|
||||
return FileStream;
|
||||
}
|
||||
virtual bool shouldWrite(const std::string& name, const Base::Persistence* Object) const;
|
||||
void checkText(XERCES_CPP_NAMESPACE_QUALIFIER DOMText* text);
|
||||
void checkXML(XERCES_CPP_NAMESPACE_QUALIFIER DOMNode* node);
|
||||
void checkElement(XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* element);
|
||||
@@ -209,6 +244,6 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}// namespace Cloud
|
||||
|
||||
void readFiles(Cloud::CloudReader reader, Base::XMLReader *xmlreader);
|
||||
void readFiles(Cloud::CloudReader reader, Base::XMLReader* xmlreader);
|
||||
|
||||
@@ -21,4 +21,4 @@
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#include "PreCompiled.h"
|
||||
|
||||
@@ -28,16 +28,16 @@
|
||||
|
||||
// Exporting of App classes
|
||||
#ifdef FC_OS_WIN32
|
||||
# define CloudAppExport __declspec(dllexport)
|
||||
#else // for Linux
|
||||
# define CloudAppExport
|
||||
#define CloudAppExport __declspec(dllexport)
|
||||
#else// for Linux
|
||||
#define CloudAppExport
|
||||
#endif
|
||||
|
||||
#ifdef _PreComp_
|
||||
|
||||
// standard
|
||||
#include <cstdio>
|
||||
#include <cassert>
|
||||
#include <cstdio>
|
||||
#include <iostream>
|
||||
|
||||
// STL
|
||||
@@ -55,7 +55,6 @@
|
||||
// Xerces
|
||||
#include <xercesc/util/XercesDefs.hpp>
|
||||
|
||||
#endif //_PreComp_
|
||||
#endif//_PreComp_
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ if (APPLE)
|
||||
set (OPENSSL_LIBRARIES ${OPENSSL_LINK_LIBRARIES})
|
||||
elseif(WIN32 AND LIBPACK_FOUND)
|
||||
SET( OPENSSL_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include)
|
||||
SET( OPENSSL_LIBRARIES
|
||||
SET( OPENSSL_LIBRARIES
|
||||
optimized ${FREECAD_LIBPACK_DIR}/lib/openssl.lib debug ${FREECAD_LIBPACK_DIR}/lib/openssld.lib
|
||||
optimized ${FREECAD_LIBPACK_DIR}/lib/libssl.lib debug ${FREECAD_LIBPACK_DIR}/lib/libssld.lib
|
||||
optimized ${FREECAD_LIBPACK_DIR}/lib/libcrypto.lib debug ${FREECAD_LIBPACK_DIR}/lib/libcryptod.lib)
|
||||
@@ -20,15 +20,15 @@ elseif(WIN32 AND LIBPACK_FOUND)
|
||||
SET( OPENSSL_FOUND False)
|
||||
message( FATAL_ERROR "openssl not found!" )
|
||||
endif(EXISTS ${FREECAD_LIBPACK_DIR}/lib/openssl.lib)
|
||||
|
||||
if(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h")
|
||||
|
||||
if(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h")
|
||||
file(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" openssl_version_str
|
||||
REGEX "OPENSSL_VERSION_STR")
|
||||
string(REGEX MATCH "\".*"
|
||||
openssl_version_str ${openssl_version_str})
|
||||
string(REPLACE "\"" "" openssl_version_str ${openssl_version_str})
|
||||
set(OPENSSL_VERSION ${openssl_version_str})
|
||||
endif ()
|
||||
endif ()
|
||||
else()
|
||||
find_package(OpenSSL REQUIRED)
|
||||
endif(APPLE)
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
/** \defgroup TEMPLATE Cloud
|
||||
* \ingroup WORKBENCHES */
|
||||
|
||||
|
||||
@@ -34,16 +34,19 @@
|
||||
void CreateCloudCommands(void);
|
||||
|
||||
|
||||
namespace CloudGui {
|
||||
class Module : public Py::ExtensionModule<Module>
|
||||
namespace CloudGui
|
||||
{
|
||||
class Module: public Py::ExtensionModule<Module>
|
||||
{
|
||||
public:
|
||||
Module() : Py::ExtensionModule<Module>("CloudGui")
|
||||
Module()
|
||||
: Py::ExtensionModule<Module>("CloudGui")
|
||||
{
|
||||
initialize("This module is the CloudGui module."); // register with Python
|
||||
initialize("This module is the CloudGui module.");// register with Python
|
||||
}
|
||||
|
||||
virtual ~Module() {}
|
||||
virtual ~Module()
|
||||
{}
|
||||
|
||||
private:
|
||||
};
|
||||
@@ -53,7 +56,7 @@ PyObject* initModule()
|
||||
return Base::Interpreter().addModule(new Module);
|
||||
}
|
||||
|
||||
} // namespace CloudGui
|
||||
}// namespace CloudGui
|
||||
|
||||
|
||||
/* Python entry */
|
||||
|
||||
@@ -36,6 +36,6 @@ fc_copy_sources(CloudGui "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Cloud
|
||||
|
||||
SET_BIN_DIR(CloudGui CloudGui /Mod/Cloud)
|
||||
SET_PYTHON_PREFIX_SUFFIX(CloudGui)
|
||||
|
||||
|
||||
install(TARGETS CloudGui DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
INSTALL(FILES ${Cloud_SVG} DESTINATION "${CMAKE_INSTALL_DATADIR}/Mod/Cloud/Resources/icons")
|
||||
|
||||
@@ -35,16 +35,16 @@
|
||||
DEF_STD_CMD(CmdCloudTest)
|
||||
|
||||
CmdCloudTest::CmdCloudTest()
|
||||
:Command("Cloud_Test")
|
||||
: Command("Cloud_Test")
|
||||
{
|
||||
sAppModule = "Cloud";
|
||||
sGroup = QT_TR_NOOP("Cloud");
|
||||
sMenuText = QT_TR_NOOP("Hello");
|
||||
sToolTipText = QT_TR_NOOP("Cloud Test function");
|
||||
sWhatsThis = "Cloud_Test";
|
||||
sStatusTip = QT_TR_NOOP("Cloud Test function");
|
||||
sPixmap = "Test1";
|
||||
sAccel = "CTRL+H";
|
||||
sAppModule = "Cloud";
|
||||
sGroup = QT_TR_NOOP("Cloud");
|
||||
sMenuText = QT_TR_NOOP("Hello");
|
||||
sToolTipText = QT_TR_NOOP("Cloud Test function");
|
||||
sWhatsThis = "Cloud_Test";
|
||||
sStatusTip = QT_TR_NOOP("Cloud Test function");
|
||||
sPixmap = "Test1";
|
||||
sAccel = "CTRL+H";
|
||||
}
|
||||
|
||||
void CmdCloudTest::activated(int)
|
||||
@@ -54,6 +54,6 @@ void CmdCloudTest::activated(int)
|
||||
|
||||
void CreateCloudCommands(void)
|
||||
{
|
||||
Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager();
|
||||
Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager();
|
||||
rcCmdMgr.addCommand(new CmdCloudTest());
|
||||
}
|
||||
|
||||
@@ -21,4 +21,4 @@
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#include "PreCompiled.h"
|
||||
|
||||
@@ -28,18 +28,18 @@
|
||||
|
||||
// Importing of App classes
|
||||
#ifdef FC_OS_WIN32
|
||||
# define CloudAppExport __declspec(dllimport)
|
||||
# define CloudGuiExport __declspec(dllexport)
|
||||
#else // for Linux
|
||||
# define CloudAppExport
|
||||
# define CloudGuiExport
|
||||
#define CloudAppExport __declspec(dllimport)
|
||||
#define CloudGuiExport __declspec(dllexport)
|
||||
#else// for Linux
|
||||
#define CloudAppExport
|
||||
#define CloudGuiExport
|
||||
#endif
|
||||
|
||||
#ifdef _PreComp_
|
||||
|
||||
// standard
|
||||
#include <cstdio>
|
||||
#include <cassert>
|
||||
#include <cstdio>
|
||||
|
||||
// STL
|
||||
#include <algorithm>
|
||||
@@ -54,14 +54,14 @@
|
||||
#include <vector>
|
||||
|
||||
#ifdef FC_OS_WIN32
|
||||
# include <windows.h>
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
// Qt Toolkit
|
||||
#ifndef __QtAll__
|
||||
# include <Gui/QtAll.h>
|
||||
#include <Gui/QtAll.h>
|
||||
#endif
|
||||
|
||||
#endif //_PreComp_
|
||||
#endif//_PreComp_
|
||||
|
||||
#endif // GUI_PRECOMPILED_H
|
||||
#endif// GUI_PRECOMPILED_H
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource>
|
||||
<qresource>
|
||||
</qresource>
|
||||
</RCC>
|
||||
</RCC>
|
||||
|
||||
@@ -33,12 +33,10 @@ using namespace CloudGui;
|
||||
TYPESYSTEM_SOURCE(CloudGui::Workbench, Gui::StdWorkbench)
|
||||
|
||||
Workbench::Workbench()
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
Workbench::~Workbench()
|
||||
{
|
||||
}
|
||||
{}
|
||||
/*
|
||||
Gui::MenuItem* Workbench::setupMenuBar() const
|
||||
{
|
||||
@@ -56,7 +54,7 @@ Gui::ToolBarItem* Workbench::setupToolBars() const
|
||||
Gui::ToolBarItem* root = StdWorkbench::setupToolBars();
|
||||
Gui::ToolBarItem* test = new Gui::ToolBarItem(root);
|
||||
test->setCommand( "Cloud Tools" );
|
||||
*test << "Cloud_Test";
|
||||
*test << "Cloud_Test";
|
||||
return root;
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -26,9 +26,10 @@
|
||||
|
||||
#include <Gui/Workbench.h>
|
||||
|
||||
namespace CloudGui {
|
||||
namespace CloudGui
|
||||
{
|
||||
|
||||
class Workbench : public Gui::StdWorkbench
|
||||
class Workbench: public Gui::StdWorkbench
|
||||
{
|
||||
TYPESYSTEM_HEADER();
|
||||
|
||||
@@ -37,11 +38,11 @@ public:
|
||||
virtual ~Workbench();
|
||||
|
||||
protected:
|
||||
// Gui::MenuItem* setupMenuBar() const;
|
||||
// Gui::ToolBarItem* setupToolBars() const;
|
||||
// Gui::MenuItem* setupMenuBar() const;
|
||||
// Gui::ToolBarItem* setupToolBars() const;
|
||||
};
|
||||
|
||||
} // namespace CloudGui
|
||||
}// namespace CloudGui
|
||||
|
||||
|
||||
#endif // Cloud_WORKBENCH_H
|
||||
#endif// Cloud_WORKBENCH_H
|
||||
|
||||
@@ -2,17 +2,24 @@
|
||||
# (c) 2001 Juergen Riegel LGPL
|
||||
# (c) 2019 Jean-Marie Verdun LGPL
|
||||
|
||||
class CloudWorkbench ( Workbench ):
|
||||
"Cloud workbench object"
|
||||
def __init__(self):
|
||||
self.__class__.Icon = FreeCAD.getResourceDir() + "Mod/Cloud/Resources/icons/CloudWorkbench.svg"
|
||||
|
||||
MenuText = "Cloud"
|
||||
ToolTip = "Cloud workbench"
|
||||
def Initialize(self):
|
||||
# load the module
|
||||
import CloudGui
|
||||
def GetClassName(self):
|
||||
return "CloudGui::Workbench"
|
||||
class CloudWorkbench(Workbench):
|
||||
"Cloud workbench object"
|
||||
|
||||
def __init__(self):
|
||||
self.__class__.Icon = (
|
||||
FreeCAD.getResourceDir() + "Mod/Cloud/Resources/icons/CloudWorkbench.svg"
|
||||
)
|
||||
|
||||
MenuText = "Cloud"
|
||||
ToolTip = "Cloud workbench"
|
||||
|
||||
def Initialize(self):
|
||||
# load the module
|
||||
import CloudGui
|
||||
|
||||
def GetClassName(self):
|
||||
return "CloudGui::Workbench"
|
||||
|
||||
|
||||
Gui.addWorkbench(CloudWorkbench())
|
||||
|
||||
Reference in New Issue
Block a user