• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            eryar

            PipeCAD - Plant Piping Design Software.
            RvmTranslator - Translate AVEVA RVM to OBJ, glTF, etc.
            posts - 603, comments - 590, trackbacks - 0, articles - 0

            Modify Branding of FreeCAD

            Posted on 2016-05-09 22:18 eryar 閱讀(1463) 評論(2)  編輯 收藏 引用

            Modify Branding of FreeCAD

            eryar@163.com

            This article describes the Branding of FreeCAD. Branding means to start your own application based on FreeCAD. That can be only your own executable or splash screen till a complete reworked program. Based on the flexible architecture of FreeCAD it’s easy to use it as base for your own special purpose program.

            本文主要描述如何修改FreeCAD的Branding,從而使自己能基于FreeCAD靈活的架構快速開發出自己的應用程序。通過修改FreeCAD的Branding甚至啟動畫面,從而使程序看上去更像是自己開發的。

            Branding信息主要在文件MainCmd.cpp和MainGrui.cpp中,這兩個工程生成了FreeCAD可執行文件。

            wps_clip_image-13903

            可以通過修改相關字符串,可以給可執行程序一個自己的名字,或者版本信息等的自定義,還有啟動畫面的自定義。

             

            int main( int argc, char ** argv )
             {
               
            // Name and Version of the Application
               App::Application::Config()["ExeName"= "FooApp";
               App::Application::Config()[
            "ExeVersion"= "0.7";
             
               
            // set the banner (for loging and console)
               App::Application::Config()["CopyrightInfo"= sBanner;
               App::Application::Config()[
            "AppIcon"= "FooAppIcon";
               App::Application::Config()[
            "SplashScreen"= "FooAppSplasher";
               App::Application::Config()[
            "StartWorkbench"= "Part design";
               App::Application::Config()[
            "HiddenDockWindow"= "Property editor";
               App::Application::Config()[
            "SplashAlignment" ] = "Bottom|Left";
               App::Application::Config()[
            "SplashTextColor" ] = "#000000"// black
             
               
            // Inits the Application 
               App::Application::Config()["RunMode"= "Gui";
               App::Application::init(argc,argv);
             
               Gui::BitmapFactory().addXPM(
            "FooAppSplasher", ( const char** ) splash_screen);
             
               Gui::Application::initApplication();
               Gui::Application::runApplication();
               App::Application::destruct();
             
               
            return 0;
             }

            圖片數據通過使用Qt的資源系統來編譯到FreeCAD中去的。所以你需要寫一個.qrc文件,將資源加到這個類似XML的qrc文件中。在程序中使用資源,需要在main()中添加下面一行:

            Q_INIT_RESOURCE(FooApp); 

            如果你有XPM格式的圖片,則可以直接使用:

            Gui::BitmapFactory().addXPM("FooAppSplasher", ( const char** ) splash_screen); 

            改后效果如下圖所示:

            wps_clip_image-1054

            Feedback

            # re: Modify Branding of FreeCAD  回復  更多評論   

            2016-08-05 13:46 by 啦啦啦
            請教一下, App::Application::Config()["ExeName"] = "FreeCAD中文名";中文字符,會亂碼,這個要怎么解決了?

            # re: Modify Branding of FreeCAD  回復  更多評論   

            2016-08-05 19:18 by eryar
            @啦啦啦
            static std::map<std::string,std::string> &Config(void){return mConfig;}
            這個用的是std::string,涉及到編碼問題了。
            99久久免费国产精品特黄| 97久久国产亚洲精品超碰热 | 国内精品久久国产| 精品一二三区久久aaa片| 久久超碰97人人做人人爱| 精品久久久久久久久久久久久久久| 久久久国产一区二区三区| 亚洲国产精品无码久久久蜜芽| 久久国产高清字幕中文| 亚洲国产精品综合久久一线| 国产综合久久久久| 中文精品99久久国产 | 中文字幕久久精品无码| 中文字幕成人精品久久不卡| 久久久SS麻豆欧美国产日韩| 国产—久久香蕉国产线看观看 | 无码日韩人妻精品久久蜜桃| 四虎国产精品免费久久5151| 一本色道久久综合亚洲精品| 日韩精品无码久久一区二区三| 国产精品一区二区久久| 久久99热这里只有精品国产| 日韩美女18网站久久精品| 欧美亚洲国产精品久久蜜芽| 国产人久久人人人人爽| 亚洲国产另类久久久精品| 2019久久久高清456| 久久久久九九精品影院| 国产福利电影一区二区三区久久老子无码午夜伦不 | 91精品国产91久久久久福利| 亚洲中文久久精品无码ww16 | 欧美黑人激情性久久| 久久AⅤ人妻少妇嫩草影院| 四虎国产精品免费久久5151| 国产欧美一区二区久久| 99久久er这里只有精品18| 久久影院综合精品| 日本欧美久久久久免费播放网| 日产精品99久久久久久| 高清免费久久午夜精品| 国产精品久久自在自线观看|