~ubuntu-branches/ubuntu/gutsy/kdebase-workspace/gutsy-backports

« back to all changes in this revision

Viewing changes to kcontrol/kthememanager/knewthemedlg.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2007-09-05 20:45:14 UTC
  • Revision ID: james.westby@ubuntu.com-20070905204514-632hhspl0nvrc84i
Tags: upstream-3.93.0
ImportĀ upstreamĀ versionĀ 3.93.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*-
 
2
/*  Copyright (C) 2003 Lukas Tinkl <lukas@kde.org>
 
3
 
 
4
    This program is free software; you can redistribute it and/or modify
 
5
    it under the terms of the GNU General Public License as published by
 
6
    the Free Software Foundation; either version 2 of the License, or
 
7
    (at your option) any later version.
 
8
 
 
9
    This program is distributed in the hope that it will be useful,
 
10
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
    GNU General Public License for more details.
 
13
 
 
14
    You should have received a copy of the GNU General Public License
 
15
    along with this program; if not, write to the Free Software
 
16
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
17
*/
 
18
 
 
19
#include "knewthemedlg.h"
 
20
 
 
21
#include <QLineEdit>
 
22
#include <QTextEdit>
 
23
 
 
24
#include <klocale.h>
 
25
 
 
26
KNewThemeDlg::KNewThemeDlg( QWidget * parent, const char * name )
 
27
    : KDialog( parent )
 
28
{
 
29
    setObjectName( name );
 
30
    setModal( true );
 
31
    setCaption( i18n("New Theme") );
 
32
    setButtons( Ok|Cancel );
 
33
 
 
34
    m_base = new NewThemeWidget( this );
 
35
    setMainWidget( m_base );
 
36
    connect( m_base->leName, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotThemeNameChanged( const QString & ) ) );
 
37
    slotThemeNameChanged( m_base->leName->text() );
 
38
}
 
39
 
 
40
KNewThemeDlg::~KNewThemeDlg()
 
41
{
 
42
    delete m_base;
 
43
}
 
44
 
 
45
void KNewThemeDlg::slotThemeNameChanged( const QString &_text )
 
46
{
 
47
     enableButtonOk( !_text.isEmpty() );
 
48
}
 
49
 
 
50
QString KNewThemeDlg::getName() const
 
51
{
 
52
    return m_base->leName->text();
 
53
}
 
54
 
 
55
QString KNewThemeDlg::getAuthor() const
 
56
{
 
57
    return m_base->leAuthor->text();
 
58
}
 
59
 
 
60
QString KNewThemeDlg::getEmail() const
 
61
{
 
62
    return m_base->leEmail->text();
 
63
}
 
64
 
 
65
QString KNewThemeDlg::getHomepage() const
 
66
{
 
67
    return m_base->leHomepage->text();
 
68
}
 
69
 
 
70
QString KNewThemeDlg::getComment() const
 
71
{
 
72
    return m_base->teComment->text();
 
73
}
 
74
 
 
75
QString KNewThemeDlg::getVersion() const
 
76
{
 
77
    return m_base->leVersion->text();
 
78
}
 
79
 
 
80
void KNewThemeDlg::setAuthor( const QString & author )
 
81
{
 
82
    m_base->leAuthor->setText( author );
 
83
}
 
84
 
 
85
void KNewThemeDlg::setEmail( const QString & email )
 
86
{
 
87
    m_base->leEmail->setText( email );
 
88
}
 
89
 
 
90
void KNewThemeDlg::setVersion( const QString & version )
 
91
{
 
92
    m_base->leVersion->setText( version );
 
93
}
 
94
 
 
95
void KNewThemeDlg::setName( const QString & name )
 
96
{
 
97
    m_base->leName->setText( name );
 
98
}
 
99
 
 
100
#include "knewthemedlg.moc"