~ubuntu-branches/ubuntu/hoary/kvirc/hoary

« back to all changes in this revision

Viewing changes to src/plugins/speak/libkvispeak.h

  • Committer: Bazaar Package Importer
  • Author(s): Robin Verduijn
  • Date: 2004-12-14 15:32:19 UTC
  • mfrom: (0.2.1 upstream) (1.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20041214153219-fdink3gyp2s20b6g
Tags: 2:2.1.3.1-2
* Change Recommends on xmms to a Suggests.
* Rebuild against KDE 3.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
//
2
 
//   SPEAK plugin for KVirc 1.1 Phoenix.
3
 
//
4
 
//   This plugin enables you to use IBM's ViaVoiceOutloud to speak
5
 
//   messages to you.  Messages that are directed to you, over the
6
 
//   Relay Chat, can be spoken outloud or sentences spoken by specific
7
 
//   people can also heard outloud.
8
 
//
9
 
//   To use the plugin, one needs to have a working IBM ViaVoice
10
 
//   Outloud, which can be retrieved from IBM's site.  For information
11
 
//   about IBM ViaVoice http://www-4.ibm.com/software/speech/dev/
12
 
//
13
 
//   Copyright (C) �rn E. Hansen (oe.hansen@gamma.telenordia.se)
14
 
//   Copyright (C) Szymon Stefanek (stefanek@tin.it)
15
 
//
16
 
//   This program is FREE software. You can redistribute it and/or
17
 
//   modify it under the terms of the GNU General Public License
18
 
//   as published by the Free Software Foundation; either version 2
19
 
//   of the License, or (at your opinion) any later version.
20
 
//
21
 
//   This program is distributed in the HOPE that it will be USEFUL,
22
 
//   but WITHOUT ANY WARRANTY; without even the implied warranty of
23
 
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24
 
//   See the GNU General Public License for more details.
25
 
//
26
 
//   You should have received a copy of the GNU General Public License
27
 
//   along with this program. If not, write to the Free Software Foundation,
28
 
//   Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29
 
//
30
 
 
31
 
#ifndef LIBKVISPEAK_H
32
 
#define LIBKVISPEAK_H
33
 
 
34
 
#include "setupData.h"
35
 
#include "smileyClassData.h"
36
 
#include "kvi_string.h"
37
 
#include "trees.h"
38
 
 
39
 
class QTextStream;
40
 
class QListView;
41
 
class smileyNode;
42
 
class KviApp;
43
 
 
44
 
struct eci_user {
45
 
  KviStr name;
46
 
  KviStr voice;
47
 
};
48
 
 
49
 
struct Voice {
50
 
  int s_gender;
51
 
  int s_headsize;;
52
 
  int s_pitch_base;
53
 
  int s_pitch_fluc;
54
 
  int s_roughness;
55
 
  int s_speed;
56
 
  int s_volume;
57
 
  int s_breathy;
58
 
};
59
 
 
60
 
class eciVoiceSetup : public eciSetupData {
61
 
  Q_OBJECT
62
 
 
63
 
private:
64
 
  eci_user* _user;
65
 
  int       _gender;
66
 
  int       _index;
67
 
 
68
 
  void setVoice(int);
69
 
  void showAnnotations();
70
 
  KviStr buildVoice();
71
 
public:
72
 
  eciVoiceSetup(eci_user *,QWidget *p=0,const char* name=0);
73
 
  ~eciVoiceSetup();
74
 
 
75
 
  void setup(eci_user *);
76
 
 
77
 
protected slots:
78
 
  void grandpa();
79
 
  void genderValue(bool); 
80
 
  void volumeValue(int);
81
 
  void pitchBaseValue(int);
82
 
  void female();
83
 
  void cancelPressed();
84
 
  void male1();
85
 
  void testPressed();
86
 
  void male2();
87
 
  void speedValue(int);
88
 
  void headValue(int);
89
 
  void okPressed();
90
 
  void breathinessValue(int);
91
 
  void child();
92
 
  void grandma();
93
 
  void pitchRangeValue(int);
94
 
  void roughnessValue(int);
95
 
};
96
 
 
97
 
class smileyClass : public smileyClassData
98
 
{
99
 
  Q_OBJECT
100
 
 
101
 
private:
102
 
  bool _smileys_loaded;
103
 
 
104
 
  void insertSmileys(QListView *, smileyNode *);
105
 
 
106
 
public:
107
 
 
108
 
  smileyClass(QWidget *parent = NULL, const char *name = NULL);
109
 
  virtual ~smileyClass();
110
 
 
111
 
  void init();
112
 
  void editSmileys();
113
 
  void load(KviStr&);
114
 
 
115
 
protected slots:
116
 
 
117
 
  void loadBase();
118
 
  void insertItem();
119
 
  void removeItem();
120
 
  void okPressed();
121
 
  void updateItem();
122
 
  void saveBaseAs();
123
 
  void selectShortHand(QListViewItem*);
124
 
};
125
 
 
126
 
class smileyNode : public Node
127
 
{
128
 
 protected:
129
 
  bool   _caseSense;
130
 
  KviStr _key, _english;
131
 
 
132
 
 public:
133
 
  smileyNode(const QString&,const QString&,bool);
134
 
  smileyNode(const KviStr&,const KviStr&,bool);
135
 
  ~smileyNode();
136
 
 
137
 
  KviStr Key()                { return _key;                     };
138
 
  const KviStr& English()     { return _english;                 };
139
 
  bool CaseSense()            { return _caseSense;               };
140
 
 
141
 
  int Compare(smileyNode *p)  { return Compare(p->Key());        };
142
 
  int Compare(Node *p)        { return Compare((smileyNode *)p); };
143
 
  int Compare(void *);
144
 
  int Compare(const KviStr&);
145
 
};
146
 
 
147
 
#endif