[Qt C++] – Transparent, dynamically generated from text tray icon
int main(int argc, char *argv)
QApplication app(argc, argv);
QPixmap pixmap(20, 20); // small size should work fine on every platform
pixmap.fill(Qt::transparent); // set transparency of the icon
int size = 15; // size 15 looks nice on KDE and GNOME
QFont font("", size);
QString theText = "3"; // this will be the text in the system tray icon
painter.drawText(QPoint(5, size+1), theText);
QSystemTrayIcon *tray = new QSystemTrayIcon();
You must convert an image to XMP format. You can do it with GIMP. Open the image, save as XPM (X PixMap Image) format, name of the file should end with .h (C/C++ header).
For my example content of a file is:
I had to write a voting assistant in Prolog as a part of my module – AI. I really enjoyed programming in Prolog and you can see my code in its repository.
The code is fully documented and it shouldn’t be hard to follow. It was my first application in Prolog, so don’t be mad at me when you see some crap there…
This application can give you suggestion about your voting choice. A user can make a list of politicians and their own views in the source file. Ask the application which politician is the most suitable to vote for in next elections.
This application has two modes:
A prototype of a booking site where a client can find accommodation, book it and rate it.
A landlord can promote theirs rooms.
Word-ladder – application can find a “ladder” from one word to another. A ladder is a set of adjacent words like:
cat, cut, but
Application uses breadth-first-search algorithm to find the shortest route from one given word to another.
I had to write this application as a university project.
The task was to generate a word ladder, which starts and ends on provided words. Both words have to be in a dictionary.
Every single step in the ladder must only differ in one character from the word before. The aim of the word-ladder is to find the shortest path from start word to end word in the whole graph.