~ubuntu-branches/ubuntu/gutsy/kdebase-workspace/gutsy

« back to all changes in this revision

Viewing changes to kcontrol/infocenter/view1394/view1394.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2007-09-05 20:45:14 UTC
  • Revision ID: james.westby@ubuntu.com-20070905204514-632hhspl0nvrc84i
Tags: upstream-3.93.0
ImportĀ upstreamĀ versionĀ 3.93.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * view1394.h
 
3
 *
 
4
 *  Copyright (C) 2003 Alexander Neundorf <neundorf@kde.org>
 
5
 *
 
6
 *  This program is free software; you can redistribute it and/or modify
 
7
 *  it under the terms of the GNU General Public License as published by
 
8
 *  the Free Software Foundation; either version 2 of the License, or
 
9
 *  (at your option) any later version.
 
10
 *
 
11
 *  This program is distributed in the hope that it will be useful,
 
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 *  GNU General Public License for more details.
 
15
 *
 
16
 *  You should have received a copy of the GNU General Public License
 
17
 *  along with this program; if not, write to the Free Software
 
18
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
19
 */
 
20
 
 
21
#ifndef VIEW1394_H_
 
22
#define VIEW1394_H_
 
23
 
 
24
#define KDE3_SUPPORT
 
25
#include <kcmodule.h>
 
26
#undef KDE3_SUPPORT
 
27
 
 
28
#include <QMap>
 
29
#include <QSocketNotifier>
 
30
 
 
31
#include <QTimer>
 
32
//Added by qt3to4:
 
33
#include <Q3PtrList>
 
34
 
 
35
#include "ui_view1394widget.h"
 
36
 
 
37
#include <libraw1394/raw1394.h>
 
38
class QStringList;
 
39
 
 
40
class OuiDb
 
41
{
 
42
   public:
 
43
      OuiDb();
 
44
      QString vendor(octlet_t guid);
 
45
   private:
 
46
      QMap<QString, QString> m_vendorIds;
 
47
};
 
48
 
 
49
class View1394Widget : public QWidget, public Ui::View1394Widget
 
50
{
 
51
public:
 
52
  View1394Widget( QWidget *parent ) : QWidget( parent ) {
 
53
    setupUi( this );
 
54
  }
 
55
};
 
56
 
 
57
 
 
58
class View1394: public KCModule
 
59
{
 
60
   Q_OBJECT
 
61
   public:
 
62
      View1394(QWidget *parent, const QStringList &args);
 
63
      virtual ~View1394();
 
64
 
 
65
   public Q_SLOTS: // Public slots
 
66
      void rescanBus();
 
67
      void generateBusReset();
 
68
 
 
69
   private:
 
70
      View1394Widget *m_view;
 
71
      QList<raw1394handle_t> m_handles;
 
72
      Q3PtrList<QSocketNotifier> m_notifiers;
 
73
      bool readConfigRom(raw1394handle_t handle, nodeid_t nodeid, quadlet_t& firstQuad, quadlet_t& cap, octlet_t& guid);
 
74
      bool m_insideRescanBus;
 
75
      QTimer m_rescanTimer;
 
76
      OuiDb *m_ouiDb;
 
77
   private Q_SLOTS:
 
78
      void callRaw1394EventLoop(int fd);
 
79
};
 
80
#endif