aboutsummaryrefslogtreecommitdiffstats
path: root/kde2/plugins/plpprops.h
diff options
context:
space:
mode:
Diffstat (limited to 'kde2/plugins/plpprops.h')
-rw-r--r--kde2/plugins/plpprops.h263
1 files changed, 154 insertions, 109 deletions
diff --git a/kde2/plugins/plpprops.h b/kde2/plugins/plpprops.h
index eeb3d4d..b7e23e0 100644
--- a/kde2/plugins/plpprops.h
+++ b/kde2/plugins/plpprops.h
@@ -1,146 +1,191 @@
-/* $Id$
+/*-*-c++-*-
+ * $Id$
+ *
+ * This file is part of plptools.
+ *
+ * Copyright (C) 1999 Philip Proudman <philip.proudman@btinternet.com>
+ * Copyright (C) 1999-2001 Fritz Elfert <felfert@to.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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * This file holds the definitions for all classes used to
- * display a Psion related properties dialog.
*/
-
#ifndef _PLPPROPS_H_
#define _PLPPROPS_H_
#include <qstring.h>
#include <qlist.h>
#include <qgroupbox.h>
+#include <qmultilineedit.h>
#include <kurl.h>
#include <kfileitem.h>
#include <kdialogbase.h>
#include <kpropsdlg.h>
+#include <krun.h>
+#include <kio/job.h>
#include "pie3dwidget.h"
-namespace KIO { class Job; }
+class PlpMachInfoJob : public KIO::TransferJob {
+ Q_OBJECT
+
+public:
+ PlpMachInfoJob(const QByteArray &packedArgs);
+
+protected slots:
+ virtual void slotFinished();
+
+};
class PlpPropsPlugin : public KPropsDlgPlugin {
- Q_OBJECT
- public:
- /**
- * Constructor
- */
- PlpPropsPlugin( KPropertiesDialog *_props );
- virtual ~PlpPropsPlugin();
-
- /**
- * Applies all changes made.
- */
- virtual void applyChanges();
-
- /**
- * Tests whether the files specified by _items need a 'General' plugin.
- */
- static bool supports(KFileItemList _items);
-
- /**
- * Called after all plugins applied their changes
- */
- void postApplyChanges();
-
- private:
- class PlpPropsPluginPrivate;
- PlpPropsPluginPrivate *d;
+ Q_OBJECT
+
+public:
+ /**
+ * Constructor
+ */
+ PlpPropsPlugin( KPropertiesDialog *_props );
+ virtual ~PlpPropsPlugin();
+
+ /**
+ * Applies all changes made.
+ */
+ virtual void applyChanges();
+
+ /**
+ * Tests whether the files specified by _items need a 'General' plugin.
+ */
+ static bool supports(KFileItemList _items);
+
+signals:
+ void save();
+
+private slots:
+ void doChange();
+
+private:
+ class PlpPropsPluginPrivate;
+ PlpPropsPluginPrivate *d;
};
-class PlpFileAttrPage : public KPropsDlgPlugin {
- Q_OBJECT
- public:
- /**
- * Constructor
- */
- PlpFileAttrPage(KPropertiesDialog *_props);
- virtual ~PlpFileAttrPage();
+class PlpFileAttrPage : public QObject {
+ Q_OBJECT
+
+public:
+ /**
+ * Constructor
+ */
+ PlpFileAttrPage(KPropertiesDialog *_props);
+ virtual ~PlpFileAttrPage();
+
+ static bool supports(KFileItemList _items);
- virtual void applyChanges();
+public slots:
+ void applyChanges();
- static bool supports(KFileItemList _items);
+signals:
+ void changed();
- private:
- class PlpFileAttrPagePrivate;
- PlpFileAttrPagePrivate *d;
+private slots:
+ void slotGetSpecialFinished(KIO::Job *job);
+ void slotSetSpecialFinished(KIO::Job *job);
+ void slotCbToggled(bool);
+
+private:
+ class PlpFileAttrPagePrivate;
+ PlpFileAttrPagePrivate *d;
};
-class PlpDriveAttrPage : public KPropsDlgPlugin {
- Q_OBJECT
- public:
- /**
- * Constructor
- */
- PlpDriveAttrPage(KPropertiesDialog *_props);
- virtual ~PlpDriveAttrPage();
-
- virtual void applyChanges();
-
- static bool supports(KFileItemList _items);
-
- private slots:
- void slotSpecialFinished(KIO::Job *job);
-
- private:
- class PlpDriveAttrPagePrivate;
- PlpDriveAttrPagePrivate *d;
-
- unsigned long total;
- unsigned long unused;
-
- QGroupBox *gb;
- QLabel *uidLabel;
- QLabel *typeLabel;
- QLabel *totalLabel;
- QLabel *freeLabel;
- QColor usedColor;
- QColor freeColor;
- Pie3DWidget *pie;
+class PlpDriveAttrPage : public QObject {
+ Q_OBJECT
+
+public:
+ /**
+ * Constructor
+ */
+ PlpDriveAttrPage(KPropertiesDialog *_props);
+ virtual ~PlpDriveAttrPage();
+
+ static bool supports(KFileItemList _items);
+
+private slots:
+ void slotSpecialFinished(KIO::Job *job);
+ void slotBackupClicked();
+ void slotRestoreClicked();
+ void slotFormatClicked();
+
+private:
+ class PlpDriveAttrPagePrivate;
+ PlpDriveAttrPagePrivate *d;
+
};
/**
- * Used to view/edit machine info.
+ * Used to view machine info.
*/
-class PlpMachinePage : public KPropsDlgPlugin {
- Q_OBJECT
- public:
- /**
- * Constructor
- */
- PlpMachinePage(KPropertiesDialog *_props);
- virtual ~PlpMachinePage();
-
- virtual void applyChanges();
-
- static bool supports(KFileItemList _items);
-
- private:
- class PlpMachinePagePrivate;
- PlpMachinePagePrivate *d;
+class PlpMachinePage : public QObject {
+ Q_OBJECT
+
+public:
+ /**
+ * Constructor
+ */
+ PlpMachinePage(KPropertiesDialog *_props);
+ virtual ~PlpMachinePage();
+
+ static bool supports(KFileItemList _items);
+
+private slots:
+ void slotJobData(KIO::Job *job, const QByteArray &data);
+ void slotJobFinished(KIO::Job *job);
+
+private:
+ class PlpMachinePagePrivate;
+ PlpMachinePagePrivate *d;
+
+ QLabel *makeEntry(QString text, QWidget *w, int y);
};
/**
- * Used to view/edit owner info
+ * Used to view owner info
*/
-class PlpOwnerPage : public KPropsDlgPlugin {
- Q_OBJECT
- public:
- /**
- * Constructor
- */
- PlpOwnerPage(KPropertiesDialog *_props);
- virtual ~PlpOwnerPage();
-
- virtual void applyChanges();
-
- static bool supports(KFileItemList _items);
-
- private:
- class PlpOwnerPagePrivate;
- PlpOwnerPagePrivate *d;
+class PlpOwnerPage : public QObject {
+ Q_OBJECT
+
+public:
+ /**
+ * Constructor
+ */
+ PlpOwnerPage(KPropertiesDialog *_props);
+ virtual ~PlpOwnerPage();
+
+ static bool supports(KFileItemList _items);
+
+private slots:
+void slotSpecialFinished(KIO::Job *job);
+
+private:
+ class PlpOwnerPagePrivate;
+ PlpOwnerPagePrivate *d;
};
#endif
+
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * End:
+ */