Git Product home page Git Product logo

qt-piechartwidget's Introduction

Qt-PieChartWidget

This is a small project to make a dividerslider for use with qt-projects.

Demonstration with the example widget

What is a dividerslider

A dividerslider is a slider that is used to divide a given number, the total if you will, into a set of smaller numbers through user interaction. The key difference from a normal slider is that it allows an arbirtary number of dividers instead of just one. In addition to this it has signals and slots for both the values of the dividers and for the sectors between them.

What it this project

This is just a small project I made for fun to explore the concept of a dividerslider described above. The project consists of an abstractdividerslider, which implements the internal dividing logic, slots and signaling, and so on. It is meant to be a common base for different visual representations of a dividerslider. For now there is only a piechartslider implementation, so the abstract base only function as a seperation of logic.

Making a PieChartSlider that behaves in an intuitive way turns out to be more complex than one would think, and there is a lot nuance in the way it could behave. Currently I have hard-coded a behaviour I find reasonable (at least compared to complexity of implementatioin).

Possible future improvements:

  • Improve handling of the scroll wheel (symmetric resizing)
  • Make the divider between zero and total movable
  • Add more configuration options(ways for it to behave)
  • Add an untracked handle option (value does not change before handle is released)
  • Visualizable string labels for each sector

Known Bugs:

  • DividerHandles overlap at zero, and not obvious which one you grab.

qt-piechartwidget's People

Contributors

exargon 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.