Ananas Library  0.9.5
eselectdoctype.ui.h
1 /****************************************************************************
2 ** ui.h extension file, included from the uic-generated form implementation.
3 **
4 ** If you wish to add, delete or rename functions or slots use
5 ** Qt Designer which will update this file, preserving your code. Create an
6 ** init() function in place of a constructor, and a destroy() function in
7 ** place of a destructor.
8 *****************************************************************************/
9 
10 void eSelectDocType::init()
11 {
12  listDocs->header()->hide();
13  listDocs->setColumnWidth( 0, 1000 );
14  listDocs->setFocus();
15 }
16 
17 
18 void eSelectDocType::setJournal( aCfg *md, int id )
19 {
20  aCfgItem obj, dobj;
21  int i, cnt, t, did;
22  QString name;
23 
24  listDocs->clear();
25  dlist.clear();
26  obj = md->find( id );
27  if ( !obj.isNull() ) {
28  dlist = md->getJournalDocuments( obj );
29 // printf("docs=%s\n", ( const char *) dlist.join("\n") );
30  for (i=0;i< dlist.count();i++) {
31  did = dlist[i].toInt();
32  dobj = md->find( did );
33  if ( !dobj.isNull() ) {
34  name = md->attr( dobj, mda_name );
35  new QListViewItem( listDocs, name, dlist[i] );
36  }
37  }
38  listDocs->setSelected( listDocs->firstChild(), true );
39  }
40 }
41 
42 
43 void eSelectDocType::accepted()
44 {
45  docId = listDocs->selectedItem()->text(1).toInt();
46  // printf("docId=%i\n", docId );
47  accept();
48 }
QStringList getJournalDocuments(aCfgItem journal)
Definition: acfg.cpp:1595
Класс реализует програмный интерфейс доступа к элементам метаданных системы. Наследует QObject...
Definition: acfg.h:436
QString attr(aCfgItem context, const QString &name)
Definition: acfg.cpp:992
aCfgItem find(aCfgItem context, const QString &name, int n=0)
Definition: acfg.cpp:539