~ubuntu-branches/ubuntu/precise/ipe/precise

« back to all changes in this revision

Viewing changes to src/ipecanvas/ipecreatetext.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve M. Robbins
  • Date: 2007-01-09 23:14:51 UTC
  • mfrom: (3.1.4 feisty)
  • Revision ID: james.westby@ubuntu.com-20070109231451-3nd095g7ishc108l
Tags: 6.0pre27-3
* debian/gsfonts-fontmap.xml: New.  Fontmap for fonts from gsfonts package.
* debian/rules: Use gsfonts-fontmap.xml instead of tetex-fontmap.xml.
* debian/control: Add texlive-latex-base dependency as alternative to
  tetex-bin (for pdflatex) and replace tetex-extra by gsfonts (for font
  files).  Patch courtesy of Norbert Preining.  Closes: #378537.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
/*
6
6
 
7
7
    This file is part of the extensible drawing editor Ipe.
8
 
    Copyright (C) 1993-2004  Otfried Cheong
 
8
    Copyright (C) 1993-2005  Otfried Cheong
9
9
 
10
10
    Ipe is free software; you can redistribute it and/or modify it
11
11
    under the terms of the GNU General Public License as published by
33
33
#define IPECREATETEXT_H
34
34
 
35
35
#include "ipetext.h"
36
 
 
37
36
#include "ipeoverlay.h"
38
 
#include "ipedlgtext.h"
 
37
 
 
38
#include "ui_ipedlgtext.h"
 
39
 
 
40
#include <QDialog>
 
41
#include <QFont>
 
42
 
 
43
class QPaintEvent;
 
44
class QMouseEvent;
39
45
 
40
46
// --------------------------------------------------------------------
41
47
 
42
 
class IpeDialogCreateText : public IpeDlgCreateText {
 
48
class IpeDialogCreateText : public QDialog, private Ui::IpeDlgCreateText {
43
49
  Q_OBJECT
44
50
public:
45
51
  IpeDialogCreateText(QWidget* parent, QString caption,
 
52
                      QString label, QString &data,
 
53
                      const IpeStyleSheet *sheet,
 
54
                      IpeAttribute &style,
 
55
                      IpeAttribute &size);
 
56
  IpeDialogCreateText(QWidget* parent, QString caption,
46
57
                      QString label, QString &data);
 
58
  static void SetEditorFont(const QString &font);
47
59
public slots:
48
60
  virtual void UpdateData();
49
 
  virtual void FlushLeft();
 
61
private:
 
62
  void init(const QString &caption, const QString &label);
50
63
private:
51
64
  QString &iData;
 
65
  IpeAttributeSeq iStyles;
 
66
  IpeAttribute *iCurrentStyle;
 
67
  IpeAttributeSeq iSizes;
 
68
  IpeAttribute *iCurrentSize;
 
69
 
 
70
  static QFont editorFont;
52
71
};
53
72
 
54
73
// --------------------------------------------------------------------
58
77
  enum TMode { ELabel, EMath, EMinipage };
59
78
 
60
79
  static void New(QMouseEvent *ev, IpeCanvas *canvas,
61
 
                  IpeOverlayServices *services,
62
 
                  TMode mode, IpeRect *rect = 0, const char *init = 0);
 
80
                  IpeOverlayServices *services, TMode mode,
 
81
                  IpeRect *rect = 0);
63
82
  static bool Edit(IpeText *obj, const IpeStyleSheet *sheet);
64
83
 
65
 
  IpeCreateText(QMouseEvent *ev, IpeCanvas *canvas, IpeOverlayServices *services);
 
84
  IpeCreateText(QMouseEvent *ev, IpeCanvas *canvas,
 
85
                IpeOverlayServices *services);
66
86
 
67
87
  virtual void Draw(QPaintEvent *ev, QPainter *painter) const;
68
88
  virtual void MousePress(QMouseEvent *ev);