~ubuntu-branches/ubuntu/intrepid/digikam/intrepid

« back to all changes in this revision

Viewing changes to digikam/digikam/firstrun.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2008-07-17 20:25:39 UTC
  • mfrom: (1.3.2 upstream) (37 hardy)
  • mto: This revision was merged to the branch mainline in revision 39.
  • Revision ID: james.westby@ubuntu.com-20080717202539-1bw3w3nrsso7yj4z
* New upstream release
  - digiKam 0.9.4 Release Plan (KDE3) ~ 13 July 08 (Closes: #490144)
* DEB_CONFIGURE_EXTRA_FLAGS := --without-included-sqlite3
* Debhelper compatibility level V7
* Install pixmaps in debian/*.install
* Add debian/digikam.lintian-overrides

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* ============================================================
 
2
 *
 
3
 * This file is a part of digiKam project
 
4
 * http://www.digikam.org
 
5
 *
 
6
 * Date        : 2006-04-25
 
7
 * Description : a widget to use in first run dialog
 
8
 *
 
9
 * Copyright (C) 2006-2007 by Gilles Caulier <caulier dot gilles at gmail dot com>
 
10
 *
 
11
 * This program is free software; you can redistribute it
 
12
 * and/or modify it under the terms of the GNU General
 
13
 * Public License as published by the Free Software Foundation;
 
14
 * either version 2, or (at your option)
 
15
 * any later version.
 
16
 * 
 
17
 * This program is distributed in the hope that it will be useful,
 
18
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
19
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
20
 * GNU General Public License for more details.
 
21
 *
 
22
 * ============================================================ */
 
23
 
 
24
// Qt includes.
 
25
 
 
26
#include <qvariant.h>
 
27
#include <qlabel.h>
 
28
#include <qframe.h>
 
29
#include <kurlrequester.h>
 
30
#include <qlayout.h>
 
31
#include <qtooltip.h>
 
32
#include <qwhatsthis.h>
 
33
 
 
34
// KDE includes.
 
35
 
 
36
#include <kdialog.h>
 
37
#include <klocale.h>
 
38
 
 
39
// Local includes.
 
40
 
 
41
#include "firstrun.h"
 
42
#include "firstrun.moc"
 
43
 
 
44
namespace Digikam
 
45
{
 
46
 
 
47
FirstRunWidget::FirstRunWidget( QWidget* parent )
 
48
              : QWidget( parent )
 
49
{
 
50
    setName( "FirstRunWidget" );
 
51
    QVBoxLayout *vlayout = new QVBoxLayout( this, 0, 6 ); 
 
52
 
 
53
    m_textLabel2 = new QLabel( this );
 
54
    vlayout->addWidget( m_textLabel2 );
 
55
 
 
56
    QFrame *line1 = new QFrame( this );
 
57
    line1->setFrameShape( QFrame::HLine );
 
58
    line1->setFrameShadow( QFrame::Sunken );
 
59
    line1->setFrameShape( QFrame::HLine );
 
60
    vlayout->addWidget( line1 );
 
61
 
 
62
    QGridLayout *grid = new QGridLayout( 0, 1, 1, 0, 6 ); 
 
63
 
 
64
    m_pixLabel = new QLabel( this );
 
65
    m_pixLabel->setAlignment( int( QLabel::AlignTop ) );
 
66
    grid->addMultiCellWidget( m_pixLabel, 0, 1, 0, 0 );
 
67
 
 
68
    m_path = new KURLRequester( this );
 
69
    m_path->setShowLocalProtocol( true );
 
70
 
 
71
    grid->addWidget( m_path, 1, 1 );
 
72
 
 
73
    m_textLabel1 = new QLabel( this );
 
74
    m_textLabel1->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) );
 
75
    grid->addWidget( m_textLabel1, 0, 1 );
 
76
    
 
77
    vlayout->addLayout( grid );
 
78
    vlayout->addItem( new QSpacerItem( 16, 16, QSizePolicy::Minimum, QSizePolicy::MinimumExpanding ) );
 
79
    
 
80
    languageChange();
 
81
    resize( QSize(479, 149).expandedTo(minimumSizeHint()) );
 
82
    clearWState( WState_Polished );
 
83
}
 
84
 
 
85
FirstRunWidget::~FirstRunWidget()
 
86
{
 
87
}
 
88
 
 
89
void FirstRunWidget::languageChange()
 
90
{
 
91
    m_textLabel2->setText( i18n( "<b>Albums Library Folder</b>" ) );
 
92
    m_pixLabel->setText( QString() );
 
93
    m_textLabel1->setText( i18n( "<p>digiKam will store the photo albums which you create in a "
 
94
                                 "common <b>Albums Library Folder</b>. "
 
95
                                 "Below, please select which folder you would like "
 
96
                                 "digiKam to use as the common Albums Library Folder.</p>" 
 
97
                                 "<p><b>Do not use a mount path hosted by a remote computer.</b></p>") );
 
98
}
 
99
 
 
100
}  // namespace Digikam