~ubuntu-branches/ubuntu/vivid/youker-assistant/vivid

« back to all changes in this revision

Viewing changes to src/aboutdialog.cpp

  • Committer: Package Import Robot
  • Author(s): Aron Xu
  • Date: 2014-03-24 15:52:37 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20140324155237-3kod0m3wr2a2ag39
Tags: 1.0.1-0ubuntu1
* New upstream release (LP: #1294936).
* Modify display mode of weather forecast and system settings.
* Add file manager and font style settings.
* Improve system settings and restoring default settings.
* Cache user account (not password).
* Change the position of window control buttons.
* Add configuration for Kingsoft KuaiPan cloud client.
* Add the instruction of Youker Assistant.
* Open related folders when scanning items got double-clicked.
* Notify users when operating the Kingsoft disk cloud configuration.
* Modify Dbus starting method.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2013 ~ 2014 National University of Defense Technology(NUDT) & Kylin Ltd.
 
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; version 3.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful,
 
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
 * GNU General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU General Public License
 
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 */
 
16
 
 
17
#include "QDesktopWidget"
 
18
 
 
19
#include "aboutdialog.h"
 
20
#include "ui_aboutdialog.h"
 
21
#include <QtGui>
 
22
 
 
23
 
 
24
AboutDialog::AboutDialog(QWidget *parent) :
 
25
    QDialog(parent),
 
26
    ui(new Ui::AboutDialog)
 
27
{
 
28
    ui->setupUi(this);
 
29
    this->setWindowFlags(Qt::WindowStaysOnTopHint);
 
30
    QDesktopWidget* desktop = QApplication::desktop();
 
31
    move((desktop->width() - this->width())/2, (desktop->height() - this->height())/2);
 
32
    ui->tabWidget->setCurrentIndex(0);
 
33
    connect(ui->homeBtn, SIGNAL(linkActivated(QString)), this, SLOT(openUrl(QString)));
 
34
}
 
35
 
 
36
AboutDialog::~AboutDialog()
 
37
{
 
38
    delete ui;
 
39
}
 
40
 
 
41
void AboutDialog::on_closeBtn_clicked()
 
42
{
 
43
//    QDialog::accept();
 
44
    this->hide();
 
45
}
 
46
 
 
47
void AboutDialog::openUrl(QString url)
 
48
{
 
49
    QDesktopServices::openUrl(QUrl(url));
 
50
}