Fix crash if key bindings specified in profile cannot be found. Improve
[personal-kdebase.git] / apps / kinfocenter / view1394 / view1394.h
blob6bae927783bbec51a1e9d0bbccb8fc080bf07caa
1 /*
2 * view1394.h
4 * Copyright (C) 2003 Alexander Neundorf <neundorf@kde.org>
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.
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.
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.
21 #ifndef VIEW1394_H_
22 #define VIEW1394_H_
24 #include <kcmodule.h>
26 #include <QMap>
27 #include <QSocketNotifier>
29 #include <QTimer>
31 #include "ui_view1394widget.h"
33 #include <libraw1394/raw1394.h>
35 class QStringList;
37 class OuiDb {
38 public:
39 OuiDb();
40 QString vendor(octlet_t guid);
41 private:
42 QMap<QString, QString> m_vendorIds;
45 class View1394Widget : public QWidget, public Ui::View1394Widget {
46 public:
47 View1394Widget(QWidget *parent) :
48 QWidget(parent) {
49 setupUi( this);
53 class View1394 : public KCModule {
54 Q_OBJECT
55 public:
56 View1394(QWidget *parent, const QVariantList &args);
57 virtual ~View1394();
59 public Q_SLOTS:
60 // Public slots
61 void rescanBus();
62 void generateBusReset();
64 private:
65 View1394Widget *m_view;
66 QList<raw1394handle_t> m_handles;
67 QList<QSocketNotifier*> m_notifiers;
68 bool readConfigRom(raw1394handle_t handle, nodeid_t nodeid, quadlet_t& firstQuad, quadlet_t& cap, octlet_t& guid);
69 bool m_insideRescanBus;
70 QTimer m_rescanTimer;
71 OuiDb *m_ouiDb;
72 private Q_SLOTS:
73 void callRaw1394EventLoop(int fd);
75 #endif