source: psi/trunk/src/options/ui_isdetails.ui.h

Last change on this file was 2, checked in by dmik, 19 years ago

Imported original Psi 0.10 sources from Affinix

File size: 1.5 KB
Line 
1/****************************************************************************
2** ui.h extension file, included from the uic-generated form implementation.
3**
4** If you wish to add, delete or rename functions or slots use
5** Qt Designer which will update this file, preserving your code. Create an
6** init() function in place of a constructor, and a destroy() function in
7** place of a destructor.
8*****************************************************************************/
9
10#include <qdatetime.h>
11
12void IconsetDetailsDlg::setIconset( const Iconset &is )
13{
14 setCaption(caption().arg(is.name()));
15
16 lb_name->setText(is.name());
17 lb_version->setText(is.version());
18
19 if ( is.description().isEmpty() ) {
20 lb_desc->hide();
21 lb_desc2->hide();
22 }
23 else
24 lb_desc->setText(is.description());
25
26 if ( !is.homeUrl().isEmpty() ) {
27 url_home->setTitle(is.homeUrl());
28 url_home->setUrl(is.homeUrl());
29 }
30 else {
31 url_home->hide();
32 lb_home->hide();
33 }
34
35 if ( is.creation().isEmpty() ) {
36 lb_date->hide();
37 lb_date2->hide();
38 }
39 else {
40 QDate date = QDate::fromString(is.creation(), ISODate);
41 lb_date->setText(date.toString(LocalDate));
42 }
43
44 if ( is.authors().count() == 0 ) {
45 ptv_authors->hide();
46 lb_authors->hide();
47 }
48 else {
49 QString authors;
50 QStringList::ConstIterator it = is.authors().begin();
51 for ( ; it != is.authors().end(); ++it) {
52 if ( !authors.isEmpty() )
53 authors += "<br><br>";
54 authors += *it;
55 }
56 ptv_authors->setText( "<qt><nobr>" + authors + "</nobr></qt>" );
57 }
58
59 isd_iconset->setIconset(is);
60
61 resize(sizeHint());
62}
Note: See TracBrowser for help on using the repository browser.