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

« back to all changes in this revision

Viewing changes to src/qdesktopitem.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
 
**
3
 
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4
 
** All rights reserved.
5
 
** Contact: Nokia Corporation (qt-info@nokia.com)
6
 
**
7
 
** This file is part of the Qt Components project on Qt Labs.
8
 
**
9
 
** No Commercial Usage
10
 
** This file contains pre-release code and may not be distributed.
11
 
** You may use this file in accordance with the terms and conditions contained
12
 
** in the Technology Preview License Agreement accompanying this package.
13
 
**
14
 
** GNU Lesser General Public License Usage
15
 
** Alternatively, this file may be used under the terms of the GNU Lesser
16
 
** General Public License version 2.1 as published by the Free Software
17
 
** Foundation and appearing in the file LICENSE.LGPL included in the
18
 
** packaging of this file.  Please review the following information to
19
 
** ensure the GNU Lesser General Public License version 2.1 requirements
20
 
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
21
 
**
22
 
** If you have questions regarding the use of this file, please contact
23
 
** Nokia at qt-info@nokia.com.
24
 
**
25
 
****************************************************************************/
26
 
#include "qdesktopitem.h"
27
 
 
28
 
 
29
 
QDesktopItem::QDesktopItem(QObject* obj) : QObject(obj) {
30
 
    connect(&desktopWidget, SIGNAL(resized(int)), this, SIGNAL(screenGeometryChanged()));
31
 
    connect(&desktopWidget, SIGNAL(resized(int)), this, SIGNAL(availableGeometryChanged()));
32
 
    connect(&desktopWidget, SIGNAL(workAreaResized(int)), this, SIGNAL(availableGeometryChanged()));
33
 
    connect(&desktopWidget, SIGNAL(screenCountChanged(int)), this, SIGNAL(screenCountChanged()));
34
 
}
35
 
 
36
 
int QDesktopItem::screenCount() const
37
 
{
38
 
    return desktopWidget.screenCount();
39
 
}
40
 
 
41
 
QRect QDesktopItem::screenGeometry(int screen) const {
42
 
    return desktopWidget.screenGeometry(screen);
43
 
}
44
 
 
45
 
QRect QDesktopItem::availableGeometry(int screen) const {
46
 
    return desktopWidget.availableGeometry(screen);
47
 
}
48
 
 
49
 
int QDesktopItem::screenWidth() const
50
 
{
51
 
    return desktopWidget.screenGeometry().width();
52
 
}
53
 
 
54
 
int QDesktopItem::screenHeight() const
55
 
{
56
 
    return desktopWidget.screenGeometry().height();
57
 
}
58
 
 
59
 
int QDesktopItem::availableWidth() const
60
 
{
61
 
    return desktopWidget.availableGeometry().width();
62
 
}
63
 
 
64
 
int QDesktopItem::availableHeight() const
65
 
{
66
 
    return desktopWidget.availableGeometry().height();
67
 
}
68
 
 
69
 
QDesktopItem *QDesktopItem::qmlAttachedProperties(QObject *obj) {
70
 
    return new QDesktopItem(obj);
71
 
}