/****************************************************************************
** kiso.cpp
**
** Created: Mit Nov 26 21:30:40 2003
**      by: Stephan Gans
**
** 
****************************************************************************/

#include "kiso.h"
#include "FPreferences.h"
#include "dirops.h"

#include <cdio/cdio.h>
#include <cdio/mmc.h>
#include <stdio.h>

#include <kmessagebox.h>
#include <kaudioplayer.h>
#include <kprogress.h>
#include <kaboutapplication.h>
#include <kfiledialog.h>
#include <khelpmenu.h>
#include <kpopupmenu.h>
#include <kdirsize.h>
#include <kinputdialog.h>
#include <kiconloader.h>
#include <krun.h>
#include <kstandarddirs.h>
#include <kpassdlg.h>
#include <kpropsdlg.h>

#include <qlabel.h>
#include <qcursor.h>
#include <qtooltip.h>
#include <qfileinfo.h>
#include <qwhatsthis.h>
#include <qstring.h>
#include <qmovie.h>
#include <qlcdnumber.h>
#include <qlayout.h>
#include <qstringlist.h>

#define DEFAULT_TIMEOUT_MS 10000

static const char* const image2_data[] = { 
"32 32 41 1",
". c None",
"A c #8395b4",
"D c #8b95b4",
"v c #9caac5",
"u c #9caacd",
"z c #b4c2e6",
"y c #b4c6de",
"C c #b4c6e6",
"x c #bdc6e6",
"B c #bdcae6",
"o c #c5cee6",
"l c #c5ceee",
"# c #c5d2e6",
"b c #c5d2ee",
"a c #cdd2ee",
"t c #cdd6ee",
"G c #cddaee",
"H c #cddaf6",
"E c #d5daee",
"F c #d5daf6",
"s c #d5def6",
"k c #d5e2f6",
"g c #dee2f6",
"w c #dee2ff",
"n c #dee6f6",
"p c #dee6ff",
"r c #deeaff",
"L c #e6e6f6",
"J c #e6e6ff",
"I c #e6eaf6",
"f c #e6eaff",
"j c #e6eeff",
"K c #eeeeff",
"i c #eef2ff",
"m c #eef6ff",
"q c #f6f2ff",
"e c #f6f6ff",
"d c #f6faff",
"M c #f6ffff",
"h c #fffaff",
"c c #ffffff",
"...#aba#aba#aba#ab..............",
"...accccccccccdefgb.............",
"...bcccccccccchijklm............",
"...accccccccccdejnodp...........",
"...#cccccccccccdqnacip..........",
"...acccccccccccdif#ccer.........",
"...bccccccccccchejleejns........",
"...acccccccccccceituvuvuvu......",
"...#cccccccccccchiifwoxyzA......",
"...accccccccccccdejftoBBCD......",
"...bccccccccccccceigtbaolA......",
"...accccccccccccdigsttatbD......",
"...#cccccccccccdqpgssEFGHA......",
"...accccccccccdiIJggssEsHD......",
"...bcccccccccdqjjffnpggswA......",
"...acccccccceiKKjjffnnggkD......",
"...#cccccccddeeiijKffLfnJA......",
"...accccccdheemeiifKffnfpD......",
"...bccccccchhddeeiiKKffffA......",
"...accccccccddeeiiKKjfffrD......",
"...#cccccccccddeeiiKKjffjA......",
"...accccccccdhedieiijKfffD......",
"...bcccccccccdhediqiijKfjA......",
"...accccccccddedmeiijjfjfD......",
"...#cccccccdcddedieKifKfjA......",
"...accccccMcddedieiijKfffD......",
"...bcccccccdcdheeiqKKfKfjA......",
"...accccccchddediiiKjjfffD......",
"...#cccccccdcddeeiiKKfKfjA......",
"...aADADADADADADADADADADAD......",
"................................",
"................................"};

static const char* const image3_data[] = { 
"32 32 136 2",
"Qt c None",
"#c c #000000",
"#U c #39406a",
"#t c #394073",
".9 c #394473",
"#y c #414073",
"#D c #41447b",
"#i c #41487b",
"#Z c #4a4c7b",
".1 c #4a4c83",
"#2 c #4a5083",
".Q c #4a558b",
"#k c #525583",
"#l c #52558b",
".W c #52598b",
"#7 c #525994",
".M c #525d94",
".2 c #5a5d9c",
"ad c #5a619c",
"#F c #5a65a4",
".D c #5a69a4",
"ac c #6269a4",
".E c #6269ac",
"#6 c #626da4",
".w c #6271b4",
".l c #6271bd",
"ae c #6a75b4",
"af c #6a75bd",
"#a c #7375a4",
"#T c #73799c",
".V c #7379a4",
".x c #737dc5",
"#n c #7385cd",
"#9 c #7385de",
"#0 c #7389cd",
".n c #7b85d5",
".m c #7b89cd",
".d c #7b8dde",
"#8 c #7b91de",
".f c #7b91e6",
".L c #8389b4",
".c c #8391e6",
".b c #8395e6",
"#V c #8399e6",
"ab c #8b95c5",
".a c #8b9df6",
".p c #8ba1f6",
"#W c #8ba5f6",
".P c #9499bd",
".k c #949dd5",
"a. c #94a1de",
".# c #94a5f6",
".0 c #94aaf6",
".e c #94aaff",
".8 c #94aef6",
"#S c #94aeff",
".v c #9ca1cd",
"#v c #9ca1d5",
".g c #9ca5e6",
".7 c #9cb2f6",
".N c #9cb2ff",
"## c #9cb6f6",
".X c #9cb6ff",
"#s c #a4a5c5",
"#G c #a4aad5",
"#B c #a4aade",
".j c #a4aede",
"#. c #a4b6f6",
"#X c #a4b6ff",
"#C c #a4baf6",
"#q c #a4baff",
"#r c #a4beff",
"#A c #acaec5",
"#1 c #acaecd",
"#M c #acb2e6",
".y c #acbaff",
"#g c #acbef6",
".Z c #acbeff",
".G c #acc2ff",
"#b c #acc6ff",
".3 c #accaff",
"#Y c #b4b2d5",
"a# c #b4b6e6",
"#3 c #b4baee",
".h c #b4bee6",
"#o c #b4beee",
".6 c #b4c2ff",
"#p c #b4c6f6",
".J c #b4c6ff",
".R c #b4caff",
".o c #b4ceff",
"aa c #bdbae6",
"#R c #bdc2de",
"#J c #bdc2e6",
".i c #bdc2ee",
".B c #bdc6ff",
"#I c #bdcaf6",
".A c #bdcaff",
".I c #bdcef6",
"#z c #bdceff",
".F c #bdd6ff",
"#e c #c5caee",
"#d c #c5caf6",
"#O c #c5caff",
".4 c #c5ceff",
".s c #c5d2ff",
"#w c #c5d6ff",
"#P c #c5deff",
"#j c #cdcaee",
".q c #cdd6f6",
".H c #cdd6ff",
"#m c #cddaff",
"#N c #d5d2ee",
"#u c #d5d6ee",
"#E c #d5d6ff",
".Y c #d5daff",
".T c #d5deff",
"#x c #dedef6",
"#Q c #dedeff",
".t c #dee2ff",
".S c #dee6ff",
"#f c #e6e2f6",
"#K c #e6e6ff",
".5 c #e6eaff",
"#4 c #e6eeff",
"#h c #eeeaf6",
"#5 c #eeeaff",
".z c #eeeeff",
"#L c #eef2ff",
"#H c #eef6ff",
".r c #f6f2ff",
".O c #f6f6ff",
".K c #f6faff",
".U c #fff6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tQtQt#c#c#c#c#c#c#c#c#c.W.wae.wafQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"};

static const char* const image4_data[] = { 
"32 32 244 2",
"Qt c None",
".c c #007900",
".n c #008100",
".b c #008900",
".e c #009100",
".g c #009900",
".f c #009d00",
".i c #00a100",
".5 c #00a500",
".h c #00aa00",
".m c #00b600",
".X c #00ba00",
".t c #00be00",
".u c #00c200",
".6 c #00c600",
".C c #00ca00",
".D c #00ce00",
".O c #00d200",
".N c #00d600",
".Z c #00de00",
".Y c #00e200",
".8 c #00e600",
".7 c #00ea00",
"#g c #00f600",
"#f c #00fa00",
"#s c #00ff00",
".v c #088900",
"#q c #08da08",
"#t c #08ee08",
"#r c #08ff08",
".a c #107d00",
".E c #109508",
".P c #109908",
".0 c #10a108",
".s c #208108",
"#F c #20de20",
"#I c #29ee29",
".d c #318510",
".l c #318910",
".# c #318d18",
".B c #319918",
".M c #31a120",
".W c #31aa20",
"#P c #39e239",
"#H c #39ff39",
"aq c #41da20",
"#G c #41ff41",
"au c #52da31",
"#T c #52f252",
"at c #5ade41",
"#1 c #5ae25a",
"as c #62de41",
"ar c #62e241",
"#S c #6aff6a",
"#Q c #73ff73",
"ab c #7bea73",
"#R c #7bff7b",
"#4 c #83f283",
"ad c #acf6ac",
"#3 c #acffac",
"#2 c #b4ffb4",
"bm c #bd4400",
"bT c #bd4c00",
"by c #c54400",
"bh c #c54800",
"am c #c55000",
"bX c #c55008",
"aK c #cd5900",
"aA c #cd5908",
"bB c #cd6918",
"#8 c #d56500",
"#A c #d56900",
"aV c #d56908",
"a5 c #d58118",
"bH c #de6d08",
"ba c #de7100",
"a6 c #de7108",
"bC c #de7508",
"ah c #de7910",
"#X c #de7d00",
"aI c #de7d08",
"bG c #de7d20",
"ai c #de8108",
"bf c #de8920",
"bN c #de8d29",
"b# c #e67900",
"aS c #e67910",
"aR c #e68100",
"#a c #e68108",
"ax c #e68510",
"#7 c #e68518",
"a0 c #e68900",
".S c #e68908",
"az c #e68d10",
"bz c #e68d18",
"bS c #e68d31",
"aw c #e69118",
"aH c #e69518",
"bU c #e6954a",
"ac c #e6ffe6",
"b. c #ee8508",
"a1 c #ee8900",
".3 c #ee8908",
"aN c #ee8d00",
"#h c #ee8d08",
"#J c #ee8d10",
".H c #ee9108",
"#v c #ee9110",
"aD c #ee9500",
"#K c #ee9910",
"bk c #ee9918",
"bW c #ee9941",
"a9 c #ee9d10",
"bj c #ee9d18",
"#w c #eea118",
"#W c #eea120",
"bO c #eea54a",
"bb c #eea552",
"aU c #eeb631",
"bx c #eeb639",
"aT c #eeb641",
"a2 c #eeba5a",
"aQ c #f69500",
"aP c #f69900",
"aY c #f69908",
"aX c #f69d00",
"a7 c #f69d08",
"bn c #f69d10",
"bg c #f69d18",
"ao c #f6a100",
"aG c #f6a108",
"al c #f6a118",
"aO c #f6a510",
"br c #f6aa20",
"ak c #f6b218",
"aj c #f6b220",
"bi c #f6c241",
"#i c #f6c631",
"aJ c #f6c641",
"ay c #f6ca39",
"aF c #f6ca41",
"bc c #f6ca73",
"ag c #f6ce41",
"bF c #f6ce4a",
"be c #f6ce62",
"a4 c #f6da52",
"aB c #ffa100",
"a# c #ffa500",
"aZ c #ffa508",
"an c #ffaa00",
"aW c #ffaa08",
"#z c #ffaa10",
"#B c #ffae00",
"#L c #ffae10",
"a8 c #ffae18",
"#p c #ffb200",
".I c #ffb208",
".j c #ffb210",
"aL c #ffb218",
"#d c #ffb608",
"#D c #ffba10",
".y c #ffba18",
"#e c #ffbe10",
"#n c #ffbe18",
".q c #ffbe20",
"#M c #ffbe29",
"#y c #ffc218",
"aM c #ffc220",
"#C c #ffc231",
".T c #ffc239",
"## c #ffc620",
".k c #ffc629",
"#m c #ffca20",
"#u c #ffca29",
"aC c #ffca31",
"bI c #ffca62",
"#l c #ffce29",
".2 c #ffce31",
"#0 c #ffce39",
".p c #ffce41",
"#b c #ffce52",
"bD c #ffce5a",
"#x c #ffd229",
"#O c #ffd231",
".R c #ffd239",
".G c #ffd241",
"bR c #ffd262",
"#. c #ffd631",
"#E c #ffd639",
".x c #ffd641",
"bV c #ffd68b",
".9 c #ffda39",
"ap c #ffda41",
"av c #ffda52",
"bM c #ffda5a",
".J c #ffda6a",
"bd c #ffda7b",
"bq c #ffde39",
"#k c #ffde41",
"#c c #ffde5a",
"aa c #ffe241",
".1 c #ffe24a",
".z c #ffe273",
"#U c #ffe64a",
"bw c #ffe652",
"bu c #ffe65a",
"bl c #ffe662",
"bo c #ffea4a",
"#j c #ffea52",
"bs c #ffea5a",
"bp c #ffea6a",
"#V c #ffee52",
".Q c #ffee5a",
"#9 c #ffee6a",
".r c #ffee7b",
"#o c #ffee94",
"#5 c #fff25a",
"bt c #fff273",
"#Y c #fff28b",
"#N c #fff294",
"ae c #fff65a",
"#6 c #fff662",
"bL c #fff673",
"bv c #fff67b",
"bQ c #fff683",
"a3 c #fff694",
".4 c #fff6bd",
"af c #fffa62",
"aE c #fffa73",
"bJ c #fffa9c",
"bP c #fffaac",
".F c #ffff6a",
"a. c #ffff73",
".w c #ffff7b",
"bA c #ffff83",
"bE c #ffff8b",
"#Z c #ffff94",
".o c #ffff9c",
"bK c #ffffa4",
".A c #ffffac",
".L c #ffffb4",
".K c #ffffbd",
".V c #ffffc5",
".U c #ffffcd",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.#QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQt.a.b.cQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQt.d.e.f.g.cQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQt.d.g.h.h.h.i.cQt.jQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQt.k.l.i.m.m.m.m.m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QtQtaW#l#l#l.qa8a9b.b#b#babbbcbdbebf#Abg#yaMbhQtQtQtQtQtQt",
"QtQtQtQtQt#z#O#.#.#E#.#E#..2biaja9bjaIaIbk#l#m#u#mbhQtQtQtQtQtQt",
"QtQtQtQtQtaO#k#kaa#kaa#kaaaabl#E.9#.#E#.#.#O#.#O#ObmQtQtQtQtQtQt",
"QtQtQtQtQtbn.1#U#Ubo#U#j#U#jbpaabq#kbq#k.9bq.9.9.9bmQtQtQtQtQtQt",
"QtQtQtQtQtQtbrbs#5#5#5#5#5#5bt#U#j#U#U#U#U.1#Uaa.1bmQtQtQtQtQtQt",
"QtQtQtQtQtQtQt#vbuafafafafafbv#5#V.Q#V#V#j#VbobwbxbyQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtbzbla.a.a.a.bA#6afae#6ae#6.Q#bbBQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtbCbDbAbAbEbE.F.F.F.F#6bFbGQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtbHbIbJ.obK.wbAbLbMbNbyQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtbObP.AbQbRbSbTQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtbUbVbWbXQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtbXQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"};

static const char* const image5_data[] = { 
"32 32 250 2",
"Qt c None",
"bE c #394473",
"aH c #41447b",
"aV c #41487b",
"bR c #4a5083",
".R c #5a69a4",
"b3 c #6269a4",
"bW c #626da4",
".E c #6271b4",
".q c #6271bd",
"bJ c #7375a4",
"bz c #73799c",
"a. c #7385cd",
"bX c #7385de",
"aK c #7b85d5",
".k c #7b91e6",
".1 c #8389b4",
"b2 c #8b95c5",
".x c #8ba1f6",
".p c #949dd5",
"bY c #94a1de",
"bo c #94aaf6",
"ax c #94aaff",
"bu c #94aeff",
"#8 c #9c614a",
"bI c #9c6d6a",
".D c #9ca1cd",
".l c #9ca5e6",
"a8 c #9cb2f6",
".9 c #9cb2ff",
"bg c #9cb6f6",
"#o c #9cb6ff",
"bG c #a47d73",
"ah c #a4a5c5",
".o c #a4aede",
"at c #a4b6f6",
"bK c #a4b6ff",
"bf c #a4baf6",
"ar c #ac654a",
"by c #ac694a",
"bH c #ac7562",
"bm c #ac7d73",
"bF c #ac8d94",
"bQ c #acaecd",
"a9 c #acb2e6",
"#2 c #acbae6",
"aI c #acbaf6",
".M c #acbaff",
"aW c #acbef6",
"#U c #acc2f6",
".W c #acc2ff",
"bM c #b46539",
"bs c #b4694a",
"bA c #b4897b",
"bP c #b49594",
"bN c #b4b2d5",
"bZ c #b4b6e6",
"bS c #b4baee",
".m c #b4bee6",
"a# c #b4beee",
"ai c #b4c2ff",
"au c #b4c6f6",
".Z c #b4c6ff",
"bD c #bd7962",
"#P c #bd7d6a",
"bL c #bd999c",
"bv c #bda19c",
"bO c #bdaeb4",
"b1 c #bdbae6",
"bt c #bdc2de",
"b0 c #bdc2e6",
".n c #bdc2ee",
".P c #bdc6ff",
"aX c #bdcaf6",
".O c #bdcaff",
".Y c #bdcef6",
"av c #bdceff",
".L c #c56d39",
".8 c #c57139",
"a6 c #c5a5a4",
"aG c #c5b6bd",
"#R c #c5caee",
"#Q c #c5caf6",
"be c #c5caff",
"#y c #c5ceff",
".A c #c5d2ff",
"bT c #c5d6ff",
"aT c #cd754a",
"bd c #cd815a",
"bp c #cdaea4",
"#1 c #cdcaee",
".y c #cdd6f6",
".X c #cdd6ff",
"#T c #cddaff",
".a c #d58952",
"aj c #d5d6ee",
"aJ c #d5d6ff",
"#p c #d5daff",
"#f c #d5deff",
"aw c #d5e2ff",
"#G c #de7529",
"#n c #de7531",
"#0 c #de7931",
"ag c #de8131",
"bB c #decec5",
"as c #dedef6",
"bn c #dedeff",
".B c #dee2ff",
"#e c #dee6ff",
"a5 c #e69952",
".f c #e69d73",
"ak c #e6aa41",
"#3 c #e6b64a",
"aY c #e6e2ee",
"#S c #e6e2f6",
"a7 c #e6e6ff",
"#z c #e6eaff",
"bU c #e6eeff",
".V c #ee7d20",
".w c #ee8129",
"aF c #ee954a",
".# c #eeb273",
"bC c #eeb69c",
"#x c #eebaa4",
"bw c #eecaa4",
"az c #eeded5",
"aL c #eee6f6",
"#H c #eeeaf6",
"bV c #eeeaff",
"ay c #eeeef6",
".N c #eeeeff",
"#9 c #eef2ff",
"aU c #eef6ff",
"#d c #f68520",
"bl c #f6b673",
"#I c #f6ba31",
"bh c #f6ba6a",
".F c #f6c662",
"aM c #f6c673",
"bq c #f6c694",
"bx c #f6d2bd",
".z c #f6f2ff",
"#. c #f6f6ff",
".0 c #f6faff",
".K c #ff9929",
"#w c #ff9939",
".7 c #ff9d31",
"#O c #ffa141",
".J c #ffa520",
".6 c #ffaa20",
"#v c #ffaa39",
"#F c #ffaa4a",
"#m c #ffb231",
"#Z c #ffb252",
".v c #ffb25a",
"#N c #ffb652",
".u c #ffba18",
"#E c #ffba39",
".I c #ffbe00",
".U c #ffbe08",
"#c c #ffbe18",
"#7 c #ffbe62",
"af c #ffbe6a",
".t c #ffc200",
".S c #ffc208",
".5 c #ffc210",
"#r c #ffc220",
"b. c #ffc26a",
"aq c #ffc273",
"#a c #ffc618",
"#l c #ffc620",
"aZ c #ffc641",
".2 c #ffc662",
"aE c #ffc67b",
".r c #ffca00",
"#k c #ffca20",
"#u c #ffca29",
"#Y c #ffca4a",
"ap c #ffca73",
"#h c #ffca83",
".T c #ffce08",
"#D c #ffce31",
"#M c #ffce39",
"ae c #ffce5a",
"aS c #ffce83",
"#L c #ffd241",
"aR c #ffd27b",
"a4 c #ffd28b",
"br c #ffd2bd",
".b c #ffd610",
"aa c #ffd641",
"#X c #ffd64a",
"#6 c #ffd652",
"ad c #ffd65a",
"bc c #ffd694",
"ac c #ffda5a",
"ao c #ffda62",
"aC c #ffda6a",
"aD c #ffda73",
"bk c #ffda9c",
"#A c #ffdaa4",
".h c #ffde10",
"#t c #ffde29",
"#V c #ffde39",
"an c #ffde6a",
"aP c #ffde73",
"a3 c #ffde7b",
".i c #ffde8b",
"bb c #ffde94",
".H c #ffe200",
"#i c #ffe218",
"#B c #ffe229",
"#K c #ffe239",
"aQ c #ffe273",
"a2 c #ffe283",
".3 c #ffe600",
"aB c #ffe673",
"a1 c #ffe683",
"ba c #ffe68b",
"bj c #ffe694",
".e c #ffe6d5",
".g c #ffea00",
".4 c #ffea08",
"#j c #ffea18",
"#5 c #ffea52",
"bi c #ffeab4",
".G c #ffee00",
".s c #ffee08",
"#b c #ffee10",
"#s c #ffee20",
"#C c #ffee31",
"am c #ffee6a",
"#J c #fff241",
"#W c #fff24a",
"#4 c #fff25a",
"aO c #fff283",
".c c #fff2b4",
".j c #fff2de",
".d c #fff2e6",
"ab c #fff662",
"al c #fff673",
"aA c #fff67b",
"aN c #fff68b",
"b# c #fff69c",
"#g c #fff6ff",
"a0 c #fffa94",
"#q c #fffaf6",
".Q c #fffaff",
"## c #fffff6",
".C c #ffffff",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.#.aQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.b.c.d.e.fQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.g.h.i.d.j.fQtQt",
"QtQtQtQtQtQtQtQtQt.k.l.m.n.o.p.qQtQtQtQtQtQtQt.r.s.r.t.u.v.wQtQt",
"QtQtQtQtQtQtQt.x.y.z.A.B.C.C.C.C.z.D.EQtQtQt.F.G.H.I.I.J.K.LQtQt",
"QtQtQtQtQtQt.M.C.N.O.P.O.Q.N.C.C.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",
"QtQtQtQtQtbn.9bo#e.C.Q.C.C.C.Cbpbq.j.d.jbrbs.C.C.CbtQtQtQtQtQtQt",
"QtQtQtQtQtbu#9#T.C.Q.Q.C.C.C.Qbvbw.d.jbxby.C.C.C.CbzQtQtQtQtQtQt",
"QtQtQtQtQtQt.9.C.C#..C.C.C.C.CbpbAbBbCbD.C.C.C.C.CbEQtQtQtQtQtQt",
"QtQtQtQtQtQtQtai.C.C.C.C.C.C.QbFbGbHbI.C.C.C.C.CbJQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtbK.C.C.C.C.C.CbLbMbm.X.C.C.C.CbNQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQt.x.Q.C.C.C.CbObP.OaX#z.C.CbQbRQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQt.xbSa7.C.C.Q.C#pbTbUbVbWQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtbXbYbZb0b1b2b3QtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"};

static const char* const image6_data[] = { 
"32 32 261 2",
".a c None",
".# c None",
"Qt c None",
"#W c #0024ff",
"#7 c #0028bd",
"#L c #0028ff",
"am c #002cff",
"al c #0034c5",
"aC c #0034cd",
"#6 c #0034ff",
"aR c #0038cd",
"aD c #0038ff",
"#u c #005de6",
"#x c #082cac",
"bC c #0838ff",
"aE c #083cff",
"aS c #0840ff",
"#V c #0865ee",
"#a c #0889ff",
"an c #102cbd",
"#e c #1030ff",
"bG c #1040ac",
".L c #1044ff",
"a7 c #1050ff",
"#5 c #1055ff",
"#I c #1059ff",
"#H c #1095ff",
"ao c #1830ff",
"#8 c #1834ff",
"bu c #1838ac",
".2 c #1838b4",
"bl c #1840ff",
"ak c #1855de",
"#9 c #2038b4",
"#X c #2038bd",
"#Y c #203cac",
"#K c #203cc5",
"#w c #203cff",
"#J c #2040ff",
"ba c #2048b4",
"bM c #2048ff",
"aQ c #2059ff",
"b6 c #208dff",
".D c #294cb4",
"a. c #294cff",
"bX c #2950ac",
"bR c #2959bd",
".X c #295dff",
"b4 c #2965c5",
"aB c #2965ff",
"aP c #296dee",
"#o c #2975ff",
"ca c #2979de",
"#U c #2979ff",
"c# c #297dff",
"a6 c #2991ff",
".8 c #2995ff",
"bN c #314ca4",
"a5 c #3179ff",
"bv c #317dde",
"#t c #3181ff",
"bD c #3955a4",
"#d c #3965ff",
"aO c #3979ff",
"bO c #397dd5",
"bH c #397dff",
"bg c #3981f6",
"aj c #3981ff",
"aW c #3989ff",
"a# c #3991ee",
"bU c #3991ff",
".K c #4165ff",
"#v c #4175e6",
"aN c #4185f6",
"#b c #4185ff",
"#P c #4189de",
"bQ c #4195ff",
"ab c #4199ee",
"#y c #4199ff",
".I c #4a5dac",
".E c #4a65ff",
"b1 c #4a85d5",
".1 c #4a91ff",
"#s c #4a9dff",
"#T c #4aa1ff",
"aG c #526dbd",
"aV c #526dff",
"bq c #5291ff",
"a3 c #5295ff",
"ai c #529dff",
"#F c #52a1ff",
"#S c #52a5ff",
"ap c #5a6db4",
".Y c #5a81d5",
"bW c #5a81ff",
"cb c #5a89ff",
".9 c #5a8dff",
"aM c #5a99ff",
"bf c #5a9dff",
"b2 c #5aa1ff",
"#r c #5aa5ff",
".Q c #5ad2ff",
"aT c #6279cd",
".O c #6279ff",
"b9 c #6285b4",
".W c #628dd5",
"bZ c #6291ff",
"#p c #629de6",
"bw c #62a1ff",
"#4 c #62aeff",
"ah c #62d6ff",
".3 c #6a79ff",
"b0 c #6a81ac",
"bB c #6a81bd",
"b5 c #6a85ff",
".M c #6a95ff",
"c. c #6a99de",
".7 c #6a9dff",
"bo c #6aaaff",
"bn c #6aaeff",
"ag c #6ab2ff",
"#D c #6ab6ff",
"#R c #6adeff",
"#n c #7391d5",
"bh c #7395e6",
"## c #73aaff",
".0 c #73aef6",
".H c #73aeff",
"aL c #73b6ff",
"ay c #73baff",
"bb c #73deff",
"bS c #7b48ff",
".J c #7b50ff",
"b8 c #7b95ff",
"#1 c #7bb2ff",
".R c #7bbaf6",
"a1 c #7bbaff",
"#Q c #7bbeff",
"#M c #7bdeff",
"af c #7be6ff",
".t c #8385ff",
".q c #8389c5",
"aA c #8399ff",
"#A c #83a1ff",
"cc c #83aaff",
"#C c #83b6ff",
".F c #83beff",
"bE c #83c6ff",
"bL c #8b9dcd",
".6 c #8ba1ff",
"bY c #8baeff",
"bI c #8bb2e6",
"b7 c #8bb6ff",
"aY c #8bbeff",
"#2 c #8bc6ff",
"ae c #8bcaff",
"b3 c #8bdaff",
"aK c #8beeff",
"be c #8bf2ff",
"a4 c #94aeff",
"#0 c #94b6ff",
"bT c #94c2ff",
"bc c #94c6ff",
"aw c #94ceff",
"#c c #9cb6ff",
"bx c #9cbaf6",
"#q c #9ccaff",
"aZ c #9cceff",
"bd c #9cd2ff",
"aF c #a495ff",
".l c #a4aaff",
"#B c #a4aeff",
".z c #a4c2ff",
".G c #a4c6ff",
"#G c #a4caff",
"ar c #a4ceff",
".f c #acbaff",
"aa c #acbeff",
"bp c #acc6ff",
"aH c #accaee",
"az c #accaff",
"#E c #acd2ff",
".P c #acd6ff",
"au c #acdeff",
".N c #b4aeff",
"aU c #b4b6cd",
".j c #b4baff",
".d c #b4c2e6",
"#z c #b4ceff",
"#Z c #b4d2ff",
"aI c #b4d6ff",
"aX c #b4daff",
"a8 c #bdaeff",
"bk c #bdbacd",
"b. c #bdbed5",
".b c #bdc6ee",
"a2 c #bdceff",
"aq c #bdd2ff",
"as c #bddeff",
"ac c #bde2ff",
"aJ c #bde6ff",
"bt c #c5aaff",
".B c #c5c2f6",
"bj c #c5c6d5",
"bm c #c5d2ff",
"#l c #c5d6ff",
"#g c #c5deff",
"at c #c5e6ff",
"bi c #cdcede",
"bs c #cdceff",
".Z c #cdd2ff",
".w c #cdd6ff",
".T c #cddaff",
"#i c #cddeff",
"#3 c #cde6ff",
"#N c #cdeaff",
"#m c #d5a5ff",
".y c #d5b2ff",
"bA c #d5d2e6",
"#. c #d5d6ff",
"br c #d5daff",
".o c #d5e2ff",
"#f c #d5e6f6",
"#h c #d5eaff",
"ax c #d5eeff",
"bF c #debeff",
"bz c #dedeee",
"bV c #dee2f6",
"#j c #dee6ff",
".4 c #deeaff",
"a0 c #deeeff",
".S c #def2ff",
".k c #e6c2ff",
"#O c #e6deff",
"by c #e6e6ee",
".m c #e6e6ff",
".v c #e6eaff",
".A c #e6eeff",
".U c #e6f2ff",
"bJ c #e6f6ff",
".C c #eed2ff",
"bK c #eeeef6",
".V c #eeeeff",
"bP c #eef2ff",
"#k c #eef6ff",
"av c #eefaff",
".n c #f6f6ff",
".u c #f6faff",
"ad c #f6ffff",
"a9 c #ffbeff",
".5 c #ffd2ff",
".h c #ffd6ff",
".e c #ffdeff",
"b# c #ffe2ff",
".p c #ffe6ff",
".c c #ffeaff",
".x c #ffeeff",
".s c #fff2ff",
".i c #fff6ff",
".r c #fffaff",
".g c #ffffff",
"Qt.#Qt.#Qt.#Qt.#Qt.#Qt.#Qt.#Qt.#Qt.#Qt.#Qt.#Qt.#Qt.#Qt.#Qt.#Qt.#",
".aQt.aQt.aQt.aQt.aQt.aQt.aQt.b.c.d.c.aQt.aQt.aQt.aQt.aQt.aQt.aQt",
"Qt.#Qt.#Qt.#Qt.#Qt.#Qt.#.e.f.g.h.i.j.k.lQt.#Qt.#Qt.#Qt.#Qt.#Qt.#",
".aQt.aQt.aQt.aQt.aQt.a.e.m.g.n.g.o.g.o.p.qQt.aQt.aQt.aQt.aQt.aQt",
"Qt.#Qt.#Qt.#Qt.#Qt.#.p.r.g.g.g.i.g.e.g.s.r.tQt.#Qt.#Qt.#Qt.#Qt.#",
".aQt.aQt.aQt.aQt.a.c.n.g.g.g.u.g.o.g.v.g.g.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f6",
"aH c #acaaac",
"bB c #acaeac",
"ad c #acbebd",
"ab c #acc2e6",
"bP c #b4b2b4",
"bq c #b4b6b4",
"a0 c #b4cac5",
"aw c #b4caf6",
"aN c #b4cebd",
"bi c #b4cec5",
"ay c #b4cecd",
"aG c #bdaec5",
"bL c #bdbebd",
"at c #bdbecd",
"#4 c #bdcec5",
"a7 c #bdcecd",
"#x c #bdd6d5",
"bH c #c59dcd",
"#V c #c5aa9c",
"bw c #c5b6cd",
"bA c #c5c2c5",
"br c #c5c6c5",
"a# c #c5cabd",
"bk c #c5cade",
"aK c #c5cede",
"bt c #c5d2d5",
"aC c #c5dacd",
"#f c #c5daee",
"#i c #c5dede",
"#M c #c5e2de",
"bm c #cda1c5",
"bJ c #cda1cd",
"by c #cdb2c5",
"av c #cdbed5",
"aY c #cdc2d5",
"bM c #cdcacd",
"aq c #cdcec5",
"bo c #cdcecd",
"ac c #cdcede",
"#2 c #cdd2c5",
"ag c #cdded5",
"aR c #cde2d5",
"ae c #cde2de",
"bg c #cde6e6",
"a3 c #cde6ff",
"#D c #d5baac",
"bC c #d5bed5",
"bQ c #d5c2d5",
"#T c #d5c6bd",
"#S c #d5c6c5",
"bF c #d5c6de",
"#d c #d5ceb4",
"#1 c #d5d2c5",
"aI c #d5d2e6",
"#L c #d5d6c5",
".9 c #d5dad5",
"aD c #d5decd",
"aS c #d5ded5",
"aM c #d5dede",
"ai c #d5e2cd",
"a4 c #d5e2d5",
"bd c #d5e2de",
"#O c #d5e2e6",
".R c #d5e2ff",
"#P c #d5e6e6",
"#6 c #d5e6ff",
"#5 c #d5eaff",
"#X c #debeac",
"b# c #debed5",
".7 c #dec2a4",
"bn c #dec2d5",
"bK c #dec6de",
"ba c #decade",
"#0 c #decebd",
"#l c #ded2c5",
"bu c #ded2ee",
"#s c #ded6c5",
".0 c #dedacd",
"bc c #dedae6",
".Z c #deded5",
"bj c #dedeee",
".Y c #dee2de",
"ax c #dee2f6",
"#Q c #dee6de",
"#h c #dee6ff",
"aP c #deeade",
".X c #deeae6",
"#w c #deeaff",
"#j c #deeeee",
"bO c #e6bae6",
"#Z c #e6ceb4",
"#r c #e6cebd",
"aW c #e6cee6",
".1 c #e6d2bd",
"bp c #e6d2e6",
"aA c #e6d2f6",
"ar c #e6d6e6",
"bs c #e6daff",
".H c #e6decd",
"ap c #e6ded5",
"aa c #e6deee",
"ak c #e6e6d5",
"aT c #e6e6de",
"aV c #e6e6e6",
"az c #e6e6ff",
"#k c #e6eee6",
"bf c #e6f2ee",
".5 c #eebe9c",
"#W c #eec2c5",
"#U c #eec2cd",
"#q c #eec6ac",
"bz c #eed2e6",
".J c #eed6c5",
"b. c #eed6e6",
"bN c #eed6ee",
"ao c #eedecd",
"am c #eeded5",
"aE c #eee2f6",
".G c #eee6de",
"#3 c #eee6ee",
"a6 c #eee6f6",
"aB c #eeeaf6",
"aU c #eeeee6",
"a2 c #eeeef6",
"aQ c #eef2ee",
"#u c #eef2ff",
"be c #eef6ee",
"#B c #f6b6ac",
"#o c #f6c6a4",
".2 c #f6cab4",
"#C c #f6cad5",
"#p c #f6ceb4",
".K c #f6d2bd",
"#m c #f6d2c5",
"a5 c #f6d6f6",
"a9 c #f6daff",
"an c #f6ded5",
"#y c #f6e2ff",
"al c #f6e6e6",
"a8 c #f6eaff",
"bh c #f6eeff",
".F c #f6f2ee",
"aO c #f6f2f6",
"ah c #f6f2ff",
"af c #f6f6ff",
"#N c #f6faff",
".3 c #ffbe9c",
"#b c #ffc2a4",
"#H c #ffc6ac",
"#A c #ffc6bd",
".L c #ffca9c",
".A c #ffcaa4",
".O c #ffcaac",
"#I c #ffcab4",
".l c #ffceac",
".C c #ffceb4",
"#K c #ffcebd",
"#8 c #ffcec5",
"#F c #ffcee6",
".p c #ffd2ac",
".M c #ffd2b4",
".v c #ffd2bd",
"#a c #ffd2e6",
"a. c #ffd2ee",
".s c #ffd6ac",
".B c #ffd6b4",
".x c #ffd6bd",
"## c #ffd6c5",
".6 c #ffd6cd",
"#G c #ffd6d5",
"#Y c #ffd6de",
".i c #ffd6ee",
"#7 c #ffd6f6",
".e c #ffdac5",
".P c #ffdacd",
".N c #ffdad5",
".V c #ffdae6",
".T c #ffdaee",
".E c #ffdaf6",
"#e c #ffdaff",
".c c #ffdecd",
".z c #ffded5",
"#c c #ffdede",
"#9 c #ffdee6",
"#z c #ffdeee",
".W c #ffdef6",
"#. c #ffdeff",
".4 c #ffe2c5",
".w c #ffe2cd",
".n c #ffe2d5",
".U c #ffe2de",
"#J c #ffe2e6",
"#E c #ffe2ee",
".u c #ffe2ff",
".b c #ffe6d5",
".q c #ffe6de",
".t c #ffe6e6",
".8 c #ffe6ee",
"#R c #ffe6f6",
".S c #ffe6ff",
".h c #ffead5",
".f c #ffeade",
".g c #ffeae6",
".D c #ffeaee",
"#n c #ffeaf6",
".k c #ffeaff",
".m c #ffeede",
".a c #ffeee6",
".y c #ffeeee",
".I c #ffeef6",
"#t c #ffeeff",
".d c #fff2f6",
".Q c #fff2ff",
".j c #fff6ee",
".r c #fff6ff",
"aj c #fffaf6",
".o c #fffaff",
".# c #ffffff",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQt.#.a.#QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQt.#.b.#QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQt.#.c.#QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQt.d.eQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQt.f.g.hQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.i.j.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"QtQtaeafagafagahag.raiajak.oal.o.q.oam#tan.rao.rap.IaqarasatauavQtQt",
"QtQt.QawaxayazaAaBaC.o.S.#.k.#.u.QaD.Q#..r.n.o.S.#.k.o#.aEaFaGaHQtQt",
"QtQtQtaIaJaKaLaMaNaOaP.#aQ.#.X.oaR.QaS.Q.9.QaS.raT.#aU.#aVaWaXaWQtQt",
"QtQtQtQtaYaZa0a1a2.S.#.r.#.Q.#a3.r.u.ra4.Qa5a6a7a8a9.r.ub.aXb#QtQtQt",
"QtQtQtQtQtbabbbcbd.#be.#bf.#bg#uag.ra4.ragbhbibjaLbkblbmaXbnboQtQtQt",
"QtQtQtQtQtQtbpbqbabr#t.S.#a3#ubs#uaR.o.u.QbtbubvbwbxbyaHbzQtQtQtQtQt",
"QtQtQtQtQtQtQtQtbAbabBbCbDavbEaYblbFbBavbGbHbIbJbDbKbLQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQt.kbMbNbObabPbQbBbQbPbabObpQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"};

static const char* const image8_data[] = { 
"32 32 83 2",
".a c None",
".# c None",
"Qt c None",
".b c #000000",
".z c #830000",
".x c #94aef6",
"#i c #9c9dc5",
"#h c #9c9dcd",
"#q c #9ca1cd",
"#n c #9ca5d5",
".E c #9caeff",
"#. c #9cb2f6",
".S c #a4aed5",
"#m c #a4aede",
".L c #a4b6f6",
"## c #a4b6ff",
".I c #a4baff",
"#p c #acaee6",
"#l c #acb2d5",
".0 c #acb2de",
".H c #acbef6",
".K c #acbeff",
".R c #acc2f6",
".J c #acc2ff",
"#k c #b4b6d5",
".5 c #b4b6de",
".3 c #b4bade",
".Q c #b4bee6",
".X c #b4beee",
".F c #b4c2e6",
".c c #b4c2f6",
".Z c #b4c2ff",
"#a c #b4c6f6",
".m c #b4c6ff",
".y c #bdc2ee",
"#c c #bdc6ff",
".d c #bdcaee",
".M c #bdcaf6",
".Y c #bdcaff",
".U c #bdceff",
".4 c #c50000",
".W c #c5c6ee",
".P c #c5caee",
".j c #c5caf6",
".g c #c5cef6",
".r c #c5ceff",
".t c #c5d2ff",
"#j c #c5d6ff",
".6 c #cdcee6",
".f c #cdd2ee",
".i c #cdd2f6",
"#o c #cdd2ff",
".N c #cdd6ff",
".2 c #cddaff",
"#g c #cddeff",
".8 c #d5d2ee",
".1 c #d5daff",
"#e c #d5def6",
".O c #d5deff",
".7 c #d5e2ff",
".9 c #d5e6ff",
"#d c #dedaee",
"#f c #dedef6",
".V c #dedeff",
".h c #dee2f6",
".G c #dee2ff",
".l c #dee6ff",
"#b c #deeaff",
".e c #e6e2ff",
".o c #e6e6f6",
".D c #e6e6ff",
".p c #e6eaff",
".q c #e6eeff",
".T c #eeeaee",
".B c #eeeaf6",
".s c #eeeeff",
".C c #eef2ff",
".v c #f6f2ff",
".w c #f6f6ff",
".u c #f6faff",
".A c #ff0000",
".n c #fffaff",
".k c #ffffff",
"Qt.#Qt.#Qt.#Qt.#Qt.#Qt.#Qt.#Qt.#Qt.#Qt.#Qt.#Qt.#Qt.#Qt.#Qt.#Qt.#",
".aQt.aQt.aQt.aQt.aQt.aQt.aQt.aQt.aQt.aQt.aQt.aQt.aQt.aQt.aQt.aQt",
"Qt.#Qt.#Qt.#Qt.#Qt.#Qt.#Qt.#Qt.#Qt.#Qt.#Qt.#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t.aQt.aQt.aQt.aQt.aQt.aQt.aQt.aQt"};

static const char* const image11_data[] = {
"16 16 125 2",
"Qt c None",
"#W c #000000",
".W c #002052",
".7 c #003c94",
".8 c #081c41",
"#f c #082c6a",
".b c #101010",
"#e c #1050bd",
".k c #181418",
"#g c #181c20",
"#s c #182c62",
"#t c #202020",
".K c #203062",
".j c #204010",
".V c #2050ac",
".6 c #2069de",
"#X c #29304a",
"#0 c #29345a",
".u c #314441",
".# c #314820",
".t c #317118",
".w c #393c62",
"#V c #394073",
".f c #395031",
".a c #395d29",
".i c #397d20",
"#F c #41487b",
".G c #417141",
"#6 c #4a598b",
"#c c #4a5d8b",
"#d c #4a69cd",
".S c #4a8120",
".D c #4aca10",
"#4 c #525594",
"#R c #52598b",
"#5 c #525d9c",
".F c #52a131",
"#p c #5a5018",
".J c #5a69bd",
".4 c #5a81c5",
".5 c #5a89ee",
".e c #626162",
"#N c #626594",
".v c #62699c",
"#r c #62719c",
".h c #6abe4a",
".Q c #6ac631",
".E c #73d241",
"#b c #7b6518",
"#q c #7b85ac",
".T c #7ba5d5",
".g c #7bb25a",
".d c #8391e6",
".U c #8ba1f6",
".c c #8ba1ff",
".q c #8bc27b",
".s c #8be262",
"#z c #947d29",
"#B c #948539",
".H c #94a5cd",
"#K c #9c958b",
"#Z c #9c9dcd",
"#C c #9ca1bd",
"#3 c #9ca5d5",
".I c #9ca5f6",
".P c #9caa94",
"#P c #9cb2f6",
".R c #9cb64a",
"#y c #a4aacd",
"#J c #a4aed5",
"#2 c #a4aede",
".C c #a4b29c",
".r c #a4ee7b",
".3 c #ac9129",
"#A c #ac9529",
"#H c #acbeff",
"#D c #acc2ff",
"#o c #b49929",
"#l c #b4b2ac",
"#1 c #b4b6d5",
".p c #b4bacd",
".m c #b4c2f6",
"#u c #b4c2ff",
".A c #b4c6ff",
".9 c #bdbac5",
"#T c #bdc6ff",
".n c #bdcaee",
"#h c #bdcaf6",
"#v c #bdcaff",
"#O c #bddaff",
".N c #c5ceff",
"#S c #c5d6ff",
"#G c #c5daff",
".0 c #cdcac5",
"#L c #cdcecd",
"#i c #cdd6ff",
"#x c #cddaff",
"#Y c #cddeff",
".L c #cde6ff",
"#m c #d5b239",
"#a c #d5be6a",
"#. c #d5be73",
"#w c #d5daff",
".Z c #d5def6",
"#E c #d5deff",
"#M c #d5e2ff",
".l c #d5e6ff",
".X c #d5eaff",
"#n c #debe41",
"#U c #dedaee",
"#Q c #dedeff",
"#I c #dee2ff",
".z c #dee6ff",
".x c #deeeff",
".2 c #e6ce7b",
".1 c #e6d6ac",
".o c #e6e2ff",
"#j c #e6eaff",
".M c #e6eeff",
".O c #eeeeff",
".Y c #f6f2ff",
"#k c #f6f6ff",
"## c #ffeab4",
".B c #fffaff",
".y c #ffffff",
"QtQtQtQtQtQtQtQtQt.#.a.bQtQtQtQt",
"QtQtQtQtQt.c.d.e.f.g.h.i.j.k.eQt",
"QtQtQt.l.m.n.o.p.q.r.s.t.u.v.w.b",
"QtQt.x.y.z.A.B.C.D.E.F.G.H.I.J.K",
"Qt.L.M.y.y.N.O.P.Q.R.S.T.A.U.V.W",
"Qt.X.y.y.y.Y.Z.0.1.2.3.4.5.6.7.8",
"Qt.l.z.B.y.y.9#.###a#b#c#d#e#f#g",
"Qt.l#h#i#j#k#l#m#n#o#p#q#r#s#tQt",
"Qt.l#u#v#w#x#y#z#A#B#C#D#E#FQtQt",
"Qt#G#h#H#h#E#I#J#K#L#x#v#M#NQtQt",
"Qt#O#i#P.A.y.y#Q.B.y.y#j#j#RQtQt",
"QtQt#S#T.y.y.y.y#j.y.y.y#U#VQtQt",
"Qt#W#X#Y.y.y.y.B#i.y.y.y#ZQtQtQt",
"#W#W#W#0#S.y.y.y#E.z.y#1.vQtQtQt",
"#W#W#W#W#W#D#i#I#I#2#3#4QtQtQtQt",
"QtQtQt#W#WQtQt#5#6QtQtQtQtQtQtQt"};

static const char* const image12_data[] = { 
"22 22 95 2",
"#t c #393052",
"#p c #393862",
"#y c #41405a",
"#i c #4a4462",
"#n c #4a485a",
"#w c #52557b",
"#B c #5a506a",
".0 c #5a5983",
".D c #625d7b",
".M c #62617b",
".m c #6a6d94",
"#o c #7371a4",
".T c #73758b",
".S c #7b7994",
"#x c #7b799c",
".8 c #7b79a4",
".Z c #837da4",
"#v c #8385ac",
"#A c #8b89a4",
".Y c #8b89bd",
".# c #8b8db4",
"#z c #948db4",
".a c #9491bd",
".w c #9c95c5",
".R c #9c99bd",
".6 c #9c99c5",
"#u c #a49dbd",
".f c #a4a5c5",
".b c #aca1c5",
"#c c #acaac5",
".g c #acaacd",
".n c #acaec5",
"#b c #b4aed5",
".K c #b4b2cd",
".h c #b4b2d5",
".U c #b4b6c5",
".x c #b4b6cd",
".5 c #b4b6d5",
".L c #bdb6cd",
"## c #bdbacd",
".c c #bdbad5",
"#f c #bdbecd",
".C c #bdbed5",
".3 c #c5bed5",
".I c #c5c2d5",
".y c #c5c2de",
".H c #c5c6d5",
"#h c #c5c6e6",
".P c #cdc2de",
".9 c #cdc6d5",
".o c #cdc6de",
"#s c #cdc6e6",
"#q c #cdcad5",
".N c #cdcade",
".J c #cdcae6",
".E c #cdcede",
"#e c #cdcee6",
"#r c #d5cade",
".4 c #d5cee6",
"#a c #d5d2de",
".i c #d5d2e6",
".X c #d5d6de",
".O c #d5d6e6",
"#l c #d5d6ee",
"#d c #ded2e6",
".W c #ded6e6",
"#m c #ded6ee",
".p c #dedae6",
".7 c #dedaee",
"#k c #dedee6",
".v c #dedeee",
".Q c #e6daee",
".2 c #e6daf6",
".l c #e6deee",
".B c #e6def6",
".V c #e6e2e6",
".t c #e6e2ee",
".u c #e6e2f6",
".A c #eee2ee",
"#g c #eee2f6",
".d c #eee6f6",
".G c #eeeaee",
".s c #eeeaf6",
"#j c #eeeef6",
".1 c #f6eaf6",
".j c #f6eaff",
".z c #f6eeff",
".F c #f6f2f6",
"#. c #f6f2ff",
".r c #f6f6ff",
".k c #fff2ff",
".q c #fff6ff",
".e c #fffaff",
"wi c #ffffff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QtQtQtQtQtQtQtQtQtQtQt"};

static const char* const image14_data[] = { 
"24 24 181 2",
"ag c #1075e6",
"af c #108dff",
"aq c #1091ff",
"ap c #1891ff",
"ar c #1895ff",
"as c #2075d5",
"az c #208dff",
"al c #292c4a",
"ao c #2995ff",
"aN c #31304a",
"aV c #393c52",
"aG c #393c62",
"#k c #41446a",
"#5 c #4189ee",
"aA c #418de6",
"ae c #41a5ff",
"aw c #4a4873",
"aI c #4a81d5",
"aS c #52506a",
"#Q c #52507b",
"aM c #5a597b",
".x c #5a5983",
"a# c #5a598b",
"at c #5a6dbd",
"aX c #62617b",
".c c #626183",
"ak c #626194",
"#v c #62659c",
"aB c #6281c5",
"ad c #62b2ff",
".Z c #6a6594",
"#Z c #6a699c",
"aU c #6a6d8b",
"aF c #6a6d94",
"#6 c #6a85c5",
"ay c #6a9de6",
"#V c #73758b",
".G c #73759c",
"#W c #738dcd",
"ac c #73b2ff",
"av c #7b71a4",
".i c #7b799c",
"an c #7ba1e6",
".5 c #835531",
"aR c #837da4",
"## c #8381ac",
"aj c #8385b4",
"#2 c #83aade",
"aW c #8b89a4",
"aL c #8b89ac",
"#H c #8b8db4",
"ah c #8b95cd",
".# c #9491b4",
".d c #9495b4",
"aJ c #94a5de",
"#4 c #94caff",
"#y c #9c6110",
"#z c #9c6531",
"#x c #9c6d29",
"aE c #9c99bd",
"ax c #9c9db4",
"ab c #9cb6ee",
"#o c #a47131",
"aO c #a49dbd",
".e c #a49dc5",
"a. c #a49dcd",
".n c #a4a1c5",
"#0 c #a4a5bd",
".b c #a4a5c5",
"aQ c #a4a5cd",
"#X c #a4b2d5",
"aT c #aca1c5",
".P c #aca1cd",
".j c #aca5c5",
".a c #acaacd",
".p c #acaec5",
"au c #acaecd",
"aH c #acbae6",
"#J c #b47539",
"#p c #b47d52",
"#I c #b4896a",
"#f c #b48d6a",
".o c #b4aecd",
"#j c #b4aed5",
".y c #b4b2c5",
".k c #b4b2cd",
".8 c #b4b6cd",
"aC c #b4bae6",
"#m c #bd9162",
"#n c #bd955a",
"am c #bdb6cd",
"#a c #bdbacd",
".Y c #bdbad5",
"#F c #bdbecd",
".f c #bdbed5",
"#g c #c58962",
"#U c #c59d7b",
"#c c #c5a58b",
".T c #c5aaa4",
".2 c #c5b6a4",
".X c #c5bad5",
".z c #c5bed5",
"#P c #c5bede",
".0 c #c5c2cd",
".D c #c5c2d5",
".w c #c5c2de",
"#t c #c5c6d5",
"aK c #c5cae6",
"#3 c #c5deff",
".4 c #cdb69c",
".S c #cdb6a4",
".Q c #cdc6d5",
".q c #cdc6de",
"#i c #cdc6e6",
".H c #cdcade",
".E c #cdcae6",
".9 c #cdcede",
"#9 c #cdcee6",
"#N c #d5b28b",
"#e c #d5be94",
".6 c #d5c2bd",
"#w c #d5cacd",
"ai c #d5cade",
"#G c #d5cae6",
".M c #d5cede",
".W c #d5cee6",
".L c #d5d2de",
"#u c #d5d2e6",
".u c #d5d6de",
".O c #d5d6e6",
".V c #d5d6ee",
"#1 c #d5daf6",
"#h c #deaa83",
"#l c #ded2c5",
"#Y c #ded2e6",
"#E c #ded2ee",
".C c #ded6e6",
".l c #ded6ee",
".v c #dedae6",
".F c #dedaee",
"#7 c #dedee6",
".7 c #dedeee",
"#r c #e6a15a",
"#T c #e6aa73",
"#d c #e6d2bd",
".3 c #e6d6cd",
"#D c #e6daee",
"aD c #e6daf6",
".N c #e6deee",
"#. c #e6def6",
".r c #e6e2ee",
".g c #e6e2f6",
"#O c #e6e6ee",
"aP c #e6e6f6",
"#C c #eeaa6a",
"#S c #eecaac",
".1 c #eedede",
".U c #eedee6",
"#R c #eee2ee",
"#b c #eee2f6",
".B c #eee6f6",
"#8 c #eeeaee",
".I c #eeeaf6",
"aa c #eeeaff",
".K c #eeeef6",
"#M c #f6b673",
"#A c #f6b67b",
"#s c #f6e2e6",
".R c #f6eeee",
".t c #f6eef6",
".m c #f6eeff",
".h c #f6f2ff",
".J c #f6f6ff",
"#q c #ffba7b",
"#B c #ffc27b",
"#K c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IaJaK.h.7#PaLaMaNQtQtQtQtQtQtQtQtQt",
"QtQtQtQtaO.gaP.B.laQaRaSQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQt.q.HaTaUaVQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtaWaXQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"};

static const char* const image16_data[] = { 
"32 32 143 2",
".k c #000000",
".7 c #8495b1",
".X c #98a9c5",
".a c #9daac1",
".T c #9eabc1",
".w c #a1adc3",
".q c #a2aec1",
".D c #a4afc5",
".K c #a4b0c4",
".i c #a7b2c4",
".6 c #aebedb",
".5 c #b4c3dc",
"#b c #b5c5e0",
".4 c #b6c4dd",
"#a c #b9c6df",
"## c #bbc9e0",
"#i c #bdcbe5",
"#. c #becae2",
".N c #becbe1",
".o c #bfcce3",
"#h c #c1cde4",
".3 c #c1cee4",
".t c #c2cee5",
"#g c #c2cfe5",
".h c #c2d0e9",
"#o c #c3d0e8",
".# c #c4d0e5",
".A c #c4d0e6",
"#f c #c5d1e6",
".G c #c6d1e5",
"#n c #c6d2e6",
"#m c #c7d2e7",
"#e c #c7d3e8",
".W c #c8d4e7",
"#t c #c8d5ec",
"#l c #c9d4e9",
"#s c #cbd7ea",
".9 c #ccd6ea",
"#k c #ccd7ea",
"#r c #ced9ec",
"#w c #cedaf0",
"#q c #d0dbed",
".S c #d0dcf1",
"#v c #d2dcef",
"#E c #d2def2",
"#D c #d4ddef",
"#C c #d4def0",
".n c #d5dff0",
"#I c #d5e0f4",
".2 c #d7e0f1",
"#B c #d7e1f2",
".R c #d8e1f0",
"#H c #d8e1f1",
".g c #d8e1f2",
".s c #d9e2f2",
"#Q c #d9e3f6",
"#j c #dae2f2",
"#u c #dae3f3",
"#P c #dae4f3",
"#A c #dbe4f3",
"#X c #dbe5f7",
".C c #dbe5f9",
".z c #dce5f4",
"#0 c #dce6f8",
".v c #dce7f9",
"#z c #dde5f4",
"#O c #dde6f4",
"#G c #dee6f5",
"#7 c #dee8fa",
".J c #dee9fb",
".F c #dfe7f6",
"#W c #dfe7f7",
"a# c #dfe9fa",
"#Z c #e0e7f6",
"#6 c #e0e8f6",
"#5 c #e0e8f7",
"ae c #e0e9fb",
"al c #e0eafc",
"ak c #e1e8f7",
".1 c #e1e9f7",
"#N c #e1e9f8",
"#4 c #e2e9f7",
"#F c #e2eaf8",
"ah c #e3eaf8",
"ag c #e3eaf9",
"ab c #e3ebf8",
".M c #e3ebf9",
".Q c #e4ebf7",
"#V c #e4ebf8",
".f c #e4ebf9",
"#y c #e4ecf9",
".0 c #e5edfa",
".r c #e6edfa",
"aa c #e7eefa",
"#d c #e7eefb",
".B c #e8eefb",
"#3 c #e8effb",
".V c #e8effc",
".y c #e9effc",
"#U c #e9f0fc",
"#2 c #eaf0fc",
"#p c #eaf0fd",
"#M c #eaf1fc",
".m c #eaf1fd",
"a. c #ebf1fd",
".Z c #ebf1fe",
"aj c #ebf2fd",
"#1 c #ebf3fe",
".p c #ebf4ff",
".P c #ecf2f9",
".I c #ecf2fd",
"#L c #ecf2fe",
".8 c #ecf3fe",
".e c #edf3fe",
"#K c #edf4ff",
"#T c #eef4ff",
"#Y c #eff5ff",
".u c #f0f6ff",
".Y c #f1f6ff",
"#S c #f1f7ff",
"#J c #f2f7ff",
"#9 c #f2f8ff",
".O c #f3f5fb",
"ad c #f3f8ff",
".E c #f3f9ff",
"#x c #f4f9ff",
"am c #f4fdff",
".L c #f5f9ff",
".d c #f5faff",
"#R c #f6fbff",
".U c #f7fbff",
"ai c #f7fcff",
"ac c #f7fdff",
".x c #f8fcff",
".l c #f8fdff",
"#8 c #f9feff",
"af c #fafeff",
"#c c #faffff",
".b c #fbffff",
".j c #fcffff",
".H c #fdffff",
".c c #feffff",
"Qt c #ffffff",
"QtQtQt.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.aQtQtQtQtQtQtQ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QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"};

static const char* const image17_data[] = { 
"32 32 378 2",
"d3 c #070707",
"dO c #0b0b0b",
"dW c #0e0e0e",
"dB c #131313",
"dV c #161616",
"ba c #171717",
"d2 c #1c1c1c",
"dL c #1d1d1d",
"dK c #212121",
"#y c #222222",
"b3 c #232323",
"cn c #252525",
"dP c #262626",
"az c #272727",
"dE c #282828",
"#c c #2b2b2b",
"dH c #2c2c2c",
"cF c #323232",
"dz c #353535",
"#z c #3a3a3a",
".e c #3d3d3d",
"dI c #3e3e3e",
"dX c #404040",
".F c #434343",
"dx c #45362e",
"bp c #464646",
"dh c #484848",
"d1 c #4a4a4a",
".# c #4b4b4b",
"aW c #4c4c4c",
"dC c #4d4d4d",
"dF c #4f4f4f",
"dY c #505050",
"dN c #515151",
"d0 c #555555",
"dZ c #575757",
"#d c #585858",
".E c #595959",
"dv c #5b5b5b",
".d c #5d5d5d",
"cs c #5d6277",
".W c #606060",
".a c #626262",
"ag c #636363",
".q c #636365",
"cr c #646887",
".c c #6a6a6a",
".b c #6b6b6b",
"c. c #6b7a94",
"dy c #6d6d6d",
"cG c #727274",
".f c #737373",
"bG c #767676",
"aG c #778aac",
"du c #78768f",
"bN c #7b849f",
"bf c #7b9cc1",
".r c #7c7c7c",
"d. c #7f7f7f",
"aV c #808080",
"cR c #828282",
"dU c #848484",
"dJ c #868686",
"ce c #868ba1",
"bb c #878787",
"dn c #886d61",
"#j c #89b5e0",
"dt c #8a7572",
"al c #8a9cbc",
"#1 c #8a9dbc",
"bE c #8c8ca2",
"bO c #8cb2ce",
"dg c #8d5825",
"c0 c #8d837a",
".2 c #8dc7f2",
"bx c #8eb7d7",
"aZ c #8f98b2",
"bV c #9091a7",
"bw c #9093aa",
"a0 c #90bfe2",
"#G c #90c7f0",
".K c #90c9f3",
"b2 c #919191",
"dQ c #929292",
".v c #92bee6",
"bn c #9499ac",
"#F c #94a3bf",
".J c #94b2d7",
".w c #95ccf3",
"#2 c #95d0f7",
"c# c #97b8cc",
".x c #97d2f7",
"aH c #98d1f5",
"dA c #999999",
"am c #9ad4f8",
"c9 c #9b6b31",
"dr c #9b7a5c",
"cO c #9b9b9b",
".y c #9bd6f8",
".z c #9dd8f8",
".V c #9e9e9e",
"bU c #9ea4b6",
".1 c #9eb1ce",
"b9 c #9fa1b2",
"#k c #9fd9f9",
"cu c #a0a0ab",
"bW c #a0a0b2",
"dj c #a17e58",
"dG c #a1a1a1",
".L c #a1dbf8",
"cC c #a2a2a2",
"bD c #a3a8ba",
"cd c #a3b3c2",
".B c #a3c7e3",
"db c #a48259",
"c1 c #a4a4a4",
".A c #a4d4f1",
".3 c #a5defa",
"dD c #a6a6a6",
".p c #a6a8b0",
"#H c #a6dffa",
".P c #a7e0fa",
"cg c #a8a8b8",
"ct c #a9aab9",
".S c #a9d8ee",
"#3 c #a9e1fa",
"cf c #aaaaba",
"bg c #aae1f9",
".M c #aae2fa",
"do c #ababab",
".u c #abbcd5",
"c4 c #ac885a",
".O c #ace3fa",
"an c #ace4fa",
"ds c #ad8857",
"bq c #adadad",
".Q c #ade4fa",
"bh c #ade5fa",
"dT c #aeaeae",
".n c #aec1d7",
"ca c #aed4e0",
".N c #aee5fb",
"a1 c #aee6fb",
"dR c #afafaf",
".g c #b0b0b0",
".T c #b0bdd0",
".l c #b0c2da",
"#v c #b0c9d7",
"#. c #b0daec",
".R c #b0e7fb",
"di c #b1aba7",
"dM c #b1b1b1",
"av c #b1b8c7",
".8 c #b1e8fb",
"cw c #b29980",
"aR c #b2b5c4",
"by c #b2e8fa",
"cU c #b38e5b",
"dw c #b3ada9",
"dq c #b3afac",
"ch c #b3b0bb",
"be c #b3b4c1",
"da c #b4aeaa",
"#V c #b4b4b4",
".k c #b4c3d9",
"c3 c #b5afaa",
"dS c #b5b5b5",
".m c #b5c8de",
"#l c #b5ebfc",
"cB c #b6ab9d",
"cS c #b6b6b6",
"bI c #b7b7b7",
"a9 c #b7b7c4",
".o c #b7c1d3",
"bP c #b7ecf9",
"#p c #b7ecfc",
".7 c #b7edfb",
".4 c #b7edfc",
"cZ c #b8823e",
"cm c #b8b8b8",
"cc c #b8d6de",
"#r c #b8eefc",
"cH c #b99360",
"b5 c #b9b9b9",
"#i c #b9bfd0",
"cb c #b9dee4",
"#S c #b9dfe7",
"d# c #bababa",
"ad c #bac0cd",
"a8 c #bac6d2",
"#4 c #baeffc",
".9 c #baf0fc",
"cM c #bb863d",
"dp c #bbbbbb",
"#M c #bbeffd",
"cl c #bcad99",
"c2 c #bcbcbc",
"#s c #bcf1fd",
"ci c #bda285",
"cT c #bdb6ae",
"aA c #bdbdbd",
"#I c #bdf2fd",
"b6 c #bebebe",
"bX c #bebec8",
"## c #bec2cf",
"aI c #bef2fc",
"a2 c #bef3fd",
"bH c #bfbfbf",
".D c #bfbfc2",
"bz c #bff4fd",
"cN c #c0b2a3",
"b1 c #c0c0c0",
"cv c #c0c0c4",
"bi c #c0f4fd",
"#t c #c0f5fd",
"bc c #c1c1c1",
".6 c #c1f4fd",
".5 c #c1f5fd",
"cA c #c28b3e",
"bs c #c2c2c2",
"ao c #c2f6fd",
"dm c #c3995a",
"#b c #c3c3c3",
".C c #c3cad6",
"#u c #c3f7fd",
"aX c #c4c4c4",
"#T c #c4c6d2",
"#8 c #c4f7fd",
"cp c #c5c5c5",
".G c #c6c6c6",
"b8 c #c6c6c9",
"#q c #c6f6fd",
"b# c #c7c7c7",
"#O c #c7fafe",
"b4 c #c8c8c8",
"ac c #c8ecf0",
"aJ c #c8f7fd",
"#x c #c9c9c9",
"bF c #c9c9d0",
"br c #cacaca",
"#P c #cafcfe",
"b0 c #cbcbcb",
"#m c #cbfbfd",
"a3 c #cbfdfe",
"ck c #cc923c",
"co c #cccccc",
"bM c #ccccd1",
"bA c #ccfdfe",
"#Q c #ccfdff",
"cE c #cdcdcd",
".j c #cdd3e1",
"aQ c #cde3e9",
"bj c #cdfdfe",
"#R c #cdfeff",
"ah c #cecece",
"aY c #cfcfcf",
"au c #cfedf0",
"#7 c #cff6fd",
"bY c #d0bca1",
"bZ c #d0c5b5",
"aC c #d0d0d0",
"#N c #d0f9fe",
"bJ c #d1d1d1",
"#5 c #d1fafd",
"a. c #d1feff",
"ai c #d2d2d2",
"bo c #d2d2d7",
"cq c #d3d3d3",
"bQ c #d3ffff",
"#X c #d4d4d4",
"aK c #d4fcfe",
"a# c #d4ffff",
"cj c #d59739",
"aD c #d5d5d5",
"ab c #d5ffff",
"aj c #d6d6d6",
"#J c #d6fefe",
"aa c #d6ffff",
"cx c #d7b478",
"aB c #d7d7d7",
"#o c #d7fbfe",
"bk c #d7ffff",
"b7 c #d8d8d8",
".s c #d9d9d9",
".I c #d9d9e1",
"ap c #d9fdff",
"#n c #d9fefe",
"df c #da9a31",
"#Y c #dadada",
"ar c #daffff",
"ay c #dbdbdb",
"#9 c #dbfdfe",
"bR c #dbffff",
"#A c #dcdcdc",
"aL c #dcffff",
"aE c #dddddd",
"#w c #dddde4",
".t c #dddee6",
"aq c #ddffff",
"ak c #dedede",
"bv c #dedee0",
"as c #deffff",
"dc c #dfbd71",
"bt c #dfdfdf",
".h c #dfdfe0",
"bB c #dfffff",
"dk c #e0bf74",
"bK c #e0e0e0",
"at c #e0ffff",
"cY c #e19f30",
"c8 c #e1a135",
"aF c #e1e1e1",
"bT c #e1f5f7",
"#6 c #e1fbfe",
"bd c #e2e2e2",
"aM c #e2ffff",
"bu c #e3e3e3",
"bS c #e3ffff",
"cL c #e4a233",
"cI c #e4c171",
"c5 c #e4c275",
"bL c #e4e4e4",
"cz c #e5a12e",
"#C c #e5e5e5",
"cV c #e6c576",
".X c #e6e6e6",
"#L c #e6fcfe",
"aN c #e6ffff",
"#Z c #e7e7e7",
"aP c #e7ffff",
"#B c #e8e8e8",
"a4 c #e8ffff",
"#W c #e9e9e9",
".0 c #e9e9ed",
"aO c #e9ffff",
"#e c #eaeaea",
".i c #eaeaed",
"#K c #eaffff",
"cD c #ebebeb",
"bC c #ebf4f6",
"aU c #ececec",
".U c #ececf0",
"b. c #ededed",
"cP c #eeeeee",
"a5 c #eeffff",
"aT c #efefef",
"aS c #efeff0",
"aw c #f0f0f1",
"bm c #f0fafb",
"a7 c #f0ffff",
"cy c #f1c56d",
"#f c #f1f1f1",
"cQ c #f2f2f2",
"c7 c #f3ca74",
"#g c #f3f3f3",
"a6 c #f3ffff",
"cK c #f4ca74",
"cX c #f4cb76",
"de c #f4cd7a",
"ax c #f4f4f4",
"#D c #f5f5f5",
"ae c #f5f5f6",
"#0 c #f6f6f6",
"dl c #f7e4a8",
"#E c #f7f7f7",
"#h c #f8f8f8",
"cJ c #f9e6a7",
".Z c #f9f9f9",
"#a c #f9f9fa",
"bl c #f9ffff",
"c6 c #fae6a8",
".Y c #fafafa",
"cW c #fbe8ab",
"dd c #fbe9aa",
"#U c #fcfcfc",
".H c #fcfcfd",
"af c #fefefe",
"Qt c None",
"QtQtQtQtQtQtQtQtQtQtQtQtQt.#.a.b.c.d.eQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQt.f.g.h.i.j.k.l.m.n.o.p.qQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQt.r.sQtQt.t.u.v.w.x.y.z.A.B.C.D.EQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQt.F.GQtQt.H.I.J.K.L.M.N.O.P.Q.R.S.T.U.VQtQtQtQtQtQtQt",
"QtQtQtQtQt.W.XQt.Y.Z.0.1.2.3.4.5.6.7.8.M.8.9#.###a#b#cQtQtQtQtQt",
"QtQtQtQt#d#e#f#g#h#h#i#j#k#l#m#n#o#p#q#r#s#t#u#v#wQt#x#yQtQtQtQt",
"QtQtQt#z#A#B#A#C#D#E#F#G#H#I#J#K#L#M#N#O#P#Q#R#S#T#UQt.gQtQtQtQt",
"QtQtQt#V#W#X#Y#A#Z#0#1#2#3#4#5#6#7#8#9a.a#aaabacadae.Yaf.fQtQtQt",
"QtQtag#Wahaiaj#Yak#ealam.Man.N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.Y#gaU.XbK#Yaib7aU#W.X#C#C#C#C#ZbJcmb5.GdAdBQtQtQt",
"QtQtQtQtdCco.Y#DaU.XbK#Ycqb0#X#W#Z#C#C#C#C#C.X#ZaY#bdDdEQtQtQtQt",
"QtQtQtQtQtdFbscD#WaF#YcqahcpaC#Z#C#C#C#C#C#C.X#WbtdGdHQtQtQtQtQt",
"QtQtQtQtQtQtdIc1aB#AaDahb4b6cE#Z#C#C#C.X#Z#W.XaYdJdKQtQtQtQtQtQt",
"QtQtQtQtQtQtQtdLdydMb0co#bd#aCcD#W#W#B#ZbLaCdGdNdOQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtdP.adQdRdScpaB#XaY.GdTdUdCdVQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtdWdPdXdYdZd0d1dzd2d3QtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"};

QString CDDevice;
QString bootpart;
QString ActualImage;
QString Symlnk;
QString toolback;
QString actd=QDir::homeDirPath() + "/.kisotmp/ISO";
QString Encryptfile;
QString Fullpath;
bool Buttonsounds=false;
bool change;
bool mcryptinstalled=false;
QString Burn;
uint16_t CD;
int dirsi;
bool ShowHidden;
uint8_t imagenumber;
QListViewItem* dragItem;

QString addfile()
{
 QDir::setCurrent( QDir::homeDirPath() );
   QString Selected=KFileDialog::getOpenFileName(QDir::currentDirPath(),
                             "*|"+i18n("All files"),0 ,i18n("Add file..."));
if (Selected){
     if (!QFileInfo(Selected).exists() || !QFileInfo(Selected).isReadable())
    KMessageBox::error(0, i18n("The file/directory does not exist, \n or you don't have permission to access it !"),
     i18n("Error"));
    else
    {
    QDir::setCurrent(actd);
    if (!QFileInfo(QDir::homeDirPath() + "/.kisotmp/ISO/" + Selected.right(Selected.length()-Selected.findRev("/")-1)).exists() && QDir::currentDirPath().startsWith(QDir::homeDirPath() + "/.kisotmp/ISO")){
    KIO::CopyJob *job;
    job = KIO::link (Selected, QDir::currentDirPath());
    change=true;
    return Selected;
     }
   }
 }
  return 0;  
}

Mainform::Mainform( QWidget* parent, const char* name, WFlags fl, QString File )
    : KMainWindow( parent, name, fl ),
      image2( (const char **) image2_data ),
      image3( (const char **) image3_data ),
      image4( (const char **) image4_data ),
      image5( (const char **) image5_data ),
      image6( (const char **) image6_data ),
      image7( (const char **) image7_data ),
      image8( (const char **) image8_data ),
      image11( (const char **) image11_data ),
      image12( (const char **) image12_data ),
      image14( (const char **) image14_data ),
      image16( (const char **) image16_data ),
      image17( (const char **) image17_data )
{
 QPixmap image1( "kiso.png" );
    (void)statusBar();
    if ( !name )
  setName( "Mainform" );
   setCaption( "KIso 0.8.3" );
    setIcon( image1 );

    KIconLoader *loader = KGlobal::iconLoader();
    image9 = loader->loadIcon("exit", KIcon::Toolbar);
    image10 = loader->loadIcon("configure", KIcon::Toolbar);
    image15 = loader->loadIcon("messagebox_info", KIcon::Toolbar);
    image18 = loader->loadIcon("encrypted", KIcon::Toolbar);

    //load Skin

    KSimpleConfig conf("kisorc");
    conf.setGroup("Preferences");
    QString skinname=conf.readEntry("Skin", 0);
if (skinname)
  {
    KSimpleConfig skin(skinname);
    skin.setGroup("Backgrounds");
    QString SkinBase=QFileInfo(skinname).dirPath() + "/";
    if (skin.readEntry("general", 0)!="") 
    setPaletteBackgroundPixmap( QPixmap(SkinBase+skin.readEntry("general", 0)) );
    if (skin.readEntry("toolbar", 0)!="") toolback = SkinBase+skin.readEntry("toolbar", 0);
    skin.setGroup("Buttons");
    if (skin.readEntry("create", 0)!="") 
    image2 = QPixmap(SkinBase+skin.readEntry("create", 0));
    if (skin.readEntry("open", 0)!="") 
    image3 = QPixmap(SkinBase+skin.readEntry("open", 0));
    if (skin.readEntry("extract", 0)!="") 
    image4 = QPixmap(SkinBase+skin.readEntry("extract", 0));
    if (skin.readEntry("add", 0)!="") 
    image5 = QPixmap(SkinBase+skin.readEntry("add", 0));
    if (skin.readEntry("save", 0)!="") 
    image6 = QPixmap(SkinBase+skin.readEntry("save", 0));
    if (skin.readEntry("burn", 0)!="") 
    image7 = QPixmap(SkinBase+skin.readEntry("burn", 0));
    if (skin.readEntry("convert", 0)!="") 
    image8 = QPixmap(SkinBase+skin.readEntry("convert", 0));
    if (skin.readEntry("quit", 0)!="")
    image9 = QPixmap(SkinBase+skin.readEntry("quit", 0));
    if (skin.readEntry("preferences", 0)!="")
    image10 = QPixmap(SkinBase+skin.readEntry("preferences", 0));
    if (skin.readEntry("boot", 0)!="") 
    image11 = QPixmap(SkinBase+skin.readEntry("boot", 0));
    if (skin.readEntry("label", 0)!="") 
    image12 = QPixmap(SkinBase+skin.readEntry("label", 0));
    if (skin.readEntry("publisher", 0)!="") 
    image14 = QPixmap(SkinBase+skin.readEntry("publisher", 0));
    if (skin.readEntry("information", 0)!="") 
    image15 = QPixmap(SkinBase+skin.readEntry("information", 0));
    if (skin.readEntry("hex", 0)!="")
    image16 = QPixmap(SkinBase+skin.readEntry("hex", 0));
    if (skin.readEntry("cdscan", 0)!="")
    image17 = QPixmap(SkinBase+skin.readEntry("cdscan", 0));
    if (skin.readEntry("encryption", 0)!="")
    image18 = QPixmap(SkinBase+skin.readEntry("encryption", 0));
  }

    //setMaximumSize( QSize( 835, 500 ) );

    setCentralWidget( new QWidget( this, "qt_central_widget" ) );

    QBoxLayout *topLayout = new QBoxLayout (centralWidget(), QBoxLayout::TopToBottom, 10);
    QGridLayout *viewsLayout = new QGridLayout( 1, 1 );
    QBoxLayout *LCDLayout = new QBoxLayout (QBoxLayout::LeftToRight);
    QBoxLayout *informationLayout = new QBoxLayout (QBoxLayout::LeftToRight);

    //Toolbar
    tools = new KToolBar( this, KMainWindow::Top, false, i18n("KIso 0.8.3 Toolbar") );
    tools->insertButton(image2, 1, SIGNAL(clicked()), this, SLOT(choice()), true, i18n("New image"));
    QWhatsThis::add( this, i18n( "Button to begin a new image." ) );
    tools->insertButton(image3, 2, SIGNAL(clicked()), this, SLOT(showopen()), true, i18n("Open image"));
    QWhatsThis::add( this, i18n( "Button to open an image." ) );
    tools->insertButton(image4, 3, SIGNAL(clicked()), this, SLOT(showextract()), false, i18n("Extract image"));
    QWhatsThis::add( this, i18n( "Button to extract the actual image to a directory." ) );
    tools->insertButton(image5, 4, SIGNAL(clicked()), this, SLOT(showadd()), false, i18n("Add file"));
    QWhatsThis::add( this, i18n( "Button to add a file to the image." ) );
    tools->insertButton(image6, 5, SIGNAL(clicked()), this, SLOT(showsave()), false, i18n("Save image"));
    QWhatsThis::add( this, i18n( "Button to save the actual image." ) );
    tools->insertButton(image7, 6, SIGNAL(clicked()), this, SLOT(startburner()), true, i18n("Burn image"));
    QWhatsThis::add( this, i18n( "Button to burn the actual image to CD." ) );
    tools->insertButton(image8, 7, SIGNAL(clicked()), this, SLOT(showconvert()), true, i18n("Convert image"));
    QWhatsThis::add( this, i18n( "Button to convert various image formats to an ISO-Image." ) );
    tools->insertButton(image11, 8, SIGNAL(clicked()), this, SLOT(bootimage()), false, i18n("Add bootimage"));
    QWhatsThis::add( this, i18n( "Button to Add a bootimage." ) );
    connect( tools, SIGNAL(highlighted(int, bool)), this, SLOT(buttonsound(int, bool)));
    if (toolback) tools->setPaletteBackgroundPixmap( QPixmap(toolback) );

    lCDNumber1 = new QLCDNumber( centralWidget(), "lCDNumber1" );
    lCDNumber1->setNumDigits( 4 );
    lCDNumber1->setFixedSize( 91, 30 );
    QWhatsThis::add( lCDNumber1, i18n( "Here KIso indicates the size of the actual image.\n It turns red, if the CD-Size given in the Preferences is exceeded." ) );

    listView1 = new DNDListView2( centralWidget(), "listView1", lCDNumber1 );
    listView1->addColumn( i18n( "Name" ), 244 );
    listView1->addColumn( i18n( "Size" ), 140 );
    listView1->addColumn( i18n( "Last modified" ), 140 );
    listView1->setPaletteBackgroundColor( QColor( 153, 153, 153 ) );
    listView1->setEnabled ( false );
    listView1->setSelectionMode( QListView::Extended );
    QWhatsThis::add( listView1, i18n( "It's the filebrowser." ) );

    listView2 = new KIsoTreeview( centralWidget(), "listView2" );
    listView2->setRootIsDecorated( true );
    listView2->setSorting(1, false);
    QWhatsThis::add( listView2, i18n( "It's the directorytree." ) );
    listView2->setEnabled ( false );

    viewsLayout->addWidget(listView2, 0, 0);
    viewsLayout->addWidget(listView1, 0, 1);
    viewsLayout->setColStretch( 0, 1 );
    viewsLayout->setColStretch( 1, 3 );
    topLayout->addLayout(viewsLayout);

    textLabel1 = new QLabel( centralWidget(), "textLabel1" );
    QFont textLabel1_font(  textLabel1->font() );
    textLabel1_font.setFamily( "Adobe Helvetica" );
    textLabel1_font.setPointSize( 24 );
    textLabel1->setFont( textLabel1_font ); 
    textLabel1->setText( "MB" );
    QWhatsThis::add( textLabel1, i18n( "You would not believe it, but it's the abbreviation for Megabyte ;)" ) );

    LCDLayout->addWidget(lCDNumber1);
    LCDLayout->addWidget(textLabel1);

    topLayout->addLayout(LCDLayout);

    kProgress1 = new KProgress( centralWidget(), "kProgress1" );
    QWhatsThis::add( kProgress1, i18n( "It's the progressbar." ) );

    KStandardDirs *dirs=KGlobal::dirs();
    Film1 = new QMovie( dirs->findResource("data", "kiso/Icons/cd.mng") );
    Film2 = new QMovie( dirs->findResource("data", "kiso/Icons/hdd.mng") );

    frame1 = new QFrame( centralWidget(), "frame1" );
    frame1->setFixedSize( 20, 22 );
    frame1->setFrameShape( QFrame::StyledPanel );
    frame1->setFrameShadow( QFrame::Sunken );

    frame2 = new QFrame( centralWidget(), "frame2" );
    frame2->setFixedSize( 22, 22 );
    frame2->setFrameShape( QFrame::StyledPanel );
    frame2->setFrameShadow( QFrame::Sunken );
    
    MLabel1 = new QLabel( frame1, "MLabel1" );
    MLabel1->setGeometry( QRect( 2, 2, 17, 18 ) );
    MLabel1->setFrameShadow( QLabel::Sunken );
    QWhatsThis::add( MLabel1, i18n( "This idicates, if the CD-drive is currently active." ) );
    
    MLabel2 = new QLabel( frame2, "MLabel2" );
    MLabel2->setGeometry( QRect( 2, 2, 19, 18 ) );
    MLabel2->setFrameShadow( QLabel::Sunken );
    QWhatsThis::add( MLabel2, i18n( "This idicates, if the harddrive is currently active." ) );
    
    informationLayout->addWidget(kProgress1);
    informationLayout->addWidget(frame1);
    informationLayout->addWidget(frame2);
     
    topLayout->addLayout(informationLayout);
    
    // actions
    menuNeues_ImageAction = new KAction( "menuNeues_ImageAction" );
    menuNeues_ImageAction->setShortcut( CTRL+Key_N );
    menuNeues_ImageAction->setIconSet( QIconSet( image2 ) );
    menuNeues_ImageAction->setText( i18n( "&New image" ) );
    menuImage_ladenAction = new KAction( "menuImage_ladenAction" );
    menuImage_ladenAction->setShortcut ( CTRL+Key_O );
    menuImage_ladenAction->setIconSet( QIconSet( image3 ) );
    menuImage_ladenAction->setText( i18n( "&Open image" ) );
    menuImage_EntpackenAction = new KAction( "menuImage__EntpackenAction" );
    menuImage_EntpackenAction->setShortcut ( CTRL+Key_E );
    menuImage_EntpackenAction->setIconSet( QIconSet( image4 ) );
    menuImage_EntpackenAction->setText( i18n( "&Extract image" ) );
    menuImage_EntpackenAction->setEnabled( false );
    menuDatei_hinzufgenAction = new KAction( "menuDatei_hinzufgenAction" );
    menuDatei_hinzufgenAction->setShortcut ( CTRL+Key_A );
    menuDatei_hinzufgenAction->setIconSet( QIconSet( image5 ) );
    menuDatei_hinzufgenAction->setText( i18n( "&Add file" ) );
    menuDatei_hinzufgenAction->setEnabled( false );
    menuImage_speichernAction = new KAction( "menuImage_speichernAction" );
    menuImage_speichernAction->setShortcut ( CTRL+Key_S );
    menuImage_speichernAction->setIconSet( QIconSet( image6 ) );
    menuImage_speichernAction->setText( i18n( "&Save image" ) );
    menuImage_speichernAction->setEnabled( false );
    menuKonvertiere_ImageAction = new KAction( "menuKonvertiere_ImageAction" );
    menuKonvertiere_ImageAction->setShortcut ( CTRL+Key_C );
    menuKonvertiere_ImageAction->setIconSet( QIconSet( image8 ) );
    menuKonvertiere_ImageAction->setText( i18n( "&Convert image" ) );
    menu_EncryptAction = new KAction ("menu_EncryptAction");
    menu_EncryptAction->setShortcut ( CTRL+Key_Y );
    menu_EncryptAction->setIconSet( QIconSet( image18 ) );
    menu_EncryptAction->setText( i18n( "Encr&ypt image" ) );
    menuKISO_verlassenAction = new KAction( "menuKISO_verlassenAction" );
    menuKISO_verlassenAction->setShortcut ( CTRL+Key_Q );
    menuKISO_verlassenAction->setIconSet( image9 );
    menuKISO_verlassenAction->setText( i18n( "&Leave KIso" ) );
    extras_burnAction = new KAction( "extras_burnAction" );
    extras_burnAction->setShortcut ( CTRL+Key_B );
    extras_burnAction->setIconSet( QIconSet( image7 ) );
    extras_burnAction->setText( i18n( "&Burn image" ) );
    extras_hexAction = new KAction ( "extrashexAction" );
    extras_hexAction->setShortcut ( CTRL+Key_H );
    extras_hexAction->setIconSet( QIconSet( image16 ) );
    extras_hexAction->setText ( i18n("Open in &Hexeditor") );
    extras_hexAction->setEnabled( false );
    extras_EinstellungenAction = new KAction( "extrasEinstellungenAction" );
    extras_EinstellungenAction->setShortcut ( CTRL+Key_P );
    extras_EinstellungenAction->setIconSet( QIconSet( image10 ) );
    extras_EinstellungenAction->setText( i18n( "&Preferences" ) );
    extras_BootimageAction =  new KAction( "extrasBootimageAction" );
    extras_BootimageAction->setShortcut ( CTRL+Key_I );
    extras_BootimageAction->setIconSet( QIconSet( image11 ) );
    extras_BootimageAction->setText( i18n( "Add boot&image" ) );
    extras_BootimageAction->setEnabled( false );
    extras_LabelimageAction =  new KAction( "extrasLabelimageAction" );
    extras_LabelimageAction->setShortcut ( CTRL+Key_L );
    extras_LabelimageAction->setIconSet( QIconSet( image12 ) );
    extras_LabelimageAction->setText( i18n( "Set &label" ) );
    extras_LabelimageAction->setEnabled( false );
    extras_PublisherAction = new KAction ("extrasPublisherAction" );
    extras_PublisherAction->setShortcut ( CTRL+Key_D );
    extras_PublisherAction->setIconSet( QIconSet( image14 ) );
    extras_PublisherAction->setText( i18n( "Set publisher i&d" ) );
    extras_PublisherAction->setEnabled ( false );
    extras_Information = new KAction ("extrasInformation" );
    extras_Information->setShortcut ( CTRL+Key_G );
    extras_Information->setIconSet( QIconSet( image15 ) );
    extras_Information->setText( i18n( "Ima&ge information" ) );
    extras_Information->setEnabled ( false );
    extras_cdscan = new KAction ("extrascdscan" );
    extras_cdscan->setShortcut ( CTRL+Key_R );
    extras_cdscan->setIconSet( QIconSet( image17 ) );
    extras_cdscan->setText( i18n( "Scan d&rive" ) );
    recent = KStdAction::openRecent(this, SLOT(openrecent(const KURL&)),actionCollection());
    recent->setIconSet( QIconSet( image3 ) );
    recent->setMaxItems(5);
    recent->loadEntries( KGlobal::config(), "Recentfiles" );
    
    // menubar
    MenuBarEditor = new KMenuBar( this, "MenuBarEditor" );

    MenuBarEditor->setGeometry( QRect( 0, 0, 714, 23 ) );

    CD_ImageMenu = new KPopupMenu( this );
    menuNeues_ImageAction->plug( CD_ImageMenu );
    menuImage_ladenAction->plug( CD_ImageMenu );
    recent->plug( CD_ImageMenu );
    CD_ImageMenu->insertSeparator();
    menuImage_EntpackenAction->plug( CD_ImageMenu );
    menuDatei_hinzufgenAction->plug( CD_ImageMenu );
    menuImage_speichernAction->plug( CD_ImageMenu );
    menuKonvertiere_ImageAction->plug( CD_ImageMenu );
    menu_EncryptAction->plug( CD_ImageMenu );
    CD_ImageMenu->insertSeparator();
    menuKISO_verlassenAction->plug( CD_ImageMenu );
    MenuBarEditor->insertItem( QString(""), CD_ImageMenu, 2 );
    ExtrasMenu = new KPopupMenu( this );
    extras_burnAction->plug( ExtrasMenu );
    extras_hexAction->plug( ExtrasMenu );
    ExtrasMenu->insertSeparator();
    extras_BootimageAction->plug( ExtrasMenu );
    extras_LabelimageAction->plug( ExtrasMenu );
    extras_PublisherAction->plug( ExtrasMenu );
    
    ExtrasMenu->insertSeparator();
    extras_Information->plug( ExtrasMenu );
    extras_cdscan->plug( ExtrasMenu );
    extras_EinstellungenAction->plug( ExtrasMenu );
    MenuBarEditor->insertItem( QString(""), ExtrasMenu, 3 );
    KHelpMenu *helpMenu = new KHelpMenu( this );
    KPopupMenu *help = helpMenu->menu();
    MenuBarEditor->insertItem(i18n("Help"), help, 4 );
    MenuBarEditor->findItem( 2 )->setText( i18n( "CD image" ) );
    MenuBarEditor->findItem( 3 )->setText( i18n( "Extras" ) );
    
    listView1->clear();
    
//Reading skin

    // signals and slots connections
    connect( extras_EinstellungenAction, SIGNAL( activated() ), this, SLOT( preferences() ) );
    connect( extras_burnAction, SIGNAL( activated() ), this, SLOT( startburner() ) );
    connect( extras_Information, SIGNAL( activated() ), this, SLOT( showinformation() ) );
    connect( extras_BootimageAction, SIGNAL( activated() ), this, SLOT( bootimage() ) );
    connect( extras_LabelimageAction, SIGNAL( activated() ), this, SLOT( newlabel() ) );
    connect( extras_PublisherAction, SIGNAL( activated() ), this, SLOT( newpublisher() ) );
    connect( menuDatei_hinzufgenAction, SIGNAL( activated() ), this, SLOT( showadd() ) );
    connect( menuImage_EntpackenAction, SIGNAL( activated() ), this, SLOT( showextract() ) );
    connect( menuImage_ladenAction, SIGNAL( activated() ), this, SLOT( showopen() ) );
    connect( menuImage_speichernAction, SIGNAL( activated() ), this, SLOT( showsave() ) );
    connect( menuKISO_verlassenAction, SIGNAL( activated() ), this, SLOT( close() ) );
    connect( menuKonvertiere_ImageAction, SIGNAL( activated() ), this, SLOT( showconvert() ) );
    connect( menu_EncryptAction, SIGNAL( activated() ), this, SLOT( encryption()));
    connect( menuNeues_ImageAction, SIGNAL( activated() ), this, SLOT( choice() ) );
    connect( extras_hexAction, SIGNAL( activated() ),this, SLOT( openashex() ) );
    connect( listView1, SIGNAL( doubleClicked(QListViewItem*) ), this, SLOT( nextdir(QListViewItem*) ) );
    connect( helpMenu, SIGNAL(showAboutApplication()), this, SLOT( showabout() ));
    connect( extras_cdscan, SIGNAL( activated() ), this , SLOT( showdrive ()));

    // Initialisation of first view
    listView2->addColumn( "/" );
    initialisation();
    if (File) showopen(File);
}

//Destroys the object and frees any allocated resources
Mainform::~Mainform()
{
// no need to delete child widgets, Qt does it all for us
}

void Mainform::buttonsound(int id, bool status)
{
 KStandardDirs *dirs=KGlobal::dirs();
 QString Soundcreate=dirs->findResource("data", "kiso/Sounds/new.ogg");
 QString Soundopen=dirs->findResource("data", "kiso/Sounds/open.ogg");
 QString Soundextract=dirs->findResource("data", "kiso/Sounds/extract.ogg");
 QString Soundadd=dirs->findResource("data", "kiso/Sounds/adding.ogg");
 QString Soundsave=dirs->findResource("data", "kiso/Sounds/save.ogg");
 QString Soundburn=dirs->findResource("data", "kiso/Sounds/fire.ogg");
 QString Soundconvert=dirs->findResource("data", "kiso/Sounds/convert.ogg");
 QString Soundboot=dirs->findResource("data", "kiso/Sounds/boot.ogg");
 KSimpleConfig conf("kisorc");
 conf.setGroup("Preferences");
 QString skinname=conf.readEntry("Skin", 0);
 if (skinname)
 {
 KSimpleConfig skin(skinname);
 skin.setGroup("Sounds");
 QString SkinBase=QFileInfo(skinname).dirPath() + "/";
 if (skin.readEntry("create", 0)!="") 
 Soundcreate=SkinBase+skin.readEntry("create", 0);
 if (skin.readEntry("open", 0)!="") 
 Soundopen=SkinBase+skin.readEntry("open", 0);
 if (skin.readEntry("extract", 0)!="") 
 Soundextract=SkinBase+skin.readEntry("extract", 0);
 if (skin.readEntry("add", 0)!="") 
 Soundadd=SkinBase+skin.readEntry("add", 0);
 if (skin.readEntry("save", 0)!="") 
 Soundsave=SkinBase+skin.readEntry("save", 0);
 if (skin.readEntry("burn", 0)!="") 
 Soundburn=SkinBase+skin.readEntry("burn", 0);
 if (skin.readEntry("convert", 0)!="") 
 Soundconvert=SkinBase+skin.readEntry("convert", 0);
 if (skin.readEntry("boot", 0)!="") 
 Soundboot=SkinBase+skin.readEntry("boot", 0);
 }
 if (Buttonsounds && status)
 {
 if (id==1) KAudioPlayer::play(Soundcreate);
 if (id==2) KAudioPlayer::play(Soundopen);
 if (id==3) KAudioPlayer::play(Soundextract);
 if (id==4) KAudioPlayer::play(Soundadd);
 if (id==5) KAudioPlayer::play(Soundsave);
 if (id==6) KAudioPlayer::play(Soundburn);
 if (id==7) KAudioPlayer::play(Soundconvert);
 if (id==8) KAudioPlayer::play(Soundboot);
 }
}

void Mainform::openashex()
{
openhex(ActualImage);
}

void Mainform::showabout()
{
        static const char *description =
  I18N_NOOP("KIso 0.8.2 is an application for KDE, to make extracting and editing\n of ISO-Image files as easy and convenient as possible.");
    KAboutData aboutData( "kiso", I18N_NOOP("KIso"),
    VERSION, description, KAboutData::License_GPL,
    "(c) 2003-2005, Stephan Gans", 0, "http://kiso.sourceforge.net", "mephistoki@users.sourceforce.net");
  aboutData.addAuthor("Stephan Gans",0, "mephistoki@users.sourceforce.net");
  aboutData.addCredit("Rocky Bernstein",I18N_NOOP("Thanks for his great work on libcdio."),"rocky@panix.org","http://www.gnu.org/software/libcdio");
  aboutData.addCredit("Salvatore Santagati",I18N_NOOP("for many code contibutions concerning image conversion."),"salvatore.santagati@gmail.com");
  aboutData.addCredit("Łukasz Sierżęga [xarafaxz]",I18N_NOOP("for patches"),"xarafaxz@gmail.com");
  aboutData.addCredit("Fraenki Schroeder",I18N_NOOP("for cleanups and patches"),"fraenkischroeder@web.de");
  aboutData.addCredit("Giacomo [iTem]",I18N_NOOP("for the homepage design."),"itempc@aliceposta.it");
  aboutData.addCredit("\n",I18N_NOOP("And of cause thanks to all translators."));
    KAboutApplication *helpMenu = new KAboutApplication (&aboutData,this,"About",true);
    helpMenu->show(); 
}

void Mainform::showinformation()
{
KMessageBox::information(this, i18n("Type: ") + format + "\n" + i18n("System Id: ") + systemid + "\n" + i18n("Volume Id: ") + cdlabel + "\n" + i18n("Publisher Id: ") + publisher + "\n" + i18n("Preparer Id: ") + preparer + "\n" + i18n("Application Id: " ) + applicationid ,i18n("Image information"));
}

void Mainform::preferences()
{  
      Formpref *preferences = new Formpref(0);
      if ( preferences->exec() == QDialog::Accepted )
      initialisation();
}

// Brennerprogramm starten
void Mainform::startburner()
{
   QDir::setCurrent( QDir::homeDirPath() );
   QString Selected=KFileDialog::getOpenFileName(QDir::currentDirPath(),
                             "*.iso *.cue|"+i18n("All supported images")+"\n *.cue |CUE\n *.iso |ISO", this, i18n("Burn image..."));
   QString SelectedSh = PrepforShell(Selected);
   QDir::setCurrent(actd);
   if (Selected){
     if (QFileInfo(Selected).extension( false ).lower()!="cue" && QFileInfo(Selected).extension(false)!="iso" || !QFileInfo(Selected).exists() || !QFileInfo(Selected).isReadable())
    KMessageBox::error(this, i18n("You did not select a valid image file !"),
     i18n("Error"));
   else{
   KShellProcess *burning = new KShellProcess();
if (Burn=="K3b" && QFileInfo(Selected).extension().lower()=="iso" || QFileInfo(Selected).extension().lower()=="cue") (*burning)<< "k3b" << "--cdimage" << SelectedSh;
if (Burn=="CD Bake Oven" && QFileInfo(Selected).extension().lower()=="iso") (*burning)<< "cdbakeoven" << SelectedSh;
if (Burn=="CD Bake Oven" && QFileInfo(Selected).extension().lower()=="cue") KMessageBox::information(this, i18n("CD Bake Oven can't handle BIN-Images ! Use K3b instead."),i18n("Error"));
burning->start();
  }
 }
}

void Mainform::openrecent(const KURL& Sel)
{
QString Selected=Sel.path();
showopen(Selected);
}

//Show the open dialog and activate all necessary widgets.
//Try to mount the iso and show it's content.
void Mainform::showopen(QString Selected)
{
    QDir::setCurrent( QDir::homeDirPath() );
    if (!Selected)
    Selected=KFileDialog::getOpenFileName(QDir::currentDirPath(),
                             "*.iso *.nrg|"+i18n("All supported images")+"\n *.iso |ISO\n *.nrg |NRG", this, i18n("Open Image..."));
     QDir::setCurrent(actd);
     if (Selected){
     ActualImage=Selected;
     recent->addURL(Selected);
//encrypted Image ?
     bool success=true;
     if (FindEncryption (Selected))
     {
     if (!Proofforapp())
     KMessageBox::error(this, i18n("Mcrypt was not found on your system. Please install it."), i18n("Encryption not possible"));
     if (Proofforapp())
     {
     QCString encryptionid;
     int result = KPasswordDialog::getPassword(encryptionid, i18n("Please enter the password:"));
     if (result == KPasswordDialog::Accepted)
     if (encryptionid) decryption(Selected, encryptionid);
     if (!QFileInfo(Selected).exists() || !encryptionid)
     {
     QDir actual = QFileInfo(Selected).dirPath()+ "/"; 
     KMessageBox::error(this, i18n("Decryption failure: Wrong password."),i18n("Error"));
     actual.rename(Selected + ".nc", Selected);
     success=false;
     }
     if (success && encryptionid) Encryptfile = Selected;
     }
     }
     if (QFileInfo(Selected).extension( false ).lower()!="iso" && QFileInfo(Selected).extension( false ).lower()!="nrg" || !QFileInfo(Selected).exists() || !QFileInfo(Selected).isReadable() && success)
    KMessageBox::error(this, i18n("You did not select an ISO/NRG image !"),i18n("Error"));
     else{
     if (success)
     {
     systemid = readoutheader(Selected, "system");
     cdlabel = readoutheader(Selected, "label");
     publisher = readoutheader(Selected, "publish");
     preparer = readoutheader(Selected, "prepar");
     applicationid = readoutheader(Selected, "application");
     format = readoutheader(Selected, "format");
     listView1->setEnabled ( true );
      listView1->setPaletteBackgroundColor( QColor( 255, 255, 255 ) );
       tools->setItemEnabled ( 3, true );
       tools->setItemEnabled ( 4, true );
       tools->setItemEnabled ( 5, true );
       tools->setItemEnabled ( 8, true );
          menuDatei_hinzufgenAction->setEnabled( true );
           menuImage_speichernAction->setEnabled( true );
            menuImage_EntpackenAction->setEnabled( true );
	     extras_BootimageAction->setEnabled( true );
	      extras_LabelimageAction->setEnabled( true );
	       extras_PublisherAction->setEnabled( true );
	        extras_Information->setEnabled( true );
		 extras_hexAction->setEnabled( true );
    MountISO(Selected, imagenumber);
    QDir Iso (QDir::homeDirPath() + "/.kisotmp/ISO");
    GetDirView (listView1, Iso, "*", ShowHidden);
    listView1->takeItem(listView1->findItem("..", 0));
    change=false;
    if (!listView1->firstChild())
    KMessageBox::information(this, i18n("This does not seem to be a valid image !"), i18n("Information"));
    else {setCaption( QFileInfo(Selected).fileName() );
    listView2->setEnabled ( true );}
    double imgsize = imgsize + KDirSize::dirSize (QDir::homeDirPath() + "/.kisotmp/Mount");
    imgsize = imgsize/1024/1024;
    lCDNumber1->setProperty( "value", imgsize );
    lCDNumber1->setPaletteBackgroundColor( QColor( 0, 220, 0 ) );
    if (imgsize > CD) lCDNumber1->setPaletteBackgroundColor( QColor( 220, 0, 0 ) );
    }
   }
  }
}

//Activate all necessary widgets.
void Mainform::choice()
{
    switch (KMessageBox::questionYesNo(this, i18n("Shall I create an image of a CD ?"),
    i18n("New image"), i18n("&Yes"), i18n("&No")))
    {
      case 3:
      {
Again:
      CdIo *cdio = cdio_open_cd (CDDevice);
      uint16_t num_audio = 0;
      track_t num_tracks;
      track_t first_track_num;
      if (NULL == cdio){
      KMessageBox::error(this, i18n("There is no CD/DVD in drive: ") + CDDevice + " !", i18n("Error"));
       break;
       }
      first_track_num = cdio_get_first_track_num(cdio);
      num_tracks      = cdio_get_num_tracks(cdio);
      if (TRACK_FORMAT_AUDIO == cdio_get_track_format(cdio,first_track_num)){
      KMessageBox::error(this, i18n("Cannot create images of an audio cd !"), i18n("Error"));
      cdio_destroy(cdio);
      break;}
      for (uint16_t i = first_track_num; i <= num_tracks; i++) {
      if (TRACK_FORMAT_AUDIO == cdio_get_track_format(cdio, i))
      num_audio++;
      }
      cdio_destroy(cdio);
      if (num_audio!=0)
      KMessageBox::information(this, i18n("This CD contains audiotracks !"), i18n("Warning"));
      QDir::setCurrent( QDir::homeDirPath() );
      QString Selected=KFileDialog::getSaveFileName(QDir::currentDirPath(),
                             "*.iso|"+i18n("ISO images"), this, i18n("Save as..."));
      QString Ending = QFileInfo(Selected).extension( false ).lower();
      if (QFileInfo(Selected).exists() && !QFileInfo(Selected).isReadable()|| !QFileInfo(QFileInfo(Selected).dirPath()).isWritable())
      KMessageBox::error(this, i18n("You don't have permission to access this file !"),
     i18n("Error"));
      if (QFileInfo(Selected).exists() && Ending=="iso")
      switch (KMessageBox::warningYesNo(this, i18n("File already exists. Overwrite it ?"),
    i18n("New image"), i18n("&Yes"), i18n("&No")))
    {
      case 3:
      {
       remove (Selected);
       break;
      }
      case 4:
      {
      Selected="";
      goto Again;
      break;
      }
    }
    if (Selected.right(Selected.length()-Selected.findRev("/")-1)) createiso(Selected);
     break;
      }
      case 4:
      {
      QDir::setCurrent(QDir::homeDirPath() + "/.kisotmp/ISO");
      listView1->clear();
      tools->setItemEnabled ( 3, false );
      menuImage_EntpackenAction->setEnabled( false );
      extras_hexAction->setEnabled( false );
      KShellProcess *rm = new KShellProcess();
      (*rm)<< "rm" << "-R" << QDir::homeDirPath() + "/.kisotmp/ISO/*";
      rm->start(KShellProcess::Block);
      systemid="LINUX";
      cdlabel=QString::null;
      applicationid="KIso";
      publisher=QString::null;
      preparer="KIso";
      lCDNumber1->setProperty( "value", 0 );
      lCDNumber1->setPaletteBackgroundColor( QColor( 0, 220, 0 ) );
      listView1->setEnabled ( true );
      listView1->setPaletteBackgroundColor( QColor( 255, 255, 255 ) );
      tools->setItemEnabled ( 4, true );
      tools->setItemEnabled ( 5, true );
      tools->setItemEnabled ( 8, true );
         menuDatei_hinzufgenAction->setEnabled( true );
          menuImage_speichernAction->setEnabled( true );
	   extras_BootimageAction->setEnabled( true );
	    extras_LabelimageAction->setEnabled( true );
	     extras_PublisherAction->setEnabled( true );
	      extras_Information->setEnabled( true );
               listView2->setEnabled ( true );
          change=false;
           break;
      }
     } 
  }

void Mainform::showextract()
{ 
    QDir::setCurrent( QDir::homeDirPath() );
    QString Selected=KFileDialog::getExistingDirectory(QDir::currentDirPath(),
                             this, i18n("Extract to..."));
    QDir::setCurrent(actd);
    if (Selected){
    if (!QFileInfo(Selected).isReadable() || !QFileInfo(Selected).isWritable())
    KMessageBox::error(this, i18n("You didn't select a valid directory !"),
    i18n("Error"));
    else
    extractiso(Selected);
  }
}

//Make symbolik link and update view.
void Mainform::showadd()
{
    double filesize = listView1->Adddialog();
    double newvalue=lCDNumber1->value() + filesize/1024/1024;
    if (newvalue < 1) newvalue = 0;
    lCDNumber1->setProperty( "value", newvalue );
    lCDNumber1->setPaletteBackgroundColor( QColor( 0, 220, 0 ) );
    if (newvalue > CD) lCDNumber1->setPaletteBackgroundColor( QColor( 220, 0, 0 ) );  
}

//call owniso.
void Mainform::showconvert()
{
     QDir::setCurrent( QDir::homeDirPath() );
     QString Selected=KFileDialog::getOpenFileName(QDir::currentDirPath(),
     "*.bin *.img *.nrg *.mdf *.cdi *.c2d |"+i18n("All supported images") + "\n *.bin |BIN\n *.c2d|C2D\n *.cdi |CDI\n *.img |IMG\n *.mdf |MDF\n *.nrg |NRG", this, i18n("Open Image..."));
     QDir::setCurrent(actd);
     if (Selected){
     if (QFileInfo(Selected).extension( false ).lower()!="bin" && QFileInfo(Selected).extension( false ).lower()!="nrg"  && QFileInfo(Selected).extension( false ).lower()!="mdf" && QFileInfo(Selected).extension( false ).lower()!="cdi" && QFileInfo(Selected).extension( false ).lower()!="img" && QFileInfo(Selected).extension( false ).lower()!="c2d" || !QFileInfo(Selected).exists() || !QFileInfo(Selected).isReadable())
    KMessageBox::error(this, i18n("You did not select a valid image file !"),
     i18n("Error"));
     else
     {
    MLabel2->setMovie( *Film2 );
    QApplication::setOverrideCursor (waitCursor);
    Convert(Selected,kProgress1);
      QApplication::restoreOverrideCursor();
      KStandardDirs *dirs=KGlobal::dirs();
      KAudioPlayer::play(dirs->findResource("data", "kiso/Sounds/kisosound.ogg"));
      kProgress1->setProgress( 0 );
      MLabel2->clear();
      }
    }
  }

void Mainform::showsave()
{
  QDir::setCurrent( QDir::homeDirPath() );
  QString Selected=KFileDialog::getSaveFileName(QDir::currentDirPath(),
                             "*.iso|"+i18n("ISO images"), this, i18n("Save Image..."));
      QDir::setCurrent(actd);
      if (Selected){
      QString Ending = QFileInfo(Selected).extension( FALSE ).lower();
      if (QFileInfo(Selected).exists() && !QFileInfo(Selected).isReadable() || !QFileInfo(QFileInfo(Selected).dirPath()).isWritable())
      {
      KMessageBox::error(this, i18n("You don't have permission to access this file !"),
     i18n("Error"));
      Selected="";
      showsave();
      }
      if (QFileInfo(Selected).exists() && Ending=="iso")
      switch (KMessageBox::warningYesNo(this, i18n("File already exists. Overwrite it ?"),
    i18n("New image"), i18n("&Yes"), i18n("&No")))
    {
      case 3:
      {
        remove (Selected);
        break;
      }
      case 4:
      {
      Selected="";
      showsave();
      break;
      }
    }
  if (Selected.right(Selected.length()-Selected.findRev("/")-1)) owniso(Selected);
  }
}

//Make iso-image and call the progessbar.
void Mainform::createiso (QString Selected)
{
    MLabel1->setMovie( *Film1 );
    MLabel2->setMovie( *Film2 );
    QApplication::setOverrideCursor (waitCursor);
    QString ending = QFileInfo(Selected).extension(false);
    if (ending.lower() != "iso") Selected = Selected + ".iso";
    double sourcesize;
    double targetsize;
    double quot;
    uint8_t progress;
    int LBA=0;
    double frame = 2047.0071437328;
    CdIo *cdio = cdio_open_cd (CDDevice);
    discmode_t ommodus = cdio_get_discmode(cdio);
    if(!cdio_is_discmode_dvd(ommodus))
 {
    LBA = cdio_stat_size(cdio);
    sourcesize = LBA*frame;
    char buffer[CDIO_CD_FRAMESIZE_RAW] = { 0, };
    unsigned int blocklen=CDIO_CD_FRAMESIZE;
    QFile file( Selected );
    track_t num_tracks;
    bool addleadout=false;
    lsn_t leadoutlsn;
    lsn_t   actuallsn = 0;
    lsn_t   lastlsn;
    leadoutlsn = cdio_get_track_lsn(cdio, CDIO_CDROM_LEADOUT_TRACK);
    lastlsn = leadoutlsn;
    num_tracks = cdio_get_num_tracks(cdio);
    for (uint16_t tracks = 0; tracks <= num_tracks; tracks++) {
      if (TRACK_FORMAT_AUDIO == cdio_get_track_format(cdio, tracks)){
      lastlsn = cdio_get_track_lsn(cdio, tracks)-blocklen;
      sourcesize = (cdio_get_track_lba(cdio,tracks)-blocklen)*frame;
      addleadout=true;
     tracks = num_tracks;
     }
    }
    if ( file.open( IO_WriteOnly | IO_Truncate) ) {
    for ( ; actuallsn <= lastlsn; actuallsn++ ) {
    kapp->processEvents();
    cdio_read_mode1_sector(cdio, &buffer, actuallsn, true);
    file.writeBlock(buffer, blocklen);
    QFileInfo target (Selected);
    targetsize = target.size();
    quot = ( targetsize / sourcesize) * 100;
    progress = (uint8_t)quot;
    if (progress>100) progress=100;
    kProgress1->setProgress( progress );
    }
  }
    if (addleadout)
    {
    cdio_read_mode1_sector(cdio, &buffer, leadoutlsn, true);
    file.writeBlock(buffer, blocklen);
    }
    file.close();
 }
    if (cdio_is_discmode_dvd(ommodus))
    {
    uint8_t Result = createfromdvd(Selected);
    Result=1;
    }
    cdio_eject_media (&cdio);
    cdio_destroy(cdio);
    QApplication::restoreOverrideCursor();
    KStandardDirs *dirs=KGlobal::dirs();
    KAudioPlayer::play(dirs->findResource("data", "kiso/Sounds/kisosound.ogg"));
    MLabel1->clear();
    MLabel2->clear();
    kProgress1->setProgress( 0 );
}

void Mainform::newlabel()
{
  QString label=KInputDialog::getText( i18n("Set CD-Label..."),i18n("Label:"), cdlabel );
  if (label){ 
  setCaption( "KIso 0.8.3 (" + label + ")" );
  cdlabel=label;
  change=true;
  }
}

void Mainform::newpublisher()
{
  QString publisherid=KInputDialog::getText( i18n("Set publisher id..."),i18n("Publisher:"), publisher );
  if (publisherid)
  { 
  change=true;
  publisher=publisherid;
  }
}

void Mainform::bootimage()
{
 QDir::setCurrent( QDir::homeDirPath() );
    QString Selected=KFileDialog::getOpenFileName(QDir::currentDirPath(),
                             "*.img|"+i18n("IMG Files"), this, i18n("Add Image..."));
 QDir::setCurrent(actd);
 if (Selected){
 if (!QFileInfo(Selected).exists() || QFileInfo(Selected).extension( false ).lower()!="img" || QFileInfo(Selected).size()/1024>1400) KMessageBox::error(0, i18n("No open image or no valid boot image selected !"), i18n("Error"));
 else
  { 
  KShellProcess *makbootdir = new KShellProcess();
  (*makbootdir)<< "mkdir" << QDir::homeDirPath() + "/.kisotmp/ISO/boot";
  makbootdir->start(KShellProcess::Block);
  KIO::CopyJob *job;
  job = KIO::copy (Selected, QDir::homeDirPath() + "/.kisotmp/ISO/boot/boot.img");
  listView1->setColumnText(0,image11, i18n("Name"));
  bootpart=Selected;
  change=true;
  }
 }
}

//Copy mountcontent and call progressbar.
void Mainform::extractiso (QString Selected)
{
    uint8_t Result;
    QString SelectedSh = PrepforShell(Selected);
    double sizeofselected=0;
    QString currentfile;
    double already=KDirSize::dirSize (Selected);
    MLabel2->setMovie( *Film2 );
    QApplication::setOverrideCursor (waitCursor);
    QList<Filelist> selectedlist;
    selectedlist.setAutoDelete( TRUE );
    QListViewItemIterator it( this->listView1 );
    while ( it.current() ) 
   { 
    if ( it.current()->isSelected() )
    {
     QFileInfo fi = QFileInfo(QDir::currentDirPath() + "/" + "'" + it.current()->text(0) + "'");
    if (fi.isDir())
   {
    double refdirsize = listView1->DirSize (QDir::homeDirPath() + "/.kisotmp/ISO/" + it.current()->text(0), "-sLb");
    sizeofselected=sizeofselected + refdirsize;
    selectedlist.append( new Filelist(fi.filePath(), refdirsize, fi.lastModified()) );
   } 
    else
   {
    sizeofselected=sizeofselected + QFileInfo(fi.readLink()).size();
    selectedlist.append( new Filelist(fi.filePath(), QFileInfo(fi.readLink()).size(), fi.lastModified()) );
   }
    }
    ++it;
    }
    if (!selectedlist.count() || selectedlist.count() == (uint16_t)listView1->childCount())
    {
    KShellProcess *extract = new KShellProcess();
    (*extract)<< "cp" << "-LR" << QDir::homeDirPath() + "/.kisotmp/ISO/*" << SelectedSh;
    extract->start();
    Result = ProgressBar (QDir::homeDirPath() + "/.kisotmp/Mount", Selected, extract, already);
    }
    else
   {
    for ( uint16_t i = 0; i < selectedlist.count(); ++i )
    {
    KShellProcess *extract = new KShellProcess();
    (*extract)<< "cp" << "-LR" << selectedlist.at(i)->filepath().latin1() << SelectedSh;
    extract->start();
    while (extract->isRunning()){
    double quot = ( (KDirSize::dirSize (Selected) - already) / sizeofselected) * 100;
    if (quot>100) quot=100;
    kProgress1->setProgress( ((uint8_t)quot) );
      }
    }
    Result=1;
   }
    if (Result){
    KShellProcess *setrights = new KShellProcess();
    (*setrights)<< "chmod" << "-R" << "755" << SelectedSh;
    setrights->start(KShellProcess::Block);
    QApplication::restoreOverrideCursor();
    KStandardDirs *dirs=KGlobal::dirs();
    KAudioPlayer::play(dirs->findResource("data", "kiso/Sounds/kisosound.ogg"));
    kProgress1->setProgress( 0 );
    MLabel2->clear();
  }
}

//Try a mkisofs and call the progresbar.
void Mainform::owniso (QString Selected)
{
  MLabel2->setMovie( *Film2 );
  QString ending = QFileInfo(Selected).extension(false);
  if (ending.lower() != "iso") Selected = Selected + ".iso";
  QString SelectedSh = PrepforShell(Selected);
  QApplication::setOverrideCursor (waitCursor);
  QString Source;
  QFileInfo target ( Selected );
  if (!cdlabel) cdlabel = target.baseName();
  cdlabel = PrepforShell(cdlabel);
  publisher = PrepforShell(publisher);
  KShellProcess *setrights = new KShellProcess();
  (*setrights)<< "chmod" << "-R" << "755" << QDir::homeDirPath() + "/.kisotmp/ISO";
  setrights->start(KShellProcess::Block);
  KShellProcess *makeiso = new KShellProcess();
  if (CD==4472 || CD==8500) (*makeiso)<< "mkisofs" << "-dvd-video" << "-quiet" << "-f" << "-publisher" << publisher << "-p" << "'" + preparer + "'" << "-A" << "KIso" << "-J" << "-V" << cdlabel << "-l" << "-o" << SelectedSh << QDir::homeDirPath() + "/.kisotmp/ISO/";
  if (!bootpart && CD!=4472 && CD!=8500) (*makeiso)<< "mkisofs" << "-joliet" << "-rock" << "-quiet" << "-f" << "-publisher" << publisher << "-p" << "'" + preparer +"'" << "-A" << "KIso" << "-J" << "-V" << cdlabel << "-l" << "-o" << SelectedSh << QDir::homeDirPath() + "/.kisotmp/ISO/";
  if (bootpart && CD!=4472 && CD!=8500) (*makeiso)<< "mkisofs" << "-joliet" << "-rock" << "-quiet" << "-f " << "-publisher" << publisher << "-p" << "'" + preparer + "'" << "-A" << "KIso" << "-J" << "-b" << QDir::homeDirPath() + "/.kisotmp/ISO/boot/boot.img" << "-c" << QDir::homeDirPath() + "/.kisotmp/ISO/boot/boot.catalog" << "-V" << cdlabel << "-l" << "-o" << SelectedSh << QDir::homeDirPath() + "/.kisotmp/ISO/";
  makeiso->start();
  uint8_t Result = ProgressBar (QDir::homeDirPath() + "/.kisotmp/ISO", Selected, makeiso);
  if (Result){
  QApplication::restoreOverrideCursor();
  }
  KStandardDirs *dirs=KGlobal::dirs();
  KAudioPlayer::play(dirs->findResource("data", "kiso/Sounds/kisosound.ogg"));
  kProgress1->setProgress( 0 );
  MLabel2->clear();
  setCaption( QFileInfo(Selected).fileName() );
  change=false;
}

void Mainform::showdrive()
{ 
  CdIo *p_cdio=NULL;
  uint16_t num_audio = 0;
  uint16_t num_data = 0;
  cdio_hwinfo_t p_hw_info;
  p_cdio = cdio_open (CDDevice, DRIVER_DEVICE);
  if (p_cdio)
  {
  track_t num_tracks = cdio_get_num_tracks(p_cdio);
  track_t first_track_num = cdio_get_first_track_num(p_cdio);
  discmode_t ommodus = cdio_get_discmode(p_cdio);
  cdio_get_hwinfo(p_cdio, &p_hw_info);
  QString Medium;
  QString DriveType="CD-ROM";
  msf_t msf;
  cdio_get_track_msf(p_cdio, CDIO_CDROM_LEADOUT_TRACK ,&msf);
  lsn_t lsn = cdio_msf_to_lsn(&msf);
  uint16_t MediumSize = lsn * CDIO_CD_FRAMESIZE_RAW / (1024*1024);
  for (uint16_t i = first_track_num; i <= num_tracks; i++) 
  {
  if (TRACK_FORMAT_AUDIO == cdio_get_track_format(p_cdio, i))
  num_audio++;
  if (TRACK_FORMAT_DATA == cdio_get_track_format(p_cdio, i))
  num_data++;
  }
  cdio_drive_read_cap_t  i_read_cap;
  cdio_drive_write_cap_t i_write_cap;
  cdio_drive_misc_cap_t  i_misc_cap;
  QString DeviceType="";
  QString Devicename = QFileInfo(CDDevice).readLink();

    int i_status; 
    uint8_t buf[500] = { 0, };
    scsi_mmc_cdb_t cdb = {{0, }};

    CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_GET_CONFIGURATION);
    CDIO_MMC_SET_READ_LENGTH8(cdb.field, sizeof(buf));
    cdb.field[1] = CDIO_MMC_GET_CONF_ALL_FEATURES;
    cdb.field[3] = 0x0;

    i_status = scsi_mmc_run_cmd(p_cdio, 0, &cdb, SCSI_MMC_DATA_READ, sizeof(buf), &buf);
    if (i_status == 0) {
      uint8_t *p;
      uint32_t i_data;
      uint8_t *p_max = buf + 65530;

      i_data = (unsigned int) CDIO_MMC_GET_LEN32(buf);
      p = buf + 8;
      while( (p < &(buf[i_data])) && (p < p_max) ) {
	uint16_t i_feature;
	uint8_t i_feature_additional = p[3];
	
	i_feature = CDIO_MMC_GET_LEN16(p);
	{
	  switch( i_feature )
	    {
	    case CDIO_MMC_FEATURE_CORE: 
	      {
		uint8_t *q = p+4;
		uint32_t 	i_interface_standard = CDIO_MMC_GET_LEN32(q);
		switch(i_interface_standard) {
		case 0: 
                  DeviceType=i18n("Unknown interface");
		  break;
		case 1: 
                  DeviceType="SCSI";
		  break;
		case 2: 
                  DeviceType="ATAPI";
		  break;
		case 3: 
                  DeviceType="IEEE 1394";
		  break;
		case 4:
                  DeviceType="IEEE 1394A";
		  break;
		case 5:
                  DeviceType=i18n("Fibre Channel");
		}
		break;
	      }
	    }
	  p += i_feature_additional + 4;
	}
      }
    }

  if (cdio_is_discmode_cdrom(ommodus)) Medium = "CD";
  if (ommodus==CDIO_DISC_MODE_DVD_R) Medium = "DVD-R";
  if (ommodus==CDIO_DISC_MODE_DVD_RW) Medium = "DVD-RW";
  if (ommodus==CDIO_DISC_MODE_DVD_R) Medium = "DVD-R";
  if (ommodus==CDIO_DISC_MODE_DVD_ROM) Medium = "DVD-ROM";
  if (ommodus==CDIO_DISC_MODE_DVD_RAM) Medium = "DVD-RAM";
  if (ommodus==CDIO_DISC_MODE_CD_DA) Medium = i18n("Audio-CD");
  cdio_get_drive_cap_dev(CDDevice, &i_read_cap,&i_write_cap, &i_misc_cap);
  if (i_read_cap & CDIO_DRIVE_CAP_READ_DVD_ROM) DriveType="DVD-ROM";
  if (i_write_cap & CDIO_DRIVE_CAP_WRITE_CD_R) DriveType="CD-R";
  if (i_write_cap & CDIO_DRIVE_CAP_WRITE_CD_RW) DriveType="CD-RW";
  if (i_write_cap & CDIO_DRIVE_CAP_WRITE_DVD_R) DriveType="DVD-R";
  if (i_write_cap & CDIO_DRIVE_CAP_WRITE_DVD_RW) DriveType="DVD-RW";
  
  KMessageBox::information(this, i18n("Drive: ") + p_hw_info.psz_vendor + " " + p_hw_info.psz_model + "\n" + i18n("Revision: ") + p_hw_info.psz_revision +"\n" + i18n ("Type: ") + DeviceType + " " + DriveType + "\n" + i18n("Medium: ") + Medium + "\n" + i18n("Number of datatracks: ") + QString::number(num_data) + "\n" + i18n ("Number of audiotracks: ") + QString::number(num_audio) + "\n" + i18n("Size: ") + QString::number(MediumSize) + " MB" + "\n");
  }
  else
  KMessageBox::error(this, i18n("There is no CD/DVD in drive: ") + CDDevice + " !", i18n("Error"));
  cdio_destroy(p_cdio);
}

//Calculate percentage between source and target.
int Mainform::ProgressBar (QString source, QString target, KShellProcess* CallingP, double already)
{
  double sourcesize;
  double targetsize;
  uint8_t add = 0;
  if (source.startsWith( "/dev" )){
  lba_t first_audio_lba = 0;
  int LBA = 0;
   double frame = 2047.0071437328;
    CdIo *cdio = cdio_open_cd (CDDevice);
    track_t num_tracks = cdio_get_num_tracks(cdio);
    track_t first_track_num = cdio_get_first_track_num(cdio);
    for (uint16_t i = first_track_num; i <= num_tracks; i++) {
    if (TRACK_FORMAT_AUDIO == cdio_get_track_format(cdio, i))
    if (first_audio_lba == 0){ 
    first_audio_lba = cdio_get_track_lba(cdio,i);
    LBA = first_audio_lba;
    }
  }
    if (!LBA) LBA = cdio_stat_size(cdio);
    cdio_destroy(cdio);
    sourcesize = LBA*frame;
  }
  else 
  {
  QFileInfo sourcefile (source);
  if (sourcefile.isDir()) sourcesize = listView1->DirSize (QDir::homeDirPath() + "/.kisotmp/ISO", "-sLb");
  else sourcesize = sourcefile.size();
  }
  while (CallingP->isRunning()){
  QFileInfo targetfile (target);
  if (targetfile.isDir()) targetsize = KDirSize::dirSize (target) - already;
  else targetsize = targetfile.size();
  if (already==-1)
  targetsize = targetsize/3;
  double quot = ( targetsize / sourcesize) * 100;
  uint8_t progress = (uint8_t)quot;
  if (progress>100) progress=100;
  kProgress1->setProgress( (progress) + add );
  kapp->processEvents ();
  }
   kProgress1->setProgress( 100 );
  return 1;
  }

  
void Mainform::encryption()
{
if (!Proofforapp())
KMessageBox::error(this, i18n("Mcrypt was not found on your system. Please install it."), i18n("Encryption not possible"));
if (Proofforapp())
{
bool success=true;
QDir::setCurrent( QDir::homeDirPath() );
 QString Selected=KFileDialog::getOpenFileName(QDir::currentDirPath(),
     "*.iso *.bin *.nrg *.mdf *.cdi |"+i18n("All supported images") + "\n*.bin |BIN\n *.cdi |CDI\n *.iso |ISO\n *.mdf |MDF\n *.nrg |NRG", this, i18n("Encrypt Image..."));
  if (FindEncryption (Selected))
   {
    KMessageBox::error(this, i18n("This file seems to be encrypted already."), i18n("Error"));
    success=false;
   }
 if (Selected && success)
 {
 QCString encryptionid;
 QString SelectedSh = PrepforShell(Selected);
 int result = KPasswordDialog::getPassword(encryptionid, i18n("Please enter a password:"));
 if (result == KPasswordDialog::Accepted)
 if (encryptionid)
 {
 MLabel2->setMovie( *Film2 );
 double sourcesize=QFileInfo (Selected).size();
 KShellProcess *encrypt = new KShellProcess();
 (*encrypt)<< "mcrypt" << SelectedSh << "-u" << "-k" << encryptionid;
  encrypt->start();
  while (encrypt->isRunning())
  {
  double targetsize=QFileInfo ( Selected + ".nc").size();
  double quot = ( targetsize / sourcesize) * 100;
  uint8_t progress = (uint8_t)quot;
  kProgress1->setProgress( progress );
  kapp->processEvents ();
  }
  QDir actual = QFileInfo(Selected).dirPath()+ "/"; 
  actual.rename(Selected + ".nc", Selected);
  KStandardDirs *dirs=KGlobal::dirs();
  KAudioPlayer::play(dirs->findResource("data", "kiso/Sounds/kisosound.ogg"));
  kProgress1->setProgress( 0 );
  MLabel2->clear();
 }
 }
 }
}

bool Mainform::Proofforapp()
{
  bool installed=true;
  KProcess* proof = new KShellProcess ();
  (*proof)<< "which" << "mcrypt";
  proof->start(KShellProcess::Block, KShellProcess::Stdout);
  int status = proof->exitStatus();
  if(status)
  installed=false;
  return installed;
}

int Mainform::decryption(QString Selected, QCString encryptionid)
{
 QString SelectedSh = PrepforShell(Selected);
MLabel2->setMovie( *Film2 );
 double sourcesize=QFileInfo (Selected).size();
 KShellProcess *decrypt = new KShellProcess();
 (*decrypt)<< "mdecrypt" << SelectedSh << "-k" << encryptionid;
  decrypt->start();
  while (decrypt->isRunning())
  {
  double targetsize=QFileInfo ( Selected + ".dc").size();
  double quot = ( targetsize / sourcesize) * 100;
  uint8_t progress = (uint8_t)quot;
  kProgress1->setProgress( progress );
  kapp->processEvents ();
  }
  QDir actual = QFileInfo(Selected).dirPath()+ "/";
  actual.rename(Selected, Selected + ".nc"); 
  actual.rename(Selected + ".dc", Selected);
  kProgress1->setProgress( 0 );
  MLabel2->clear();
  return 1;
}
  
//initialize mainform
void Mainform::initialisation()
{
    KSimpleConfig conf("kisorc");
    conf.setGroup("Toolbar");
    conf.setGroup("Preferences");
    Burn=conf.readEntry("Burning", 0);
    CDDevice=conf.readEntry("Read", 0); 
    uint8_t CDS=conf.readNumEntry("CD-Size", 0);
    bool Oldhidden=ShowHidden;
    ShowHidden=conf.readBoolEntry("Hidden", false);
    Buttonsounds=conf.readBoolEntry("Sounds", false);
    if (CDS==0) CD = 650;
    if (CDS==1) CD = 700;
    if (CDS==2) CD = 800;
    if (CDS==3) CD = 4472;
    if (CDS==4) CD = 8500;

    lCDNumber1->setPaletteBackgroundColor( QColor( 0, 220, 0 ) );
    if (lCDNumber1->value() > CD) lCDNumber1->setPaletteBackgroundColor( QColor( 220, 0, 0 ) ); 
    tools->applySettings(KGlobal::config(), "Toolbar");
    if (tools->barPos()==KToolBar::Flat) tools->setFlat( false );
    applyMainWindowSettings(KGlobal::config(), "Mainwindow");

    if (Oldhidden != ShowHidden)
    {
    listView2->removeBranch(root);
    listView2->removeBranch(home);
    }
    if(!listView2->branch(i18n("Root")))
    {
    root = listView2->addBranch("/", i18n("Root"), KGlobal::iconLoader()->loadIcon("folder", KIcon::Small));
    home = listView2->addBranch(QDir::home().path(), i18n("Home Folder"), KGlobal::iconLoader()->loadIcon("folder_home", KIcon::Small),ShowHidden);
    }
}

//update listview1 when doubleclicked
void Mainform::nextdir(QListViewItem* selection)
{
    tools->setItemEnabled ( 4, true );
    menuDatei_hinzufgenAction->setEnabled( true );
    QString current = QDir::current().path();
    if (!QFileInfo(current + "/" + selection->text(0)).isDir())
    execute = new KRun(current + "/" + selection->text(0));
    if (selection->text(0)==".."){
    QDir Prev = QDir::current();
    Prev.cdUp();
    if (Prev.path()==Symlnk || Prev.path()==QDir::rootDirPath()) Prev.setPath(QDir::homeDirPath() + "/.kisotmp/ISO");
    changedirectory(listView1, Prev.path() );
    if (QDir::current().path() == QDir::homeDirPath() + "/.kisotmp/ISO")
    listView1->takeItem(listView1->findItem("..", 0));
    }
    else if (QFileInfo(current + "/" + selection->text(0)).isDir()){
    QFileInfo file (QFileInfo(current + "/" + selection->text(0)));
    if (file.isDir())
    if (current == QDir::homeDirPath() + "/.kisotmp/ISO"){
    Symlnk = QFileInfo(current + "/" + selection->text(0)).readLink();
    Symlnk = Symlnk.left(Symlnk.findRev('/'));
    }
    changedirectory(listView1, current, selection->text(0) );
    if (!listView1->findItem("..", 0)) QListViewItem item = new QListViewItem (listView1, "..");
    if (listView1->findItem(".", 0)) listView1->takeItem(listView1->findItem(".", 0));
    actd = QDir::currentDirPath();
    }
}

int Mainform::createfromdvd( QString Selected )
{
    QString SelectedSh = PrepforShell(Selected);
    KShellProcess *makeiso = new KShellProcess();
    (*makeiso)<< "dd" << "if=" + CDDevice << "of=" + SelectedSh;
    makeiso->start();
    uint8_t Result = ProgressBar (CDDevice, Selected, makeiso, -1);
    if (Result)
    return 1;
    return 0;
}

//This code is partly based on the QT example dirview.
//Copyright (C) 1992-2000 Trolltech AS.  All rights reserved.

DNDListView::DNDListView( QWidget* parent, const char* name )
    : QListView( parent, name )
{
}

DNDListView::~DNDListView()
{
}

int DNDListView::DirSize (QString directory, QString options)
{
  KProcess* usage = new KShellProcess ();
  (*usage)<< "du" << options << directory;
  connect (usage, SIGNAL (receivedStdout (KProcess*, char*, int)), this ,SLOT (result(KProcess*,char*,int)));
  usage->start(KShellProcess::Block, KShellProcess::Stdout);
  return dirsi;
  }

void DNDListView::result(KProcess* prozess, char* outp, int id){
   QString size = outp;
   if (prozess && id){
   size = size.left(size.find("/")-1);
   dirsi = size.toInt(0, 10);
  }
} 

DNDListView2::DNDListView2( QWidget* parent, const char* name, QLCDNumber* Object )
    : DNDListView( parent, name )
{
    LCD=Object;
    setAcceptDrops( true );
    viewport()->setAcceptDrops( true );
}

DNDListView2::~DNDListView2()
{

}

void DNDListView2::contentsDropEvent( QDropEvent *e )
{
  bool Noadd=0;
  QString fileSize;
  if ( !QUriDrag::canDecode(e) || !dragItem ) {
    e->ignore();
    return;
    }
    e->accept();
    if (dragItem->text(0)){
    QFileInfo fi (Fullpath);
    if (fi.extension( FALSE ).lower()=="iso" || fi.extension( FALSE ).lower()=="nrg")
    {
    switch(KMessageBox::questionYesNo(this, i18n("Shall this image be merged with the actual one ?"), i18n("New image"), i18n("&Yes"), i18n("&No")))
   {
    case 3:
    {
    ++imagenumber;
    Mergeimage(Fullpath);
    Noadd=1;
    }
   }
    }
    if (!Noadd)
    {
    if (fi.isReadable() && !QFileInfo(QDir::homeDirPath() + "/.kisotmp/ISO/" + dragItem->text(0)).exists()){
    if (!fi.isDir()) fileSize = QString::number(fi.size()) + " Bytes";
    QString LastMod = fi.lastModified().toString("dd.MM.yyyy  hh:mm");
    if (fi.isDir())
    {
    QDir addi (Fullpath);
    QApplication::setOverrideCursor (waitCursor);
    Linkfiles(addi, QDir::current());
    QApplication::restoreOverrideCursor();
    }
    else
    {
    KIO::CopyJob *job;
    job = KIO::link (Fullpath, QDir::currentDirPath());
    }
    QListViewItem* itemnew = new QListViewItem (this, dragItem->text(0), fileSize, LastMod);
    itemnew->setPixmap(0, QPixmap(FileIcon (&fi)));
    double filesize = fi.size();
    if (fi.isDir()) filesize = KDirSize::dirSize (Fullpath);
    double newvalue=LCD->value()+filesize/1024/1024;
    actuallcd(newvalue);
     }
   }
  }
}

void DNDListView2::Mergeimage(QString Name)
{
  QString Mountnumber=QString::number(imagenumber);
  if (!imagenumber) Mountnumber="";
  QDir mntpt (QDir::homeDirPath() + "/.kisotmp/");
  QApplication::setOverrideCursor (waitCursor);
  mntpt.mkdir( "Mount" + Mountnumber );
  MountISO(Name, imagenumber);
  QDir Iso (QDir::homeDirPath() + "/.kisotmp/ISO");
  GetDirView (this, Iso, "*", ShowHidden);
  this->takeItem(this->findItem("..", 0));
  double imgsize = DirSize (QDir::homeDirPath() + "/.kisotmp/ISO", "-sLb");
  imgsize = imgsize/1024/1024;
  actuallcd(imgsize);
  QApplication::restoreOverrideCursor();
}

void DNDListView2::contextMenuEvent ( QContextMenuEvent * )
{
 KPopupMenu* contextMenu = new KPopupMenu( this );
    KIconLoader *loader = KGlobal::iconLoader();
    Q_CHECK_PTR( contextMenu ); 
    CDelItem = new KAction( "CDelItem" );
    CDelItem->setShortcut ( ALT+Key_D );
    CDelItem->setIconSet( loader->loadIcon("editdelete", KIcon::Small) );
    CAddItem = new KAction( "CAddItem" );
    CAddItem->setShortcut ( ALT+Key_A );
    CAddItem->setIconSet ( QPixmap ((const char **) image5_data ));
    CAddDir = new KAction ( "KAddDir" );
    CAddDir->setShortcut ( ALT+Key_E );
    CAddDir->setIconSet ( QPixmap ((const char **) image5_data ));
    CNewDir = new KAction( "CNewDir" );
    CNewDir->setShortcut ( ALT+Key_R );
    CNewDir->setIconSet (loader->loadIcon("folder_new", KIcon::Small) );
    CEraseBoot = new KAction ( "CEraseBoot" );
    CEraseBoot->setShortcut ( ALT+Key_B );
    CEraseBoot->setIconSet( loader->loadIcon("editdelete", KIcon::Small) );
    CRenItem = new KAction ( "CRenItem" );
    CRenItem->setShortcut ( ALT+Key_N );
    CRenItem->setIconSet (loader->loadIcon("editclear", KIcon::Small) );
    CEraseBoot->setText ( i18n ( "Erase &bootimage" ) );
    CDelItem->setText( i18n( "&Delete File/Directory" ) );
    CAddItem->setText( i18n( "&Add File" ) );
    CAddDir->setText( i18n( "Add Dir&ectory" ) );
    CNewDir->setText( i18n( "C&reate Directory" ) );
    CRenItem->setText( i18n ( "Re&name" ) );
    CDelItem->plug( contextMenu );
    CAddItem->plug( contextMenu );
    CRenItem->plug( contextMenu );
    contextMenu->insertSeparator();
    CAddDir->plug( contextMenu );
    CNewDir->plug( contextMenu );
    contextMenu->insertSeparator();
    CEraseBoot->plug( contextMenu );
    connect( CDelItem, SIGNAL( activated() ), this, SLOT( erase() ) );
    connect( CAddItem, SIGNAL( activated() ), this, SLOT( add() ) );
    connect( CAddDir, SIGNAL(activated() ),this, SLOT( addfolder() ) );
    connect( CNewDir, SIGNAL( activated() ), this, SLOT( newsub() ) );
    connect( CEraseBoot, SIGNAL( activated() ), this, SLOT ( eraseboot() ) );
    connect( CRenItem, SIGNAL( activated() ), this, SLOT (renameItem() ) );
    if (this->childCount()==0 || !this->currentItem()->isSelected())
    {
    CDelItem->setEnabled ( false );
    CRenItem->setEnabled ( false );
    }
    if (!bootpart) CEraseBoot->setEnabled ( false );
    contextMenu->exec( QCursor::pos() );
    delete contextMenu;
}

void DNDListView2::eraseboot()
{
    KIO::Job* job;
    job=KIO::del(QDir::homeDirPath() + "/.kisotmp/ISO/boot");
    bootpart=QString::null;
    this->setColumnText(0,QIconSet(),i18n("Name"));
}

void DNDListView2::addfolder()
{
QString fileSize;
QString Selected=KFileDialog::getExistingDirectory(QDir::currentDirPath(), this, i18n("Add Directory..."));
if (Selected){
if (!QFileInfo(Selected).isReadable())
    KMessageBox::error(this, i18n("You didn't select a valid directory !"),i18n("Error"));
    else
    {
    QFileInfo fi (Selected);
    if (!QFileInfo(QDir::homeDirPath() + "/.kisotmp/ISO/" + fi.fileName()).exists()){
    QString LastMod = fi.lastModified().toString("dd.MM.yyyy  hh:mm");
    QDir addi (Selected);
    QApplication::setOverrideCursor (waitCursor);
    Linkfiles(addi, QDir::current());
    QApplication::restoreOverrideCursor();
    QListViewItem* itemnew = new QListViewItem (this, fi.fileName(), 0, LastMod);
    itemnew->setPixmap(0, QPixmap(FileIcon (&fi)));
    double filesize = fi.size();
    if (fi.isDir()) filesize = KDirSize::dirSize (Selected);
    double newvalue=LCD->value()+filesize/1024/1024;
    actuallcd(newvalue);
   }
  }
 }
}

void DNDListView2::newsub()
{
QString newdirect = KInputDialog::getText( i18n("Create directory..."),i18n("Directory name:") );
  if (this->findItem(newdirect, 0))
  KMessageBox::error(0, i18n("Directory already exists."),i18n("Error"));
  else
  {
  if (newdirect)
  {
  QListViewItem* newitem;
  QFileInfo file ( QDir::homeDirPath() );
  QString LastMod = QDateTime::currentDateTime().toString("dd.MM.yyyy  hh:mm");
  newitem = new QListViewItem (this, newdirect, 0, LastMod);
  QPixmap Picture = FileIcon( &file );
  newitem->setPixmap( 0, Picture );
  QDir nsu (QDir::current());
  nsu.mkdir( newdirect );
   }
  change=true;
  }
}

void DNDListView2::add()
{
    double filesize=Adddialog();
    double newvalue=LCD->value()+filesize/1024/1024;
    actuallcd(newvalue);
}

double DNDListView::Adddialog()
{
double filesize = 0;
QString Selected = addfile();
 if (Selected) {
   QString fileSize;
    QFileInfo file ( Selected );
    QListViewItem* newitem;
    QString entry = Selected.right(Selected.length() - Selected.findRev('/')-1);
    fileSize = QString::number(file.size()) + " Bytes";
    QString LastMod = QFileInfo(Selected).lastModified().toString("dd.MM.yyyy  hh:mm");
    newitem = new QListViewItem (this, entry, fileSize, LastMod);
    QPixmap Picture = FileIcon( &file );
    newitem->setPixmap( 0, Picture );
    filesize = file.size();
 }
    return filesize;
}
	
void DNDListView2::keyPressEvent ( QKeyEvent* e )
{
  if (e->key()==4103 && this->acceptDrops()){
  erase();
    }
}

void DNDListView2::erase()
{
    switch (KMessageBox::warningYesNo(this, i18n("Do you really want to erase this file(s) ?"),
    i18n("Warning"), i18n("&Yes"), i18n("&No")))
    {
    case 3:
    {
    QList<Filelist> selectedlist;
    QListViewItemIterator it( this );
    while ( it.current() ) {
        if ( it.current()->isSelected() )
	{
	 QFileInfo fi = QFileInfo(QDir::currentDirPath() + "/" + "'" + it.current()->text(0) + "'");
	 selectedlist.append( new Filelist(fi.filePath(), fi.size(), fi.lastModified()) );
	  }  
        ++it;
   }
    for ( uint16_t i = 0; i < selectedlist.count(); ++i )
   {
    KShellProcess *rm = new KShellProcess();
    (*rm)<< "rm" << "-R" << selectedlist.at(i)->filepath().latin1();
    rm->start(KShellProcess::Block);
   }
    GetDirView (this, (QDir::currentDirPath()), "*", ShowHidden);
    if (QDir::currentDirPath()==QDir::homeDirPath() + "/.kisotmp/ISO") this->takeItem(this->findItem("..", 0));
    double newvalue=DirSize (QDir::homeDirPath() + "/.kisotmp/ISO", "-sLb")/1024/1024;
    actuallcd(newvalue);
    }
  }
}
 
void DNDListView2::actuallcd(double nvalue)
{
    LCD->setProperty( "value", nvalue );
    LCD->setPaletteBackgroundColor( QColor( 0, 220, 0 ) );
    if (nvalue > CD) LCD->setPaletteBackgroundColor( QColor( 220, 0, 0 ) );
    change=true;   
}

void DNDListView2::renameItem()
{
QString newname;
if (this->currentItem())
 {
newname=KInputDialog::getText( i18n("Rename"),i18n("New name:"), this->currentItem()->text(0) );
 }
if (newname)
{
QDir actual = QDir::currentDirPath() + "/"; 
actual.rename(this->currentItem()->text(0), newname);
this->currentItem()->setText(0, newname);
}
}

KIsoTreeview::KIsoTreeview(QWidget* parent, const char* name ): KFileTreeView(parent, name)
{
   viewport()->setAcceptDrops(false);
   setDragEnabled(true);
   setAllColumnsShowFocus(true);
   mousePressed = FALSE;
   KSimpleConfig conf("kisorc");
   conf.setGroup("Preferences");
   QString favorites = conf.readEntry("Favorites", 0);
   QStringList fav = QStringList::split(',', favorites, true);
   for(QStringList::iterator it = fav.begin(); it != fav.end(); it++)
   {
    QString Element = *it;
    int Seperator = Element.find(":");
    if (Element.left(Seperator))
    (void) this->addBranch(Element.left(Seperator), Element.mid(Seperator+1,Element.length()), KGlobal::iconLoader()->loadIcon("folder", KIcon::Small));
   }
   connect(this, SIGNAL(selectionChanged(QListViewItem*)),this, SLOT(Update()) );
}

KIsoTreeview::~KIsoTreeview()
{
}

//Dirty hack because KFileTreeView is damn full of bugs.
void KIsoTreeview::Update()
{
     if (!this->branch(currentItem()->text(0)) && currentKFileTreeViewItem()->isDir() && QFileInfo(currentURL().path()).isReadable())
     {
     KFileTreeViewItem *it = static_cast<KFileTreeViewItem*>(this->currentItem());
     KFileTreeBranch *branch = it->branch();
     branch->populate(currentURL(), currentKFileTreeViewItem());
     }
}

void KIsoTreeview::contextMenuEvent ( QContextMenuEvent * )
{
   Contextmenu = new KPopupMenu( this );
   KIconLoader *loader = KGlobal::iconLoader();
   Q_CHECK_PTR( Contextmenu );
   if(this->currentItem()->isSelected())
   {
   if (!this->branch(currentItem()->text(0)))
   {
   RenameItem = new KAction( "RenameItem" );
   RenameItem->setIconSet( loader->loadIcon("editclear", KIcon::Small) );
   RenameItem->setText( i18n( "Rename" ) );
   EraseItem = new KAction( "EraseItem" );
   EraseItem->setIconSet( loader->loadIcon("editdelete", KIcon::Small) );
   EraseItem->setText( i18n( "Erase" ) );
   Properties = new KAction( "Properties" );
   Properties->setIconSet( loader->loadIcon("info", KIcon::Small) );
   Properties->setText( i18n( "Properties" ) );
   EraseItem->plug(Contextmenu);
   RenameItem->plug(Contextmenu);
   Contextmenu->insertSeparator();
   Properties->plug(Contextmenu);
   connect(Properties, SIGNAL( activated() ), this, SLOT (showPropertiesDialog()));
   connect(RenameItem, SIGNAL( activated() ), this, SLOT (Rename()));
   connect(EraseItem, SIGNAL( activated() ), this, SLOT (Erase()));
   }
   else
   {
   EraseMainfolder = new KAction( "EraseMainfolder" );
   EraseMainfolder->setIconSet( loader->loadIcon("editdelete", KIcon::Small) );
   EraseMainfolder->setText( i18n( "Erase Folder" ) );
   EraseMainfolder->plug(Contextmenu);
   connect(EraseMainfolder, SIGNAL( activated() ), this, SLOT (EraseFolder()));
   }
   }
   else
   {
   NewMainfolder = new KAction( "NewMainfolder" );
   NewMainfolder->setIconSet( loader->loadIcon("folder_new", KIcon::Small) );
   NewMainfolder->setText( i18n( "New Folder" ) );
   NewMainfolder->plug(Contextmenu);
   connect(NewMainfolder, SIGNAL( activated() ), this, SLOT (NewFolder()));
   } 
   Contextmenu->exec( QCursor::pos() );
   delete Contextmenu;
}

void KIsoTreeview::contentsMousePressEvent( QMouseEvent* e )
{
   if (e->button()==LeftButton){
  QListView::contentsMousePressEvent(e);
    QPoint p( contentsToViewport( e->pos() ) );
    QListViewItem *i = itemAt( p );
    if ( i ) {
      setSelected( i, TRUE );

    if (p.x() > rootIsDecorated() ? 1 : 0 ){
      dragItem = i;
      presspos = e->pos();
      mousePressed = TRUE;
  }
    }
  }
}

void KIsoTreeview::contentsMouseMoveEvent( QMouseEvent* )
{
  if ( mousePressed ) {
    mousePressed = FALSE;
    QUriDrag* ud = new QUriDrag(viewport());
    QFileInfo fi (currentURL().path());
    Fullpath=(currentURL().path());
    ud->setPixmap(QPixmap(FileIcon (&fi)),QPoint(8,8));
  if ( ud->drag() ) ;
    }
  this->setAcceptDrops(true);    
}

void KIsoTreeview::contentsMouseReleaseEvent( QMouseEvent* )
{
    mousePressed = FALSE;
}

void KIsoTreeview::showPropertiesDialog() 
{
  (void)new KPropertiesDialog(currentURL(),this);
}

void KIsoTreeview::Rename()
{
     QString newname=KInputDialog::getText(i18n("Rename"),i18n("New name:"), this->currentItem()->text(0));
     if (newname)
     {
     KURL newURL=currentURL().upURL();
     newURL.addPath(newname);
     KIO::Job* job;
     job=KIO::rename(currentURL(),newURL,false);
     }
}

void KIsoTreeview::Erase()
{
     switch (KMessageBox::warningYesNo(this, i18n("Do you really want to erase this file(s) ?"),
    i18n("Warning"), i18n("&Yes"), i18n("&No")))
    {
    case 3:
    {
     KIO::Job* job;
     job=KIO::del(currentURL());
   }
  }
}

void KIsoTreeview::NewFolder()
{
    QString Selected=KFileDialog::getExistingDirectory(QDir::currentDirPath(), this, i18n("Create Folder..."));
    if (Selected && QFileInfo(Selected).isReadable())
    {
    QString Capt=KInputDialog::getText(i18n("Name"),i18n("Name:"), QFileInfo(Selected).fileName());
    if (Capt)
    {
    if (!this->branch(Capt))
    {
    (void) this->addBranch(Selected, Capt, KGlobal::iconLoader()->loadIcon("folder", KIcon::Small));
    KSimpleConfig conf("kisorc");
    conf.setGroup("Preferences");
    QString favorites = conf.readEntry("Favorites", 0);
    favorites=favorites + Selected + ":" + Capt + ",";
    conf.writeEntry("Favorites", favorites);
    }
    else
    KMessageBox::error(0, i18n("A Folder of that name already exists."),i18n("Error"));
    }
    }
}

void KIsoTreeview::EraseFolder()
{
    KSimpleConfig conf("kisorc");
    conf.setGroup("Preferences");
    QString favorites = conf.readEntry("Favorites", 0);
    favorites.replace(currentURL().path() + ":" + currentItem()->text(0) + ",","");
    conf.writeEntry("Favorites", favorites);
    this->removeBranch(branch(currentItem()->text(0)));
}

void Mainform::closeEvent ( QCloseEvent* e )
{
    if (Encryptfile)
    {
    QDir actual = QFileInfo(Encryptfile).dirPath()+ "/";
    actual.remove(Encryptfile);
    actual.rename(Encryptfile + ".nc", Encryptfile);
    }
    if (change){
      switch (KMessageBox::warningYesNo(this, i18n("Changes have not been saved. Exit anyway ?"),
    i18n("Warning"), i18n("&Yes"), i18n("&No")))
    {
      case 3:
      {
        change=false;
        }
      }
    }
    if (!change){
    saveMainWindowSettings(KGlobal::config(), "Mainwindow");
    recent->saveEntries( KGlobal::config(), "Recentfiles" );
    tools->saveSettings(KGlobal::config(), "Toolbar");
    QDir::setCurrent( QDir::homeDirPath() );  
    KShellProcess *unmount = new KShellProcess();
    (*unmount)<< "sudo" << "/bin/umount" << QDir::homeDirPath() + "/.kisotmp/Mount";
    unmount->start(KShellProcess::Block, KShellProcess::Stderr);
    KShellProcess *rm = new KShellProcess();
    (*rm)<< "rm" << "-R" << QDir::homeDirPath() + "/.kisotmp/ISO/*";
    rm->start(KShellProcess::Block);
    if (imagenumber)
   {
    for (uint8_t i = 1; i<= imagenumber ; ++i)
    {
    KShellProcess *unmount = new KShellProcess();
    (*unmount)<< "sudo" << "/bin/umount" << QDir::homeDirPath() + "/.kisotmp/Mount" + QString::number(i);
    unmount->start(KShellProcess::Block, KShellProcess::Stderr);
    KShellProcess *rm = new KShellProcess();
    (*rm)<< "rm" << "-R" << QDir::homeDirPath() + "/.kisotmp/Mount" + QString::number(i);
    rm->start(KShellProcess::Block);
    }
   }
    e->accept();
  }
}

#include "kiso.moc"
