Quickly Testing Qt Desktop Applications With Approval Tests
Executable Color Key GUI.exe main() and *.cpp *.ui15 Introduce static lib for tests Static Library Executable Color Key GUI.exe main() UI.lib *.cpp *.ui16 Introduce static lib for tests Static Library Executable Color Key GUI.exe main() UITests.exe main() and tests/*.cpp UI.lib *.cpp *.ui If too hard, could move just the code you are going to test17 Why Static Library? Impact fixture50 Bonus Points: Separate logic from UI code Static Library Executable Color Key GUI.exe main() UITests.exe main() and tests/*.cpp UI.lib *.cpp *.ui Model.lib ModelTests.exe *.cpp main()0 码力 | 77 页 | 6.96 MB | 5 月前3Combining Co-Routines and Functions into a Job System
the Frametime Physics UI N Logic AI Record S GPU Physics UI N Logic AI Record S Frametime = 1 / FPS Threads GPU Physics UI N Logic AI Record S Frametime Threads P UI N L AI P P L Frametime R R S GPU Physics UI N Logic AI Record S Physics UI N Logic AI Record S Physics UI N Logic AI GPU P UI N L AI P P L R R R R R R R R S P UI N L AI P P L R R R R R R R R S P UI N AI L R R R R R R R R S L P P GPU GPU GPU Threads GPUHelmut Hlavacs – Combining Co-Routines and Functions into a Job System - CppCon 2021 7 / 39 Job Systems0 码力 | 39 页 | 1.23 MB | 5 月前3《深入浅出MFC》2/e
本章回顧 / 409 第7章 簡單而完整:MFC 骨幹程式 / 411 不㆓法門:熟記 MFC 類別的階層架構 / 411 MFC 程式的 UI 新風貌 / 412 Document/View 支撐你的應用程式 / 419 利用 Visual C++ 工具完成 Scribble step0 / 423 Scribble Step2:UI 物件的變化 / 585 改變選單 / 585 改變工具列 / 588 利用 ClassWizard 連接命令項識別碼與命令處理函式 / 590 維護 UI 物件狀態(UPDATE_COMMAND_UI) / 594 本章回顧 / 多重文件 / 736 新的 Document 類別 / 736 新的 Document Template / 739 新的 UI 系統 / 740 新文件的檔案讀寫動作 / 742 * 第 14 章 MFC 多緒程式設計(Multi-threaded Programming in MFC) / 7450 码力 | 1009 页 | 11.08 MB | 1 年前3Changing Legacy Code: With Confidence
Test: Hijack a FunctionComplicated Dependencies class ActiveAssetsPage : public UI::Page { public: ActiveAssetsPage(UI::Page& parent, SQLDB dbId); void OnShow() override; private: UIList mAssetList AssetDatabase mDB; };Complicated Dependencies class ActiveAssetsPage : public UI::Page { public: ActiveAssetsPage(UI::Page& parent, SQLDB dbId); const Asset& GetNextAsset(AssetId id, AssetFilter filter) AssetDatabase mDB; };Complicated Dependencies class ActiveAssetsPage : public UI::Page { public: ActiveAssetsPage(UI::Page& parent, SQLDB dbId); const Asset& GetNextAsset(AssetId id, AssetFilter filter)0 码力 | 114 页 | 982.54 KB | 5 月前3Back to Basics Casting
struct D : public B {}; int main() { int i = 7001; float f = static_cast(i); // 1 uint8_t ui8 = static_cast (1.75f * f); // 2 D d; B& rb = d; D& rd = static_cast (rb); //3 return 0; pointers and throws std::bad_cast for references if the types are not relateddynamic_cast example: UI Framework struct Widget {}; struct Label : public Widget {}; struct Button : public Widget { void if(touchedWidget) { touchedWidget->DoClick(); } //more processing } Code::Bytesdynamic_cast example: UI Framework struct Widget {}; struct Label : public Widget {}; struct Button : public Widget { void 0 码力 | 117 页 | 1.57 MB | 5 月前3Calling Functions A Tutorial
boolStandard Conversions (Rank 3) 66 void f( double ); // (1) int main() { unsigned int ui = 42U; f( ui ); } // Calls (1) (standard conversion, rank 3) Standard conversion (rank 3)Standard Conversions unsigned int ui = 42U; f( ui ); } // Calls (1) (standard conversion, rank 3) Standard conversion (rank 3)Standard Conversions (Rank 3) 68 int main() { unsigned int ui = 42U; f( ui ); }0 码力 | 111 页 | 5.11 MB | 5 月前3Visualize Time Enabled Data using ArcGIS Qt (C++) and Toolkit
the development environment using Esri templates • Use the ArcGIS toolkit to use already existing UI componentsTime aware layer • We will be using a feature layer that include hurricane data as features Runtime Toolkit for Qt • Open-source project • Contains UI components and utilities to help simplify Qt app development • Can plug and play various UI pieces • Where: - https://github.com/Esri/arcgis-runtime-toolkit-qt file in Qt Creator - Register your components in main.cppArcGIS Runtime Toolkit for Qt • Time slider UI component: - Provides controls to visualize and step through temporal data - Set the current time0 码力 | 10 页 | 734.09 KB | 5 月前3Monadic Operations in Modern C++: A Practical Approach
ranges-v3, tl-expected, catch2 etc) ● Qt for UI on devices 9Briefly about Qt 10 C++ code: ● Business logic ● Integration ● System-level QML code: ● UI-related thingsBriefly about classes 11std::optional logging output ○ Integration with UI libraries ○ Glue-code ○ ...Where is the boundary? ● Class interface ● Library interface 37Example: window layout class diagram 38 UI::WindowLayout IWindowLayout0 码力 | 61 页 | 411.49 KB | 5 月前3C++20 STL Features: 1 Year of Development on GitHub
using namespace std; int main() { cout << boolalpha; short s = -1; unsigned int ui = 1729; cout << (s < ui) << endl; } • What does this print? • warning C4018: '<': signed/unsigned mismatch • namespace std; int main() { cout << boolalpha; short s = -1; unsigned int ui = 1729; cout << cmp_less(s, ui) << endl; } • This prints true ✔ 9template constexpr 0 码力 | 45 页 | 989.72 KB | 5 月前3C++20 STL Features: 1 Year of Development on GitHub
namespace std; int main() { cout << boolalpha; short s = -1; unsigned int ui = 1729; cout << (s < ui) << endl; } • What does this print? • warning C4018: '<': signed/unsigned mismatch std; int main() { cout << boolalpha; short s = -1; unsigned int ui = 1729; cout << cmp_less(s, ui) << endl; } • This prints true ✔10template constexpr 0 码力 | 45 页 | 702.09 KB | 5 月前3
共 98 条
- 1
- 2
- 3
- 4
- 5
- 6
- 10