Qt-like library for libui
.
libui
is a C lightweight multi-platform UI library using native widgets on Linux (Gtk), OS X, and Windows.libui-qtlike
provides a C++
interface to libui
Instead of inventing a new class design, the interface is as close as possible to the Qt one.
As a welcome side effect it should be easier to start a project with libui
and -- if the project gets bigger and needs a more powerful library -- switch to Qt.
Of course, the UI of a libui-qtlike
program will not look like Qt, except if you are using the Qt backend (which is not in libui
yet).
For small projects, using libui
will produce much smaller executables for Windows and OS X.
The initial implementation aims at getting one of the basic Qt examples to run: http://doc.qt.io/qt-5/qtwidgets-mainwindows-application-example.html
Currently, it's possible to create a main window with a menu:
#include "libui-qtlike/libui-qtlike.h" #include <vector> using namespace std; class MainWindow : public UI::MainWindow { public: MainWindow(); private: void createActions(); }; MainWindow::MainWindow() { createActions(); } void MainWindow::createActions() { UI::Menu *fileMenu = menuBar()->addMenu("_File"); UI::Action *newAction = new UI::Action("_New", this); fileMenu->addAction(newAction); } int main(int argc, char *argv[]) { UI::Application app(argc, argv); MainWindow mainWin; mainWin.show(); return app.exec(); }
On Linux:
compile libui
and copy the .h
and .so
files in the libui/
directory
compile and run the example:
mkdir build/ cd build/ cmake .. make ./main-window
libui
provides.MainWindow
creator, or let the user change it after the fact (or add them as parameters to the MainWindow
's creator, if Qt does it thise way)tr()
translation module.
https://github.com/tinygettext/tinygettext/blob/master/LICENSE.md
gettext
#include <libintl.h> #include <iostream> #define _(x) gettext(x) int main (){ std::cout << _("hello, world!\n"); }
http://helloworld922.blogspot.ch/2013/07/thread-safe-signalsslots-using-c11.html
http://simmesimme.github.io/tutorials/2015/09/20/signal-slot/
https://github.com/cpp11nullptr/lsignal/blob/master/main.cpp
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4