File: kab_searchresultswidget.h

package info (click to toggle)
kdeutils 4%3A2.2.2-9.2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 8,892 kB
  • ctags: 10,879
  • sloc: cpp: 82,942; sh: 11,754; ansic: 4,638; perl: 1,852; makefile: 706; python: 258
file content (47 lines) | stat: -rw-r--r-- 1,259 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef SEARCHRESULTSWIDGET_H
#define SEARCHRESULTSWIDGET_H

#include <qwidget.h>
#include <qstringlist.h>
#include <qlist.h>
#include "kab_searchresultswidgetbase.h"

class BunchOfKeys;
class KabAPI;

class SearchResultsWidget : public SearchResultsWidgetBase
{
  Q_OBJECT
public:
  SearchResultsWidget(KabAPI *api, QWidget *parent=0, const char* name=0);
  /** Set the contents of the search results widget. Each element of
      headers needs to have an equivalent in indizes containing the
      index of the entry in the entry list(s). */
  void setContents(const QStringList& headers, const QList<int>
		   indizes);
  /** Clear the results of a previous search. Does not emit hideMe(). */
  void clear();
  /** Return if search results are available from a previous
      search. */
  bool hasResults();
  /** Get a BunchOfKeys object that represents the results. */
  bool bunchOfKeys(BunchOfKeys& keys);
protected:
  void slotHide();
  void slotClear();
  void slotPrint();
  void slotEntrySelected(int);
  // ----- 
  QStringList headlines;
  QList<int> indizes;
  KabAPI *api;
signals:
  void showMe(bool);
  void printResults();
  void setStatus(const QString&);
  void entrySelected(int);
};

class QVBoxLayout; 

#endif // SEARCHRESULTSWIDGET_H