From f8876e46818361e6adce312a24b0ca230fbbefe1 Mon Sep 17 00:00:00 2001 From: deva Date: Wed, 3 Dec 2008 11:20:22 +0000 Subject: Added some graphics to the multilist widget to make it easier to understand. --- client/add.png | Bin 0 -> 242 bytes client/arrows.png | Bin 0 -> 547 bytes client/del.png | Bin 0 -> 370 bytes client/widgets/multilist.cc | 17 ++++++++++++----- 4 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 client/add.png create mode 100644 client/arrows.png create mode 100644 client/del.png (limited to 'client') diff --git a/client/add.png b/client/add.png new file mode 100644 index 0000000..7a8dfc0 Binary files /dev/null and b/client/add.png differ diff --git a/client/arrows.png b/client/arrows.png new file mode 100644 index 0000000..ae56b01 Binary files /dev/null and b/client/arrows.png differ diff --git a/client/del.png b/client/del.png new file mode 100644 index 0000000..222ac8b Binary files /dev/null and b/client/del.png differ diff --git a/client/widgets/multilist.cc b/client/widgets/multilist.cc index d83423c..5ba40ac 100644 --- a/client/widgets/multilist.cc +++ b/client/widgets/multilist.cc @@ -88,21 +88,28 @@ MultiList::MultiList(QDomNode &node, MacroWindow *macrowindow) printf("ERROR: Missing 'innerwidget' attribute on multilist!\n"); } + QLabel *arrows = new QLabel(); + arrows->setPixmap(QPixmap("arrows.png")); + layout->addWidget(arrows, 1, 0, 1, 2, Qt::AlignHCenter); + QPushButton *add = new QPushButton(this); connect(add, SIGNAL(clicked()), this, SLOT(add())); - add->setText("Tilføj"); + add->setText("Tilføj ovenstående til listen"); + add->setIcon(QIcon(QPixmap("add.png"))); + // layout->addWidget(add, 0, 1, Qt::AlignTop); - layout->addWidget(add, 1, 0, 1, 1, Qt::AlignTop); + layout->addWidget(add, 2, 0, 1, 1, Qt::AlignTop); QPushButton *rem = new QPushButton(this); connect(rem, SIGNAL(clicked()), this, SLOT(remove())); - rem->setText("Fjern"); + rem->setText("Fjern det markerede element fra listen"); + rem->setIcon(QIcon(QPixmap("del.png"))); // layout->addWidget(rem, 1, 1, Qt::AlignTop); - layout->addWidget(rem, 1, 1, 1, 1, Qt::AlignTop); + layout->addWidget(rem, 2, 1, 1, 1, Qt::AlignTop); list = new QListWidget(this); // layout->addWidget(list, 1, 0, Qt::AlignTop); - layout->addWidget(list, 2, 0, 1, 2, Qt::AlignTop); + layout->addWidget(list, 3, 0, 1, 2, Qt::AlignTop); /* // This is done later if(elem.hasAttribute("value")) { -- cgit v1.2.3