- Timestamp:
- Sep 25, 2006, 7:09:37 PM (18 years ago)
- Location:
- trunk/BNC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bnctabledlg.cpp
r191 r195 15 15 * 16 16 * -----------------------------------------------------------------------*/ 17 18 #include <iostream.h> 17 19 18 20 #include "bnctabledlg.h" … … 52 54 53 55 _table = new QTableWidget(this); 56 connect(_table, SIGNAL(itemSelectionChanged()), 57 this, SLOT(slotSelectionChanged())); 54 58 mainLayout->addWidget(_table); 55 59 56 _buttonGet = new QPushButton(tr("Get Table"), this); 60 _buttonSkl = new QPushButton(tr("Create skeleton headers"), this); 61 _buttonSkl->setEnabled(false); 62 connect(_buttonSkl, SIGNAL(clicked()), this, SLOT(slotSkl())); 63 64 _buttonGet = new QPushButton(tr("Get table"), this); 57 65 connect(_buttonGet, SIGNAL(clicked()), this, SLOT(slotGetTable())); 58 66 … … 64 72 65 73 QHBoxLayout* buttonLayout = new QHBoxLayout; 74 buttonLayout->addWidget(_buttonSkl); 66 75 buttonLayout->addStretch(1); 67 76 buttonLayout->addWidget(_buttonGet); … … 224 233 QDialog::accept(); 225 234 } 235 236 // User changed the selection of mountPoints 237 //////////////////////////////////////////////////////////////////////////// 238 void bncTableDlg::slotSelectionChanged() { 239 if (_table->selectedItems().isEmpty()) { 240 _buttonSkl->setEnabled(false); 241 } 242 else { 243 _buttonSkl->setEnabled(true); 244 } 245 } 246 247 // 248 //////////////////////////////////////////////////////////////////////////// 249 void bncTableDlg::slotSkl() { 250 QStringList fullTable; 251 bncTableDlg::getFullTable("www.euref-ip.net", 80, fullTable); 252 253 cout << fullTable.join("").toAscii().data() << endl; 254 255 } -
trunk/BNC/bnctabledlg.h
r191 r195 23 23 virtual void accept(); 24 24 void slotGetTable(); 25 void slotSkl(); 26 void slotSelectionChanged(); 25 27 26 28 private: … … 30 32 QLineEdit* _casterPasswordLineEdit; 31 33 34 QPushButton* _buttonSkl; 32 35 QPushButton* _buttonGet; 33 36 QPushButton* _buttonCancel;
Note:
See TracChangeset
for help on using the changeset viewer.