~ubuntu-branches/ubuntu/breezy/koffice/breezy

« back to all changes in this revision

Viewing changes to kugar/kudesigner_qt/itemopts.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Ben Burton
  • Date: 2004-05-09 11:33:00 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040509113300-vfrdadqsvjfuhn3b
Tags: 1:1.3.1-1
* New upstream bugfix release.
* Built against newer imagemagick (closes: #246623).
* Made koffice-libs/kformula recommend/depend on latex-xft-fonts, which
  provides mathematical fonts that the formula editor can use.  Also
  patched the kformula part to make these fonts the default.
* Changed kword menu hint from "WordProcessors" to "Word processors"
  (closes: #246209).
* Spellchecker configuration is now fixed (closes: #221256, #227568).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <qtable.h>
 
2
#include <qstring.h>
 
3
#include <qstringlist.h>
 
4
#include <qpushbutton.h>
 
5
#include "dlgoptions.h"
 
6
#include "itemopts.h"
 
7
 
 
8
//save the properties from table widget to a object
 
9
void dlgItemOptions::commitProps()
 
10
{
 
11
    for (int i = 0; i < taProps->numRows(); i++)
 
12
    {
 
13
        QString a = taProps->item(i, 0)->text();
 
14
        (*props)[a].first = taProps->item(i, 1)->text();
 
15
    }
 
16
}
 
17
 
 
18
dlgItemOptions::dlgItemOptions(map<QString, pair<QString, QStringList> > *p,
 
19
                               QWidget *parent, const char *name, WFlags f):
 
20
            dlgOptions(parent, name, f)
 
21
{  
 
22
    taProps->setLeftMargin(0);
 
23
            
 
24
    //show properties in list view
 
25
    props = p;
 
26
    
 
27
    map<QString, pair<QString, QStringList> >::const_iterator i;
 
28
    int j;
 
29
    for (i = props->begin(), j = 0; i != props->end(); ++i, ++j)
 
30
    {
 
31
        taProps->insertRows(taProps->numRows());
 
32
        taProps->setText(j, 0, i->first);
 
33
        taProps->setText(j, 1, i->second.first);
 
34
    }
 
35
    
 
36
    connect(buttonOk, SIGNAL(clicked()), this, SLOT(commitProps()));
 
37
}