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

« back to all changes in this revision

Viewing changes to kst/kst/vectorselector.ui.h

  • 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:
46
46
        _vector->insertItem(tr("<None>"));
47
47
    }
48
48
    QStringList vectors;
49
 
    for (KstVectorList::Iterator i = KST::vectorList.begin(); i != KST::vectorList.end(); ++i) {
 
49
    KST::vectorList.lock().readLock();
 
50
    for (KstVectorList::ConstIterator i = KST::vectorList.begin(); i != KST::vectorList.end(); ++i) {
 
51
        (*i)->readLock();
50
52
        if (!(*i)->isScalarList()){
51
53
            vectors << (*i)->tagName();
52
54
            if (!found && (*i)->tagName() == prev) {
53
55
                found = true;
54
56
            }
55
57
        }
 
58
        (*i)->readUnlock();
56
59
    }
 
60
    KST::vectorList.lock().readUnlock();
57
61
    qHeapSort(vectors);
58
62
    _vector->insertStringList(vectors);
59
63
    if (found) {
66
70
 
67
71
void VectorSelector::createNewVector()
68
72
{
69
 
    KstVectorDialogI *vd = new KstVectorDialogI(this, "vector dialog");
70
 
    connect(vd, SIGNAL(vectorCreated(KstVectorPtr)), this, SLOT(newVectorCreated(KstVectorPtr)));
71
 
    connect(vd, SIGNAL(vectorCreated(KstVectorPtr)), this, SLOT(setSelection(KstVectorPtr)));
72
 
    connect(vd, SIGNAL(modified()), this, SLOT(update()));
73
 
    vd->show_New();
74
 
    vd->exec();
75
 
    delete vd;
 
73
    KstDialogs::self()->newVectorDialog(this, SLOT(newVectorCreated(KstVectorPtr)), SLOT(setSelection(KstVectorPtr)), SLOT(update()));
76
74
}
77
75
 
78
76
 
106
104
 
107
105
void VectorSelector::newVectorCreated( KstVectorPtr v )
108
106
{
 
107
    v->readLock();
109
108
    QString name = v->tagName();
 
109
    v->readUnlock();
110
110
    v = 0L; // deref
111
111
    emit newVectorCreated(name);
112
112
}
114
114
 
115
115
void VectorSelector::setSelection( KstVectorPtr v )
116
116
{
 
117
    v->readLock();
117
118
    setSelection(v->tagName());
 
119
    v->readUnlock();
118
120
}
119
121
 
120
122
 
129
131
 
130
132
void VectorSelector::editVector()
131
133
{
132
 
    KstVectorDialogI::globalInstance()->show_Edit(_vector->currentText());
 
134
    KstDialogs::self()->showVectorDialog(_vector->currentText());
133
135
}
134
136
 
135
 
void VectorSelector::setEdit( QString tag)
 
137
 
 
138
void VectorSelector::setEdit( const QString& tag )
136
139
{
137
140
    KST::vectorList.lock().readLock();
138
141
    KstRVectorPtr rvp = kst_cast<KstRVector>(*KST::vectorList.findTag(tag));