Git Product home page Git Product logo

timepicker's Introduction

TimePicker

TimePicker is a litte project which allow you to pick a time on European or American Clock. Its components are intended to be a part of Qaterial library (Cf QaterialGallery)

Overview

Hour Picker (EU way)

Screen showing an example of the EuHourPicker

Hour Picker (Am way)

Screen showing an example of the AmHourPicker

Minute Picker

Screen showing an example of the MinutePicker

Build

git clone https://github.com/CedricLeon/TimePicker.git
mkdir build && cd build
cmake -DCMAKE_PREFIX_PATH=/your/Qt/gcc_64/path ..
make -j2
./TimePicker

Components : Code Example

EuCircularHourPicker

Allow to pick hour from 0 to 23 (Eu way)

EuCircularHourPicker
{
    radius: 150			    // default: 100
    hour: slider.value		// default: 0
    onAccepted: (hour) => console.log(`hour: ${hour}`)
}

Properties

  • radius: (default 100)
  • hour : Hour of the component, can be set from outside (default 0)
  • labelSize : Size of text area, distance between am and pm hour circular path (default 32)

Signal

  • accepted : Signal emitted at every move of the HandClock

AmCircularHourPicker

Allow to pick hour from 1 to 12 (American way)

AmCircularHourPicker
{
    radius: 150			    // default: 100
    hour: slider.value		// default: 0    
    onAccepted: (hour) => console.log(`hour: ${hour}`)
}

Properties

  • radius: (default 100)
  • hour : Hour of the component, can be set from outside (default 12)

Signal

  • accepted : Signal emitted at every move of the HandClock

CircularMinutePicker

Allow to pick minute from 0 to 59

CircularMinutePicker
{
    radius: 150			   // default: 100
    minute: slider.value   // default: 0
    onAccepted: (minute) => console.log(`minute: ${minute}`)
}

Properties

  • radius: (default 100)
  • minute : Minute of the component, can be set from outside (default 0)

Signal

  • accepted : Signal emitted at every move of the HandClock

CircularPathLabel

Display data in a circular path, is able to highlight an element

CircularPathLabel
{
    radius: 150				// default: 100
    numberOfElement: 5      // default: 12
    model: ["0", "1", "2", "3", "4"] // default: hours of the day
    currentIndex: 3         // "highlighted" element, default: -1
}

Properties

  • radius: (default 100)
  • model : Table of values displayed in the path (default, hours of the day)
  • numberOfElement : Number of values display in circle (default 12)
  • textType : Text characteristics of elements displayed (default, Qaterial.Style.TextType.Body1, can be choose among Qaterial.Style.TextType Enum)
  • currentIndex : Index of the element "highlighted" (default -1)
  • labelSize : Size of text area (default 32)

HandClock

Display a handclock

HandClock
{
    radius: 140		    // default 100
    color: "white"	    // default "transparent"
    renderDot: false    // default true
}

Properties

  • color : (default transparent)
  • radius : (default 100)
  • labelSize : Radius of the external "picker" circle (default : 32 x 2^0.5)
  • renderDot : Boolean which displayed or not a central circle in the external "picker" circle (default true)

Notes

Note that there is no security on the hour/minute when you set it by yourselves. So you can set an hour like 25:-12.

timepicker's People

Watchers

Cedric Leonard avatar

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.