~ubuntu-branches/ubuntu/karmic/kst/karmic

« back to all changes in this revision

Viewing changes to kst/kst/kstviewscalarsdialog_i.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2006-06-30 19:11:30 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060630191130-acumuar75bz4puty
Tags: 1.2.1-1ubuntu1
Merge from debian unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
#include <qlayout.h>
19
19
#include <qpushbutton.h>
20
20
 
21
 
#include <kdebug.h>
22
21
#include <klocale.h>
23
22
 
24
23
#include "kstdatacollection.h"
38
37
  QBoxLayout *box = dynamic_cast<QBoxLayout*>(layout());
39
38
  if (box) {
40
39
    box->insertWidget(0, tableScalars);
41
 
 
42
40
    if (tableScalars->numCols() != 2) {
43
41
      for (; 0 < tableScalars->numCols(); ) {
44
42
        tableScalars->removeColumn(0);
53
51
  connect(Cancel, SIGNAL(clicked()), this, SLOT(close()));
54
52
}
55
53
 
 
54
 
56
55
KstViewScalarsDialogI::~KstViewScalarsDialogI() {
57
56
}
58
57
 
 
58
 
59
59
void KstViewScalarsDialogI::updateViewScalarsDialog() {
60
60
  KST::scalarList.lock().readLock();
61
61
  int needed = KST::scalarList.count();
63
63
 
64
64
  tableScalars->setNumRows(needed);
65
65
  QRect rect = tableScalars->horizontalHeader()->rect();
66
 
  tableScalars->setColumnWidth( 0, rect.width()/2 );
67
 
  tableScalars->setColumnWidth( 1, rect.width()/2 );
 
66
  tableScalars->setColumnWidth(0, rect.width()/2);
 
67
  tableScalars->setColumnWidth(1, rect.width()/2);
68
68
}
69
69
 
 
70
 
70
71
void KstViewScalarsDialogI::showViewScalarsDialog() {
71
72
  updateViewScalarsDialog();
72
73
  updateDefaults(0);
73
 
 
74
74
  show();
75
75
  raise();
76
76
}
77
77
 
 
78
 
78
79
/*
79
80
 *  Sets the strings of the subwidgets using the current
80
81
 *  language.
81
82
 */
82
 
void KstViewScalarsDialogI::languageChange()
83
 
{
 
83
void KstViewScalarsDialogI::languageChange() {
84
84
  setCaption(i18n("View Scalar Values"));
85
85
  tableScalars->horizontalHeader()->setLabel(0, i18n("Scalar"));
86
86
  tableScalars->horizontalHeader()->setLabel(1, i18n("Value"));
87
 
 
88
87
  KstViewScalarsDialog::languageChange();      
89
88
}
90
89
 
 
90
 
91
91
void KstViewScalarsDialogI::updateDefaults(int index) {
92
92
  Q_UNUSED(index)
93
93
}