Changeset 10917


Ignore:
Timestamp:
06/07/11 17:10:28 (13 years ago)
Author:
tbretz
Message:
Renamed fPing to fFtuPing; added fFtuAllOn and fFtuAllOff buttons
Location:
trunk/FACT++/gui
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/gui/FactGui.h

    r10781 r10917  
    12191219            break;
    12201220        }
     1221
     1222        const int cnt = count(&fFtuStatus[0], &fFtuStatus[40], 0);
     1223        fFtuAllOn->setEnabled(cnt!=0);
     1224        fFtuAllOff->setEnabled(cnt!=40);
    12211225    }
    12221226
     
    13251329        }
    13261330
    1327         fPing->setChecked(false);
     1331        fFtuPing->setChecked(false);
    13281332
    13291333        const FTM::DimFtuList &sdata = *reinterpret_cast<const FTM::DimFtuList*>(d.ptr());
  • trunk/FACT++/gui/MainWindow.cc

    r10916 r10917  
    285285}
    286286
    287 void MainWindow::on_fPing_toggled(bool checked)
     287void MainWindow::on_fFtuPing_toggled(bool checked)
    288288{
    289289    if (checked)
     
    291291}
    292292
     293void MainWindow::on_fFtuAllOn_clicked()
     294{
     295    static const struct Data { int32_t id; char on; } __attribute__((__packed__)) d = { -1, 1 };
     296    Dim::SendCommand("FTM_CONTROL/ENABLE_FTU", &d, sizeof(d));
     297}
     298
     299void MainWindow::on_fFtuAllOff_clicked()
     300{
     301    static const struct Data { int32_t id; char on; } __attribute__((__packed__)) d = { -1, 0 };
     302    Dim::SendCommand("FTM_CONTROL/ENABLE_FTU", &d, sizeof(d));
     303}
     304
    293305void MainWindow::on_fChatSend_clicked()
    294306{
  • trunk/FACT++/gui/MainWindow.h

    r10916 r10917  
    8080    // Tab: FTUs
    8181    void slot_fFtuLED_clicked();
    82     void on_fPing_toggled(bool);
     82    void on_fFtuPing_toggled(bool);
     83    void on_fFtuAllOn_clicked();
     84    void on_fFtuAllOff_clicked();
    8385
    8486    // Tab: Rates
  • trunk/FACT++/gui/design.ui

    r10916 r10917  
    5252      </property>
    5353      <property name="currentIndex">
    54        <number>4</number>
     54       <number>1</number>
    5555      </property>
    5656      <property name="documentMode">
     
    20892089              </property>
    20902090              <layout class="QGridLayout" name="gridLayout_32">
    2091                <item row="1" column="0" colspan="3">
     2091               <item row="1" column="0" colspan="6">
    20922092                <layout class="QGridLayout" name="fFtuLedLayout" rowstretch="0,1,1,1,1" columnstretch="0,1,1,1,1,1,1,1,1,1,1,0">
    20932093                 <property name="margin">
     
    23422342                </layout>
    23432343               </item>
    2344                <item row="2" column="1">
    2345                 <widget class="QPushButton" name="fPing">
     2344               <item row="2" column="4">
     2345                <widget class="QPushButton" name="fFtuPing">
    23462346                 <property name="text">
    23472347                  <string> Ping </string>
     
    23522352                </widget>
    23532353               </item>
    2354                <item row="2" column="0">
     2354               <item row="2" column="1">
     2355                <widget class="QPushButton" name="fFtuAllOn">
     2356                 <property name="text">
     2357                  <string>All on</string>
     2358                 </property>
     2359                </widget>
     2360               </item>
     2361               <item row="2" column="3">
    23552362                <spacer name="horizontalSpacer_13">
    23562363                 <property name="orientation">
     
    23642371                 </property>
    23652372                </spacer>
     2373               </item>
     2374               <item row="2" column="2">
     2375                <widget class="QPushButton" name="fFtuAllOff">
     2376                 <property name="text">
     2377                  <string>All off</string>
     2378                 </property>
     2379                </widget>
    23662380               </item>
    23672381              </layout>
Note: See TracChangeset for help on using the changeset viewer.