Changeset 30 in flair-src for trunk/tools/FlairGCS/src/Manager.cpp
- Timestamp:
- 06/21/16 15:48:18 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/FlairGCS/src/Manager.cpp
r15 r30 38 38 39 39 setWindowTitle(name); 40 40 //statusBar()->showMessage(tr("Ready to serve")); 41 41 // manager layout 42 42 managerLayout = new QVBoxLayout; … … 69 69 connect(save_button, SIGNAL(clicked(bool)), this, SLOT(save())); 70 70 71 status=new QStatusBar(); 72 status->setSizeGripEnabled(false); 73 button_layout->addWidget(status, 1,0); 74 71 75 UDT::startup(); 72 76 serv = UDT::socket(AF_INET, SOCK_DGRAM, 0); … … 155 159 connect(newLayout, SIGNAL(setRemoteName(QString)), this, 156 160 SLOT(tabName(QString))); 161 connect(newLayout, SIGNAL(computedRxRate(float)), this, 162 SLOT(printRxRates(float))); 157 163 connect(socket, SIGNAL(dataReady(char *, int)), newLayout, 158 164 SLOT(receive(char *, int))); … … 172 178 } else { // add a tab for the new connection 173 179 tabBar->addTab("unknown"); 180 } 181 } 182 183 void Manager::printRxRates(float rxRate) { 184 int index = connectionsLayout.indexOf((ConnectionLayout *)sender()); 185 186 if (tabBar->count() == 0) { 187 status->showMessage(tr("rx rate %1 kB/s").arg(rxRate,0,'f',3)); 188 } else if (index==tabBar->currentIndex()) { 189 status->showMessage(tr("%1 rx rate %2 kB/s").arg(tabBar->tabText(index)).arg(rxRate,0,'f',3)); 174 190 } 175 191 } … … 209 225 hiddenTabName = tabBar->tabText(0); 210 226 tabBar->removeTab(0); 227 } 228 229 if (connectionsLayout.count() == 0) { 230 status->showMessage(""); 211 231 } 212 232 }
Note:
See TracChangeset
for help on using the changeset viewer.