summaryrefslogtreecommitdiffstats
path: root/qml
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageia.org>2018-12-06 12:47:17 +0100
committerPapoteur <papoteur@mageia.org>2018-12-17 10:19:29 +0100
commitd16c6580baed691a873d5bfa1e9af2b5b7146cda (patch)
treedc48c6d35fba31f1625621208ca6642b8d541ec8 /qml
parentfb5ab5bd0965dc2741e842bbaa2832860b01e831 (diff)
downloadmageiawelcome-d16c6580baed691a873d5bfa1e9af2b5b7146cda.tar
mageiawelcome-d16c6580baed691a873d5bfa1e9af2b5b7146cda.tar.gz
mageiawelcome-d16c6580baed691a873d5bfa1e9af2b5b7146cda.tar.bz2
mageiawelcome-d16c6580baed691a873d5bfa1e9af2b5b7146cda.tar.xz
mageiawelcome-d16c6580baed691a873d5bfa1e9af2b5b7146cda.zip
Add QML matter
Suppress webkit matter
Diffstat (limited to 'qml')
-rw-r--r--qml/AppList.qml60
-rw-r--r--qml/helpers.py83
-rw-r--r--qml/img/.directory4
-rw-r--r--qml/img/0ad.pngbin0 -> 2478 bytes
-rw-r--r--qml/img/abiword.pngbin0 -> 2325 bytes
-rw-r--r--qml/img/amule.pngbin0 -> 2191 bytes
-rw-r--r--qml/img/anjuta.pngbin0 -> 3606 bytes
-rw-r--r--qml/img/bleachbit.pngbin0 -> 1918 bytes
-rw-r--r--qml/img/blender.pngbin0 -> 2209 bytes
-rw-r--r--qml/img/calibre.pngbin0 -> 2143 bytes
-rw-r--r--qml/img/calligra.pngbin0 -> 695 bytes
-rw-r--r--qml/img/chromium.pngbin0 -> 2158 bytes
-rw-r--r--qml/img/claws-mail.pngbin0 -> 2719 bytes
-rw-r--r--qml/img/clementine.pngbin0 -> 1764 bytes
-rw-r--r--qml/img/codeblocks.pngbin0 -> 3572 bytes
-rw-r--r--qml/img/codecs-audio.pngbin0 -> 1361 bytes
-rw-r--r--qml/img/codecs-video.pngbin0 -> 1936 bytes
-rw-r--r--qml/img/darktable.pngbin0 -> 2347 bytes
-rw-r--r--qml/img/digikam.pngbin0 -> 2661 bytes
-rw-r--r--qml/img/eclipse.pngbin0 -> 4362 bytes
-rw-r--r--qml/img/filezilla.pngbin0 -> 844 bytes
-rw-r--r--qml/img/firefox.pngbin0 -> 2912 bytes
-rw-r--r--qml/img/flash-player-plugin.pngbin0 -> 1144 bytes
-rw-r--r--qml/img/fuse-exfat.pngbin0 -> 1216 bytes
-rw-r--r--qml/img/gimp.pngbin0 -> 1717 bytes
-rw-r--r--qml/img/gnumeric.pngbin0 -> 2289 bytes
-rw-r--r--qml/img/gparted.pngbin0 -> 2228 bytes
-rw-r--r--qml/img/hardware.pngbin0 -> 1747 bytes
-rw-r--r--qml/img/homebank.pngbin0 -> 2368 bytes
-rw-r--r--qml/img/inkscape.pngbin0 -> 2155 bytes
-rw-r--r--qml/img/k3b.pngbin0 -> 2300 bytes
-rw-r--r--qml/img/k9copy.pngbin0 -> 4564 bytes
-rw-r--r--qml/img/kdenlive.pngbin0 -> 1979 bytes
-rw-r--r--qml/img/kodi.pngbin0 -> 2554 bytes
-rw-r--r--qml/img/lazarus.pngbin0 -> 2931 bytes
-rw-r--r--qml/img/libreoffice-calc.pngbin0 -> 1826 bytes
-rw-r--r--qml/img/libreoffice-writer.pngbin0 -> 987 bytes
-rw-r--r--qml/img/mageia-2013-alpha.pngbin0 -> 5600 bytes
-rw-r--r--qml/img/mageia-2013-black-alpha.pngbin0 -> 7438 bytes
-rw-r--r--qml/img/mageia-2016-alpha.pngbin0 -> 7146 bytes
-rw-r--r--qml/img/mageia-theme-extra.pngbin0 -> 1549 bytes
-rw-r--r--qml/img/mageia.pngbin0 -> 1260 bytes
-rw-r--r--qml/img/mcc.jpgbin0 -> 19540 bytes
-rw-r--r--qml/img/megaglest.pngbin0 -> 3245 bytes
-rw-r--r--qml/img/mga_bg.pngbin0 -> 5785 bytes
-rw-r--r--qml/img/mypaint.pngbin0 -> 2802 bytes
-rw-r--r--qml/img/ok.pngbin0 -> 9052 bytes
-rw-r--r--qml/img/opera.pngbin0 -> 1528 bytes
-rw-r--r--qml/img/pidgin.pngbin0 -> 1678 bytes
-rw-r--r--qml/img/playonlinux.pngbin0 -> 2108 bytes
-rw-r--r--qml/img/qbittorrent.pngbin0 -> 2531 bytes
-rw-r--r--qml/img/qmmp.pngbin0 -> 1297 bytes
-rw-r--r--qml/img/qt-creator.pngbin0 -> 2230 bytes
-rw-r--r--qml/img/radiotray.pngbin0 -> 1857 bytes
-rw-r--r--qml/img/sauerbraten.pngbin0 -> 1860 bytes
-rw-r--r--qml/img/scribus.pngbin0 -> 2737 bytes
-rw-r--r--qml/img/skrooge.pngbin0 -> 2511 bytes
-rw-r--r--qml/img/skype.pngbin0 -> 2507 bytes
-rw-r--r--qml/img/smplayer.pngbin0 -> 2554 bytes
-rw-r--r--qml/img/soundkonverter.pngbin0 -> 3977 bytes
-rw-r--r--qml/img/steam.pngbin0 -> 2022 bytes
-rw-r--r--qml/img/supertux.pngbin0 -> 3948 bytes
-rw-r--r--qml/img/supertuxkart.pngbin0 -> 1841 bytes
-rw-r--r--qml/img/svg/mageia.svg235
-rw-r--r--qml/img/system-config-printer.pngbin0 -> 842 bytes
-rw-r--r--qml/img/thunderbird.pngbin0 -> 2884 bytes
-rw-r--r--qml/img/virtualbox.pngbin0 -> 2629 bytes
-rw-r--r--qml/img/vlc.pngbin0 -> 1535 bytes
-rw-r--r--qml/img/warzone2100.pngbin0 -> 2821 bytes
-rw-r--r--qml/img/wesnoth.pngbin0 -> 3865 bytes
-rw-r--r--qml/mw-ui.qml619
-rw-r--r--qml/mw.py206
72 files changed, 1207 insertions, 0 deletions
diff --git a/qml/AppList.qml b/qml/AppList.qml
new file mode 100644
index 0000000..79cad01
--- /dev/null
+++ b/qml/AppList.qml
@@ -0,0 +1,60 @@
+import QtQuick 2.2
+ import QtQml.Models 2.1
+ ListModel {
+ ListElement { group: "audio featured";description: "Various Multimedia Codecs for Audio";inst_repo: "tainted";title: "Audio Multimedia Codecs";name: "task-codec-audio";command: "";repo: "";icon: "img/codecs-audio.png";installable: "True";}
+ListElement { group: "audio featured";description: "Various Multimedia Codecs for Audio";inst_repo: "tainted";title: "Audio Multimedia Codecs";name: "task-codec-audio";command: "";repo: "tainted";icon: "img/codecs-audio.png";installable: "False";}
+ListElement { group: "video featured";description: "Various Multimedia Codecs for Video";inst_repo: "tainted";title: "Video Multimedia Codecs";name: "task-codec-video";command: "";repo: "";icon: "img/codecs-video.png";installable: "True";}
+ListElement { group: "video featured";description: "Various Multimedia Codecs for Video";inst_repo: "tainted";title: "Video Multimedia Codecs";name: "task-codec-video";command: "";repo: "tainted";icon: "img/codecs-video.png";installable: "False";}
+ListElement { group: "games";description: "Steam Client";inst_repo: "";title: "Steam";name: "steam";command: "steam";repo: "non-free";icon: "img/steam.png";installable: "True";}
+ListElement { group: "games";description: "3D Real Time Strategy";inst_repo: "";title: "Megaglest";name: "megaglest";command: "megaglest";repo: "";icon: "img/megaglest.png";installable: "True";}
+ListElement { group: "games";description: "Multi-player/single-player first person shooter game";inst_repo: "";title: "Sauerbraten";name: "sauerbraten";command: "sauerbraten";repo: "non-free";icon: "img/sauerbraten.png";installable: "True";}
+ListElement { group: "games";description: "Classic 2d jump 'n run sidescroller with tux ";inst_repo: "";title: "Supertux";name: "supertux";command: "supertux2";repo: "";icon: "img/supertux.png";installable: "True";}
+ListElement { group: "games";description: "Kart racing game featuring Tux and friends";inst_repo: "";title: "SuperTuxKart";name: "supertuxkart";command: "supertuxkart";repo: "";icon: "img/supertuxkart.png";installable: "True";}
+ListElement { group: "games";description: "Postnuclear realtime strategy";inst_repo: "";title: "Warzone 2100";name: "warzone2100";command: "warzone2100";repo: "";icon: "img/warzone2100.png";installable: "True";}
+ListElement { group: "games";description: "Fantasy turn-based strategy game";inst_repo: "";title: "Battle for Wesnoth";name: "wesnoth";command: "wesnoth";repo: "";icon: "img/wesnoth.png";installable: "True";}
+ListElement { group: "games";description: "RTS Game of Ancient Warfare";inst_repo: "";title: "O A.D";name: "0ad";command: "0ad";repo: "";icon: "img/0ad.png";installable: "True";}
+ListElement { group: "graphics";description: "3d modeller/renderer";inst_repo: "";title: "Blender";name: "blender";command: "blender.nonsse";repo: "";icon: "img/blender.png";installable: "True";}
+ListElement { group: "graphics";description: "Painting Program";inst_repo: "";title: "MyPaint";name: "mypaint";command: "mypaint";repo: "";icon: "img/mypaint.png";installable: "False";}
+ListElement { group: "graphics";description: "The GNU image manipulation program";inst_repo: "";title: "GIMP";name: "gimp";command: "gimp";repo: "";icon: "img/gimp.png";installable: "False";}
+ListElement { group: "graphics";description: "Vector graphics editor";inst_repo: "";title: "Inkscape";name: "inkscape";command: "inkscape";repo: "";icon: "img/inkscape.png";installable: "False";}
+ListElement { group: "graphics";description: "Digital photo management application";inst_repo: "";title: "Digikam";name: "digikam";command: "digikam";repo: "";icon: "img/digikam.png";installable: "False";}
+ListElement { group: "graphics";description: "Virtual lighttable and darkroom for photographers";inst_repo: "";title: "Darktable";name: "darktable";command: "darktable";repo: "";icon: "img/darktable.png";installable: "True";}
+ListElement { group: "internet";description: "Multi-protocol instant messaging client";inst_repo: "";title: "Pidgin";name: "pidgin";command: "pidgin";repo: "";icon: "img/pidgin.png";installable: "False";}
+ListElement { group: "internet";description: "Full-featured graphical ftp/ftps/sftp client";inst_repo: "";title: "Filezilla";name: "filezilla";command: "filezilla";repo: "";icon: "img/filezilla.png";installable: "False";}
+ListElement { group: "internet featured";description: "Next generation web browser";inst_repo: "";title: "Firefox";name: "firefox";command: "firefox";repo: "";icon: "img/firefox.png";installable: "False";}
+ListElement { group: "internet featured";description: "Lightweight but feature rich bittorrent client";inst_repo: "";title: "Qbittorrent";name: "qbittorrent";command: "qbittorrent";repo: "";icon: "img/qbittorrent.png";installable: "True";}
+ListElement { group: "internet";description: "Fast Webbrowser";inst_repo: "";title: "Chromium";name: "chromium-browser";command: "chromium-browser";repo: "";icon: "img/chromium.png";installable: "False";}
+ListElement { group: "internet";description: "File sharing client compatible with eDonkey";inst_repo: "";title: "Amule";name: "amule";command: "amule";repo: "";icon: "img/amule.png";installable: "True";}
+ListElement { group: "internet";description: "E-mail, news and RSS client";inst_repo: "";title: "Thunderbird";name: "thunderbird";command: "thunderbird";repo: "";icon: "img/thunderbird.png";installable: "False";}
+ListElement { group: "internet";description: "Fast e-mail client";inst_repo: "";title: "Claws Mail";name: "claws-mail";command: "claws-mail";repo: "";icon: "img/claws-mail.png";installable: "True";}
+ListElement { group: "video featured";description: "Media Player";inst_repo: "";title: "Smplayer";name: "smplayer";command: "smplayer";repo: "";icon: "img/smplayer.png";installable: "True";}
+ListElement { group: "video";description: "A non-linear video editing application";inst_repo: "";title: "Kdenlive";name: "kdenlive";command: "kdenlive";repo: "";icon: "img/kdenlive.png";installable: "False";}
+ListElement { group: "video featured";description: "Multimedia player and streamer";inst_repo: "tainted";title: "VLC";name: "vlc";command: "vlc";repo: "";icon: "img/vlc.png";installable: "True";}
+ListElement { group: "video featured";description: "Multimedia player and streamer";inst_repo: "tainted";title: "VLC";name: "vlc";command: "vlc";repo: "tainted";icon: "img/vlc.png";installable: "False";}
+ListElement { group: "video";description: "Media Center";inst_repo: "";title: "Kodi";name: "kodi";command: "kodi";repo: "";icon: "img/kodi.png";installable: "True";}
+ListElement { group: "audio";description: "Audio Player similiar to Winamp";inst_repo: "";title: "Qmmp";name: "qmmp";command: "qmmp";repo: "";icon: "img/qmmp.png";installable: "True";}
+ListElement { group: "audio";description: "Modern music player and library organizer";inst_repo: "";title: "Clementine";name: "clementine";command: "clementine";repo: "";icon: "img/clementine.png";installable: "False";}
+ListElement { group: "audio";description: "An audio file converter, CD ripper and replay gain tool";inst_repo: "";title: "Soundkonverter";name: "soundkonverter";command: "soundkonverter";repo: "";icon: "img/soundkonverter.png";installable: "True";}
+ListElement { group: "programming";description: "Extensible tool platform and java ide";inst_repo: "";title: "Eclipse";name: "eclipse";command: "eclipse";repo: "";icon: "img/eclipse.png";installable: "True";}
+ListElement { group: "programming";description: "A C++ IDE";inst_repo: "";title: "CodeBlocks";name: "codeblocks";command: "codeblocks";repo: "";icon: "img/codeblocks.png";installable: "True";}
+ListElement { group: "programming";description: "Lightweight IDE for qt";inst_repo: "";title: "Qt Creator";name: "qt-creator";command: "qtcreator";repo: "";icon: "img/qt-creator.png";installable: "False";}
+ListElement { group: "programming";description: "IDE for C and C++";inst_repo: "";title: "Anjuta";name: "anjuta";command: "anjuta";repo: "";icon: "img/anjuta.png";installable: "True";}
+ListElement { group: "programming";description: "IDE for free pascal";inst_repo: "";title: "Lazarus";name: "lazarus";command: "lazarus";repo: "";icon: "img/lazarus.png";installable: "True";}
+ListElement { group: "system";description: "Sophisticated cd/dvd burning application";inst_repo: "";title: "K3b";name: "k3b";command: "k3b";repo: "";icon: "img/k3b.png";installable: "False";}
+ListElement { group: "system";description: "Partition editor";inst_repo: "";title: "GParted";name: "gparted";command: "gparted";repo: "";icon: "img/gparted.png";installable: "False";}
+ListElement { group: "system";description: "Exfat formatted device management";inst_repo: "tainted";title: "fuse-exfat";name: "fuse-exfat";command: "";repo: "tainted";icon: "img/fuse-exfat.png";installable: "False";}
+ListElement { group: "system featured";description: "Extra community-made background images";inst_repo: "";title: "mageia-theme-extra";name: "mageia-theme-extra";command: "";repo: "";icon: "img/mageia-theme-extra.png";installable: "True";}
+ListElement { group: "system";description: "k9copy helps making backups of your video DVDs ";inst_repo: "";title: "K9copy";name: "k9copy";command: "k9copy";repo: "";icon: "img/k9copy.png";installable: "True";}
+ListElement { group: "system";description: "Clean junk to free disk space and to maintain privacy ";inst_repo: "";title: "BleachBit";name: "bleachbit";command: "bleachbit";repo: "";icon: "img/bleachbit.png";installable: "True";}
+ListElement { group: "system";description: "A printer administration tool";inst_repo: "";title: "System Config Printer";name: "system-config-printer";command: "system-config-printer";repo: "";icon: "img/system-config-printer.png";installable: "False";}
+ListElement { group: "system";description: "Virtualization software";inst_repo: "";title: "VirtualBox";name: "virtualbox";command: "VirtualBox";repo: "";icon: "img/virtualbox.png";installable: "False";}
+ListElement { group: "office";description: "LibreOffice Spreadsheet Application";inst_repo: "";title: "LibreOffice Calc";name: "libreoffice-calc";command: "oocalc";repo: "";icon: "img/libreoffice-calc.png";installable: "False";}
+ListElement { group: "office";description: "LibreOffice Word Processor Application";inst_repo: "";title: "LibreOffice Writer";name: "libreoffice-writer";command: "oowriter";repo: "";icon: "img/libreoffice-writer.png";installable: "False";}
+ListElement { group: "office";description: "Set of office applications for KDE";inst_repo: "";title: "Calligra";name: "calligra";command: "";repo: "";icon: "img/calligra.png";installable: "True";}
+ListElement { group: "office";description: "Lean and fast full-featured word processor";inst_repo: "";title: "AbiWord";name: "abiword";command: "abiword";repo: "";icon: "img/abiword.png";installable: "True";}
+ListElement { group: "offrce";description: "A full-featured spreadsheet for GNOME";inst_repo: "";title: "Gnumeric";name: "gnumeric";command: "gnumeric";repo: "";icon: "img/gnumeric.png";installable: "True";}
+ListElement { group: "office";description: "E-book converter and library management";inst_repo: "";title: "Calibre";name: "calibre";command: "calibre";repo: "";icon: "img/calibre.png";installable: "True";}
+ListElement { group: "office";description: "Desktop Publishing Program";inst_repo: "";title: "Scribus";name: "scribus";command: "scribus";repo: "";icon: "img/scribus.png";installable: "True";}
+ListElement { group: "office";description: "Free easy personal accounting for all";inst_repo: "";title: "HomeBank";name: "homebank";command: "homebank";repo: "";icon: "img/homebank.png";installable: "True";}
+ListElement { group: "office";description: "Personal Finance Management Tool";inst_repo: "";title: "Skrooge";name: "skrooge";command: "skrooge";repo: "";icon: "img/skrooge.png";installable: "True";}
+}
diff --git a/qml/helpers.py b/qml/helpers.py
new file mode 100644
index 0000000..773070d
--- /dev/null
+++ b/qml/helpers.py
@@ -0,0 +1,83 @@
+# -*- coding: utf-8 -*-
+
+
+import csv
+import gettext
+import rpm
+
+gettext.install("mageiawelcome")
+
+install = _("Install")
+launch = _("Launch")
+
+ts = rpm.TransactionSet()
+
+def get_desktop_name(x):
+ return {
+ '01plasma':'KDE Plasma',
+ '02GNOME':'Gnome',
+ 'gnome': 'Gnome Wayland',
+ 'gnome-xorg': 'Gnome X.org',
+ 'LXDE':'LXDE',
+ 'MATE':'Mate',
+ 'Cinnamon':'Cinnamon',
+ '23E17':'Enlightenment',
+ '07IceWM':'IceWM',
+ '26Openbox':'Openbox',
+ '03WindowMaker':'WindowMaker',
+ '09Fvwm2':'Fvwm2',
+ }.get(x,'Other')
+
+def get_desktop_name2(x):
+ return {
+ 'KDE':'KDE Plasma',
+ 'XFCE':'Xfce',
+ 'LXQt':'LXQt',
+ 'MATE':'Mate',
+ 'GNOME':'Gnome',
+ 'X-Cinnamon':'Cinnamon',
+ }.get(x,'unknown')
+
+
+def is_installed(name):
+ mi = ts.dbMatch('name', name)
+ release = ""
+ for h in mi:
+ release = (h['release']).decode("utf-8")
+ if release.endswith("tainted"):
+ repo = 'tainted'
+ elif release.endswith("nonfree"):
+ repo = 'nonfree'
+ else:
+ repo = ''
+ return release != "", repo
+
+
+def get_listapp():
+ listapp = ''
+ with open("apps.csv", 'rt') as f:
+ mycsv = csv.reader(f,delimiter='|')
+ next(mycsv)
+ for r in mycsv:
+ if (r[5] == 'false'):
+ start_btn = ""
+ else:
+ start_btn = "<button class='cmd small green' data-run='"+ r[5] + "'><i class='icon-ok-sign'> </i>" + launch +"</button>"
+ if (r[6] != ''):
+ label = "<span class='label red'>" + r[6] + "</span>"
+ title = " title='{}'".format(_("Need {} repository enabled").format(r[6]))
+ else:
+ label = ""
+ title = ""
+ is_app_installed, repo = is_installed(r[1])
+ if ( not is_app_installed or repo != r[6]):# NOT INSTALLED IN EXPECTED RELEASE
+ if is_app_installed and r[6] == "": # ANOTHER RELEASE THAN CORE IS INSTALLED
+ listapp += "<li class='urpme " + r[3] +"' id='" + r[0] + "'><img class=icon src=img/" + r[0] + ".png /><div class='chkbox'></div> \
+<h6>" + r[2] + "</h6><p class='description'>" + r[4] + "</p>" + label
+ else:
+ listapp += "<li class='" + r[3] +"' id='" + r[0] + "'><img class=icon src=img/" + r[0] + ".png /><div class='chkbox'><input type='checkbox' datasrc='" + r[1] +"'></div> \
+<h6>" + r[2] + "</h6><p class='description'>" + r[4] + "</p>" + label + "<button class='inst small' data-rpm='" + r[1] + "'" + title +"><i class='icon-circle-arrow-down'> </i>" + install +"</button></li>"
+ else: # INSTALLED
+ listapp += "<li class='urpme " + r[3] +"' id='" + r[0] + "'><img class=icon src=img/" + r[0] + ".png /><div class='chkbox'></div> \
+<h6>" + r[2] + "</h6><p class='description'>" + r[4] + "</p>" + start_btn + label + "</li>"
+ return listapp
diff --git a/qml/img/.directory b/qml/img/.directory
new file mode 100644
index 0000000..e715fe1
--- /dev/null
+++ b/qml/img/.directory
@@ -0,0 +1,4 @@
+[Dolphin]
+PreviewsShown=true
+Timestamp=2018,11,10,17,35,0
+Version=4
diff --git a/qml/img/0ad.png b/qml/img/0ad.png
new file mode 100644
index 0000000..544554a
--- /dev/null
+++ b/qml/img/0ad.png
Binary files differ
diff --git a/qml/img/abiword.png b/qml/img/abiword.png
new file mode 100644
index 0000000..1ae2dc0
--- /dev/null
+++ b/qml/img/abiword.png
Binary files differ
diff --git a/qml/img/amule.png b/qml/img/amule.png
new file mode 100644
index 0000000..7cad1b3
--- /dev/null
+++ b/qml/img/amule.png
Binary files differ
diff --git a/qml/img/anjuta.png b/qml/img/anjuta.png
new file mode 100644
index 0000000..18cc5cf
--- /dev/null
+++ b/qml/img/anjuta.png
Binary files differ
diff --git a/qml/img/bleachbit.png b/qml/img/bleachbit.png
new file mode 100644
index 0000000..c819132
--- /dev/null
+++ b/qml/img/bleachbit.png
Binary files differ
diff --git a/qml/img/blender.png b/qml/img/blender.png
new file mode 100644
index 0000000..574b2f8
--- /dev/null
+++ b/qml/img/blender.png
Binary files differ
diff --git a/qml/img/calibre.png b/qml/img/calibre.png
new file mode 100644
index 0000000..e38fe33
--- /dev/null
+++ b/qml/img/calibre.png
Binary files differ
diff --git a/qml/img/calligra.png b/qml/img/calligra.png
new file mode 100644
index 0000000..a1f9dac
--- /dev/null
+++ b/qml/img/calligra.png
Binary files differ
diff --git a/qml/img/chromium.png b/qml/img/chromium.png
new file mode 100644
index 0000000..24ea921
--- /dev/null
+++ b/qml/img/chromium.png
Binary files differ
diff --git a/qml/img/claws-mail.png b/qml/img/claws-mail.png
new file mode 100644
index 0000000..199a571
--- /dev/null
+++ b/qml/img/claws-mail.png
Binary files differ
diff --git a/qml/img/clementine.png b/qml/img/clementine.png
new file mode 100644
index 0000000..44d91e8
--- /dev/null
+++ b/qml/img/clementine.png
Binary files differ
diff --git a/qml/img/codeblocks.png b/qml/img/codeblocks.png
new file mode 100644
index 0000000..8b575b3
--- /dev/null
+++ b/qml/img/codeblocks.png
Binary files differ
diff --git a/qml/img/codecs-audio.png b/qml/img/codecs-audio.png
new file mode 100644
index 0000000..23f2d18
--- /dev/null
+++ b/qml/img/codecs-audio.png
Binary files differ
diff --git a/qml/img/codecs-video.png b/qml/img/codecs-video.png
new file mode 100644
index 0000000..e3850da
--- /dev/null
+++ b/qml/img/codecs-video.png
Binary files differ
diff --git a/qml/img/darktable.png b/qml/img/darktable.png
new file mode 100644
index 0000000..913c2a2
--- /dev/null
+++ b/qml/img/darktable.png
Binary files differ
diff --git a/qml/img/digikam.png b/qml/img/digikam.png
new file mode 100644
index 0000000..8c44268
--- /dev/null
+++ b/qml/img/digikam.png
Binary files differ
diff --git a/qml/img/eclipse.png b/qml/img/eclipse.png
new file mode 100644
index 0000000..3a729b1
--- /dev/null
+++ b/qml/img/eclipse.png
Binary files differ
diff --git a/qml/img/filezilla.png b/qml/img/filezilla.png
new file mode 100644
index 0000000..55b33cc
--- /dev/null
+++ b/qml/img/filezilla.png
Binary files differ
diff --git a/qml/img/firefox.png b/qml/img/firefox.png
new file mode 100644
index 0000000..0c4f681
--- /dev/null
+++ b/qml/img/firefox.png
Binary files differ
diff --git a/qml/img/flash-player-plugin.png b/qml/img/flash-player-plugin.png
new file mode 100644
index 0000000..30d7c58
--- /dev/null
+++ b/qml/img/flash-player-plugin.png
Binary files differ
diff --git a/qml/img/fuse-exfat.png b/qml/img/fuse-exfat.png
new file mode 100644
index 0000000..657ba56
--- /dev/null
+++ b/qml/img/fuse-exfat.png
Binary files differ
diff --git a/qml/img/gimp.png b/qml/img/gimp.png
new file mode 100644
index 0000000..5cbd7f0
--- /dev/null
+++ b/qml/img/gimp.png
Binary files differ
diff --git a/qml/img/gnumeric.png b/qml/img/gnumeric.png
new file mode 100644
index 0000000..0c20caa
--- /dev/null
+++ b/qml/img/gnumeric.png
Binary files differ
diff --git a/qml/img/gparted.png b/qml/img/gparted.png
new file mode 100644
index 0000000..f897c05
--- /dev/null
+++ b/qml/img/gparted.png
Binary files differ
diff --git a/qml/img/hardware.png b/qml/img/hardware.png
new file mode 100644
index 0000000..411f21d
--- /dev/null
+++ b/qml/img/hardware.png
Binary files differ
diff --git a/qml/img/homebank.png b/qml/img/homebank.png
new file mode 100644
index 0000000..4293f19
--- /dev/null
+++ b/qml/img/homebank.png
Binary files differ
diff --git a/qml/img/inkscape.png b/qml/img/inkscape.png
new file mode 100644
index 0000000..aa445e4
--- /dev/null
+++ b/qml/img/inkscape.png
Binary files differ
diff --git a/qml/img/k3b.png b/qml/img/k3b.png
new file mode 100644
index 0000000..c716d58
--- /dev/null
+++ b/qml/img/k3b.png
Binary files differ
diff --git a/qml/img/k9copy.png b/qml/img/k9copy.png
new file mode 100644
index 0000000..e923936
--- /dev/null
+++ b/qml/img/k9copy.png
Binary files differ
diff --git a/qml/img/kdenlive.png b/qml/img/kdenlive.png
new file mode 100644
index 0000000..b8945de
--- /dev/null
+++ b/qml/img/kdenlive.png
Binary files differ
diff --git a/qml/img/kodi.png b/qml/img/kodi.png
new file mode 100644
index 0000000..da2c920
--- /dev/null
+++ b/qml/img/kodi.png
Binary files differ
diff --git a/qml/img/lazarus.png b/qml/img/lazarus.png
new file mode 100644
index 0000000..1ac13ba
--- /dev/null
+++ b/qml/img/lazarus.png
Binary files differ
diff --git a/qml/img/libreoffice-calc.png b/qml/img/libreoffice-calc.png
new file mode 100644
index 0000000..b65c141
--- /dev/null
+++ b/qml/img/libreoffice-calc.png
Binary files differ
diff --git a/qml/img/libreoffice-writer.png b/qml/img/libreoffice-writer.png
new file mode 100644
index 0000000..1942e73
--- /dev/null
+++ b/qml/img/libreoffice-writer.png
Binary files differ
diff --git a/qml/img/mageia-2013-alpha.png b/qml/img/mageia-2013-alpha.png
new file mode 100644
index 0000000..a75bf06
--- /dev/null
+++ b/qml/img/mageia-2013-alpha.png
Binary files differ
diff --git a/qml/img/mageia-2013-black-alpha.png b/qml/img/mageia-2013-black-alpha.png
new file mode 100644
index 0000000..3b5a36e
--- /dev/null
+++ b/qml/img/mageia-2013-black-alpha.png
Binary files differ
diff --git a/qml/img/mageia-2016-alpha.png b/qml/img/mageia-2016-alpha.png
new file mode 100644
index 0000000..e424d6d
--- /dev/null
+++ b/qml/img/mageia-2016-alpha.png
Binary files differ
diff --git a/qml/img/mageia-theme-extra.png b/qml/img/mageia-theme-extra.png
new file mode 100644
index 0000000..4d37fc4
--- /dev/null
+++ b/qml/img/mageia-theme-extra.png
Binary files differ
diff --git a/qml/img/mageia.png b/qml/img/mageia.png
new file mode 100644
index 0000000..4ce0c12
--- /dev/null
+++ b/qml/img/mageia.png
Binary files differ
diff --git a/qml/img/mcc.jpg b/qml/img/mcc.jpg
new file mode 100644
index 0000000..f415357
--- /dev/null
+++ b/qml/img/mcc.jpg
Binary files differ
diff --git a/qml/img/megaglest.png b/qml/img/megaglest.png
new file mode 100644
index 0000000..ba4d86c
--- /dev/null
+++ b/qml/img/megaglest.png
Binary files differ
diff --git a/qml/img/mga_bg.png b/qml/img/mga_bg.png
new file mode 100644
index 0000000..3243445
--- /dev/null
+++ b/qml/img/mga_bg.png
Binary files differ
diff --git a/qml/img/mypaint.png b/qml/img/mypaint.png
new file mode 100644
index 0000000..56d21e4
--- /dev/null
+++ b/qml/img/mypaint.png
Binary files differ
diff --git a/qml/img/ok.png b/qml/img/ok.png
new file mode 100644
index 0000000..fcb66a2
--- /dev/null
+++ b/qml/img/ok.png
Binary files differ
diff --git a/qml/img/opera.png b/qml/img/opera.png
new file mode 100644
index 0000000..fc8cd53
--- /dev/null
+++ b/qml/img/opera.png
Binary files differ
diff --git a/qml/img/pidgin.png b/qml/img/pidgin.png
new file mode 100644
index 0000000..3494e74
--- /dev/null
+++ b/qml/img/pidgin.png
Binary files differ
diff --git a/qml/img/playonlinux.png b/qml/img/playonlinux.png
new file mode 100644
index 0000000..9b5e5c2
--- /dev/null
+++ b/qml/img/playonlinux.png
Binary files differ
diff --git a/qml/img/qbittorrent.png b/qml/img/qbittorrent.png
new file mode 100644
index 0000000..fd76d5f
--- /dev/null
+++ b/qml/img/qbittorrent.png
Binary files differ
diff --git a/qml/img/qmmp.png b/qml/img/qmmp.png
new file mode 100644
index 0000000..32126f8
--- /dev/null
+++ b/qml/img/qmmp.png
Binary files differ
diff --git a/qml/img/qt-creator.png b/qml/img/qt-creator.png
new file mode 100644
index 0000000..fca5342
--- /dev/null
+++ b/qml/img/qt-creator.png
Binary files differ
diff --git a/qml/img/radiotray.png b/qml/img/radiotray.png
new file mode 100644
index 0000000..6715e5c
--- /dev/null
+++ b/qml/img/radiotray.png
Binary files differ
diff --git a/qml/img/sauerbraten.png b/qml/img/sauerbraten.png
new file mode 100644
index 0000000..145aaca
--- /dev/null
+++ b/qml/img/sauerbraten.png
Binary files differ
diff --git a/qml/img/scribus.png b/qml/img/scribus.png
new file mode 100644
index 0000000..325bd55
--- /dev/null
+++ b/qml/img/scribus.png
Binary files differ
diff --git a/qml/img/skrooge.png b/qml/img/skrooge.png
new file mode 100644
index 0000000..e6a0c54
--- /dev/null
+++ b/qml/img/skrooge.png
Binary files differ
diff --git a/qml/img/skype.png b/qml/img/skype.png
new file mode 100644
index 0000000..a192daf
--- /dev/null
+++ b/qml/img/skype.png
Binary files differ
diff --git a/qml/img/smplayer.png b/qml/img/smplayer.png
new file mode 100644
index 0000000..7fe0489
--- /dev/null
+++ b/qml/img/smplayer.png
Binary files differ
diff --git a/qml/img/soundkonverter.png b/qml/img/soundkonverter.png
new file mode 100644
index 0000000..5952509
--- /dev/null
+++ b/qml/img/soundkonverter.png
Binary files differ
diff --git a/qml/img/steam.png b/qml/img/steam.png
new file mode 100644
index 0000000..5590da6
--- /dev/null
+++ b/qml/img/steam.png
Binary files differ
diff --git a/qml/img/supertux.png b/qml/img/supertux.png
new file mode 100644
index 0000000..7cdc9b2
--- /dev/null
+++ b/qml/img/supertux.png
Binary files differ
diff --git a/qml/img/supertuxkart.png b/qml/img/supertuxkart.png
new file mode 100644
index 0000000..4a75df8
--- /dev/null
+++ b/qml/img/supertuxkart.png
Binary files differ
diff --git a/qml/img/svg/mageia.svg b/qml/img/svg/mageia.svg
new file mode 100644
index 0000000..5578abe
--- /dev/null
+++ b/qml/img/svg/mageia.svg
@@ -0,0 +1,235 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="32"
+ height="32"
+ id="svg5453"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="mageia.svg"
+ inkscape:export-filename="../mageia.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90">
+ <defs
+ id="defs5455">
+ <linearGradient
+ id="linearGradient4290"
+ inkscape:collect="always">
+ <stop
+ id="stop4292"
+ offset="0"
+ style="stop-color:#7cbaf8;stop-opacity:1" />
+ <stop
+ id="stop4294"
+ offset="1"
+ style="stop-color:#f4fcff;stop-opacity:1" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4290"
+ id="linearGradient4194"
+ x1="398.57144"
+ y1="535.79797"
+ x2="398.57144"
+ y2="527.79797"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4290"
+ id="linearGradient4175"
+ gradientUnits="userSpaceOnUse"
+ x1="398.57144"
+ y1="535.79797"
+ x2="398.57144"
+ y2="527.79797" />
+ <linearGradient
+ gradientTransform="matrix(0.14959446,0,0,0.14959446,385.91117,510.3726)"
+ inkscape:collect="always"
+ xlink:href="#linearGradient4226"
+ id="linearGradient4232"
+ x1="538.42279"
+ y1="260.88647"
+ x2="538.42279"
+ y2="122.81936"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient4226">
+ <stop
+ style="stop-color:#262f45;stop-opacity:1;"
+ offset="0"
+ id="stop4228" />
+ <stop
+ style="stop-color:#485982;stop-opacity:1"
+ offset="1"
+ id="stop4230" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4286"
+ id="linearGradient4257"
+ x1="103.20959"
+ y1="114.29383"
+ x2="103.20959"
+ y2="30.334101"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ id="linearGradient4286"
+ inkscape:collect="always">
+ <stop
+ id="stop4288"
+ offset="0"
+ style="stop-color:#2397d4;stop-opacity:1;" />
+ <stop
+ id="stop4290"
+ offset="1"
+ style="stop-color:#55b2e4;stop-opacity:1" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="11.313708"
+ inkscape:cx="16.088069"
+ inkscape:cy="14.043225"
+ inkscape:document-units="px"
+ inkscape:current-layer="g4171"
+ showgrid="true"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0"
+ inkscape:window-width="1876"
+ inkscape:window-height="1051"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:showpageshadow="false"
+ borderlayer="true"
+ showguides="true"
+ inkscape:snap-midpoints="false">
+ <inkscape:grid
+ type="xygrid"
+ id="grid4063" />
+ <sodipodi:guide
+ position="1.1650391e-05,32.000026"
+ orientation="32,0"
+ id="guide4157" />
+ <sodipodi:guide
+ position="1.1650391e-05,2.6367188e-05"
+ orientation="0,32"
+ id="guide4159" />
+ <sodipodi:guide
+ position="32.000012,2.6367188e-05"
+ orientation="-32,0"
+ id="guide4161" />
+ <sodipodi:guide
+ position="32.000012,32.000026"
+ orientation="0,-32"
+ id="guide4163" />
+ <sodipodi:guide
+ position="2.0000117,30.000026"
+ orientation="28,0"
+ id="guide4167" />
+ <sodipodi:guide
+ position="2.0000117,2.0000264"
+ orientation="0,28"
+ id="guide4169" />
+ <sodipodi:guide
+ position="30.000012,2.0000264"
+ orientation="-28,0"
+ id="guide4171" />
+ <sodipodi:guide
+ position="30.000012,30.000026"
+ orientation="0,-28"
+ id="guide4173" />
+ <sodipodi:guide
+ position="2.0000117,30.000026"
+ orientation="28,0"
+ id="guide4181" />
+ <sodipodi:guide
+ position="2.0000117,2.0000264"
+ orientation="0,14"
+ id="guide4183" />
+ <sodipodi:guide
+ position="16.000012,2.0000264"
+ orientation="-28,0"
+ id="guide4185" />
+ <sodipodi:guide
+ position="16.000012,30.000026"
+ orientation="0,-14"
+ id="guide4187" />
+ <sodipodi:guide
+ position="9.0000117,23.000026"
+ orientation="14,0"
+ id="guide4193" />
+ <sodipodi:guide
+ position="9.0000117,9.0000264"
+ orientation="0,14.000031"
+ id="guide4195" />
+ <sodipodi:guide
+ position="23.000042,9.0000264"
+ orientation="-14,0"
+ id="guide4197" />
+ <sodipodi:guide
+ position="23.000042,23.000026"
+ orientation="0,-14.000031"
+ id="guide4199" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata5458">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Capa 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-384.57143,-515.798)">
+ <g
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.5px;line-height:125%;font-family:'Clear Sans';-inkscape-font-specification:'Clear Sans Bold';letter-spacing:0px;word-spacing:0px;opacity:1;fill:url(#linearGradient4194);fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ id="text4184">
+ <g
+ id="g4171"
+ style="fill:url(#linearGradient4175);fill-opacity:1">
+ <g
+ transform="matrix(0.14959446,0,0,0.14959446,371.66858,439.78892)"
+ id="g5423"
+ style="fill:#2397d4;fill-opacity:1">
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:url(#linearGradient4257);fill-opacity:1"
+ d="m 92.599609,30.003906 a 8.0761247,8.0761247 0 0 0 -8.3125,8.072266 8.0761705,8.0761705 0 0 0 16.152341,0 8.0761247,8.0761247 0 0 0 -7.839841,-8.072266 z m 19.822271,15.34375 a 9.2875434,9.2875434 0 0 0 -9.5586,9.285156 9.2875434,9.2875434 0 0 0 18.57422,0 9.2875434,9.2875434 0 0 0 -9.01562,-9.285156 z M 96.292969,61.501953 a 10.095156,10.095156 0 0 0 -10.390625,10.089844 10.095703,10.095703 0 0 0 20.191406,0 10.095156,10.095156 0 0 0 -9.800781,-10.089844 z m 19.097651,19.761719 c -6.23507,0.0051 -11.30687,5.080285 -11.29687,11.322266 0.004,6.225519 5.0757,11.291012 11.30664,11.291012 l 0.01,0 c 6.23404,-0.006 11.29687,-5.080292 11.29687,-11.322262 -0.006,-6.22553 -5.07725,-11.291016 -11.31641,-11.291016 z m -32.728511,7.269531 c -6.67896,0.0071 -12.113515,5.442303 -12.103515,12.132817 0.0071,6.6683 5.440381,12.09375 12.113281,12.09375 l 0.0098,0 0,0.002 c 6.67896,-0.007 12.105468,-5.44425 12.105468,-12.13477 -0.0081,-6.668297 -5.44202,-12.093747 -12.125,-12.093747 z"
+ transform="translate(95.208039,484.36743)"
+ id="path3042-0-6-4" />
+ </g>
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:url(#linearGradient4232);fill-opacity:1;stroke:none"
+ d="m 394.34806,528.40282 c -0.40608,0.007 -0.80819,0.14573 -1.11787,0.4707 -1.56332,2.02633 -2.83119,4.30554 -2.83119,7.06659 0,5.98472 4.54145,10.92039 10.17242,10.92039 5.6308,0 10.17243,-4.93564 10.17243,-10.92039 0,-2.7616 -1.26976,-4.96839 -2.92147,-7.06659 -0.61936,-0.64993 -1.51379,-0.55321 -2.16474,-0.13732 -1.90479,0.98561 -2.93284,1.37937 -5.08621,1.36972 -2.08265,-0.009 -3.17694,-0.34945 -5.08184,-1.38784 -0.32546,-0.1989 -0.73545,-0.32261 -1.14152,-0.31526 z m 0.23959,2.15189 c 1.97438,1.09167 3.73523,1.64554 5.98377,1.64554 2.25044,0 4.00838,-0.55388 5.98378,-1.64554 1.0779,1.51985 2.09432,3.40445 2.09432,5.3854 0,4.90689 -3.61649,8.82607 -8.0781,8.82607 -4.46182,0 -8.22769,-3.91916 -8.22769,-8.82607 0,-1.97833 1.16366,-3.86436 2.24392,-5.3854 z"
+ id="path4687-7-56-1-0-2-2-7"
+ sodipodi:nodetypes="ccsssccscccscsssc" />
+ </g>
+ </g>
+ </g>
+</svg>
diff --git a/qml/img/system-config-printer.png b/qml/img/system-config-printer.png
new file mode 100644
index 0000000..5df9aae
--- /dev/null
+++ b/qml/img/system-config-printer.png
Binary files differ
diff --git a/qml/img/thunderbird.png b/qml/img/thunderbird.png
new file mode 100644
index 0000000..0ea7046
--- /dev/null
+++ b/qml/img/thunderbird.png
Binary files differ
diff --git a/qml/img/virtualbox.png b/qml/img/virtualbox.png
new file mode 100644
index 0000000..505e0b5
--- /dev/null
+++ b/qml/img/virtualbox.png
Binary files differ
diff --git a/qml/img/vlc.png b/qml/img/vlc.png
new file mode 100644
index 0000000..1a0f859
--- /dev/null
+++ b/qml/img/vlc.png
Binary files differ
diff --git a/qml/img/warzone2100.png b/qml/img/warzone2100.png
new file mode 100644
index 0000000..4ae4d9f
--- /dev/null
+++ b/qml/img/warzone2100.png
Binary files differ
diff --git a/qml/img/wesnoth.png b/qml/img/wesnoth.png
new file mode 100644
index 0000000..451bdff
--- /dev/null
+++ b/qml/img/wesnoth.png
Binary files differ
diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml
new file mode 100644
index 0000000..1b3cba9
--- /dev/null
+++ b/qml/mw-ui.qml
@@ -0,0 +1,619 @@
+import QtQuick 2.0
+
+import QtQml.Models 2.1
+import QtQuick.Layouts 1.3
+import QtQuick.Controls 1.4
+import QtQuick.Controls.Styles 1.4
+
+Rectangle {
+ id: box
+ width: 800; height: 550
+ property alias view: view
+ Rectangle {
+ id: banner
+ color: "lightgray"
+ width: parent.width;height: 120
+
+ Image {
+ anchors.fill: parent
+ anchors.bottomMargin: 10
+ anchors.topMargin: 10
+ source: "img/mageia-2013-black-alpha.png"
+ fillMode: Image.PreserveAspectFit
+ }
+
+ }
+
+ Rectangle {
+ id: slideshow
+ property Item displayItem: null
+ anchors {left: parent.left; top: buttonbox.bottom; bottom: parent.bottom; right: parent.right}
+ color: "blue"
+ width: parent.width
+
+ ObjectModel {
+ id: itemModel
+
+ // Welcome page
+ Rectangle {
+ property var title: qsTr("Welcome")
+ width: view.width; height: view.height
+ color: "#FFFEF0"
+ Label {
+ text: qsTr("Welcome to Mageia, %1").arg(user)
+ font.bold: true
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+
+ Label {
+ text: qsTr("We are going to guide you through a few important steps<BR />
+and help you with the configuration of your newly installed system.
+<BR />Now, click on <i>Media sources</i> to go to the first step.");
+ textFormat: Text.RichText
+ anchors.centerIn: parent
+ }
+ }
+ // Configure source page
+ Rectangle {
+ property var title: qsTr("Media sources")
+ width: view.width; height: view.height
+ color: "#F0FFF7"
+ Column {
+ anchors.left: parent.left
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.leftMargin: 10
+ Label { text: qsTr("Configure software repositories"); font.bold: true; }
+ Label { text: qsTr("Mageia official repositories contain:"); }
+ GridLayout {
+ columns: 3
+ Rectangle {id: coreBg
+ color: "lightgreen"
+ width: 80;
+ height: 20
+ Label { text: qsTr("core"); }
+ }
+ Label {
+ text: qsTr("- the free-open-source packages, i.e. software licensed under a free-open-source license");
+ wrapMode: Text.WordWrap
+ Layout.maximumWidth: slideshow.width * .6
+ }
+ Label {
+ text: ""
+
+ }
+
+ Rectangle {id: nonfreeBg
+ color: "red"
+ width: 80; height: 20
+ Label { text: qsTr("nonfree");
+
+ wrapMode: Text.WordWrap}
+ }
+ Label {
+ width: parent.width
+ text: qsTr("- some programs which are not free, or closed source. For example this repository includes Nvidia and ATI graphics card proprietary drivers, firmware for various WiFi cards, etc");
+ Layout.maximumWidth: slideshow.width * .6
+ wrapMode: Text.WordWrap
+ }
+ Button {
+ Layout.maximumWidth: slideshow.width * .25
+ objectName: "launch"
+ onClicked: { launch.command("drakrpm-edit-media")}
+ style: ButtonStyle {
+ label: Label {
+ text: qsTr("Configure software repositories");
+ width: parent.width
+ wrapMode: Text.WordWrap
+ }
+ }
+ }
+ Rectangle {id: taintedBg
+ color: "red"
+ width: 80; height: 20
+ Label { text: qsTr("tainted"); }
+ }
+ Label {
+ text: qsTr("- includes packages released under a free license. However, they may infringe on patents and copyright laws in some countries, e.g. multimedia codecs needed to play various audio/video files; packages needed to play commercial video DVD, etc. ");
+ wrapMode: Text.WordWrap
+ Layout.maximumWidth: slideshow.width * .6
+ }
+ Label {
+ text: ""
+
+ }
+ Rectangle {
+ color: "white"
+ width: 80; height: 20
+ Label { text: qsTr("backports"); }
+ }
+ Label {
+ text: qsTr("- includes sofware published after a Mageia release, or another version of sofware already present and not replaced.");
+ wrapMode: Text.WordWrap
+ Layout.maximumWidth: slideshow.width * .6
+ }
+ Label {
+ text: "Administrator password is needed"
+ Layout.maximumWidth: slideshow.width * .3
+ wrapMode: Text.WordWrap
+ }
+ Rectangle {id: noteBg
+ color: "yellow";
+ width: 70
+ height: 20
+ Label { text: qsTr("Note! ")
+ }
+ }
+ Label { text: qsTr("If you enabled the online repositories during installation, some media sources should be installed already. If you didn't, we will now configure these online repositories.
+ If this computer will have access to the Internet, you can delete the <i>cdrom</i> entry from the list of repositories.
+ <br />
+ Now, please enable or disable the online repositories of your choice: click on the <i>Edit software repositories</i> button below. Select the pair <i>release</i> with the <i>updates</i>. <i>Debuginfo</i> and <i>testing<i/> are for special cases.
+ <br />
+ After you have checked and enabled the repositories you need, please click on the <i>Next</i> arrow.
+ <br />Maybe we should suggest a bunch of usual repositories because the idea of repositories isn't obvious for newcomers")
+ wrapMode: Text.WordWrap
+ textFormat: Text.RichText
+ Layout.maximumWidth: slideshow.width * .6
+ }
+ }
+ }
+ }
+ // Update page
+ Rectangle {
+ property var title: "Update"
+ width: view.width; height: view.height
+ color: "#F4F0FF"
+ Column {
+ anchors {left: parent.left; verticalCenter: parent.verticalCenter; leftMargin: 10}
+ Label { text: qsTr("Update"); font.bold: true; }
+ Label {
+ width: slideshow.width * .7
+ text: qsTr("
+Mageia provides software which may be updated in order to fix bugs or security issues.
+It is highly recommended that you update your system regularly. An Update icon will appear in your task bar when new updates are available. To run the updates, just click on this icon and give your user password or use the Software Manager (root password). This is a background process and you will be able to use your computer normally during the updates.");
+ wrapMode: Text.WordWrap
+ }
+ }
+ Column {
+ anchors.right: parent.right
+ anchors.verticalCenter: parent.verticalCenter
+ Button {
+ objectName: "launch"
+ onClicked:{ launch.command("drakrpm-update")}
+ style: ButtonStyle {
+ label: Label {
+ text: qsTr("Check system update");
+ width: parent.width
+ wrapMode: Text.WordWrap
+ }
+ }
+ }
+ Label {
+ text: qsTr("User password is needed")
+ wrapMode: Text.WordWrap
+ }
+
+ }
+ }
+ // MCC Page
+ Rectangle {
+ property var title: "MCC"
+ width: view.width; height: view.height
+ color: "#F4F0FF"
+ Column {
+ anchors.left: parent.left
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.leftMargin: 5
+ Label {
+ text: qsTr("Mageia Control Center (aka drakconf) is a set of tools to help you configure your system.")
+ width: view.width * 0.6
+ wrapMode: Text.WordWrap
+ }
+ Label {text: qsTr("Software Management"); width: view.width/2; wrapMode: Text.WordWrap}
+ Label {text: qsTr("Hardware"); width: view.width/2; wrapMode: Text.WordWrap}
+ Label {text: qsTr("Network and Internet"); width: view.width/2; wrapMode: Text.WordWrap}
+ Label {text: qsTr("System"); width: view.width/2; wrapMode: Text.WordWrap}
+ Label {text: qsTr("Network Sharing"); width: view.width/2; wrapMode: Text.WordWrap}
+ Label {text: qsTr("Local Disks"); width: view.width/2; wrapMode: Text.WordWrap}
+ Label {text: qsTr("Security"); width: view.width/2; wrapMode: Text.WordWrap}
+ Label {text: qsTr("Boot"); width: view.width/2; wrapMode: Text.WordWrap}
+ }
+ Column {
+ anchors.right: parent.right
+ anchors.verticalCenter: parent.verticalCenter
+ Button {
+ id: mcc
+ objectName: "launch"
+ onClicked: { launch.command("drakconf")}
+ style: ButtonStyle {
+ label: Label {
+ text: qsTr("Mageia Control Center");
+ wrapMode: Text.WordWrap
+ }
+ }
+ }
+ Button {
+ objectName: "link"
+ onClicked: { link.weblink("https://www.mageia.org/doc")}
+ style: ButtonStyle {
+ label: Label {
+ text: qsTr("MCC documentation");
+ wrapMode: Text.WordWrap
+ }
+ }
+ }
+ Label {
+ text: qsTr("Administrator password is needed")
+ wrapMode: Text.WordWrap
+ width: view.width * .3;
+ }
+ }
+ }
+ // Install software page
+ Rectangle {
+ property var title: "Install software"
+ width: view.width; height: view.height
+ color: "#F4F0FF"
+ Column {
+ anchors.left: parent.left
+ anchors.verticalCenter: parent.verticalCenter
+ Label {
+ text: qsTr("Install and remove software")
+ width: slideshow.width * .7
+ font.bold: true
+ wrapMode: Text.WordWrap
+ }
+ Label {
+ text: qsTr("<If you have used MS-Windows for a long time, you might not be able to find the software you are used to, which probably are under proprietary licenses. Therefore they can't be redistributed, or don't even exist on GNU/Linux systems. Don't worry, there are lots of open-source alternatives!<BR/>
+The most famous one is probably the web-browser Mozilla Firefox, an open-source alternative to Microsoft Internet Explorer.<BR />
+I you need a mail client to manage your e-mails, you may choose between Kmail (by the KDE team), Evolution (by the Gnome team), or Mozilla Thunderbird, which is also very popular amongst Windows users. There are lesser-known e-mail clients such as Sylpheed, but they are far from being less efficient! You will find even more of them in the Mageia Software Manager.<BR />
+With Mageia, you will find the software in the media repositories (named store by Google and Apple). Mageia users simply access these media via one of the Software Managers.<BR >
+Nest slide is a small selection of popular applications - any of which may be installed at this point.<BR/>
+You can find a more detailed list here: <BR />
+If you can't find the software you need, please come and tell us about it. We will help you find the open-source equivalent.
+If it is an open-source application, we will gladly do our best to add it to the software repository. We will tell you how you can get in touch with the community in the <i>More information</i> tab.");
+ width: slideshow.width * .7;
+ wrapMode: Text.WordWrap
+ textFormat: Text.RichText
+ }
+ }
+ Column {
+ anchors.right: parent.right
+ anchors.verticalCenter: parent.verticalCenter
+ Button {
+ id: rpmdrake
+ style: ButtonStyle {
+ label: Label {
+ text: qsTr("RPMdrake")+" *";
+ width: slideshow.width * .3
+ wrapMode: Text.WordWrap
+ }
+ }
+ }
+ Label {
+ text: qsTr("(*) Administrator password is needed")
+ width: slideshow.width * .3
+ wrapMode: Text.WordWrap
+ font.italic: true
+ }
+
+ Button {
+ id: listApplicationsWiki
+ objectName: "link"
+ onClicked: { link.weblink(qsTr("https://wiki.mageia.org/en/List_of_applications"))}
+ style: ButtonStyle {
+ label: Label {
+ text: qsTr("List of applications (wiki)");
+ width: slideshow.width * .3
+ wrapMode: Text.WordWrap
+ }
+ }
+ }
+
+ }
+ }
+ // Applications page
+ Rectangle {
+ property var title: "Applications"
+ width: view.width; height: view.height
+
+ color: "#F4F0FF"
+ Column {
+
+ Rectangle {
+ // Bandeau avertissement
+ id: warning
+ width: view.width
+ height: 60
+ color: "yellow"
+ Label {anchors {verticalCenter: parent.verticalCenter;}
+ text: qsTr("Here is a small selection of popular applications - any of which may be installed at this point.")+"<BR />"+"Be sure you have enabled <i>online repositories</i>"
+ textFormat: Text.RichText
+ }
+ }
+ Row {
+ // Under the warning
+ Column {
+ // Software categories
+ id:categoriesColumn
+
+ Component { //The hightlight
+ id: catHighlight
+ Rectangle {
+ width: 200
+ height: 25
+ anchors.horizontalCenter: parent.horizontalCenter
+ color: "#8f9193"
+ y: categoriesList.currentItem.y;
+ }
+ }
+
+ ListView {
+ id:categoriesList
+ anchors {left: parent.left;margins: 5}
+ width: 200
+ //highlight: catHighlight
+ //highlightFollowsCurrentItem: false
+ focus: true
+ model: [{'name': qsTr("Featured"), 'group': "featured"},
+ {'name': qsTr("Games"),'group': "games"},
+ {'name':qsTr("Internet"),'group': "internet"},
+ {'name':qsTr("Video"),'group': "video"},
+ {'name':qsTr("Audio"),'group': "audio"},
+ {'name':qsTr("Office"),'group': "office"},
+ {'name':qsTr("Graphics"),'group': "graphics"},
+ {'name':qsTr("System"),'group': "system"},
+ {'name':qsTr("Programming"),'group': "programming"}]
+ height: 25 * 9
+ delegate: Rectangle{
+ width: parent.width
+ height: 25
+ color:"white"
+ Label {text: modelData.name ;}
+ MouseArea {
+ anchors.centerIn: parent
+ width: parent.width
+ height: 25
+ onClicked: {
+ appListDM.items.remove(0,appListDM.count );
+ var rowCount = appList.count;
+ for( var i = 0;i < rowCount;i++ )
+ {
+ var entry = appList.get(i);
+ entry.installable = installable.installable(entry.name, entry.inst_repo)
+ var pattern = new RegExp(modelData.group, "g");
+ if(pattern.test(entry.group) ) {
+ appListDM.items.insert(entry, "group");
+ }
+ }
+ appListDM.filterOnGroup = "items";}
+ }
+ }
+ }
+
+ }
+ Rectangle {
+ // Software list
+ height: box.height - 222
+ x: 200
+
+ DelegateModel {
+ id: appListDM
+ model: AppList {id: appList}
+ groups: [
+ DelegateModelGroup {
+ includeByDefault: false
+ name: "group"
+ }
+ ]
+ filterOnGroup: "group"
+ Component.onCompleted: {
+ var rowCount = appList.count;
+ items.remove(0,rowCount);
+ console.log("Init")
+ var pattern = /featured/g;
+ for( var i = 0;i < rowCount;i++ )
+ {
+ var entry = appList.get(i);
+ entry.installable = installable.installable(entry.name, entry.inst_repo)
+ if(pattern.test(entry.group) ) {
+ items.insert(entry, "group");
+ }
+ }
+ }
+ delegate: Row {
+ Image {
+ source: icon
+ width: 32
+ height: 32
+ }
+ //CheckBox{ enabled: installable
+ //}
+ Column{
+ Label {
+ text: title
+ font.bold: true
+ }
+ Label {
+ text: description
+ width: view.width - (200 + 32 +30 + 100)
+ wrapMode: Text.WordWrap
+ }
+ }
+
+ Column{
+ Loader {
+ Component {
+ id: repotag
+ Rectangle {
+ color: "red"
+ width: 70; height: 20
+ Label {
+ anchors.centerIn: parent
+ text: repo
+ }
+ }
+ }
+ Component { id: dumm; Label {text: " "}}
+ sourceComponent: repo == "" ? dumm : repotag
+ }
+
+ Loader {
+ Component { id: button;
+ Button {
+ objectName: "launch"
+ onClicked: {
+ launch.command(["gurpmi",name,])}
+ style: ButtonStyle {
+ label: Label {
+ text: qsTr("Install");
+ }
+ }
+ }
+ }
+ Component { id: dummy; Label {text: " "}}
+ sourceComponent: (installable === "True") ? button : dummy
+ }
+ }
+ }
+
+ }
+ Flickable {
+ height: 350
+ width: 500
+ ListView {
+ id: applicationsListView
+ anchors.fill: parent
+ model: appListDM
+ spacing: 5
+ }
+ }
+ }
+ }
+ }
+ }
+ // Configuration summary Page
+ Rectangle {
+ property var title: "Your configuration"
+ width: view.width; height: view.height
+ color: "#F4F0FF"
+ ListView {
+ id: confList
+ anchors.fill: parent
+ anchors.margins: 50
+ model: ConfList
+ delegate: Label {
+ text: name
+ }
+ }
+ }
+ // Links page
+ Rectangle {
+ property var title: "To go further"
+ width: view.width; height: view.height
+ color: "#F4F0FF"
+ Column {
+ anchors.left: parent.left
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.leftMargin: 10
+ Label { text: "To go further"; font.bold: true; }
+
+ Grid {
+ columns: 3
+ spacing: 10
+ Label {
+ width: view.width * .3
+ text: qsTr("Documentation")
+ wrapMode: Text.WordWrap
+ }
+ Label {
+ width: view.width * .3
+ text: qsTr("Support")
+ wrapMode: Text.WordWrap
+ }
+ Label {
+ width: view.width * .3
+ text: qsTr("Community")
+ wrapMode: Text.WordWrap
+ }
+ Repeater{
+ model: [{'name': qsTr("Release notes"), 'url': qsTr("https://wiki.mageia.org/en/Mageia_7_Release_Notes")},
+ {'name': qsTr("Forums"),'url': qsTr("https://forums.mageia.org/en/")},
+ {'name': qsTr("Community Center"),'url': qsTr("https://www.mageia.org/community/")},
+ {'name': qsTr("Errata"), 'url': qsTr("Wiki"),'url': qsTr("https://wiki.mageia.org/en/Mageia_7_Errata")},
+ {'name': qsTr("Contribute"),'url': qsTr("https://www.mageia.org/contribute/")},
+ {'name': qsTr("Newcomers Howto"),'url': qsTr("https://wiki.mageia.org/en/Newcomers_start_here")},
+ {'name': qsTr("Chat Room"),'url': qsTr("irc://irc.freenode.net/#mageia")},
+ {'name': qsTr("Donations"),'url': qsTr("https://www.mageia.org/donate/")},
+ {'name': qsTr("Documentation"),'url': qsTr("https://wiki.mageia.org/en/Documentation")},
+ {'name': qsTr("Bugs tracker"),'url': qsTr("https://bugs.mageia.org/")},
+ {'name': qsTr("Join us!"),'url': qsTr("https://identity.mageia.org/")}]
+ delegate: Button {
+ width: view.width * .3
+ objectName: "link"
+ onClicked: { link.weblink(modelData.url)}
+ style: ButtonStyle {
+ label: Label {text: modelData.name; width: parent.width; wrapMode: Text.WordWrap }
+ }
+ }
+ }
+ }
+ }
+
+
+ Component.onDestruction: if (printDestruction) print("destroyed 3")
+ }
+ }
+
+ ListView {
+ id: view
+ z: 1
+ anchors.rightMargin: 0
+ anchors.leftMargin: 0
+ anchors.topMargin: 0
+ anchors { fill: parent; bottomMargin: 30 }
+ model: itemModel
+ preferredHighlightBegin: 0; preferredHighlightEnd: 0
+ highlightRangeMode: ListView.StrictlyEnforceRange
+ orientation: ListView.Horizontal
+ snapMode: ListView.SnapOneItem; flickDeceleration: 2000
+ highlightFollowsCurrentItem: true
+ highlightMoveDuration: 800
+ cacheBuffer: 200
+ }
+ }
+ Rectangle {
+ id: buttonbox
+ width: banner.width; height: 42
+ anchors { top: banner.bottom; }
+ color: "gray"
+
+ Row {
+ anchors.centerIn: parent
+ spacing: 10
+
+ Repeater {
+ model: itemModel.count
+
+ Rectangle {
+ width: banner.width/9; height: 35
+ radius: 3
+ color: view.currentIndex == index ? "blue" : "white"
+ Label{
+ text: itemModel.get(index).title
+ font.pointSize: 8
+ width: parent.width
+ color: view.currentIndex == index ? "white" : "black"
+ horizontalAlignment: Text.AlignHCenter
+ wrapMode : Text.WordWrap
+ }
+
+ MouseArea {
+ width: banner.width/8; height: 35
+ anchors.centerIn: parent
+ onClicked: view.currentIndex = index
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/qml/mw.py b/qml/mw.py
new file mode 100644
index 0000000..51fc544
--- /dev/null
+++ b/qml/mw.py
@@ -0,0 +1,206 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+from PyQt5.QtGui import QGuiApplication
+from PyQt5.QtQuick import QQuickView
+from PyQt5.QtQml import qmlRegisterType
+from PyQt5.QtCore import QUrl, QLocale, QTranslator, QLibraryInfo, QAbstractListModel, QVariant, \
+ QModelIndex, Qt, QObject, pyqtSlot, pyqtProperty, qInstallMessageHandler, QSortFilterProxyModel, QRegExp, QByteArray
+import sys
+import os
+import subprocess
+from helpers import *
+import pwd
+
+class AppList(QAbstractListModel):
+
+ IconRole = Qt.UserRole + 1
+ NameRole = Qt.UserRole + 2
+ TitleRole = Qt.UserRole + 3
+ GroupRole = Qt.UserRole + 4
+ DescriptionRole = Qt.UserRole + 5
+ RepoRole = Qt.UserRole + 6
+ InstallableRole = Qt.UserRole + 7
+ InstalledRepoRole = Qt.UserRole + 8
+ listapp = []
+ def __init__(self, parent=None):
+ super().__init__(parent)
+ self.get_listapp()
+
+ def get_listapp(self):
+ with open("apps.csv", 'rt') as f:
+ mycsv = csv.reader(f,delimiter='|')
+ next(mycsv)
+ for r in mycsv:
+ if (r[5] == 'false'):
+ r[5] = ""
+ is_app_installed, repo = is_installed(r[1])
+ installable = (not is_app_installed) or (r[6] != repo and repo != "")
+ app = { 'icon': "img/{}.png".format(r[0]),
+ 'name': r[1],
+ 'title': r[2],
+ 'group':r[3],
+ 'description': r[4],
+ 'command': r[5],
+ 'repo':r[6],
+ 'installable': installable,
+ 'inst_repo': repo}
+ self.listapp.append(app)
+
+ def data(self, index, role=Qt.DisplayRole):
+ row = index.row()
+ if role == AppList.IconRole:
+ return AppList.listapp[row]["icon"]
+ elif role == AppList.NameRole:
+ return AppList.listapp[row]["name"]
+ elif role == AppList.TitleRole:
+ return AppList.listapp[row]["title"]
+ elif role == AppList.GroupRole:
+ return AppList.listapp[row]["group"]
+ elif role == AppList.DescriptionRole:
+ return AppList.listapp[row]["description"]
+ elif role == AppList.RepoRole:
+ return AppList.listapp[row]["repo"]
+ elif role == AppList.InstallableRole:
+ return AppList.listapp[row]["installable"]
+ elif role == AppList.InstalledRepoRole:
+ return AppList.listapp[row]["installedRepo"]
+ else:
+ print("Not found")
+
+ def rowCount(self, parent=QModelIndex()):
+ return len(AppList.listapp)
+
+ def roleNames(self):
+ return {
+ AppList.IconRole: b'icon',
+ AppList.NameRole: b'name',
+ AppList.TitleRole: b'title',
+ AppList.GroupRole: b'group',
+ AppList.DescriptionRole: b'description',
+ AppList.RepoRole: b'repo',
+ AppList.InstallableRole: b'installable',
+ AppList.InstalledRepoRole: b'installedRepo'
+ }
+
+class ConfList(QAbstractListModel):
+ NameRole = Qt.UserRole + 1
+ def __init__(self, parent=None):
+ super().__init__(parent)
+ # Changing working directory
+ abspath = os.path.abspath(__file__)
+ dname = os.path.dirname(abspath)
+ os.chdir(dname)
+
+ #collect sys info
+ #release = open("/etc/release", "r").read()
+ release = subprocess.getoutput('lsb_release -sd')
+ release = release[1:-1]
+ release_nb = subprocess.getoutput('lsb_release -sr')
+ release_nb = release_nb.strip()
+ kernel = subprocess.getoutput('uname -r')
+ if os.uname()[4] == 'x86_64':
+ arch = '64-bit'
+ else:
+ arch = '32-bit'
+ home = os.getenv("HOME")
+ username = os.getenv("USER")
+ try:
+ desktop = get_desktop_name(os.path.basename(os.getenv("DESKTOP_SESSION")))
+ except:
+ desktop = 'Other'
+
+ if desktop == 'Other':
+ desktop = get_desktop_name2(os.getenv("XDG_CURRENT_DESKTOP"))
+ if desktop == 'unknown':
+ desktop = os.getenv("XDG_CURRENT_DESKTOP")
+
+ self.configuration = [
+ {'name': release},
+ {'name': _("kernel: {}").format(kernel)},
+ {'name': _("arch: {}").format(arch)},
+ {'name': _("Desktop: {}").format(desktop)},
+ {'name': _("Your user's id: {}").format(os.getuid())},
+ ]
+
+ def data(self, index, role=Qt.DisplayRole):
+ row = index.row()
+ return self.configuration[row]["name"]
+
+ def rowCount(self, parent=QModelIndex()):
+ return len(self.configuration)
+
+ def roleNames(self):
+ return {
+ ConfList.NameRole: b'name',
+ }
+
+class Callbrowser(QObject):
+ def __init__(self):
+ QObject.__init__(self)
+
+ @pyqtSlot(str)
+ def weblink(self, link):
+ subprocess.Popen(["xdg-open", link])
+ print("Opening %s"%link)
+
+class Launcher(QObject):
+ def __init__(self):
+ QObject.__init__(self)
+
+ @pyqtSlot(QVariant)
+ def command(self, app):
+ if app.isArray():
+ cmd = []
+ for i in range(0,app.property("length").toInt()):
+ cmd.append(app.property(i).toString())
+ subprocess.Popen(cmd)
+
+class Installable(QObject):
+ def __init__(self):
+ QObject.__init__(self)
+
+ @pyqtSlot(str, str, result=bool)
+ def installable(self, app,repo):
+ is_app_installed, inst_repo = is_installed(app)
+ installable = (not is_app_installed) or (repo != inst_repo and inst_repo != "")
+ return installable
+
+def username():
+ user = pwd.getpwuid(os.getuid())[4] # pw_gecos, i e the real name
+ if user == "":
+ user = pwd.getpwuid(os.getuid())[0] # login
+ return user
+
+if __name__ == '__main__':
+ app = QGuiApplication(sys.argv)
+ locale = QLocale.system().name()
+ qtTranslator = QTranslator()
+ if qtTranslator.load("qt_" + locale,QLibraryInfo.location(QLibraryInfo.TranslationsPath)):
+ app.installTranslator(qtTranslator)
+ appTranslator = QTranslator()
+ if appTranslator.load("mageiawelcome_" + locale,':/languages'):
+ app.installTranslator(appTranslator)
+ view = QQuickView()
+ view.setResizeMode(QQuickView.SizeRootObjectToView)
+ cb = Callbrowser()
+ la = Launcher()
+ us = username()
+ ins = Installable()
+ cl = ConfList()
+ view.rootContext().setContextProperty('link', cb)
+ view.rootContext().setContextProperty('launch', la)
+ view.rootContext().setContextProperty('user', us)
+ view.rootContext().setContextProperty('ConfList', cl)
+ view.rootContext().setContextProperty('installable', ins)
+ current_path = os.path.abspath(os.path.dirname(__file__))
+ qml_file = os.path.join(current_path, 'mw-ui.qml')
+ print("Loading")
+ view.setSource(QUrl.fromLocalFile(qml_file))
+ if view.status() == QQuickView.Error:
+ for error in view.errors():
+ print(error.description())
+ sys.exit(-1)
+ view.show()
+ res = app.exec_()
+ del view
+ sys.exit(res)