~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to src/plugins/mousedrivers/tslib/tslibmousedriverplugin.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-08-24 04:09:09 UTC
  • Revision ID: james.westby@ubuntu.com-20050824040909-xmxe9jfr4a0w5671
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 
 
3
 Copyright (C) 2005, Texas Instruments, Inc.
 
4
 Copyright (C) 2005, Holger Hans Peter Freyther
 
5
 All rights reserved.
 
6
 
 
7
 Redistribution and use in source and binary forms, with or without
 
8
 modification, are permitted provided that the following conditions are met:
 
9
 
 
10
   Redistributions of source code must retain the above copyright notice,
 
11
   this list of conditions and the following disclaimer.
 
12
 
 
13
   Redistributions in binary form must reproduce the above copyright
 
14
   notice, this list of conditions and the following disclaimer in the
 
15
   documentation and/or other materials provided with the distribution.
 
16
 
 
17
   Neither the name Texas Instruments, Inc nor the names of its
 
18
   contributors may be used to endorse or promote products derived
 
19
   from this software without specific prior written permission.
 
20
 
 
21
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 
22
 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 
23
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 
24
 FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 
25
 COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
 
26
 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 
27
 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 
28
 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 
29
 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 
30
 STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
 
31
 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 
32
 POSSIBILITY OF SUCH DAMAGE.
 
33
 
 
34
*/
 
35
 
 
36
 
 
37
#include "tslibmousedriverplugin.h"
 
38
#include "tslibmousehandler.h"
 
39
 
 
40
TSLibMouseDriverPlugin::TSLibMouseDriverPlugin( QObject *parent )
 
41
    : QMouseDriverPlugin( parent )
 
42
{}
 
43
 
 
44
TSLibMouseDriverPlugin::~TSLibMouseDriverPlugin()
 
45
{}
 
46
 
 
47
QWSMouseHandler* TSLibMouseDriverPlugin::create(const QString& driver, const QString&)
 
48
{
 
49
    return create( driver );
 
50
}
 
51
 
 
52
QWSMouseHandler* TSLibMouseDriverPlugin::create( const QString& driver)
 
53
{
 
54
    if( driver == "TSLib" )
 
55
        return new TSLibMouseHandler();
 
56
 
 
57
    return 0;
 
58
}
 
59
 
 
60
QStringList TSLibMouseDriverPlugin::keys() const
 
61
{
 
62
    return QStringList() << "TSLib";
 
63
}
 
64
 
 
65
Q_EXPORT_PLUGIN(TSLibMouseDriverPlugin)