Archive for the ‘X Windows’ Category

ruby workshop: the way of the Qt samurai

Monday, December 17th, 2007

As a side result of my work with dradis during the last months, I’ve been working on some technical sessions that will be grouped in what could be called a “ruby workshop”. The first of this sessions is on ruby + Qt programming and is available now.

  • Slides can be found here.
  • Source and examples: here.

Popularity: 35% [?]

using the fox toolkit in ruby

Tuesday, October 2nd, 2007

The fox toolkit is a portable C++ graphical library. If you download old code (such as the nice rubyforger – that sits on top of libnet and libpcap) you may end up with some headache, so these easy steps will help to get your fox application up and running :)
(more…)

Popularity: 18% [?]

ruby Qt: model / view / controller

Wednesday, August 15th, 2007

From the wikipedia:

Model-view-controller (MVC) is an architectural pattern used in software engineering. In complex computer applications that present a large amount of data to the user, a developer often wishes to separate data (model) and user interface (view) concerns, so that changes to the user interface will not affect data handling, and that the data can be reorganized without changing the user interface.

MVC is not only useful for web frameworks and applications, here is a simple example of the implementation of the MVC pattern for a Qt GUI application.
(more…)

Popularity: 23% [?]

ruby Qt: menu bar, status bar and resources

Tuesday, July 31st, 2007

Menu and status bar are two elements that you expect to find in most applications out there. Menu bars are rich elements that consists of menu items and actions. Each action consists of a text and optionally a shortcut and an icon.
(more…)

Popularity: 22% [?]

ruby Qt custom widget example

Monday, June 4th, 2007

With Qt’s custom widgets you can create the building blocks of the GUI of your application.

In this case we are creating a graphical command line. The command line will consist mainly of a text input box (Qt::LineEdit). The widget will have memory, that is, every line entered by the user will be added to the internal history of the widget and will be accessible by means of Up and Down arrows as the standard *nix command line.

(more…)

Popularity: 21% [?]

ruby Qt::TreeWidget example

Saturday, June 2nd, 2007

I am involved in some projects were we are using Qt library for GUI development with ruby. In the following example I will show how to use the Qt::TreeWidget object.

The TreeWidget can be used not only to display information hierarchically but also to add multiple columns to the data model.
(more…)

Popularity: 20% [?]

kde desktop background auto change

Thursday, December 14th, 2006

Much in the way we did with xfce here is the way to implement de auto change feature in KDE.

This is an easy one. Although you can perform background auto change from KDE control center, it may be usefull to have a script to do the task. You can use this script to create a link in your desktop to change the background image when you want.

The KDE applications can be controlled by scripts via the DCOP mechanism. From the Wikipedia:

DCOP, which stands for Desktop COmmunication Protocol, is a light-weight interprocess and software componentry communication system. The main point of this system is to allow applications to interoperate, and to share complex tasks. Essentially, DCOP is a ‘remote control’ system, which allows an application or a script to enlist the help of other applications. It is built on top of the X Window System’s Inter-Client Exchange protocol.

(more…)

Popularity: 30% [?]

xmms song in mail’s signature

Saturday, November 12th, 2005

We need three files for this:

  • signature.txt: you should point your mail client to this one
  • signature.tpl: here is the common text to display, something like “xmms is now playing:
  • signature.sh: the script first copies the contents of the template file to the final signature file, and then adds the current song as a new line.

(more…)

Popularity: 17% [?]

xfce desktop background auto change

Monday, September 19th, 2005

First of all check Xfce 4 Desktop Manager help. Click on the New list… button and create a list with all the backgrounds you want to rotate.

From this page:

To refresh the backdrop with a new random image from the list just run the xfdesktop command again, e.g. from a terminal or the run dialog, or xfdesktop [-reload].

What we have to do now is to create a shell script that runs xfdesktop -reload and to add a cron job to run it.
(more…)

Popularity: 19% [?]