source: ntrip/trunk/BNC/bnctabledlg.cpp@ 1504

Last change on this file since 1504 was 1504, checked in by weber, 14 years ago

* empty log message *

File size: 21.0 KB
Line 
1// Part of BNC, a utility for retrieving decoding and
2// converting GNSS data streams from NTRIP broadcasters.
3//
4// Copyright (C) 2007
5// German Federal Agency for Cartography and Geodesy (BKG)
6// http://www.bkg.bund.de
7// Czech Technical University Prague, Department of Geodesy
8// http://www.fsv.cvut.cz
9//
10// Email: euref-ip@bkg.bund.de
11//
12// This program is free software; you can redistribute it and/or
13// modify it under the terms of the GNU General Public License
14// as published by the Free Software Foundation, version 2.
15//
16// This program is distributed in the hope that it will be useful,
17// but WITHOUT ANY WARRANTY; without even the implied warranty of
18// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19// GNU General Public License for more details.
20//
21// You should have received a copy of the GNU General Public License
22// along with this program; if not, write to the Free Software
23// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24
25/* -------------------------------------------------------------------------
26 * BKG NTRIP Client
27 * -------------------------------------------------------------------------
28 *
29 * Class: bncTableDlg
30 *
31 * Purpose: Displays the source table, allows mountpoints selection
32 *
33 * Author: L. Mervart
34 *
35 * Created: 24-Dec-2005
36 *
37 * Changes:
38 *
39 * -----------------------------------------------------------------------*/
40
41#include <iostream>
42
43#include "bnctabledlg.h"
44#include "bncgetthread.h"
45#include "bncnetqueryv2.h"
46
47using namespace std;
48
49// Constructor
50////////////////////////////////////////////////////////////////////////////
51bncTableDlg::bncTableDlg(QWidget* parent) : QDialog(parent) {
52
53 setMinimumSize(600,400);
54 setWindowTitle(tr("Add Streams"));
55
56 QVBoxLayout* mainLayout = new QVBoxLayout(this);
57
58 int ww = QFontMetrics(font()).width('w');
59
60 _casterPortLineEdit = new QLineEdit();
61 _casterPortLineEdit->setMaximumWidth(9*ww);
62
63 _casterUserLineEdit = new QLineEdit();
64 _casterUserLineEdit->setMaximumWidth(9*ww);
65
66 _casterPasswordLineEdit = new QLineEdit();
67 _casterPasswordLineEdit->setMaximumWidth(9*ww);
68 //// _casterPasswordLineEdit->setEchoMode(QLineEdit::Password);
69
70 _casterHostComboBox = new QComboBox();
71 _casterHostComboBox->setMaxCount(10);
72 _casterHostComboBox->setDuplicatesEnabled(false);
73 _casterHostComboBox->setEditable(true);
74 _casterHostComboBox->setMinimumWidth(20*ww);
75 _casterHostComboBox->setMaximumWidth(20*ww);
76 connect(_casterHostComboBox, SIGNAL(currentIndexChanged(const QString&)),
77 this, SLOT(slotCasterHostChanged(const QString&)));
78 QSettings settings;
79 settings.remove("casterHostList");
80 settings.remove("casterHost");
81 settings.remove("casterPort");
82 settings.remove("casterUser");
83 settings.remove("casterPassword");
84 QStringList casterUrlList = settings.value("casterUrlList").toStringList();
85 for (int ii = 0; ii < casterUrlList.count(); ii++) {
86 QUrl url(casterUrlList[ii]);
87 _casterHostComboBox->addItem(url.host());
88 }
89
90 _ntripVersionComboBox = new QComboBox();
91 _ntripVersionComboBox->addItems(QString("1,2,R").split(","));
92 int kk = _ntripVersionComboBox->findText(settings.value("ntripVersion").toString());
93 if (kk != -1) {
94 _ntripVersionComboBox->setCurrentIndex(kk);
95 }
96 _ntripVersionComboBox->setMaximumWidth(5*ww);
97
98 _buttonCasterTable = new QPushButton(tr("Show"), this);
99 connect(_buttonCasterTable, SIGNAL(clicked()), this, SLOT(slotCasterTable()));
100 _buttonCasterTable->setMaximumWidth(5*ww);
101
102 // WhatsThis
103 // ---------
104 _casterUserLineEdit->setWhatsThis(tr("<p>Access to some streams on NTRIP broadcasters may be restricted. You'll need to enter a valid 'User ID' and 'Password' for access to these protected streams.</p><p>Accounts are usually provided per NTRIP broadcaster through a registration process. Register through <u>http://igs.bkg.bund.de/index_ntrip_reg.htm</u> for access to protected streams on <u>www.euref-ip.net</u> and <u>www.igs-ip.net</u>.</p>"));
105 _casterHostComboBox->setWhatsThis(tr("<p>Enter the NTRIP broadcaster hostname or IP number.</p><p>Note that EUREF and IGS operate NTRIP broadcasters at <u>http://www.euref-ip.net/home</u> and <u>http://www.igs-ip.net/home</u>.</p>"));
106 _casterPortLineEdit->setWhatsThis(tr("Enter the NTRIP broadcaster port number."));
107 _casterPasswordLineEdit->setWhatsThis(tr("Access to some streams on NTRIP broadcasters may be restricted. You'll need to enter a valid 'Password' for access to these protected streams."));
108
109 QGridLayout* editLayout = new QGridLayout;
110 editLayout->addWidget(new QLabel(tr("Caster host")), 0, 0);
111 editLayout->addWidget(_casterHostComboBox, 0, 1);
112 editLayout->addWidget(new QLabel(tr(" Caster port")), 0, 2, Qt::AlignRight);
113 editLayout->addWidget(_casterPortLineEdit, 0, 3);
114 editLayout->addWidget(new QLabel(tr("Caster table")), 0, 4, Qt::AlignRight);
115 editLayout->addWidget(_buttonCasterTable, 0, 5);
116 editLayout->addWidget(new QLabel(tr("User")), 1, 0, Qt::AlignRight);
117 editLayout->addWidget(_casterUserLineEdit, 1, 1);
118 editLayout->addWidget(new QLabel(tr("Password")), 1, 2, Qt::AlignRight);
119 editLayout->addWidget(_casterPasswordLineEdit, 1, 3);
120 editLayout->addWidget(new QLabel(tr(" NTRIP Version")),1, 4, Qt::AlignRight);
121 editLayout->addWidget(_ntripVersionComboBox, 1, 5);
122
123 mainLayout->addLayout(editLayout);
124
125 _buttonCasterTable->setWhatsThis(tr("<p>Hit 'Show' for a table of known NTRIP broadcaster installations as maintained at <u>www.rtcm-ntrip.org/home.</u></p><p>A window opens which allows to select a broadcaster for stream retrieval.</p>"));
126 _ntripVersionComboBox->setWhatsThis(tr("<p>Select the NTRIP transport protocol version you want to use. Implemented options are:<br>&nbsp; 1:&nbsp; NTRIP version 1, TCP/IP<br>&nbsp; 2:&nbsp; NTRIP version 2, TCP/IP mode<br>&nbsp; R:&nbsp; NTRIP Version 2, RTSP/RTP mode<br>Select option '1' if you are not sure whether the NTRIP broadcaster supports NTRIP version 2.</p><p>Note that RTSP/RTP (option 'R') is sometimes not supported by mobile Internet Service Providers.</p>"));
127
128 _table = new QTableWidget(this);
129 _table->setWhatsThis(tr("<p>Use the 'Get Table' button to download the sourcetable from the selected NTRIP broadcaster. Select the desired streams line by line, using +Shift and +Ctrl when necessary. Hit 'OK' to return to the main window.</p><p>Pay attention to data field 'format'. Keep in mind that BNC can only decode and convert streams that come in RTCM Version 2.x, RTCM Version 3.x, or RTIGS format. See data field 'format-details' for available message types and their repetition rates in brackets.</p><p>The content of data field 'nmea' tells you whether a stream comes from a virtual reference station (VRS).</p>"));
130 connect(_table, SIGNAL(itemSelectionChanged()),
131 this, SLOT(slotSelectionChanged()));
132 mainLayout->addWidget(_table);
133
134 _buttonWhatsThis = new QPushButton(tr("Help=Shift+F1"), this);
135 connect(_buttonWhatsThis, SIGNAL(clicked()), this, SLOT(slotWhatsThis()));
136
137 _buttonGet = new QPushButton(tr("Get table"), this);
138 _buttonGet->setDefault(true);
139 connect(_buttonGet, SIGNAL(clicked()), this, SLOT(slotGetTable()));
140
141 _buttonCancel = new QPushButton(tr("Cancel"), this);
142 connect(_buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
143
144 _buttonOK = new QPushButton(tr("OK"), this);
145 connect(_buttonOK, SIGNAL(clicked()), this, SLOT(accept()));
146
147 QHBoxLayout* buttonLayout = new QHBoxLayout;
148 buttonLayout->addWidget(_buttonWhatsThis);
149 buttonLayout->addStretch(1);
150 buttonLayout->addWidget(_buttonGet);
151 buttonLayout->addWidget(_buttonCancel);
152 buttonLayout->addWidget(_buttonOK);
153
154 mainLayout->addLayout(buttonLayout);
155}
156
157// Destructor
158////////////////////////////////////////////////////////////////////////////
159bncTableDlg::~bncTableDlg() {
160 delete _casterHostComboBox;
161 delete _casterPortLineEdit;
162 delete _casterUserLineEdit;
163 delete _casterPasswordLineEdit;
164 delete _ntripVersionComboBox;
165 delete _buttonGet;
166 delete _buttonCancel;
167 delete _buttonOK;
168 delete _buttonWhatsThis;
169 delete _buttonCasterTable;
170 delete _table;
171}
172
173// Read full caster table (static)
174////////////////////////////////////////////////////////////////////////////
175t_irc bncTableDlg::getFullTable(const QString& casterHost,
176 int casterPort, QStringList& allLines,
177 bool alwaysRead) {
178
179 static QMutex mutex;
180 static QMap<QString, QStringList> allTables;
181
182 QMutexLocker locker(&mutex);
183
184 if (!alwaysRead && allTables.find(casterHost) != allTables.end()) {
185 allLines = allTables.find(casterHost).value();
186 return success;
187 }
188
189 allLines.clear();
190
191 QUrl url;
192 url.setHost(casterHost);
193 url.setPort(casterPort);
194 url.setScheme("http");
195 url.setPath("/");
196
197 bncNetQueryV2 query;
198 QByteArray outData;
199 query.waitForRequestResult(url, outData);
200 if (query.status() == bncNetQuery::finished) {
201 QTextStream in(outData);
202 QString line = in.readLine();
203 while ( !line.isNull() ) {
204 allLines.append(line);
205 line = in.readLine();
206 }
207 allTables.insert(casterHost, allLines);
208 return success;
209 }
210 else {
211 return failure;
212 }
213}
214
215// Read Table from Caster
216////////////////////////////////////////////////////////////////////////////
217void bncTableDlg::slotGetTable() {
218
219 _buttonGet->setEnabled(false);
220 _buttonCasterTable->setEnabled(false);
221
222 if ( getFullTable(_casterHostComboBox->currentText(),
223 _casterPortLineEdit->text().toInt(),
224 _allLines, true) != success ) {
225 QMessageBox::warning(0, "BNC", "Cannot retrieve table of data");
226 _buttonGet->setEnabled(true);
227 return;
228 }
229
230 static const QStringList labels = QString("mountpoint,identifier,format,"
231 "format-details,carrier,system,network,country,lat,long,"
232 "nmea,solution,generator,compress.,auth.,fee,bitrate,"
233 "misc").split(",");
234
235 QStringList lines;
236 QStringListIterator it(_allLines);
237 while (it.hasNext()) {
238 QString line = it.next();
239 if (line.indexOf("STR") == 0) {
240 QStringList hlp = line.split(";");
241 if (hlp.size() > labels.size()) {
242 lines.push_back(line);
243 }
244 }
245 }
246
247 if (lines.size() > 0) {
248 _table->setSelectionMode(QAbstractItemView::ExtendedSelection);
249 _table->setSelectionBehavior(QAbstractItemView::SelectRows);
250 _table->setColumnCount(labels.size());
251 _table->setRowCount(lines.size());
252 for (int nRow = 0; nRow < lines.size(); nRow++) {
253 QStringList columns = lines[nRow].split(";");
254 for (int ic = 1; ic < columns.size(); ic++) {
255 if (ic == 11) {
256 if (columns[ic] == "0") {
257 columns[ic] = "no";
258 } else {
259 columns[ic] = "yes";
260 }
261 }
262 QTableWidgetItem* item = new QTableWidgetItem(columns[ic]);
263 item->setFlags(item->flags() & ~Qt::ItemIsEditable);
264 _table->setItem(nRow, ic-1, item);
265 }
266 }
267 _table->setHorizontalHeaderLabels(labels);
268 _table->setSortingEnabled(true);
269 int ww = QFontMetrics(this->font()).width('w');
270 _table->horizontalHeader()->resizeSection( 0,10*ww);
271 _table->horizontalHeader()->resizeSection( 1,10*ww);
272 _table->horizontalHeader()->resizeSection( 2, 8*ww);
273 _table->horizontalHeader()->resizeSection( 3,22*ww);
274 _table->horizontalHeader()->resizeSection( 4, 5*ww);
275 _table->horizontalHeader()->resizeSection( 5, 8*ww);
276 _table->horizontalHeader()->resizeSection( 6, 8*ww);
277 _table->horizontalHeader()->resizeSection( 7, 7*ww);
278 _table->horizontalHeader()->resizeSection( 8, 6*ww);
279 _table->horizontalHeader()->resizeSection( 9, 6*ww);
280 _table->horizontalHeader()->resizeSection(10, 6*ww);
281 _table->horizontalHeader()->resizeSection(11, 6*ww);
282 _table->horizontalHeader()->resizeSection(12,15*ww);
283 _table->horizontalHeader()->resizeSection(13, 8*ww);
284 _table->horizontalHeader()->resizeSection(14, 5*ww);
285 _table->horizontalHeader()->resizeSection(15, 5*ww);
286 _table->horizontalHeader()->resizeSection(16, 7*ww);
287 _table->horizontalHeader()->resizeSection(17,15*ww);
288 _table->sortItems(0);
289 }
290}
291
292// Accept slot
293////////////////////////////////////////////////////////////////////////////
294void bncTableDlg::accept() {
295
296 QSettings settings;
297 settings.setValue("ntripVersion", _ntripVersionComboBox->currentText());
298 QUrl url;
299 url.setScheme("http");
300 url.setHost(_casterHostComboBox->currentText());
301 url.setPort(_casterPortLineEdit->text().toInt());
302 url.setUserName(_casterUserLineEdit->text());
303 url.setPassword(_casterPasswordLineEdit->text());
304 addUrl(url);
305
306 QStringList* mountPoints = new QStringList;
307
308 if (_table) {
309 for (int ir = 0; ir < _table->rowCount(); ir++) {
310 QTableWidgetItem* item = _table->item(ir,0);
311 QString format = _table->item(ir,2)->text();
312 QString latitude = _table->item(ir,8)->text();
313 QString longitude = _table->item(ir,9)->text();
314 QString nmea = _table->item(ir,10)->text();
315 QString ntripVersion = _ntripVersionComboBox->currentText();
316 format.replace(" ", "_");
317 if (_table->isItemSelected(item)) {
318 url.setPath(item->text());
319 mountPoints->push_back(url.toString() + " " + format + " " + latitude
320 + " " + longitude + " " + nmea + " " + ntripVersion);
321 }
322 }
323 }
324 emit newMountPoints(mountPoints);
325
326 QDialog::accept();
327}
328
329// User changed the selection of mountPoints
330////////////////////////////////////////////////////////////////////////////
331void bncTableDlg::slotSelectionChanged() {
332 if (_table->selectedItems().isEmpty()) {
333 }
334}
335
336// Whats This Help
337void bncTableDlg::slotWhatsThis() {
338QWhatsThis::enterWhatsThisMode();
339}
340
341// Slot caster table
342////////////////////////////////////////////////////////////////////////////
343void bncTableDlg::slotCasterTable() {
344
345 _buttonCasterTable->setEnabled(false);
346 _casterHostComboBox->setEnabled(false);
347 _casterPortLineEdit->setEnabled(false);
348 _casterUserLineEdit->setEnabled(false);
349 _casterPasswordLineEdit->setEnabled(false);
350 _ntripVersionComboBox->setEnabled(false);
351 _buttonWhatsThis->setEnabled(false);
352 _buttonGet->setEnabled(false);
353 _buttonCancel->setEnabled(false);
354 _buttonOK->setEnabled(false);
355
356 bncCasterTableDlg* dlg = new bncCasterTableDlg(this);
357 dlg->move(this->pos().x()+50, this->pos().y()+50);
358 connect(dlg, SIGNAL(newCaster(QString, QString)),
359 this, SLOT(slotNewCaster(QString, QString)));
360 dlg->exec();
361 delete dlg;
362
363 _buttonCasterTable->setEnabled(true);
364 _casterHostComboBox->setEnabled(true);
365 _casterPortLineEdit->setEnabled(true);
366 _casterUserLineEdit->setEnabled(true);
367 _casterPasswordLineEdit->setEnabled(true);
368 _ntripVersionComboBox->setEnabled(true);
369 _buttonWhatsThis->setEnabled(true);
370 _buttonGet->setEnabled(true);
371 _buttonCancel->setEnabled(true);
372 _buttonOK->setEnabled(true);
373
374}
375
376// New caster selected
377////////////////////////////////////////////////////////////////////////////
378void bncTableDlg::slotNewCaster(QString newCasterHost, QString newCasterPort) {
379
380 _casterHostComboBox->insertItem(0, newCasterHost);
381 _casterHostComboBox->setCurrentIndex(0);
382 _casterUserLineEdit->setText("");
383 _casterPasswordLineEdit->setText("");
384 _casterPortLineEdit->setText(newCasterPort);
385
386 QUrl url;
387 url.setScheme("http");
388 url.setHost(newCasterHost);
389 url.setPort(newCasterPort.toInt());
390 addUrl(url);
391
392 _casterHostComboBox->setCurrentIndex(0);
393}
394
395// New caster selected
396////////////////////////////////////////////////////////////////////////////
397void bncTableDlg::addUrl(const QUrl& url) {
398 QSettings settings;
399 QStringList oldUrlList = settings.value("casterUrlList").toStringList();
400 QStringList newUrlList;
401 newUrlList << url.toString();
402 for (int ii = 0; ii < oldUrlList.count(); ii++) {
403 QUrl oldUrl(oldUrlList[ii]);
404 if (url.host() != oldUrl.host()) {
405 newUrlList << oldUrl.toString();
406 }
407 }
408 settings.setValue("casterUrlList", newUrlList);
409 settings.sync();
410}
411
412// New caster selected in combobox
413////////////////////////////////////////////////////////////////////////////
414void bncTableDlg::slotCasterHostChanged(const QString& newHost) {
415 QSettings settings;
416 QStringList casterUrlList = settings.value("casterUrlList").toStringList();
417 for (int ii = 0; ii < casterUrlList.count(); ii++) {
418 QUrl url(casterUrlList[ii]);
419 if (url.host() == newHost) {
420 _casterUserLineEdit->setText(url.userName());
421 _casterPasswordLineEdit->setText(url.password());
422 if (url.port() > 0) {
423 _casterPortLineEdit->setText(QString("%1").arg(url.port()));
424 }
425 else {
426 _casterPortLineEdit->setText("");
427 }
428 }
429 }
430}
431
432// Caster table
433////////////////////////////////////////////////////////////////////////////
434bncCasterTableDlg::bncCasterTableDlg(QWidget* parent) :
435 QDialog(parent) {
436
437 static const QStringList labels = QString("host,port,identifier,operator,nmea,country,lat,long,link").split(",");
438
439 _casterTable = new QTableWidget(this);
440
441 QUrl url;
442 url.setHost("www.rtcm-ntrip.org");
443 url.setPort(2101);
444 url.setScheme("http");
445 url.setPath("/");
446
447 bncNetQueryV2 query;
448 QByteArray outData;
449 query.waitForRequestResult(url, outData);
450
451 QStringList lines;
452 if (query.status() == bncNetQuery::finished) {
453 QTextStream in(outData);
454 QString line = in.readLine();
455 while ( !line.isNull() ) {
456 line = in.readLine();
457 if (line.indexOf("CAS") == 0) {
458 QStringList hlp = line.split(";");
459 if (hlp.size() > labels.size()) {
460 lines.push_back(line);
461 }
462 }
463 }
464 }
465
466 if (lines.size() > 0) {
467 _casterTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
468 _casterTable->setSelectionBehavior(QAbstractItemView::SelectRows);
469
470 QStringList hlp = lines[0].split(";");
471 _casterTable->setColumnCount(labels.size());
472 _casterTable->setRowCount(lines.size());
473
474 for (int nRow = 0; nRow < lines.size(); nRow++) {
475 QStringList columns = lines[nRow].split(";");
476 for (int ic = 1; ic < columns.size(); ic++) {
477 if (ic == 5) {
478 if (columns[ic] == "0") {
479 columns[ic] = "no";
480 } else {
481 columns[ic] = "yes";
482 }
483 }
484 QTableWidgetItem* item = new QTableWidgetItem(columns[ic]);
485 item->setFlags(item->flags() & ~Qt::ItemIsEditable);
486 _casterTable->setItem(nRow, ic-1, item);
487 }
488 }
489 }
490 _casterTable->setHorizontalHeaderLabels(labels);
491 _casterTable->setSortingEnabled(true);
492 _casterTable->sortItems(0);
493 int ww = QFontMetrics(this->font()).width('w');
494 _casterTable->horizontalHeader()->resizeSection(0,15*ww);
495 _casterTable->horizontalHeader()->resizeSection(1, 5*ww);
496 _casterTable->horizontalHeader()->resizeSection(2,15*ww);
497 _casterTable->horizontalHeader()->resizeSection(3,15*ww);
498 _casterTable->horizontalHeader()->resizeSection(4, 5*ww);
499 _casterTable->horizontalHeader()->resizeSection(5, 7*ww);
500 _casterTable->horizontalHeader()->resizeSection(6, 7*ww);
501 _casterTable->horizontalHeader()->resizeSection(7, 7*ww);
502 _casterTable->horizontalHeader()->resizeSection(8,15*ww);
503
504 _closeButton = new QPushButton("Cancel");
505 connect(_closeButton, SIGNAL(clicked()), this, SLOT(close()));
506 _closeButton->setMinimumWidth(8*ww);
507 _closeButton->setMaximumWidth(8*ww);
508
509 _okButton = new QPushButton(tr("OK"), this);
510 connect(_okButton, SIGNAL(clicked()), this, SLOT(slotAcceptCasterTable()));
511 _okButton->setMinimumWidth(8*ww);
512 _okButton->setMaximumWidth(8*ww);
513
514 _whatsThisButton = new QPushButton(tr("Help=Shift+F1"), this);
515 connect(_whatsThisButton, SIGNAL(clicked()), this, SLOT(slotWhatsThis()));
516 _whatsThisButton->setMinimumWidth(12*ww);
517 _whatsThisButton->setMaximumWidth(12*ww);
518
519 _casterTable->setWhatsThis(tr("<p>Select an NTRIP broadcaster and hit 'OK'.</p><p>See <u>http://www.rtcm-ntrip.org/home</u> for further details on known NTRIP broadcaster installations.</u>."));
520
521 QGridLayout* dlgLayout = new QGridLayout();
522 dlgLayout->addWidget(new QLabel(" List of NTRIP Broadcasters from www.rtcm-ntrip.org"), 0,0,1,3,Qt::AlignLeft);
523 dlgLayout->addWidget(_casterTable, 1, 0, 1, 3);
524 dlgLayout->addWidget(_whatsThisButton, 2, 0);
525 dlgLayout->addWidget(_closeButton, 2, 1, Qt::AlignRight);
526 dlgLayout->addWidget(_okButton, 2, 2);
527
528 setMinimumSize(600,400);
529 setWindowTitle(tr("Select Broadcaster"));
530 setLayout(dlgLayout);
531 resize(68*ww, 50*ww);
532 show();
533}
534
535// Caster table destructor
536////////////////////////////////////////////////////////////////////////////
537bncCasterTableDlg::~bncCasterTableDlg() {
538 delete _casterTable;
539 delete _okButton;
540 delete _closeButton;
541 delete _whatsThisButton;
542}
543
544// Caster table what's this
545////////////////////////////////////////////////////////////////////////////
546void bncCasterTableDlg:: slotWhatsThis() {
547 QWhatsThis::enterWhatsThisMode();
548}
549
550// Accept caster table
551////////////////////////////////////////////////////////////////////////////
552void bncCasterTableDlg::slotAcceptCasterTable() {
553 if (_casterTable) {
554 for (int ir = _casterTable->rowCount() - 1; ir >= 0 ; ir--) {
555 if (_casterTable->isItemSelected(_casterTable->item(ir,0))) {
556 emit newCaster(_casterTable->item(ir,0)->text(),
557 _casterTable->item(ir,1)->text());
558 }
559 }
560 }
561 QDialog::accept();
562}
563
Note: See TracBrowser for help on using the repository browser.