~ubuntu-branches/debian/sid/kxstitch/sid

« back to all changes in this revision

Viewing changes to kxstitch/calibratedialog.h

  • Committer: Bazaar Package Importer
  • Author(s): eric pareja
  • Date: 2005-02-19 12:37:22 UTC
  • Revision ID: james.westby@ubuntu.com-20050219123722-kt3ru1nqvllietee
Tags: upstream-0.6
ImportĀ upstreamĀ versionĀ 0.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *   Copyright (C) 2003 by Stephen Allewell                                *
 
3
 *   stephen@mirramar.fsnet.co.uk                                          *
 
4
 *                                                                         *
 
5
 *   This program is free software; you can redistribute it and/or modify  *
 
6
 *   it under the terms of the GNU General Public License as published by  *
 
7
 *   the Free Software Foundation; either version 2 of the License, or     *
 
8
 *   (at your option) any later version.                                   *
 
9
 ***************************************************************************/
 
10
 
 
11
#ifndef __CALIBRATEDIALOG_H
 
12
#define __CALIBRATEDIALOG_H
 
13
 
 
14
#include <qmap.h>
 
15
#include <qstring.h>
 
16
#include <qcolor.h>
 
17
#include "calibratedlg.h"
 
18
 
 
19
class FlossListBoxItem;
 
20
 
 
21
/** Wrapper class to manage the calibration of floss colors
 
22
    @author Stephen P Allewell
 
23
  */
 
24
class CalibrateDialog : public CalibrateDlg
 
25
{
 
26
  Q_OBJECT
 
27
public:
 
28
  CalibrateDialog(QWidget *);
 
29
  virtual ~CalibrateDialog();
 
30
 
 
31
protected slots:
 
32
  virtual void accept();
 
33
  void contextHelp();
 
34
  void schemeChanged(int);
 
35
  void selectionChanged(QListBoxItem *);
 
36
  void redChanged(int);
 
37
  void greenChanged(int);
 
38
  void blueChanged(int);
 
39
  void resetColor();
 
40
 
 
41
private:
 
42
  void fillSchemeList();
 
43
  void fillColorList();
 
44
  void updateSample();
 
45
  void updateName(bool);
 
46
  void commitColor();
 
47
 
 
48
  QString           m_scheme;
 
49
  QColor            m_sampleColor;
 
50
  FlossListBoxItem* m_item;
 
51
  QPixmap*          m_sample;
 
52
 
 
53
  typedef QMap<QString,QColor>  ChangedColors;        // <colorName,color>
 
54
  QMap<QString,ChangedColors>   m_calibratedColors;   // <schemeName,<colorName,color>>
 
55
};
 
56
 
 
57
#endif