Skip to main content

TickMarker widget, used to mark intervals.

Project description

Tickmarker

Github Build Status

TickMarker widget, used to mark intervals.

See https://kivy-garden.github.io/tickmarker/ for the rendered flower docs.

Please see the garden instructions for how to use kivy garden flowers.

Flower information

Tickmarker exports the TickMarker widget, which places ticks in the center of the widget so that when combined with another widget e.g. a slider it marks intervals. TickMarker supports horizontal and vertical orientation, minor/major ticks and log10 representation.

For example, to create a log slider from 0.1 to 10 starting at 1 with major tick marks at every decade, and minor ticks at every 0.2 decades:

from kivy.uix.slider import Slider
from kivy.garden.tickmarker import TickMarker
class TickSlider(Slider, TickMarker):
pass
s = TickSlider(log=True, min_log=.1, max_log=10, value_log=1,
ticks_major=1, ticks_minor=5)

Or a linear slider from 10 to 200 starting at 60 with major tick marks at every 50 units from start, and minor ticks at every 10 units

s = TickSlider(min=10, max=200, value=60, ticks_major=50, ticks_minor=5)

To create a log progress bar from 10 to 1000 starting at 500 with major tick marks at every decade, and minor ticks at every 0.1 decades::

from kivy.uix.progressbar import ProgressBar
from kivy.garden.tickmarker import TickMarker
class TickBar(ProgressBar, TickMarker):
padding = NumericProperty(0)
min = NumericProperty(0)
orientation = OptionProperty('horizontal', options=('horizontal'))
s = TickBar(log=True, min_log=10, max_log=1000, value_log=500,
ticks_major=1, ticks_minor=10)

When combining with another widget such as a slider, the widget must have min, max, value, orientation, and padding fields. See the second example above as to how you would do this with a ProgressBar. When logarithmic representation is required you read and write to the numerical fields using min_log, max_log and value_log instead of min, max, and value.

Install

To install with pip::

pip install kivy_garden.tickmarker

To build or re-build locally::

PYTHONPATH=.:$PYTHONPATH python setup.py build_ext --inplace

Or to install as editable (package is installed, but can be edited in its original location)::

pip install -e .

CI

Every push or pull request run the GitHub Action CI. It tests the code on various OS and also generates wheels that can be released on PyPI upon a tag. Docs are also generated and uploaded to the repo as well as artifacts of the CI.

TODO

  • add your code

Contributing

Check out our contribution guide and feel free to improve the flower.

License

This software is released under the terms of the MIT License. Please see the LICENSE.txt file.

How to release

See the garden instructions for how to make a new release.

Project details


Release history Release notifications

This version

3.0.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for kivy-garden.tickmarker, version 3.0.0
Filename, size File type Python version Upload date Hashes
Filename, size kivy_garden.tickmarker-3.0.0-cp35-cp35m-macosx_10_13_x86_64.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (30.6 kB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size kivy_garden.tickmarker-3.0.0-cp35-cp35m-manylinux1_x86_64.whl (136.4 kB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size kivy_garden.tickmarker-3.0.0-cp35-cp35m-manylinux2010_x86_64.whl (136.4 kB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size kivy_garden.tickmarker-3.0.0-cp36-cp36m-macosx_10_13_x86_64.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (31.3 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size kivy_garden.tickmarker-3.0.0-cp36-cp36m-manylinux1_x86_64.whl (138.4 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size kivy_garden.tickmarker-3.0.0-cp36-cp36m-manylinux2010_x86_64.whl (138.4 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size kivy_garden.tickmarker-3.0.0-cp36-cp36m-win32.whl (29.2 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size kivy_garden.tickmarker-3.0.0-cp36-cp36m-win_amd64.whl (32.4 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size kivy_garden.tickmarker-3.0.0-cp37-cp37m-macosx_10_13_x86_64.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (31.4 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size kivy_garden.tickmarker-3.0.0-cp37-cp37m-manylinux1_x86_64.whl (141.0 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size kivy_garden.tickmarker-3.0.0-cp37-cp37m-manylinux2010_x86_64.whl (141.0 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size kivy_garden.tickmarker-3.0.0-cp37-cp37m-win32.whl (29.3 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size kivy_garden.tickmarker-3.0.0-cp37-cp37m-win_amd64.whl (32.5 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size kivy_garden.tickmarker-3.0.0-cp38-cp38-macosx_10_13_x86_64.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (31.8 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size kivy_garden.tickmarker-3.0.0-cp38-cp38-manylinux1_x86_64.whl (165.4 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size kivy_garden.tickmarker-3.0.0-cp38-cp38-manylinux2010_x86_64.whl (165.4 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size kivy_garden.tickmarker-3.0.0-cp38-cp38-win32.whl (29.7 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size kivy_garden.tickmarker-3.0.0-cp38-cp38-win_amd64.whl (32.9 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size kivy_garden.tickmarker-3.0.0.tar.gz (10.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page