Skip to content

NoumanNawaz51/WeatherWidget

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Live Weather Widget

Live weather widget gives us weather update of cities. It takes city name as input and shows the temperature in celcius. Api, keys and interval(min) are taken from sqlite database. For UI, wxwidgets library is used, for sending requests to the API, libcurl is used and for json parsing response from API, we are using nlohmann-json library.

Library/Packages

-curl
-nlohmann-json
-wxwidgets
-sqlite3

GENERAL

  • The solution is only built in msvc x64 DEBUG configuration (couldn't get the time to setup the release configuration).
  • The solution requires to be built with MultiThreaded Debug config.
  • The solution requires the std=c++17 to be installed.
  • If a city name is changed, we have to wait at max for INTERVAL time for weather to be updated (as the thread for weather update will be in sleep).

Steps to run

  • This is a MSVC 2019 solution.
  • There is third party folder in the root directory which contains the libcurl, nlohmmann json and sqlite library headers, static and dynamic link library files and dlls.
  • The paths to thirdparty headers and libs are already set in the vcxproj.
  • After the build, the dlls from the respective bin folders should be copied/present with the executable.
  • The database file [weather.db] should be present with the sln file.
  • You have to have installed latest version of wxwidgets from here. The default installation path for wxwidgets is harcoded in visual studio project.
  • The default installation path for wxwidgets (C:\wxWidgets-3.1.5) is hardcoded in the vcxproj for easy configuration. If the default installation path is used, the solution can be run from any directory. Otherwise, the vcxproj will require to be updated.

TO-DO

  • Add multiple providers for weather information (DB already has the supported structure).
  • The database also supports muliple settings, we should add user settings there and reload on app restart.
  • Loader gif or loader bar to show the background process.
  • Weather information for multiple cities.
  • Multiple instances of the widget.
  • Last data sync.
  • Exception Handling.
  • Error handling for JSON responses.

About

Weather widget for live weather update.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published