summaryrefslogtreecommitdiffstats
path: root/src/sidebar/sq_mountview.h
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-02-10 15:10:13 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-02-13 11:44:42 +0900
commit8f8f84410cc591c85c5e83e0b3efdcda5fdbe42e (patch)
treef273a932ce048ef22ea9d9888b77ea8a2b8f3e33 /src/sidebar/sq_mountview.h
parent424635023ee423826de12514b2fec7834b8deb7b (diff)
downloadksquirrel-8f8f8441.tar.gz
ksquirrel-8f8f8441.zip
Rename 'ksquirrel' folder to 'src'
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 203fcb8d90752b546c672c625927a136b959fcfb)
Diffstat (limited to 'src/sidebar/sq_mountview.h')
-rw-r--r--src/sidebar/sq_mountview.h84
1 files changed, 84 insertions, 0 deletions
diff --git a/src/sidebar/sq_mountview.h b/src/sidebar/sq_mountview.h
new file mode 100644
index 0000000..d14aa13
--- /dev/null
+++ b/src/sidebar/sq_mountview.h
@@ -0,0 +1,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 <tdelistview.h>
+
+class TDEPopupMenu;
+
+class SQ_MountViewItem;
+
+/*
+ * SQ_MountView is an detailed view representing mount points.
+ */
+
+class SQ_MountView : public TDEListView
+{
+ 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(TDEListView *, 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;
+ TDEPopupMenu *popup;
+ int id_mount, id_unmount;
+
+ static SQ_MountView *m_inst;
+};
+
+#endif