author | mickeyl <mickeyl> | 2005-06-09 14:30:24 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-06-09 14:30:24 (UTC) |
commit | 855e272549619c02efac516b2cd17828d7a3ad68 (patch) (unidiff) | |
tree | e16d36f3a0a85ae847b7cf9699061c8990991a55 | |
parent | 9a4b3a90fdd4ac0288034657d4818e3d10ed0193 (diff) | |
download | opie-855e272549619c02efac516b2cd17828d7a3ad68.zip opie-855e272549619c02efac516b2cd17828d7a3ad68.tar.gz opie-855e272549619c02efac516b2cd17828d7a3ad68.tar.bz2 |
update dialog and start with code reading possible PCMCIA devices and classes
-rw-r--r-- | noncore/applets/pcmcia/configdialog.cpp | 15 | ||||
-rw-r--r-- | noncore/applets/pcmcia/configdialog.h | 0 | ||||
-rw-r--r-- | noncore/applets/pcmcia/configdialogbase.ui | 76 | ||||
-rw-r--r-- | noncore/applets/pcmcia/pcmcia.cpp | 0 |
4 files changed, 81 insertions, 10 deletions
diff --git a/noncore/applets/pcmcia/configdialog.cpp b/noncore/applets/pcmcia/configdialog.cpp index c08926e..e7c97c1 100644 --- a/noncore/applets/pcmcia/configdialog.cpp +++ b/noncore/applets/pcmcia/configdialog.cpp | |||
@@ -36,11 +36,14 @@ using namespace Opie::Core; | |||
36 | 36 | ||
37 | /* QT */ | 37 | /* QT */ |
38 | #include <qcombobox.h> | 38 | #include <qcombobox.h> |
39 | #include <qdir.h> | ||
40 | #include <qlabel.h> | ||
39 | 41 | ||
40 | ConfigDialog::ConfigDialog( const QString& cardname, QWidget* parent ) | 42 | ConfigDialog::ConfigDialog( const QString& cardname, QWidget* parent ) |
41 | :ConfigDialogBase( parent, "pcmcia config dialog", true ) | 43 | :ConfigDialogBase( parent, "pcmcia config dialog", true ) |
42 | { | 44 | { |
43 | setCaption( tr( "Configure %1" ).arg( cardname ) ); | 45 | //setCaption( tr( "Configure %1" ).arg( cardname ) ); |
46 | textCardName->setText( cardname ); | ||
44 | 47 | ||
45 | OConfig cfg( "PCMCIA" ); | 48 | OConfig cfg( "PCMCIA" ); |
46 | cfg.setGroup( "Global" ); | 49 | cfg.setGroup( "Global" ); |
@@ -66,6 +69,16 @@ ConfigDialog::ConfigDialog( const QString& cardname, QWidget* parent ) | |||
66 | for ( int i; i < cbAction->count(); ++i ) | 69 | for ( int i; i < cbAction->count(); ++i ) |
67 | if ( cbAction->text( i ) == insert ) cbAction->setCurrentItem( i ); | 70 | if ( cbAction->text( i ) == insert ) cbAction->setCurrentItem( i ); |
68 | } | 71 | } |
72 | |||
73 | // parse possible device and class names out of /etc/pcmcia/*.conf | ||
74 | QStringList deviceNames; | ||
75 | QStringList classNames; | ||
76 | |||
77 | QDir pcmciaconfdir( "/etc/pcmcia", "*.conf" ); | ||
78 | |||
79 | for ( int i = 0; i < pcmciaconfdir.count(); ++i ) | ||
80 | odebug << "found conf file '" << pcmciaconfdir[i] << "'" << oendl; | ||
81 | |||
69 | } | 82 | } |
70 | 83 | ||
71 | ConfigDialog::~ConfigDialog() | 84 | ConfigDialog::~ConfigDialog() |
diff --git a/noncore/applets/pcmcia/configdialog.h b/noncore/applets/pcmcia/configdialog.h index 12500c4..f79d7a6 100644 --- a/noncore/applets/pcmcia/configdialog.h +++ b/noncore/applets/pcmcia/configdialog.h | |||
diff --git a/noncore/applets/pcmcia/configdialogbase.ui b/noncore/applets/pcmcia/configdialogbase.ui index d8dd983..a9682c5 100644 --- a/noncore/applets/pcmcia/configdialogbase.ui +++ b/noncore/applets/pcmcia/configdialogbase.ui | |||
@@ -11,8 +11,8 @@ | |||
11 | <rect> | 11 | <rect> |
12 | <x>0</x> | 12 | <x>0</x> |
13 | <y>0</y> | 13 | <y>0</y> |
14 | <width>214</width> | 14 | <width>234</width> |
15 | <height>44</height> | 15 | <height>130</height> |
16 | </rect> | 16 | </rect> |
17 | </property> | 17 | </property> |
18 | <property stdset="1"> | 18 | <property stdset="1"> |
@@ -28,13 +28,13 @@ | |||
28 | <grid> | 28 | <grid> |
29 | <property stdset="1"> | 29 | <property stdset="1"> |
30 | <name>margin</name> | 30 | <name>margin</name> |
31 | <number>11</number> | 31 | <number>7</number> |
32 | </property> | 32 | </property> |
33 | <property stdset="1"> | 33 | <property stdset="1"> |
34 | <name>spacing</name> | 34 | <name>spacing</name> |
35 | <number>6</number> | 35 | <number>4</number> |
36 | </property> | 36 | </property> |
37 | <widget row="0" column="2" > | 37 | <widget row="2" column="2" > |
38 | <class>QLabel</class> | 38 | <class>QLabel</class> |
39 | <property stdset="1"> | 39 | <property stdset="1"> |
40 | <name>name</name> | 40 | <name>name</name> |
@@ -45,7 +45,18 @@ | |||
45 | <string>card</string> | 45 | <string>card</string> |
46 | </property> | 46 | </property> |
47 | </widget> | 47 | </widget> |
48 | <widget row="0" column="1" > | 48 | <widget row="2" column="0" > |
49 | <class>QLabel</class> | ||
50 | <property stdset="1"> | ||
51 | <name>name</name> | ||
52 | <cstring>TextLabel2</cstring> | ||
53 | </property> | ||
54 | <property stdset="1"> | ||
55 | <name>text</name> | ||
56 | <string>Upon insertion,</string> | ||
57 | </property> | ||
58 | </widget> | ||
59 | <widget row="2" column="1" > | ||
49 | <class>QComboBox</class> | 60 | <class>QComboBox</class> |
50 | <item> | 61 | <item> |
51 | <property> | 62 | <property> |
@@ -76,15 +87,62 @@ | |||
76 | <cstring>cbAction</cstring> | 87 | <cstring>cbAction</cstring> |
77 | </property> | 88 | </property> |
78 | </widget> | 89 | </widget> |
79 | <widget row="0" column="0" > | 90 | <widget row="3" column="1" rowspan="1" colspan="2" > |
91 | <class>QComboBox</class> | ||
92 | <property stdset="1"> | ||
93 | <name>name</name> | ||
94 | <cstring>cbBindTo</cstring> | ||
95 | </property> | ||
96 | </widget> | ||
97 | <widget row="1" column="0" rowspan="1" colspan="3" > | ||
98 | <class>Line</class> | ||
99 | <property stdset="1"> | ||
100 | <name>name</name> | ||
101 | <cstring>Line1</cstring> | ||
102 | </property> | ||
103 | <property stdset="1"> | ||
104 | <name>orientation</name> | ||
105 | <enum>Horizontal</enum> | ||
106 | </property> | ||
107 | </widget> | ||
108 | <widget row="3" column="0" > | ||
80 | <class>QLabel</class> | 109 | <class>QLabel</class> |
81 | <property stdset="1"> | 110 | <property stdset="1"> |
82 | <name>name</name> | 111 | <name>name</name> |
83 | <cstring>TextLabel2</cstring> | 112 | <cstring>textBindTo</cstring> |
84 | </property> | 113 | </property> |
85 | <property stdset="1"> | 114 | <property stdset="1"> |
86 | <name>text</name> | 115 | <name>text</name> |
87 | <string>Upon insertion,</string> | 116 | <string>Bind to:</string> |
117 | </property> | ||
118 | </widget> | ||
119 | <widget row="4" column="0" > | ||
120 | <class>QLabel</class> | ||
121 | <property stdset="1"> | ||
122 | <name>name</name> | ||
123 | <cstring>textClassName</cstring> | ||
124 | </property> | ||
125 | <property stdset="1"> | ||
126 | <name>text</name> | ||
127 | <string>Classname:</string> | ||
128 | </property> | ||
129 | </widget> | ||
130 | <widget row="4" column="1" rowspan="1" colspan="2" > | ||
131 | <class>QComboBox</class> | ||
132 | <property stdset="1"> | ||
133 | <name>name</name> | ||
134 | <cstring>cbClassName</cstring> | ||
135 | </property> | ||
136 | </widget> | ||
137 | <widget row="0" column="0" rowspan="1" colspan="3" > | ||
138 | <class>QLabel</class> | ||
139 | <property stdset="1"> | ||
140 | <name>name</name> | ||
141 | <cstring>textCardName</cstring> | ||
142 | </property> | ||
143 | <property stdset="1"> | ||
144 | <name>text</name> | ||
145 | <string>CardName</string> | ||
88 | </property> | 146 | </property> |
89 | </widget> | 147 | </widget> |
90 | </grid> | 148 | </grid> |
diff --git a/noncore/applets/pcmcia/pcmcia.cpp b/noncore/applets/pcmcia/pcmcia.cpp index 4fcc189..6c18e86 100644 --- a/noncore/applets/pcmcia/pcmcia.cpp +++ b/noncore/applets/pcmcia/pcmcia.cpp | |||