~ubuntu-branches/ubuntu/breezy/psi/breezy

« back to all changes in this revision

Viewing changes to src/options/ui_isdetails.ui.h

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2004-06-15 00:10:41 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040615001041-enywb6pcpe4sjsw6
Tags: 0.9.2-1
* New upstream release
* Set KDEDIR for ./configure so kde specific files get installed
* Don't install libpsiwidgets.so. It got installed in /usr/share
  where it doesn't belong. May be included (at a better location)
  later.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
 
12
void 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
}