~ubuntu-branches/ubuntu/jaunty/gtk-qt-engine/jaunty

« back to all changes in this revision

Viewing changes to kcm_gtk/mozillaprofile.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2008-06-11 16:16:24 UTC
  • Revision ID: james.westby@ubuntu.com-20080611161624-hay4v4gyuaurxm4n
Tags: 1:0.8-2ubuntu1
* Merge with Debian, remaining changes:
 - use cdbs for patches
 - Add patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <kdialog.h>
 
2
#include <klocale.h>
 
3
 
 
4
/****************************************************************************
 
5
** Form implementation generated from reading ui file '/root/gtk-qt-engine/gtk-qt-engine-0.8/kcm_gtk/mozillaprofile.ui'
 
6
**
 
7
** Created: Wed Jun 11 16:19:41 2008
 
8
**
 
9
** WARNING! All changes made in this file will be lost!
 
10
****************************************************************************/
 
11
 
 
12
#include "/root/gtk-qt-engine/gtk-qt-engine-0.8/kcm_gtk/mozillaprofile.h"
 
13
 
 
14
#include <qvariant.h>
 
15
#include <qlabel.h>
 
16
#include <qheader.h>
 
17
#include <klistview.h>
 
18
#include <qlayout.h>
 
19
#include <qtooltip.h>
 
20
#include <qwhatsthis.h>
 
21
 
 
22
/*
 
23
 *  Constructs a MozillaProfileWidget as a child of 'parent', with the
 
24
 *  name 'name' and widget flags set to 'f'.
 
25
 */
 
26
MozillaProfileWidget::MozillaProfileWidget( QWidget* parent, const char* name, WFlags fl )
 
27
    : QWidget( parent, name, fl )
 
28
{
 
29
    if ( !name )
 
30
        setName( "MozillaProfileWidget" );
 
31
    MozillaProfileWidgetLayout = new QVBoxLayout( this, 0, 6, "MozillaProfileWidgetLayout"); 
 
32
 
 
33
    label = new QLabel( this, "label" );
 
34
    label->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, label->sizePolicy().hasHeightForWidth() ) );
 
35
    MozillaProfileWidgetLayout->addWidget( label );
 
36
 
 
37
    profilesList = new KListView( this, "profilesList" );
 
38
    profilesList->addColumn( tr2i18n( "Profile" ) );
 
39
    profilesList->setProperty( "selectionMode", "Multi" );
 
40
    profilesList->setRootIsDecorated( FALSE );
 
41
    profilesList->setFullWidth( TRUE );
 
42
    MozillaProfileWidgetLayout->addWidget( profilesList );
 
43
    languageChange();
 
44
    resize( QSize(309, 293).expandedTo(minimumSizeHint()) );
 
45
    clearWState( WState_Polished );
 
46
}
 
47
 
 
48
/*
 
49
 *  Destroys the object and frees any allocated resources
 
50
 */
 
51
MozillaProfileWidget::~MozillaProfileWidget()
 
52
{
 
53
    // no need to delete child widgets, Qt does it all for us
 
54
}
 
55
 
 
56
/*
 
57
 *  Sets the strings of the subwidgets using the current
 
58
 *  language.
 
59
 */
 
60
void MozillaProfileWidget::languageChange()
 
61
{
 
62
    setCaption( tr2i18n( "Form2" ) );
 
63
    label->setText( tr2i18n( "Please select the profiles that you want to fix:" ) );
 
64
    profilesList->header()->setLabel( 0, tr2i18n( "Profile" ) );
 
65
}
 
66