1 // Implementation of CLinkerCollection methods
2 // Copyright © 2009 The University of Chicago
3 #include "LinkerCollection.h"
6 #include "MiniLexicon.h"
10 //////////////////////////////////////////////////////////////////////
11 // Construction/Destruction
12 //////////////////////////////////////////////////////////////////////
14 CLinkerCollection::CLinkerCollection(CMiniLexicon
* Lex
)
16 // do the creation of TCollection with ptr to Lexicon and name of class
18 if( m_pMiniLex
) m_pLexicon
= m_pMiniLex
->GetLexicon();
21 CLinkerCollection::CLinkerCollection(CLexicon
* Lex
)
23 // do the creation of TCollection with ptr to Lexicon and name of class
29 CLinkerCollection::CLinkerCollection()
36 CLinkerCollection::~CLinkerCollection()
40 void CLinkerCollection::ListDisplay(Q3ListView
* pView
, StringToString
* filter
)
42 linguistica::ui::status_user_agent
& status
= m_pLexicon
!= 0 ?
43 m_pLexicon
->status_display() :
44 linguistica::ui::ignore_status_updates();
47 pView
->setRootIsDecorated(false);
49 // Remove all previous columns
50 while (pView
->columns())
51 pView
->removeColumn(0);
54 pView
->addColumn("Linkers");
55 pView
->addColumn("Corpus Count");
56 pView
->addColumn("Use Count");
57 pView
->addColumn("Compounds");
59 status
.progress
.clear();
60 status
.major_operation
= "Creating linker list for display";
62 if (m_SortValidFlag
== false)
65 status
.progress
.set_denominator(GetCount());
66 for (int i
= 0; i
< (int)GetCount(); i
++) {
67 pLinker
= GetAtSort(i
);
69 pLinker
->ListDisplay(pView
, filter
);
71 status
.progress
.clear();
72 status
.major_operation
.clear();