~ben-kietzman/ubuntu/quantal/mountmanager/fix-for-598070

« back to all changes in this revision

Viewing changes to sources/gui/welcomedialog.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Fabrice Coutadeur
  • Date: 2008-08-20 10:22:14 UTC
  • Revision ID: james.westby@ubuntu.com-20080820102214-fv93myu0ncb1503r
Tags: upstream-0.2.4
ImportĀ upstreamĀ versionĀ 0.2.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//MountManager - the program for easy mounting of storage devices in Linux
 
2
//Copyright (C) 2007-2008 Tikhonov Sergey
 
3
//
 
4
//This file is part of MountManager Gui
 
5
//
 
6
//This program is free software; you can redistribute it and/or
 
7
//modify it under the terms of the GNU General Public License
 
8
//as published by the Free Software Foundation; either version 2
 
9
//of the License, or (at your option) any later version.
 
10
//
 
11
//This program is distributed in the hope that it will be useful,
 
12
//but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
//GNU General Public License for more details.
 
15
//
 
16
//You should have received a copy of the GNU General Public License
 
17
//along with this program; if not, write to the Free Software
 
18
//Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
19
#include <QtGui/QPushButton>
 
20
#include <QtGui/QLabel>
 
21
#include <QtGui/QVBoxLayout>
 
22
#include <QtGui/QHBoxLayout>
 
23
#include "welcomedialog.h"
 
24
#include "const.h"
 
25
 
 
26
WelcomeDialog::WelcomeDialog(QWidget *parent) : QDialog(parent) {
 
27
        textLabel = new QLabel;
 
28
        textLabel->setWordWrap(true);
 
29
        closeButton = new QPushButton(tr("Close"));
 
30
        connect(closeButton,SIGNAL(clicked()),this,SLOT(hide()));
 
31
 
 
32
        textLabel->setText(tr("You have started MountManager - a Linux program, made for easy and understandable mounting. You are running MountManager version %1 for the first time, that's why MountManager gives a piece of information.").arg(VERSION) + "<br><br><b>" + tr("Notice") + ":</b> " + tr("You should understand that management of storage devices is rather serious, that's why you should think twice before changing any options. MountManager will try to prevent some possible errors, but if you ruin your system with your inaccurate actions remember, that we take no responsibility over your actions.")
 
33
                        + "<br><br><b>" + tr("Request") + ":</b> " + tr("We will be very thankful if you send us a letter with your wishes and a log file from /var/log/MountManager.log to developer's e-mail: sstikhonov@gmail.com. It'll help us to develop the project.")
 
34
                        + "<br><br><b>" + tr("First actions") + ":</b> " + tr("MountManager has good documentation and you should read it. After loading the program press F1 and read \"Base information about mounting\" and \"More about program.\""));
 
35
 
 
36
        QHBoxLayout *bottomLayout = new QHBoxLayout;
 
37
        bottomLayout->addStretch();
 
38
        bottomLayout->addWidget(closeButton);
 
39
        
 
40
        QVBoxLayout *mainLayout = new QVBoxLayout;
 
41
        mainLayout->addWidget(textLabel);
 
42
        mainLayout->addLayout(bottomLayout);
 
43
        setLayout(mainLayout);
 
44
        setWindowTitle(tr("Welcome to MountManager!"));
 
45
        setFixedSize(sizeHint());
 
46
}
 
47
 
 
48
WelcomeDialog::~WelcomeDialog() {
 
49
        delete textLabel;
 
50
        delete closeButton;
 
51
}