• <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 閱讀(1479) 評(píng)論(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靈活的架構(gòu)快速開(kāi)發(fā)出自己的應(yīng)用程序。通過(guò)修改FreeCAD的Branding甚至啟動(dòng)畫面,從而使程序看上去更像是自己開(kāi)發(fā)的。

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

            wps_clip_image-13903

            可以通過(guò)修改相關(guān)字符串,可以給可執(zhí)行程序一個(gè)自己的名字,或者版本信息等的自定義,還有啟動(dòng)畫面的自定義。

             

            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;
             }

            圖片數(shù)據(jù)通過(guò)使用Qt的資源系統(tǒng)來(lái)編譯到FreeCAD中去的。所以你需要寫一個(gè).qrc文件,將資源加到這個(gè)類似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  回復(fù)  更多評(píng)論   

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

            # re: Modify Branding of FreeCAD  回復(fù)  更多評(píng)論   

            2016-08-05 19:18 by eryar
            @啦啦啦
            static std::map<std::string,std::string> &Config(void){return mConfig;}
            這個(gè)用的是std::string,涉及到編碼問(wèn)題了。

            只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問(wèn)   Chat2DB   管理


            国产成人精品免费久久久久| 亚洲国产成人精品无码久久久久久综合| 区久久AAA片69亚洲| 日韩精品无码久久久久久| 99久久无码一区人妻a黑| 国产一区二区精品久久岳| 国内精品九九久久精品| 7国产欧美日韩综合天堂中文久久久久 | 久久精品国产亚洲一区二区| 午夜精品久久久久久影视777| 亚洲愉拍99热成人精品热久久| 97久久综合精品久久久综合| 热99RE久久精品这里都是精品免费| 亚洲天堂久久精品| 久久国产乱子伦免费精品| 要久久爱在线免费观看| 亚洲国产精品久久久久婷婷老年| 亚洲AV日韩精品久久久久久 | 日产精品久久久久久久| 偷偷做久久久久网站| 91精品婷婷国产综合久久| 久久天堂AV综合合色蜜桃网| 精品国产日韩久久亚洲| 久久午夜福利电影| 久久精品国产一区二区 | 亚洲精品久久久www| 久久精品亚洲精品国产欧美| 青青青国产精品国产精品久久久久| 亚洲精品高清国产一线久久| 2021久久精品免费观看| 久久久久人妻一区二区三区| 欧美色综合久久久久久| 污污内射久久一区二区欧美日韩| 中文字幕亚洲综合久久2| 国产精品九九久久免费视频| 日本精品久久久中文字幕| 久久久91精品国产一区二区三区 | 久久天天躁狠狠躁夜夜躁2O2O| 亚洲日本va中文字幕久久| 久久人人爽人人爽人人AV东京热| 亚洲av成人无码久久精品|