November 9, 2008 9

Yalı4: Porting something to Qt4

Yali is the first Pardus software a user encounters. Basically, it recognizes the hardware and installs Pardus software from the installation media (i.e CD) to a hard disk partition user selects. Yalı was developed mainly with Qt and Python (PyQt ..) but for supporting new technologies (there is Qt4 now and it rocks !)

I ported Yalı Qt3 version to Qt4 named as Yali4 (to avoid chaos; we still use Qt3 version for some of other projects); while porting I have totally changed some approach in visual design.

General UI:

In general I used Qt Style Sheet support for design basics; a centered shiny background, transparent icons and graphics in screens and some WidgetStyle from Qt Style Sheet examples. For screens I prefer QStackedWidget which supports transparency too and some signals for walking between screens. (Also while desining YALI’ screen infrastructure I tried to make it modular — I will blog it later. )

Standard widgets of Qt4 are enough for YALI but for making something shiny I made some tricks;

For each partition I used a QRadioButton (which has already have checked/unchecked state) and QSplitter to seperate them (each splitter width calculated from partition size).

Flexibility of Qt4 gave me this;

You just need some CSS tricks like this;

  QRadioButton::indicator { width:1px;height:1px;border-color:white; }
  QRadioButton:checked { border:6px solid rgba(255,255,255,180); }
  QSplitter::handle { background-color:rgba(255,255,255,0); }

and some colors and icons;

  metaTypes = {"ntfs" :{"bgcolor":"#18D918",
                        "fgcolor":"#000000",
                        "icon"   :"windows"},
               "hfs+" :{"bgcolor":"#C0A39E",
                        "fgcolor":"#000000",
                        "icon"   :"other"},
               "ext3" :{"bgcolor":"#7590AE",
                        "fgcolor":"#FFFFFF",
                        "icon"   :"linux"}}

  partition.setIcon(QtGui.QIcon(":/gui/pics/%s.png" % icon))
  partition.setStyleSheet("background-color:%s;color:%s" % (meta["bgcolor"],meta["fgcolor"]))

I’m done time is 03:50 now :) For more information about Yalı feel free to get in source at Pardus SVN.

Tags: ,

  • onety-three

    Verrry orange, but apart from that I like it a lot :) I guess I should finally try Pardus.
    Keep up the great work!

  • Mark Kretschmann

    This looks very nice indeed :)

    It was interesting to see what Qt Style Sheets can achieve.

  • I think that the confirmation dialog should be less transparent, but that’s only a personal opinion.

  • @CoolGoose

    Yes, you are right I will change the background ;) thanks.

  • Hey!
    Nice work done! Pardus seems to rock, need to try it :)

    Lukas

  • Markus

    Very nice, but indeed, very, very orange as pointed out by the first comment here. Is this colour the final one?

    Apart from that, keep up the good work!

  • Gil

    Wow, that’s pretty! very nice :)

  • @Markus

    Yes, it is the final color; actually it is our 2008 Release color scheme ;)

    U can get and try from http://pardus.org.tr/eng/download.html

  • Cediddi

    This is 2013, I’m searching for some Qt info at google and what I found is priceless. I miss the old Pardus. I hope one day some will understand what it was and wake him up and turn that beast into a real monster.