- Build system was changed from
QMaketoCMake, so TeamForecast.pro was replaced with CMakeLists.text.
LocationModelautomatically updates after it created withLocationManager.LocationsManagerViewbecame a singleton to prevent multiple creation on click of a buttonLocationsManagerbecame a singleton to simplify access to it from settings dialog.- Added update_timer and setUpdateInterval(int msec) to
LocationsManager(I'll test auto-updating models). - Fixed bug: you could mark location as favorite and then changed location, but it was still considered marked as favorite.
- Introduced Model-View pattern: base
AbstractWeatherModelinherited byCurrentModel,HourlyModelandDailyModel. Most of functions moved to them. The functions of converting the values of temperature, distance, wind speed and pressure into non-standard units of measure have been implemented (so far, you cannot switch them from the application) - Redesigned navigation between added locations: instead of creating every time new
LocationForecastwidget and storing it inQTabWidgetI madeLocationsManager(which contains all added locations models and provide some functionality to manage them) ,LocationsManagerView(dialog-widget with search line, which is view forLocationsManagerandLocationMiniView, which shows some info about eachLocationModel(click left mouse button to switch current shown location, right to call contextRoundedMenu, which allows: edit location, copy, delete or update). Now exists only one instance ofLocationForecastwhich has an opportunity to display selected by userLocationModelor nothing in case user selected nothing. - Average RAM usage for each location with new architecture decreased from 15-20mb to 0.3-1.0mb.
- Most of sources were grouped into folders.
- All dialogs now inherit
RoundedDialog(dialog with round corners). - Created
AppStyleclass(Provides current theme, element's roles enum and element's states enum). - Created base class for animated widgets -
AnimatedWidget. In it I implemented animation in the style of material design. - Created
AnimatedButtoninheritsAnimatedWidget. - Created
TextWidgetas a replace forQLabeltext. - Added
clear()function toScrollAreaWrapper. - Opacity value in
DarkOverlayEffectconstructor. - Some slots replaced with lambdas.
updateWidgetInfo(...)functions inCurrentWidget,HourlyWidgetandDailyWidgetwere simplified using models.ExpandingWeatherWidget: now inheritsAnimatedWidget. Temporary disabled expanding animation.- and many other minor changes.