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

« back to all changes in this revision

Viewing changes to kst/kst/kstimagedialog_i.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:
1
1
/***************************************************************************
2
 
                       kstcurvedialog_i.h  -  Part of KST
 
2
                       kstimagedialog_i.h  -  Part of KST
3
3
                             -------------------
4
4
    begin                :
5
5
    copyright            : (C) 2003 The University of Toronto
19
19
#ifndef KSTIMAGEDIALOGI_H
20
20
#define KSTIMAGEDIALOGI_H
21
21
 
22
 
#include "imagedialog.h"
 
22
#include "kstdatadialog.h"
23
23
#include "kstimage.h"
24
 
 
25
 
class KstImageDialogI : public KstImageDialog {
 
24
#include "kst_export.h"
 
25
 
 
26
class ImageDialogWidget;
 
27
 
 
28
class KST_EXPORT KstImageDialogI : public KstDataDialog {
26
29
  Q_OBJECT
27
30
  public:
28
 
    KstImageDialogI(QWidget *parent = 0, const char *name = 0,
29
 
        bool modal = false, WFlags fl = 0 );
 
31
    KstImageDialogI(QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags fl = 0 );
30
32
    virtual ~KstImageDialogI();
 
33
    static KstImageDialogI *globalInstance();
31
34
 
32
35
  public slots:
33
36
    void update();
34
37
    void updateWindow();
35
 
 
36
 
    bool new_I();
37
 
    bool edit_I();
38
 
 
39
 
    static KstImageDialogI *globalInstance();
40
 
 
 
38
    bool newObject();
 
39
    bool editObject();
 
40
    void populateEditMultiple();
 
41
    void setMatrix(const QString& name);
 
42
 
 
43
  private:
 
44
    static QGuardedPtr<KstImageDialogI> _inst;
 
45
    void placeInPlot(KstImagePtr image);
 
46
    bool checkParameters(double& lowerZDouble, double& upperZDouble);
 
47
    void fillFieldsForEditNoUpdate();
 
48
    
 
49
    // the following are for the multiple edit mode
 
50
    bool _matrixDirty : 1;
 
51
    bool _colorOnlyDirty : 1;
 
52
    bool _contourOnlyDirty : 1;
 
53
    bool _colorAndContourDirty : 1;
 
54
    bool _paletteDirty : 1;
 
55
    bool _lowerZDirty : 1;
 
56
    bool _upperZDirty : 1;
 
57
    bool _realTimeAutoThresholdDirty : 1;
 
58
    bool _numContourLinesDirty : 1;
 
59
    bool _contourWeightDirty : 1;
 
60
    bool _useVariableWeightDirty : 1;
 
61
    bool _contourColorDirty : 1;
 
62
    bool editSingleObject(KstImagePtr imPtr);
 
63
    
41
64
  private slots:
42
65
    void calcAutoThreshold();
43
66
    void updateGroups();
44
67
    void updateEnables();
45
 
 
46
 
  signals:
47
 
    void modified();
48
 
 
49
 
  private:
50
 
    static QGuardedPtr<KstImageDialogI> _inst;
51
 
    KstImagePtr _getPtr(const QString& tagin);
52
 
 
53
 
    bool _newDialog;
54
 
    KstImagePtr DP;
55
 
    void placeInPlot(KstImagePtr image);
56
 
    bool checkParameters(double& lowerZDouble, double& upperZDouble);
57
 
 
58
 
    /***********************************/
59
 
    /** defined in dataobjectdialog.h **/
60
 
  public slots:
61
 
    void show_Edit(const QString &field);
62
 
    void show_New();
63
 
    void OK();
64
 
    void Init();
65
 
    void close();
66
 
    void reject();
67
 
  private:
68
 
    void _fillFieldsForEdit();
69
 
    void _fillFieldsForNew();
 
68
    void updatePalette(const QString& palette);
 
69
    
 
70
    // for multiple edit mode
 
71
    void setColorOnlyDirty() { _colorOnlyDirty = true; }
 
72
    void setContourOnlyDirty() { _contourOnlyDirty = true; }
 
73
    void setColorAndContourDirty() { _colorAndContourDirty = true; }
 
74
    void setRealTimeAutoThresholdDirty();
 
75
    void setUseVariableWeightDirty();
 
76
    void setContourColorDirty() { _contourColorDirty = true; }
 
77
    
 
78
  private:
 
79
    void fillFieldsForEdit();
 
80
    void fillFieldsForNew();
 
81
    void cleanup();
 
82
    ImageDialogWidget *_w;
70
83
};
71
84
 
72
85
#endif