~ubuntu-branches/ubuntu/saucy/libkdegames/saucy

« back to all changes in this revision

Viewing changes to kgdeclarativeview.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell, Rohan Garg, Philip Muškovac, Jonathan Riddell
  • Date: 2013-06-21 01:42:38 UTC
  • mfrom: (1.2.3)
  • Revision ID: package-import@ubuntu.com-20130621014238-mk0kx5llg3m15ua6
Tags: 4:4.10.80-0ubuntu1
[ Rohan Garg ]
* New upstream release

[ Philip Muškovac ]
* Add Qml imports to libkdegames6.install 
* Add new symbols to libkdegames6.symbols

[ Jonathan Riddell ]
* New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *   Copyright 2012 Viranch Mehta <viranch.mehta@gmail.com>                *
 
3
 *                                                                         *
 
4
 *   This program is free software; you can redistribute it and/or modify  *
 
5
 *   it under the terms of the GNU Library General Public License          *
 
6
 *   version 2 as published by the Free Software Foundation                *
 
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 Library General Public License for more details.                  *
 
12
 *                                                                         *
 
13
 *   You should have received a copy of the GNU Library General Public     *
 
14
 *   License along with this program; if not, write to the                 *
 
15
 *   Free Software Foundation, Inc.,                                       *
 
16
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
 
17
 ***************************************************************************/
 
18
 
 
19
#include "kgdeclarativeview.h"
 
20
 
 
21
#include <kdeclarative.h>
 
22
 
 
23
KgDeclarativeView::KgDeclarativeView(QWidget *parent) :
 
24
    QDeclarativeView(parent),
 
25
    d(0) //unused for now, for future expandability
 
26
{
 
27
    KDeclarative kdeclarative;
 
28
    kdeclarative.setDeclarativeEngine(engine());
 
29
    kdeclarative.initialize();
 
30
 
 
31
    // binds things like i18n and icons
 
32
    kdeclarative.setupBindings();
 
33
 
 
34
    setResizeMode(QDeclarativeView::SizeRootObjectToView);
 
35
}
 
36
 
 
37
#include "kgdeclarativeview.moc"