Code Monkey home page Code Monkey logo

Comments (3)

gamecreature avatar gamecreature commented on June 11, 2024

@Dariusz1989 Could you provide some pseudo code/sample how you would like to invoke/use such a feature?

from qtawesome.

Dariusz1989 avatar Dariusz1989 commented on June 11, 2024

Hey
Yea I was just thinking about it. It seems like we may need second app? Or a python app... Could be python/pyside2.
But I suppose we need to give it path to a resource file & write in to it QPixmap/QIcon/QImage in to "that magical format" and then create tags/strings/etc .h/.cpp etc like the ones we have from Awesome library.

In general

  1. Open app
  2. Specify resource file
  3. Read icons in it
  4. remove/rename entries
  5. add entry
    a. Specify either img path
    b. Specify QPixmap/QImage/QIcon if we are dynamically generating something via painter/etc
    c. Configurew tags/etc
  6. Save rsc/ generate .h/.cpp/etc/etc

I'm using cmake that dynamically adds files to project, so we could probably do somethign similar so we can add multiple resourece/h/cpp and then probably create .h init for doing Q_RESOURCE_INIT stuff to generate them dynamically... ?

I could help doing the gui/writer/loading system, But I would need help with serializing/deserializing the input data in to that black bock rsc thini I tried understanding and gave up :- )

from qtawesome.

gamecreature avatar gamecreature commented on June 11, 2024

@Dariusz1989 Thanks for your input. Re-reading your suggestion multiple times, I don't see how this can be put into this project.
The 'magic format' is a Font file that contains (vector) icons. (QtAwesome just uses an existing font-file). It cannot convert pixmaps or other other graphics into a font file.

The 'magic' is nothing else then settings the correct font and the foreground/background colors. And drawing a certain glyph from this font.
The generator (written in Ruby), takes the meta-information from the FontAwesome project to generate the correct names for the glyphs into the c++ source/header files.

(* Adding other Font-icon files should be possible, but that's another wish already placed in the issue tracker.)

from qtawesome.

Related Issues (20)

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.