summaryrefslogtreecommitdiffstats
path: root/quanta/components/csseditor/fontfamilychooser.h
blob: fa5c947e17295cbe343f6b9d210ccc0cebb2529c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/***************************************************************************
                          fontfamilychooser.h  -  description
                             -------------------
    begin                : mer lug 23 11:20:17 CEST 2003
    copyright            : (C) |YEAR| by si2003    email                : gulmini.luciano@student.unife.it
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef FONTFAMILYCHOOSER_H
#define FONTFAMILYCHOOSER_H

#include "fontfamilychoosers.h"
#include <tqmap.h>
class QStringList;

class fontFamilyChooser : public fontFamilyChooserS
{
  Q_OBJECT
  private:
    enum FontOrigin { available, generic };
    TQString m_currentSelectedFont;
    FontOrigin m_fontOrigin;
    int  m_currentSelectedFontIndex;
    TQMap<TQString,FontOrigin> m_selectedFontMap;
  
  private slots:
    void updatePreview(const TQString &);
    void setCurrentSelectedAvailableFamilyFont(const TQString&); 
    void setCurrentSelectedGenericFamilyFont(const TQString&);
    void setCurrentSelectedFont( int i) { m_currentSelectedFontIndex = i; }
    void setCurrentSelectedFont( const TQString& f ) { m_currentSelectedFont = f; }
    void addFont();
    void removeFont();
    void moveFontUp();
    void moveFontDown();
    
  public:    
    fontFamilyChooser(TQWidget* parent, const char *name=0);
    ~fontFamilyChooser(); 
    TQStringList fontList();
    void setInitialValue(const TQString& s);
};

#endif