* @short Main window for Dolphin.
*
* Handles the menus, toolbars and Dolphin views.
- *
- * @author Peter Penz <peter.penz@gmx.at>
-*/
+ */
class DolphinMainWindow: public KMainWindow
{
Q_OBJECT
+ Q_CLASSINFO("D-Bus Interface", "org.kde.dolphin.MainWindow")
+ Q_PROPERTY(int id READ getId SCRIPTABLE true)
friend class DolphinApplication;
+
public:
virtual ~DolphinMainWindow();
*/
KNewMenu* newMenu() const { return m_newMenu; }
+public slots:
+ /**
+ * Returns the main windows ID, mainly used throught DBus.
+ */
+ int getId() const { return m_id; }
+
+ /**
+ * Changes the URL of the current active DolphinView to \a url.
+ */
+ void changeUrl(const QString& url);
+
+ /** Stores all settings and quits Dolphin. */
+ void quit();
+
signals:
/**
* Is send if the active view has been changed in
*/
void properties();
- /** Stores all settings and quits Dolphin. */
- void quit();
-
/**
* Shows the error information of the job \a job
* in the status bar.
void openNewMainWindow();
private:
- DolphinMainWindow();
+ DolphinMainWindow(int id);
void init();
void loadSettings();
KNewMenu* m_newMenu;
QSplitter* m_splitter;
DolphinView* m_activeView;
+ int m_id;
DolphinView* m_view[SecondaryIdx + 1];