Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Plotline | 24 | 7 years ago | gpl-3.0 | C++ | ||||||
Application for Planning, Plotting, and Writing a Novel | ||||||||||
Omegarpg | 16 | 14 days ago | 1 | gpl-3.0 | C++ | |||||
OmegaRPG is a free, open-source Virtual Tabletop application. | ||||||||||
Flist Messenger | 16 | 7 years ago | 28 | C++ | ||||||
A multi-platform desktop client for the F-Chat protocol. | ||||||||||
Qescpos | 10 | 4 years ago | apache-2.0 | C++ | ||||||
Some classes for Qt to interact with ESC/POS printers | ||||||||||
Qtcreator Easymotion | 10 | 8 years ago | 3 | C++ | ||||||
An EasyMotion plugin for Qt Creator | ||||||||||
Qtasciimage | 7 | 8 years ago | 1 | mit | C++ | |||||
QtAsciimage - Asciimage for Qt Applications | ||||||||||
Pinyin4cpp | 6 | 8 years ago | C++ | |||||||
Pinyin4cpp is a c plus plus library supporting convertion between Chinese characters and hanyu pinyin that based on Qt. | ||||||||||
Pattern Gen | 6 | 8 years ago | C++ | |||||||
Pattern-Gen | ||||||||||
Twofold Qt | 6 | 2 years ago | apache-2.0 | C++ | ||||||
C++11/Qt implementation of Twofold, the universal source code generation template language | ||||||||||
Attorney Online Client | 6 | 7 years ago | 1 | gpl-3.0 | C++ | |||||
This is the new client project based on the Qt framework |
QtAsciimage - Asciimage for Qt Applications
This is a C++/Qt version of Charles Parnot's ASCIImage format. ASCIImage let's you specify simple images directly in your source code using 'ASCII art'.
QtAsciimage uses an extended format allowing for a direct styling of the individual ASCIImage shapes. The styling rules are appended to the ASCIImage, separated by a line containing three dashes ---
only:
. . . . 5 . . . .
. . . . # . . . .
. . . . # . . . .
. . . . # . . . .
. . 1 . # . 3 . .
. . . # 5 # . . .
6 . . . 2 . . . 9
# . . . . . . . #
7 # # # # # # # 8
---
1 open color=#FF0000
5 color=#FF0000
6 open
A styling rule contains of a shape identifier (the character that is used in the ASCIImage to start the corresponding shape) and a set of styling options:
ID [color=#RRGGBB] [open] [empty] [cutting]
ID
Shape identifier. The character that is used to start the curresponding shape. E.g. in the above example the polyline made from the consecutive characters 6
, 7
, 8
, 9
is identified by the shaped first character 6
.
color=#RRGGBB
Applicable to all shape types.
The shape is drawn in the given hex-color instead of the default color (black).
open
Applicable to polygons.
The shape is not automatically closed, and thus drawn as a polyline instead of a polygon.
empty
Applicable to ellipses and polygons.
The shape is not filled; only the edge is drawn.
cutting
Applicable to all shape types.
Instead of drawing the shape, it is cut out of the previsously drawn shapes, leaving a 'hole'.
Styling rules and the styling rules section are completely optional; if there is no styling rule for a shape, it is drawn in the default style (black color, closed, and filled).
To include QtAsciimage into your QMake-based project, copy the QtAsciimage directory to your project tree and include()
QtAsciimage's pri
-file in you main QMake-file:
include(QtAsciimage/QtAsciimage.pri)
Of course you need to include()
QtAsciimage's header files (QtAsciimage/image.h
should normally suffice; you also need QtAsciimage/iconengine.h
if you want to use the QIconEngine) into your C++ sources.
#include <QtAsciimage/image.h>
// ...
asciimage::Image asciiSun({
". . . . 8 . . . .",
". 7 . . 8 . . 9 .",
". . 7 . . . 9 . .",
". . . . 1 . . . .",
"6 6 . 1 # 1 . 2 2",
". . . . 1 . . . .",
". . 5 . . . 3 . .",
". 5 . . 4 . . 3 .",
". . . . 4 . . . ."
});
int scale = 4;
QImage result = asciiSun.render(scale);
#include <QtAsciimage/image.h>
#include <QtAsciimage/iconengine.h>
// ...
asciimage::Image asciiSaveIcon({
". . . . 5 . . . .",
". . . . # . . . .",
". . . . # . . . .",
". . . . # . . . .",
". . 1 . # . 3 . .",
". . . # 5 # . . .",
"6 . . . 2 . . . 9",
"# . . . . . . . #",
"7 # # # # # # # 8",
"---",
"1 open",
"6 open"
});
QIconEngine* iconEngine = new asciimage::IconEngine(asciiSaveIcon);
QAction* saveAction = new QAction("Save", this);
saveAction->setIcon(QIcon(iconEngine));
// add saveAction to a toolbar/menu to display the icon
QtAsciimageEditor let's you edit Asciimages visually and, furthermore, demos how to use the QtAsciimage library.