]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/admin/workerintegration.h
GIT_SILENT Sync po/docbooks with svn
[dolphin.git] / src / admin / workerintegration.h
index 51230374460677531680330bcb4bf1d8a37197dd..19cc5c17272a4a2d10cb7388504e3f7d3e04e205 100644 (file)
@@ -22,6 +22,15 @@ class QUrl;
  */
 namespace Admin
 {
+/**
+ * When a user starts Dolphin with arguments that imply that they want to use administrative rights, this method is called.
+ * This function acts like a command line program that guides users towards installing kio-admin. It will not return until this is accomplished.
+ * This function will do nothing if kio-admin is already installed.
+ */
+void guideUserTowardsInstallingAdminWorker();
+
+void guideUserTowardsUsingAdminWorker();
+
 /**
  * Used with the KMessageBox API so users can disable the warning.
  * @see KMessageBox::saveDontShowAgainContinue()
@@ -48,11 +57,6 @@ public:
      */
     static void createActAsAdminAction(KActionCollection *actionCollection, DolphinMainWindow *dolphinMainWindow);
 
-    /**
-     * Triggers the m_actAsAdminAction only if it is currently checked.
-     */
-    static void exitAdminMode();
-
 private:
     WorkerIntegration(DolphinMainWindow *parent, QAction *actAsAdminAction);
 
@@ -65,9 +69,14 @@ private:
     /** Updates the toggled/checked state of the action depending on the state of the currently active view. */
     static void updateActAsAdminAction();
 
+    /** Used by the friend class Bar to show the m_actAsAdminAction to users. */
+    static QAction *actAsAdminAction();
+
 private:
     /** @see createActAsAdminAction() */
     QAction *const m_actAsAdminAction = nullptr;
+
+    friend class Bar; // Allows the bar to access the actAsAdminAction, so users can use the bar to change who they are acting as.
 };
 
 }