1 // Merged signatures, representing a single part of speech (one hopes!)
2 // Copyright © 2009 The University of Chicago
7 #include <q3listview.h>
10 class LxPoS
: public CLParse
12 CSignature
* m_Signature
; // owned by another Collection; this is just a pointer.
13 CParse m_SatelliteAffixes
;//affixes taken by stems of this POS.
15 QList
<CStem
*> m_Stems
;
16 QList
<CSignature
*> m_Signatures
;
20 LxPoS (CSignature
* , CMiniLexicon
* mini
);
23 int GetSize() { return m_Signature
->Size(); }
24 CSignature
* GetSignature() { return m_Signature
; }
25 CParse
* GetSatelliteAffixes() { return &m_SatelliteAffixes
; }
26 double GetRobustness() { return m_Robustness
; }
27 void AddRobustness(double r
) { m_Robustness
+= r
; }
28 void ListDisplay(Q3ListView
* m_collectionView
,
30 void ListDisplay(Q3ListViewItem
* m_collectionView
,
32 int GetNumberOfStems() { return m_Stems
.count(); }
33 int GetNumberOfSignatures() { return m_Signature
->GetMentorList()->count() + 1; }
34 void AddStem (CStem
* pStem
) { m_Stems
.append(pStem
); }
35 CStem
* GetStem(int stemno
) { return m_Stems
.at(stemno
); }
36 CSignature
* GetSignature(int signo
) { return m_Signatures
.at(signo
);}
37 void AppendSignature (CSignature
* pSig
) { m_Signatures
.append(pSig
); }
43 //--------------- GUI -----------------------------------------//
45 class GUIPOSListViewItem
: public Q3ListViewItem
49 //--------------------------------------------------
50 // Constructors/Destructor
51 //--------------------------------------------------
54 GUIPOSListViewItem( Q3ListView
* parent
= NULL
);
55 GUIPOSListViewItem( Q3ListView
*parent
,
59 GUIPOSListViewItem( Q3ListViewItem
*parent
,
63 virtual QString
text ( int ) const;
64 virtual QString
key ( int, bool ) const;
65 LxPoS
* GetPoS() const { return m_PoS
; }
66 void SetPoS( LxPoS
* qPoS
) { m_PoS
= qPoS
; }
67 CParse
* GetSatelliteAffixes() { return m_PoS
->GetSatelliteAffixes(); }
68 Q3ListView
* GetParent() { return m_parentlist
; }
69 void PoSListDisplay (Q3ListView
*, QString
, LxPoS
*);
70 void PoSListDisplay (Q3ListViewItem
*, QString
, LxPoS
*);
71 int compare(Q3ListViewItem
*item
, int col
, bool asc
) const;
72 //--------------------------------------------------
73 // Protected member variables
74 //--------------------------------------------------
78 QMap
<QString
, QString
>* m_filter
;
80 Q3ListView
* m_parentlist
;