Goldendict is a good, and StarDict (star translation) similar to the dictionary software. It uses WebKit as the rendering core, formatting, colors, images, links and other support available, supporting a variety of dictionary file formats, including Babylon. BGL file, stardict. ifo/.dict/.idx/.syn file, dictd. index/.dict (. dz) file, abbyy lingvo. dsl/.lsa/.dat file, query Wikipedia, wikt MediaWiki Wiki sites such as Ionary, and the ability to use other online dictionary sites via template Url patterns, morphology systems based on Hunspell, complete Unicode support, scan windows, and global hotkey functions. Effect as shown:
The Qtsingleapplication component provides support applications, which are very useful and even critical for some applications. The application should activate and start an instance that is already running, and can perform the requested action, such as loading a file.
The Qtsingleapplication class provides an interface to detect a running instance that sends a command string. For Console (non-GUI) applications, qtsinglecoreapplication variants, thereby avoiding reliance on Qtgui.
The following is a show of how to use an existing application qtsingleapplication:
Original
int main (int argc, char **argv)
{
qapplication app (argc, argv);
Mymainwidget MMW;
Mmw.show ();
return app.exec ();
}
Single Instance
int main (int argc, char **argv)
{
qtsingleapplication app (argc, argv);
if (app.isrunning ()) return
!app.sendmessage (somedatastring);
Mymainwidget MMW;
App.setactivationwindow (&MMW);
Mmw.show ();
return app.exec ();
}
The following instance log view shows messages sent by other instances of the same application.
This example demonstrates how to use the Qtsingleapplication class to detect and communicate a running instance of an application using the SendMessage (API). A qtextedit log displays the received message (messagereceived).
#include <qtsingleapplication.h>
#include <QtGui/QTextEdit>
class Textedit:public Qtextedit
{
q_object public
:
textedit (Qwidget *parent = 0)
: qtextedit (parent)
{} Public
slots:
void Append (const QString &STR)
{
qtextedit::append (str);
}
;
#include "MAIN.MOC"
int main (int argc, char **argv)
{
qtsingleapplication instance (argc, argv);
Create an Qtsingleapplication object immediately
if (Instance.sendmessage ("Wake up!")
return 0;
Only one instance is allowed to
TextEdit LogView;
Logview.setreadonly (true);
Logview.show ();
Create a form. ~
Instance.setactivationwindow (&logview);
Qobject::connect (&instance, SIGNAL (messagereceived (const qstring&)),
&logview, SLOT (Append (const qstring&)));
return instance.exec ();
The Log Viewer object is also set to the application's activation window. Each time a message is received, the window is raised and automatically activated.
//each received message will be displayed in the log.
//The event loop is entered.
The goal of learning is to be mature. ~~~
SOURCE Package Download