summaryrefslogtreecommitdiff
path: root/noncore/settings/netsystemtime
Side-by-side diff
Diffstat (limited to 'noncore/settings/netsystemtime') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/netsystemtime/predicttabwidget.cpp4
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 )
// Predicted time drift
layout->addWidget( new QLabel( tr( "Predicted time drift" ), this ), 0, 0 );
lblDrift = new QLabel( tr( "n/a" ), this );
layout->addWidget( lblDrift, 0, 1 );
// Estimated time difference
layout->addWidget( new QLabel( tr( "Estimated shift" ), this ), 1, 0 );
lblDiff = new QLabel( tr( "n/a" ), this );
layout->addWidget( lblDiff, 1, 1 );
// Predicted time
layout->addWidget( new QLabel( tr( "Predicted time" ), this ), 2, 0 );
lblPredicted = new QLabel( tr( "n/a" ), this );
layout->addWidget( lblPredicted, 2, 1 );
// Prediction table
tblLookups = new QTable( 2, 3, this );
QFont font( tblLookups->font() );
font.setPointSize( 7 );
tblLookups->setFont( font );
tblLookups->horizontalHeader()->setLabel( 0, tr( "Shift [s/h]" ) );
tblLookups->horizontalHeader()->setLabel( 1, tr( "Last [h]" ) );
tblLookups->horizontalHeader()->setLabel( 2, tr( "Offset [s]" ) );
- tblLookups->setColumnWidth( 0, 78 );
- tblLookups->setColumnWidth( 1, 50 );
- tblLookups->setColumnWidth( 2, 50 );
+
tblLookups->setMinimumHeight( 50 );
tblLookups->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum ) );
layout->addMultiCellWidget( tblLookups, 3, 3, 0, 1 );
// Predict time button
QPushButton *pb = new QPushButton( tr( "Predict time" ), this );
connect( pb, SIGNAL(clicked()), this, SLOT(slotPredictTime()) );
layout->addWidget( pb, 4, 0 );
// Set predicted time button
pb = new QPushButton( tr( "Set predicted time" ), this );
connect( pb, SIGNAL(clicked()), this, SLOT(slotSetPredictedTime()) );
layout->addWidget( pb, 4, 1 );
// Initialize values
Config config( "ntp" );
config.setGroup( "lookups" );
int lookupCount = config.readNumEntry( "count", 0 );
float last, shift, shiftPerSec;
tblLookups->setNumRows( lookupCount );
int cw = tblLookups->width() / 4;
cw = 50;
tblLookups->sortColumn( 0, FALSE, TRUE );
_shiftPerSec = 0;