cadMousePro-gui/src/MouseMainWindow.cpp
branchv_0
changeset 20 cfb5f62ea048
parent 18 7323a89c15e9
child 21 642f32f76c9d
equal deleted inserted replaced
19:048a7d391e05 20:cfb5f62ea048
    40 	int f = 0;
    40 	int f = 0;
    41 
    41 
    42 	statusProxy->setEnabled(false);
    42 	statusProxy->setEnabled(false);
    43 	statusUPower->setEnabled(false);
    43 	statusUPower->setEnabled(false);
    44 	statusDevice->setEnabled(false);
    44 	statusDevice->setEnabled(false);
       
    45 	statusName->setToolTip("name of the USB device – usually the wireless adaptor");
    45 
    46 
    46 	layout->setWidget(f++, QFormLayout::FieldRole, statusProxy);
    47 	layout->setWidget(f++, QFormLayout::FieldRole, statusProxy);
    47 	layout->setWidget(f++, QFormLayout::FieldRole, statusUPower);
    48 	layout->setWidget(f++, QFormLayout::FieldRole, statusUPower);
    48 	layout->setWidget(f++, QFormLayout::FieldRole, statusDevice);
    49 	layout->setWidget(f++, QFormLayout::FieldRole, statusDevice);
       
    50 	layout->setWidget(f++, QFormLayout::FieldRole, statusName);
    49 
    51 
    50 	QPushButton* refreshButton = new QPushButton("Refresh", panel);
    52 	QPushButton* refreshButton = new QPushButton("Refresh", panel);
    51 	layout->setWidget(f++, QFormLayout::FieldRole, refreshButton);
    53 	layout->setWidget(f++, QFormLayout::FieldRole, refreshButton);
    52 	connect(refreshButton, &QPushButton::clicked, this, &MouseMainWindow::refresh);
    54 	connect(refreshButton, &QPushButton::clicked, this, &MouseMainWindow::refresh);
    53 
    55 
   106 }
   108 }
   107 
   109 
   108 void MouseMainWindow::refresh() {
   110 void MouseMainWindow::refresh() {
   109 	statusProxy->setChecked(proxy->isValid());
   111 	statusProxy->setChecked(proxy->isValid());
   110 	statusDevice->setChecked(proxy->devicePresent());
   112 	statusDevice->setChecked(proxy->devicePresent());
   111 
   113 	statusName->setText(proxy->deviceName());
   112 }
   114 }
   113 
   115 
   114 void MouseMainWindow::configure() {
   116 void MouseMainWindow::configure() {
   115 	message->setText("…");
   117 	message->setText("…");
   116 
   118