~smartboyhw/ubuntu/raring/calligra/2.6.0-0ubuntu1

« back to all changes in this revision

Viewing changes to kexi/widget/dataviewcommon/KexiTableViewColumn.cpp

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2012-10-23 21:09:16 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20121023210916-m82w6zxnxhaxz7va
Tags: 1:2.5.90-0ubuntu1
* New upstream alpha release (LP: #1070436)
  - Add libkactivities-dev and libopenimageio-dev to build-depends
  - Add kubuntu_build_calligraactive.diff to build calligraactive by default
  - Add package for calligraauthor and move files that are shared between
    calligrawords and calligraauthor to calligrawords-common
* Document the patches
* Remove numbers from patches so they follow the same naming scheme as
  the rest of our patches.
* calligra-data breaks replaces krita-data (<< 1:2.5.3) (LP: #1071686)

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
#include <kexiutils/validator.h>
29
29
 
30
 
#include <kexidb/field.h>
31
 
#include <kexidb/queryschema.h>
32
 
#include <kexidb/roweditbuffer.h>
33
 
#include <kexidb/cursor.h>
34
 
#include <kexidb/utils.h>
 
30
#include <db/field.h>
 
31
#include <db/queryschema.h>
 
32
#include <db/roweditbuffer.h>
 
33
#include <db/cursor.h>
 
34
#include <db/utils.h>
35
35
#include <kexi.h>
36
36
 
37
37
#include <kdebug.h>
67
67
        uint options,
68
68
        uint length, uint precision,
69
69
        QVariant defaultValue,
70
 
        const QString& caption, const QString& description, uint width
71
 
                                        )
 
70
        const QString& caption, const QString& description)
72
71
        : m_columnInfo(0)
73
72
        , m_visibleLookupColumnInfo(0)
74
73
        , d(new Private)
79
78
        options,
80
79
        length, precision,
81
80
        defaultValue,
82
 
        caption, description, width);
 
81
        caption, description);
83
82
 
84
83
    m_isDBAware = false;
85
84
    m_fieldOwned = true;
174
173
    m_validator = 0;
175
174
    m_relatedDataEditable = false;
176
175
    m_headerTextVisible = true;
 
176
    m_width = 0;
177
177
}
178
178
 
179
179
void KexiTableViewColumn::setValidator(KexiUtils::Validator* v)
200
200
    if (!data)
201
201
        return;
202
202
    //find a primary key
203
 
    const KexiTableViewColumn::List columns(data->columns());
 
203
    const KexiTableViewColumn::List *columns = data->columns();
204
204
    int id = -1;
205
 
    foreach(KexiTableViewColumn* col, columns) {
 
205
    foreach(KexiTableViewColumn* col, *columns) {
206
206
        id++;
207
207
        if (col->field()->isPrimaryKey()) {
208
208
            //found, remember
245
245
    }
246
246
    return true;
247
247
}
 
248
 
 
249
void KexiTableViewColumn::setWidth(uint w)
 
250
{
 
251
    m_width = w;
 
252
}
 
253
 
 
254
uint KexiTableViewColumn::width() const {
 
255
    return m_width;
 
256
}
 
257