• <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 閱讀(1470) 評論(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,涉及到編碼問題了。
            久久天天躁狠狠躁夜夜不卡| 久久无码高潮喷水| 国产亚洲精久久久久久无码| 久久久久AV综合网成人 | 香蕉久久夜色精品国产尤物| 久久Av无码精品人妻系列 | 亚洲午夜久久久| 亚洲精品国产美女久久久| 久久精品国产亚洲77777| 99久久99久久精品国产| 久久婷婷色综合一区二区| 国产精品久久久久久久久免费| 国产一区二区精品久久岳| 中文字幕精品久久| 精品免费tv久久久久久久| 一本色综合久久| 国产999精品久久久久久| 国产成人久久精品一区二区三区| 香蕉久久一区二区不卡无毒影院| 久久受www免费人成_看片中文| 久久九九全国免费| 中文精品久久久久人妻不卡| 国产精品伊人久久伊人电影| 久久成人小视频| 久久这里只有精品18| 99久久无码一区人妻| 久久亚洲私人国产精品| 性高湖久久久久久久久AAAAA| 999久久久无码国产精品| 伊人精品久久久久7777| AAA级久久久精品无码区| 麻豆成人久久精品二区三区免费| 一本大道久久香蕉成人网| 精品久久综合1区2区3区激情| 99久久er这里只有精品18| 亚洲国产美女精品久久久久∴| 九九精品久久久久久噜噜| 色偷偷88欧美精品久久久| 伊人久久综在合线亚洲2019| 狠狠色丁香婷婷综合久久来| 精品久久久久久中文字幕人妻最新|