blob: a899118e5949b9793b2fc17f9411ae8ca8cfeced (
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
|
/***************************************************************************
sq_mountview.h - description
-------------------
begin : ??? Nov 29 2005
copyright : (C) 2005 by Baryshev Dmitry
email : ksquirrel.iv@gmail.com
***************************************************************************/
/***************************************************************************
* *
* 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 SQ_MOUNTVIEW_H
#define SQ_MOUNTVIEW_H
#include <tqstringlist.h>
#include <klistview.h>
class KPopupMenu;
class SQ_MountViewItem;
/*
* SQ_MountView is an detailed view representing mount points.
*/
class SQ_MountView : public KListView
{
Q_OBJECT
TQ_OBJECT
public:
SQ_MountView(TQWidget *parent = 0, const char *name = 0);
~SQ_MountView();
enum { OPT_COL_MOUNTPOINT = 1, OPT_COL_DEVICE = 2, OPT_COL_FSTYPE = 4, OPT_COL_OPTIONS = 8 };
static SQ_MountView* instance() { return m_inst; }
void setupColumns();
void reload(bool current = true);
private:
void setColumns(int cols);
bool exists(const TQString &);
private slots:
void slotContextMenu(KListView *, TQListViewItem *i, const TQPoint &p);
/*
* Item executed. We should emit path() signal.
*/
void slotExecuted(TQListViewItem *i);
// for context menu
void slotRefresh();
void slotMount();
void slotUnmount();
void slotUnmountFinished();
void slotMountFinished();
void slotMountFinished2();
void slotMountError();
signals:
void path(const TQString &);
private:
int m_columns;
SQ_MountViewItem *mountItem, *citem;
TQStringList mounted;
KPopupMenu *popup;
int id_mount, id_unmount;
static SQ_MountView *m_inst;
};
#endif
|