Giter Club home page Giter Club logo

weather's Introduction

weather

Yet another weather forecast for OpenWeatherMap

Introduction 介绍

这是一个用Qt5写的天气预报程序

  • weather 主程序,该部分采用Qt5。
  • weather_config 配置程序,该部分代码兼容Qt4和Qt5。

Build 编译

获取源代码

git clone https://github.com/YeLee/weather.git

编译weather_config配置前端

cd weather_config
qmake (系统默认qmake生成Makefile)
make
wget http://bulk.openweathermap.org/sample/city.list.json.gz (获取OpenWeatherMap城市列表文件)
sh newCityList.sh city.list.json.gz (SQLite3生成数据库文件)

编译weather主程序前端

cd weather
/usr/lib/qt5/bin/qmake (仅限Qt5版qmake)
make

Configure 配置程序

weather主程序、weather_config配置前端和weather_config.db城市列表数据库拷贝到同一目录下即可。

OpenWeatherMap去申请一个免费的APPID。

打开weather_config,配置程序:

  • Country 国家代码(ISO 3166 Country codes)
  • City 城市对应的英文名称
  • City Information 城市信息,包含城市代码和经纬度,重复名称用下拉列表选择
  • Language 返回的天气信息语言
  • Temperature 温度格式,支持华氏、摄氏和开氏
  • Update Frequency 更新频率(单位为分),即程序间隔多长时间会从服务器获取天气信息
  • AutoCloseWindow 鼠标不在主窗口内自动关闭主窗体(单位为秒)
  • APPID OpenWeatherMap APPID
  • Submit 在程序其目录下生成weather.ini并退出(这里没有任何提示)

Running 运行程序

使用一台联网的计算机打开weather,点击托盘菜单的Show即可查看天气信息

weather's People

Contributors

sarrow104 avatar yelee avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

sarrow104

weather's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.