~ubuntu-branches/ubuntu/utopic/cdrdao/utopic

« back to all changes in this revision

Viewing changes to xdao/DeviceConfDialog.h

  • Committer: Bazaar Package Importer
  • Author(s): Andrew Suffield
  • Date: 2004-06-24 22:33:16 UTC
  • Revision ID: james.westby@ubuntu.com-20040624223316-534onzugaeeyq61j
Tags: upstream-1.1.9
ImportĀ upstreamĀ versionĀ 1.1.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*  cdrdao - write audio CD-Rs in disc-at-once mode
 
2
 *
 
3
 *  Copyright (C) 1998, 1999  Andreas Mueller <mueller@daneb.ping.de>
 
4
 *
 
5
 *  This program is free software; you can redistribute it and/or modify
 
6
 *  it under the terms of the GNU General Public License as published by
 
7
 *  the Free Software Foundation; either version 2 of the License, or
 
8
 *  (at your option) any later version.
 
9
 *
 
10
 *  This program is distributed in the hope that it will be useful,
 
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 *  GNU General Public License for more details.
 
14
 *
 
15
 *  You should have received a copy of the GNU General Public License
 
16
 *  along with this program; if not, write to the Free Software
 
17
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
18
 */
 
19
 
 
20
#ifndef __DEVICE_CONF_DIALOG_H
 
21
#define __DEVICE_CONF_DIALOG_H
 
22
 
 
23
#include <gtkmm.h>
 
24
 
 
25
class TocEdit;
 
26
class CdDevice;
 
27
 
 
28
class DeviceConfDialog : public Gtk::Window
 
29
{
 
30
public:
 
31
  DeviceConfDialog();
 
32
  ~DeviceConfDialog();
 
33
 
 
34
  void start();
 
35
  void stop();
 
36
 
 
37
  void update(unsigned long level);
 
38
 
 
39
private:
 
40
  bool active_;
 
41
 
 
42
  Gtk::TreeIter selectedRow_;
 
43
 
 
44
  struct DeviceData {
 
45
    std::string dev;
 
46
    int driverId;
 
47
    int deviceType;
 
48
    unsigned long options;
 
49
  };
 
50
 
 
51
  // ------------------------------------- Device TreeView
 
52
 
 
53
  class ListColumns : public Gtk::TreeModel::ColumnRecord {
 
54
  public:
 
55
    ListColumns() {
 
56
      add(dev); add(vendor); add(model); add(status); add(data);
 
57
    };
 
58
 
 
59
    Gtk::TreeModelColumn<std::string> dev;
 
60
    Gtk::TreeModelColumn<std::string> vendor;
 
61
    Gtk::TreeModelColumn<std::string> model;
 
62
    Gtk::TreeModelColumn<std::string> status;
 
63
    Gtk::TreeModelColumn<DeviceData*> data;
 
64
  };
 
65
  Gtk::TreeView list_;
 
66
  Glib::RefPtr<Gtk::ListStore> listModel_;
 
67
  ListColumns listColumns_;
 
68
 
 
69
  Gtk::Frame listFrame_;
 
70
  Gtk::Frame settingFrame_;
 
71
  Gtk::Frame addDeviceFrame_;
 
72
 
 
73
  Gtk::OptionMenu *driverMenu_;
 
74
  Gtk::OptionMenu *devtypeMenu_;
 
75
 
 
76
  Gtk::Entry devEntry_;
 
77
  Gtk::Entry vendorEntry_;
 
78
  Gtk::Entry productEntry_;
 
79
  Gtk::Entry driverOptionsEntry_;
 
80
 
 
81
  const char *checkString(const std::string &str);
 
82
 
 
83
  void setDriverId(int);
 
84
  void setDeviceType(int);
 
85
 
 
86
  void selectionChanged();
 
87
 
 
88
  void closeAction();
 
89
  void resetAction();
 
90
  void applyAction();
 
91
  void addDeviceAction();
 
92
  void deleteDeviceAction();
 
93
  void rescanAction();
 
94
 
 
95
  Gtk::TreeIter appendTableEntry(CdDevice *);
 
96
  void import();
 
97
  void importConfiguration(Gtk::TreeIter);
 
98
  void importStatus();
 
99
 
 
100
  void exportData();
 
101
  void exportConfiguration(Gtk::TreeIter);
 
102
};
 
103
 
 
104
#endif