21 #ifndef __KACCELMANAGER_PRIVATE_H__
22 #define __KACCELMANAGER_PRIVATE_H__
26 #include <tqmemarray.h>
27 #include <tqvaluelist.h>
47 KAccelString(
const TQString &input,
int initalWeight=-1);
49 void calculateWeights(
int initialWeight);
51 const TQString &pure()
const {
return m_pureText; }
52 TQString accelerated()
const;
54 int accel()
const {
return m_accel; }
55 void setAccel(
int accel) { m_accel = accel; }
57 int originalAccel()
const {
return m_orig_accel; }
58 TQString originalText()
const {
return m_origText; }
60 TQChar accelerator()
const;
62 int maxWeight(
int &index,
const TQString &used);
64 bool operator == (
const KAccelString &c)
const {
return m_pureText == c.m_pureText && m_accel == c.m_accel && m_orig_accel == c.m_orig_accel; }
69 int stripAccelerator(TQString &input);
73 TQString m_pureText, m_origText;
74 int m_accel, m_orig_accel;
75 TQMemArray<int> m_weight;
80 typedef TQValueList<KAccelString> KAccelStringList;
140 static void manage(TQPopupMenu *popup);
155 void calculateAccelerators();
157 void findMenuEntries(KAccelStringList &list);
158 void setMenuEntries(
const KAccelStringList &list);
160 TQPopupMenu *m_popup;
161 KAccelStringList m_entries;
167 class QWidgetStackAccelManager :
public TQObject
173 static void manage(TQWidgetStack *popup);
178 QWidgetStackAccelManager(TQWidgetStack *popup);
183 void aboutToShow(TQWidget *);
184 bool eventFilter ( TQObject * watched, TQEvent * e );
188 void calculateAccelerators();
190 TQWidgetStack *m_stack;
191 KAccelStringList m_entries;