summaryrefslogtreecommitdiffstats
path: root/kfind/kfwin.h
blob: 76837c4a06319ac622bd912e1c9f57c3ae778c56 (plain)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/***********************************************************************
 *
 *  Kfwin.h
 *
 ***********************************************************************/

#ifndef KFWIN_H
#define KFWIN_H

#include <tdelistview.h>
#include <tdefileitem.h>
#include <kurl.h>

class KfArchiver;
class TQPixmap;
class TQFileInfo;
class TDEPopupMenu;
class KfindWindow;

class KfFileLVI : public TQListViewItem
{
 public:
  KfFileLVI(KfindWindow* lv, const KFileItem &item,const TQString& matchingLine);
  ~KfFileLVI();

  TQString key(int column, bool) const;

  TQFileInfo *fileInfo;
  KFileItem fileitem;
};

class KfindWindow: public   TDEListView
{
  TQ_OBJECT
public:
  KfindWindow( TQWidget * parent = 0, const char * name = 0 );

  void beginSearch(const KURL& baseUrl);
  void endSearch();

  void insertItem(const KFileItem &item, const TQString& matchingLine);

  TQString reducedDir(const TQString& fullDir);

public slots:
  void copySelection();
  void slotContextMenu(TDEListView *,TQListViewItem *item,const TQPoint&p);

private slots:
  void deleteFiles();
  void fileProperties();
  void openFolder();
  void saveResults();
  void openBinding();
  void selectionHasChanged();
  void slotExecute(TQListViewItem*);
  void slotOpenWith();
  
protected:
  virtual void resizeEvent(TQResizeEvent *e);

  virtual TQDragObject *dragObject();

signals:
  void resultSelected(bool);

private:
  TQString m_baseDir;
  TDEPopupMenu *m_menu;
  bool haveSelection;
  bool m_pressed;
  void resetColumns(bool init);
};

#endif