~ubuntu-branches/ubuntu/vivid/tea/vivid-proposed

« back to all changes in this revision

Viewing changes to fontbox.cpp

  • Committer: Package Import Robot
  • Author(s): Tobias Quathamer
  • Date: 2014-10-22 19:53:04 UTC
  • mfrom: (1.2.15)
  • Revision ID: package-import@ubuntu.com-20141022195304-ns9m470yend0ywyy
Tags: 38.0.0-1
* Imported Upstream version 38.0.0
* Refresh patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
this code is Public Domain
 
3
*/
 
4
 
1
5
#include <QHBoxLayout>
2
6
#include <QDebug>
3
7
#include <QSpinBox> 
4
8
#include <QFontComboBox>
5
9
 
6
 
 
7
10
#include "fontbox.h"
8
11
 
9
12
 
26
29
  h_box->addWidget (&edit);
27
30
  
28
31
  edit.setPlainText (tr("Example string"));
29
 
  
30
 
 
31
 
 
 
32
   
32
33
  connect (cf, SIGNAL(currentIndexChanged (const QString &)),
33
34
           this, SLOT(slot_fontname_changed(const QString &)));
34
35
 
39
40
 
40
41
void CFontBox::slot_fontname_changed (const QString &text)
41
42
{
42
 
  //edit.setFontFamily (text);
43
 
//  QFont f (text, 14);
44
43
  QFont f = edit.font();
45
44
  f.setFamily (text);
46
45
  edit.setFont (f);
47
 
  qDebug() << text;
48
46
}
49
47
 
50
48
 
51
49
void CFontBox::slot_font_size_changed (int i)
52
50
{
53
 
 QFont f = edit.font();
54
 
 f.setPointSize (i);
55
 
 edit.setFont (f);
56
 
  
57
 
 //cleanText
58
 
 
 
51
  QFont f = edit.font();
 
52
  f.setPointSize (i);
 
53
  edit.setFont (f);
59
54
}