Changeset 10641


Ignore:
Timestamp:
05/10/11 12:59:04 (13 years ago)
Author:
tbretz
Message:
Added clock showing UTC of local machine.
Location:
trunk/FACT++/gui
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/gui/MainWindow.cc

    r10626 r10641  
    22
    33#include <iostream>
     4
     5#include <QTimer>
    46
    57#include "dic.hxx"
     
    6971        QObject::connect(fFtuLED[i], SIGNAL(clicked()), this, SLOT(slot_fFtuLED_clicked()));
    7072    }
     73
     74    QTimer *timer = new QTimer(this);
     75    connect(timer, SIGNAL(timeout()), this, SLOT(slot_TimeUpdate()));
     76    timer->start(100);
     77}
     78
     79void MainWindow::slot_TimeUpdate()
     80{
     81    fUTC->setDateTime(QDateTime::currentDateTimeUtc());
    7182}
    7283
     
    249260    SelectTab("FTUs");
    250261}
    251 
  • trunk/FACT++/gui/MainWindow.h

    r10627 r10641  
    9494    virtual void slot_RootEventProcessed(TObject *, unsigned int, TCanvas *) { }
    9595    virtual void slot_RootUpdate() { }
     96
     97    void slot_TimeUpdate();
    9698};
    9799
  • trunk/FACT++/gui/design.ui

    r10625 r10641  
    36063606   <property name="minimumSize">
    36073607    <size>
    3608      <width>178</width>
     3608     <width>408</width>
    36093609     <height>97</height>
    36103610    </size>
     
    36463646          <number>0</number>
    36473647         </property>
     3648         <item>
     3649          <widget class="QDateTimeEdit" name="fUTC">
     3650           <property name="enabled">
     3651            <bool>true</bool>
     3652           </property>
     3653           <property name="sizePolicy">
     3654            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
     3655             <horstretch>0</horstretch>
     3656             <verstretch>0</verstretch>
     3657            </sizepolicy>
     3658           </property>
     3659           <property name="minimumSize">
     3660            <size>
     3661             <width>0</width>
     3662             <height>0</height>
     3663            </size>
     3664           </property>
     3665           <property name="font">
     3666            <font>
     3667             <weight>50</weight>
     3668             <bold>false</bold>
     3669            </font>
     3670           </property>
     3671           <property name="alignment">
     3672            <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
     3673           </property>
     3674           <property name="readOnly">
     3675            <bool>true</bool>
     3676           </property>
     3677           <property name="buttonSymbols">
     3678            <enum>QAbstractSpinBox::NoButtons</enum>
     3679           </property>
     3680           <property name="dateTime">
     3681            <datetime>
     3682             <hour>0</hour>
     3683             <minute>0</minute>
     3684             <second>2</second>
     3685             <year>2000</year>
     3686             <month>1</month>
     3687             <day>1</day>
     3688            </datetime>
     3689           </property>
     3690           <property name="currentSection">
     3691            <enum>QDateTimeEdit::DaySection</enum>
     3692           </property>
     3693           <property name="displayFormat">
     3694            <string>dd.MM.yyyy HH:mm:ss</string>
     3695           </property>
     3696          </widget>
     3697         </item>
     3698         <item>
     3699          <widget class="QLabel" name="label_67">
     3700           <property name="text">
     3701            <string>UTC</string>
     3702           </property>
     3703          </widget>
     3704         </item>
    36483705         <item>
    36493706          <spacer name="horizontalSpacer">
Note: See TracChangeset for help on using the changeset viewer.