~ubuntu-branches/ubuntu/raring/kdepim/raring-proposed

« back to all changes in this revision

Viewing changes to backupmail/selecttypewidget.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2012-06-07 07:56:38 UTC
  • mfrom: (0.2.27)
  • Revision ID: package-import@ubuntu.com-20120607075638-0luhdq11z7sgvs4m
Tags: 4:4.8.80-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  Copyright (c) 2012 Montel Laurent <montel@kde.org>
 
3
 
 
4
  This program is free software; you can redistribute it and/or modify it
 
5
  under the terms of the GNU General Public License, version 2, as
 
6
  published by the Free Software Foundation.
 
7
 
 
8
  This program is distributed in the hope that it will be useful, but
 
9
  WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
11
  General Public License for more details.
 
12
 
 
13
  You should have received a copy of the GNU General Public License along
 
14
  with this program; if not, write to the Free Software Foundation, Inc.,
 
15
  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
16
*/
 
17
 
 
18
#include "selecttypewidget.h"
 
19
#include "ui_selecttypewidget.h"
 
20
 
 
21
SelectTypeWidget::SelectTypeWidget(QWidget *parent) :
 
22
  QWidget(parent),
 
23
  ui(new Ui::SelectTypeWidget)
 
24
{
 
25
  ui->setupUi(this);
 
26
}
 
27
 
 
28
SelectTypeWidget::~SelectTypeWidget()
 
29
{
 
30
  delete ui;
 
31
}
 
32
 
 
33
BackupMailUtil::BackupTypes SelectTypeWidget::backupTypesSelected() const
 
34
{
 
35
  BackupMailUtil::BackupTypes types = BackupMailUtil::None;
 
36
  if(ui->resources->isChecked())
 
37
  {
 
38
    types|= BackupMailUtil::Resources;
 
39
  }
 
40
  if(ui->mailtransport->isChecked())
 
41
  {
 
42
    types|= BackupMailUtil::MailTransport;
 
43
  }
 
44
  if(ui->config->isChecked())
 
45
  {
 
46
    types|= BackupMailUtil::Config;
 
47
  }
 
48
  if(ui->identity->isChecked())
 
49
  {
 
50
    types|= BackupMailUtil::Identity;
 
51
  }
 
52
  if(ui->mails->isChecked())
 
53
  {
 
54
    types|= BackupMailUtil::Mails;
 
55
  }
 
56
  if(ui->akonadi->isChecked())
 
57
  {
 
58
    types|= BackupMailUtil::AkonadiDb;
 
59
  }
 
60
  return types;
 
61
}
 
62
 
 
63
 
 
64
#include "selecttypewidget.moc"