Author: dmacvicar
Date: Wed Apr 25 17:08:26 2007
New Revision: 5445
URL: http://svn.opensuse.org/viewcvs/zypp?rev=5445&view=rev
Log:
fix indentation
Modified:
branches/work/updater-kde-refactoring/updater-kde/updater/Updater.h
Modified: branches/work/updater-kde-refactoring/updater-kde/updater/Updater.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/work/updater-kde-refactoring/updater-kde/updater/Updater.h?rev=5445&r1=5444&r2=5445&view=diff
==============================================================================
--- branches/work/updater-kde-refactoring/updater-kde/updater/Updater.h (original)
+++ branches/work/updater-kde-refactoring/updater-kde/updater/Updater.h Wed Apr 25 17:08:26 2007
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (C) 2006 Narayan Newton
This program is free software; you can redistribute it and/or
@@ -22,14 +22,14 @@
#include
#include
-
+#include
#include "Constants.h"
#include "UpdaterCapabilities.h"
/**
@file
- This is the base class for all updater backends.
+ This is the base class for all updater backends.
If a backend class conforms to this, it will work
@author Narayan Newton
@@ -37,140 +37,142 @@
**/
/**
- Constants that define the various states our applet can be in.
+ Constants that define the various states our applet can be in.
Currently APPLET_CHECKING is a useless constant.
**/
enum {
- APPLET_NO_UPDATES, /** No updates **/
- APPLET_UPDATES, /** Updates available **/
- APPLET_CRITICAL_UPDATES, /** Updates available (security) **/
- APPLET_CHECKING, /** Checking for updates **/
- APPLET_PROBLEM /** problem **/
+ APPLET_NO_UPDATES, /** No updates **/
+ APPLET_UPDATES, /** Updates available **/
+ APPLET_CRITICAL_UPDATES, /** Updates available (security) **/
+ APPLET_CHECKING, /** Checking for updates **/
+ APPLET_PROBLEM /** problem **/
};
/**
Parent class for all updater backends
*/
-class Updater : public QObject
+class KDE_EXPORT Updater : public QObject
{
- Q_OBJECT
- public:
+ Q_OBJECT
+public:
- Updater( QObject *parent, const char* name=0 ) : QObject( parent, name ) {}
- virtual ~Updater() {};
- /**
- Used by GUI to retrieve updater capabilities
- **/
- virtual UpdaterCapabilities capabilities() = 0;
-
- /**
- * this is called when the updater is going to quit so the
- * backend can do cleanup
- */
- virtual void shutdown() = 0;
- signals:
- /** This is a signal sent to the MainWindow class.
- It tells the applet whether the backend is ready
- to install updates at user request or not.
- The applet can disable or enable buttons and
- gui elements.
- @param allowed whether it is allowed or not
- **/
- void installAllowed(bool allowd);
-
- /** This is a signal sent to the MainWindow class.
- It updates the applet to the specified state.
- @param state this is the state the updater applet
- @param n number of updates
- will be refreshed to reflect
- **/
- void updateApplet(int state, int n);
-
- /** This is a signal sent to the MainWindow class.
- It updates the applet to the specified state.
- @param state this is the state the updater applet
+ Updater( QObject *parent, const char* name=0 ) : QObject( parent, name )
+ {}
+ virtual ~Updater()
+ {};
+ /**
+ Used by GUI to retrieve updater capabilities
+ **/
+ virtual UpdaterCapabilities capabilities() = 0;
+
+ /**
+ * this is called when the updater is going to quit so the
+ * backend can do cleanup
+ */
+ virtual void shutdown() = 0;
+signals:
+ /** This is a signal sent to the MainWindow class.
+ It tells the applet whether the backend is ready
+ to install updates at user request or not.
+ The applet can disable or enable buttons and
+ gui elements.
+ @param allowed whether it is allowed or not
+ **/
+ void installAllowed(bool allowd);
+
+ /** This is a signal sent to the MainWindow class.
+ It updates the applet to the specified state.
+ @param state this is the state the updater applet
@param n number of updates
- will be refreshed to reflect
- **/
- void updateAppletError( const QString &desc );
-
- /**
- Send this signal to force an update list refresh.
- You should do this after an installation or after
- a service is added to the updater
- **/
- void refreshList();
-
- /**
- Send this signal to disable the two selection buttons
- on the GUI. You do this if you are not going to load
- the list with UpdateListItems. If you don't disable
- these buttons, we assume you are using UpdateListItems.
- **/
- void disableSelectButtons();
-
- /**
- Fire this signal to deliver the description of the
- currently selected update back to the main window.
-
- @param desc the description text which will be displayed
- in the Main Window
- **/
- void returnDescription(QString desc);
-
- /**
- Fire this signal to inform the MainWindow that the
- updates are all added to the list. This can be sent
- multiple times, it just causes the MainWindow to
- handle the new updates
- **/
- void populateDone();
-
- protected slots:
-
- /**
- When signaled, this slot should run whatever configuration
- utility this updater uses. However, this is marked as
- Add/Remove Servers in the GUI, so it should at least be
- able to do that.
- **/
- virtual void configureUpdater() = 0;
-
- /**
- When signaled, this slot should run the installation routine
- for the updater. It is important to note that you get the
- package list from the QListView you will _ALWAYS_ be given
- in the "populateUpdateList" slot. This pointer should
- be saved for later use in this slot (so you can fetch
- the package list).
- **/
- virtual void startInstall() = 0;
-
- /**
- When signaled, this slot should fetch a list of current
- updates available and add them to the listview specified.
-
- @param updateList the QListView we will be loading with updates.
- **/
- virtual void populateUpdateList(QListView* updateList) = 0;
-
- /**
- This slot is signaled when an update is selected and
- we need to put together a description for it.
-
- @param selectedItem the currently selected update.
- **/
- virtual void updateSelected(QListViewItem* selectedItem) = 0;
-
- /**
- This slot is signaled when an update is right clicked.
- What menu comes up is entirely the decision of the backend,
- but it is expected that this will control holding packages.
-
- @param item the QListViewItem currently selected.
- @param point where to show the menu.
- **/
- virtual void updateMenu(QListViewItem *item, const QPoint &point) = 0;
+ will be refreshed to reflect
+ **/
+ void updateApplet(int state, int n);
+
+ /** This is a signal sent to the MainWindow class.
+ It updates the applet to the specified state.
+ @param state this is the state the updater applet
+ @param n number of updates
+ will be refreshed to reflect
+ **/
+ void updateAppletError( const QString &desc );
+
+ /**
+ Send this signal to force an update list refresh.
+ You should do this after an installation or after
+ a service is added to the updater
+ **/
+ void refreshList();
+
+ /**
+ Send this signal to disable the two selection buttons
+ on the GUI. You do this if you are not going to load
+ the list with UpdateListItems. If you don't disable
+ these buttons, we assume you are using UpdateListItems.
+ **/
+ void disableSelectButtons();
+
+ /**
+ Fire this signal to deliver the description of the
+ currently selected update back to the main window.
+
+ @param desc the description text which will be displayed
+ in the Main Window
+ **/
+ void returnDescription(QString desc);
+
+ /**
+ Fire this signal to inform the MainWindow that the
+ updates are all added to the list. This can be sent
+ multiple times, it just causes the MainWindow to
+ handle the new updates
+ **/
+ void populateDone();
+
+protected slots:
+
+ /**
+ When signaled, this slot should run whatever configuration
+ utility this updater uses. However, this is marked as
+ Add/Remove Servers in the GUI, so it should at least be
+ able to do that.
+ **/
+ virtual void configureUpdater() = 0;
+
+ /**
+ When signaled, this slot should run the installation routine
+ for the updater. It is important to note that you get the
+ package list from the QListView you will _ALWAYS_ be given
+ in the "populateUpdateList" slot. This pointer should
+ be saved for later use in this slot (so you can fetch
+ the package list).
+ **/
+ virtual void startInstall() = 0;
+
+ /**
+ When signaled, this slot should fetch a list of current
+ updates available and add them to the listview specified.
+
+ @param updateList the QListView we will be loading with updates.
+ **/
+ virtual void populateUpdateList(QListView* updateList) = 0;
+
+ /**
+ This slot is signaled when an update is selected and
+ we need to put together a description for it.
+
+ @param selectedItem the currently selected update.
+ **/
+ virtual void updateSelected(QListViewItem* selectedItem) = 0;
+
+ /**
+ This slot is signaled when an update is right clicked.
+ What menu comes up is entirely the decision of the backend,
+ but it is expected that this will control holding packages.
+
+ @param item the QListViewItem currently selected.
+ @param point where to show the menu.
+ **/
+ virtual void updateMenu(QListViewItem *item, const QPoint &point) = 0;
};
#endif
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org