Diffstat (limited to 'noncore/settings/netsystemtime') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/netsystemtime/predicttabwidget.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/noncore/settings/netsystemtime/predicttabwidget.cpp b/noncore/settings/netsystemtime/predicttabwidget.cpp index a9fe418..c706add 100644 --- a/noncore/settings/netsystemtime/predicttabwidget.cpp +++ b/noncore/settings/netsystemtime/predicttabwidget.cpp | |||
@@ -58,51 +58,49 @@ PredictTabWidget::PredictTabWidget( QWidget *parent ) | |||
58 | 58 | ||
59 | // Predicted time drift | 59 | // Predicted time drift |
60 | layout->addWidget( new QLabel( tr( "Predicted time drift" ), this ), 0, 0 ); | 60 | layout->addWidget( new QLabel( tr( "Predicted time drift" ), this ), 0, 0 ); |
61 | lblDrift = new QLabel( tr( "n/a" ), this ); | 61 | lblDrift = new QLabel( tr( "n/a" ), this ); |
62 | layout->addWidget( lblDrift, 0, 1 ); | 62 | layout->addWidget( lblDrift, 0, 1 ); |
63 | 63 | ||
64 | // Estimated time difference | 64 | // Estimated time difference |
65 | layout->addWidget( new QLabel( tr( "Estimated shift" ), this ), 1, 0 ); | 65 | layout->addWidget( new QLabel( tr( "Estimated shift" ), this ), 1, 0 ); |
66 | lblDiff = new QLabel( tr( "n/a" ), this ); | 66 | lblDiff = new QLabel( tr( "n/a" ), this ); |
67 | layout->addWidget( lblDiff, 1, 1 ); | 67 | layout->addWidget( lblDiff, 1, 1 ); |
68 | 68 | ||
69 | // Predicted time | 69 | // Predicted time |
70 | layout->addWidget( new QLabel( tr( "Predicted time" ), this ), 2, 0 ); | 70 | layout->addWidget( new QLabel( tr( "Predicted time" ), this ), 2, 0 ); |
71 | lblPredicted = new QLabel( tr( "n/a" ), this ); | 71 | lblPredicted = new QLabel( tr( "n/a" ), this ); |
72 | layout->addWidget( lblPredicted, 2, 1 ); | 72 | layout->addWidget( lblPredicted, 2, 1 ); |
73 | 73 | ||
74 | // Prediction table | 74 | // Prediction table |
75 | tblLookups = new QTable( 2, 3, this ); | 75 | tblLookups = new QTable( 2, 3, this ); |
76 | QFont font( tblLookups->font() ); | 76 | QFont font( tblLookups->font() ); |
77 | font.setPointSize( 7 ); | 77 | font.setPointSize( 7 ); |
78 | tblLookups->setFont( font ); | 78 | tblLookups->setFont( font ); |
79 | tblLookups->horizontalHeader()->setLabel( 0, tr( "Shift [s/h]" ) ); | 79 | tblLookups->horizontalHeader()->setLabel( 0, tr( "Shift [s/h]" ) ); |
80 | tblLookups->horizontalHeader()->setLabel( 1, tr( "Last [h]" ) ); | 80 | tblLookups->horizontalHeader()->setLabel( 1, tr( "Last [h]" ) ); |
81 | tblLookups->horizontalHeader()->setLabel( 2, tr( "Offset [s]" ) ); | 81 | tblLookups->horizontalHeader()->setLabel( 2, tr( "Offset [s]" ) ); |
82 | tblLookups->setColumnWidth( 0, 78 ); | 82 | |
83 | tblLookups->setColumnWidth( 1, 50 ); | ||
84 | tblLookups->setColumnWidth( 2, 50 ); | ||
85 | tblLookups->setMinimumHeight( 50 ); | 83 | tblLookups->setMinimumHeight( 50 ); |
86 | tblLookups->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum ) ); | 84 | tblLookups->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum ) ); |
87 | layout->addMultiCellWidget( tblLookups, 3, 3, 0, 1 ); | 85 | layout->addMultiCellWidget( tblLookups, 3, 3, 0, 1 ); |
88 | 86 | ||
89 | // Predict time button | 87 | // Predict time button |
90 | QPushButton *pb = new QPushButton( tr( "Predict time" ), this ); | 88 | QPushButton *pb = new QPushButton( tr( "Predict time" ), this ); |
91 | connect( pb, SIGNAL(clicked()), this, SLOT(slotPredictTime()) ); | 89 | connect( pb, SIGNAL(clicked()), this, SLOT(slotPredictTime()) ); |
92 | layout->addWidget( pb, 4, 0 ); | 90 | layout->addWidget( pb, 4, 0 ); |
93 | 91 | ||
94 | // Set predicted time button | 92 | // Set predicted time button |
95 | pb = new QPushButton( tr( "Set predicted time" ), this ); | 93 | pb = new QPushButton( tr( "Set predicted time" ), this ); |
96 | connect( pb, SIGNAL(clicked()), this, SLOT(slotSetPredictedTime()) ); | 94 | connect( pb, SIGNAL(clicked()), this, SLOT(slotSetPredictedTime()) ); |
97 | layout->addWidget( pb, 4, 1 ); | 95 | layout->addWidget( pb, 4, 1 ); |
98 | 96 | ||
99 | // Initialize values | 97 | // Initialize values |
100 | Config config( "ntp" ); | 98 | Config config( "ntp" ); |
101 | config.setGroup( "lookups" ); | 99 | config.setGroup( "lookups" ); |
102 | int lookupCount = config.readNumEntry( "count", 0 ); | 100 | int lookupCount = config.readNumEntry( "count", 0 ); |
103 | float last, shift, shiftPerSec; | 101 | float last, shift, shiftPerSec; |
104 | tblLookups->setNumRows( lookupCount ); | 102 | tblLookups->setNumRows( lookupCount ); |
105 | int cw = tblLookups->width() / 4; | 103 | int cw = tblLookups->width() / 4; |
106 | cw = 50; | 104 | cw = 50; |
107 | tblLookups->sortColumn( 0, FALSE, TRUE ); | 105 | tblLookups->sortColumn( 0, FALSE, TRUE ); |
108 | _shiftPerSec = 0; | 106 | _shiftPerSec = 0; |