blob: 0e6729f37431973e226b6223e112c3dce57289e2 (
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
/***************************************************************************
krresulttable.h
-------------------
copyright : (C) 2005 by Dirk Eschler & Krusader Krew
e-mail : krusader@users.sourceforge.net
web site : http://krusader.sourceforge.net
---------------------------------------------------------------------------
Description
***************************************************************************
A
db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b.
88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D
88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY'
88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b
88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88.
YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD
S o u r c e F i l e
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef KRRESULTTABLE_H
#define KRRESULTTABLE_H
#include <tqstring.h>
#include <tqlabel.h>
#include <tqlayout.h>
#include <tqhbox.h>
#include <tqvbox.h>
#include <tqgrid.h>
#include <tqstringlist.h>
#include <tqvaluevector.h>
#include <kiconloader.h>
#include <kglobalsettings.h>
#include <klocale.h>
#include <klocale.h>
#include <krun.h>
#include <kseparator.h>
#include <kurllabel.h>
#include "searchobject.h"
#include "../krusader.h"
#include "../krservices.h"
#include "../VFS/krarchandler.h"
/**
@author Dirk Eschler <deschler@users.sourceforge.net>
*/
class KrResultTable : public TQWidget
{
public:
KrResultTable(TQWidget* parent);
virtual ~KrResultTable();
/**
* Adds a row of search results to the end of a TQGridLayout
* Each KrResultTable has to implement it
*
* @param const SearchObject* search Name of the SearchObject
* @param const TQGridLayout* grid The GridLayout where the row is inserted
*
* @return bool True if row was added successfully to rows, else false
*/
virtual bool addRow(SearchObject* search, TQGridLayout* grid) = 0;
protected:
TQStringList _supported;
TQStringList _tableHeaders;
int _numColumns;
int _numRows;
TQGridLayout* _grid;
TQHBox* _iconBox;
TQLabel* _label; // generic label
/**
* Creates the main grid tqlayout and attaches the table header
*
* @return bool Pointer to the main grid tqlayout
*/
TQGridLayout* initTable();
/**
* Applies settings to each cell of the grid tqlayout
* Supposed to be run after a row was added
*
* @param const TQGridLayout* grid The GridLayout
*/
void adjustRow(TQGridLayout* grid);
};
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
class KrArchiverResultTable : public KrResultTable
{
Q_OBJECT
TQ_OBJECT
public:
KrArchiverResultTable(TQWidget* parent);
virtual ~KrArchiverResultTable();
bool addRow(SearchObject* search, TQGridLayout* grid);
protected:
KURLLabel* _nameLabel;
protected slots:
void website(const TQString&);
};
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
class KrToolResultTable : public KrResultTable
{
Q_OBJECT
TQ_OBJECT
public:
KrToolResultTable(TQWidget* parent);
virtual ~KrToolResultTable();
bool addRow(SearchObject* search, TQGridLayout* grid);
protected:
TQValueVector<Application*> _apps;
protected slots:
void website(const TQString&);
};
#endif
|