summaryrefslogtreecommitdiffstats
path: root/src/newui/ddockwindow.h
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-08 00:35:14 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-08 00:35:14 -0600
commitb5f8b47f97a92b7e9624e7de8c35ae232f56035b (patch)
tree7a5b1836b58e7979cf02652a6949df31fd94dd02 /src/newui/ddockwindow.h
parentdb971c3ef3fc9a8e376d6e0d44b27504dad5c85a (diff)
downloadtdevelop-b5f8b47f97a92b7e9624e7de8c35ae232f56035b.tar.gz
tdevelop-b5f8b47f97a92b7e9624e7de8c35ae232f56035b.zip
Fix accidental conversion of dockwin (part 2 of 2)
Diffstat (limited to 'src/newui/ddockwindow.h')
-rw-r--r--src/newui/ddockwindow.h115
1 files changed, 115 insertions, 0 deletions
diff --git a/src/newui/ddockwindow.h b/src/newui/ddockwindow.h
new file mode 100644
index 00000000..d98aa375
--- /dev/null
+++ b/src/newui/ddockwindow.h
@@ -0,0 +1,115 @@
+/***************************************************************************
+ * Copyright (C) 2005 by Alexander Dymo *
+ * adymo@kdevelop.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU Library 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 Library General Public *
+ * License along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+#ifndef DDOCKWINDOW_H
+#define DDOCKWINDOW_H
+
+#include <tqdockwindow.h>
+#include <tqvaluelist.h>
+
+class TQBoxLayout;
+class TQToolButton;
+class TQWidgetStack;
+class TQPopupMenu;
+
+class KComboBox;
+class KAction;
+
+class DMainWindow;
+
+namespace Ideal {
+ class Button;
+ class ButtonBar;
+}
+
+class DDockWindow : public TQDockWindow {
+ Q_OBJECT
+ TQ_OBJECT
+public:
+ enum Position { Bottom, Left, Right };
+
+ DDockWindow(DMainWindow *parent, Position position);
+ virtual ~DDockWindow();
+
+ virtual void setVisible(bool v);
+ bool visible() const { return m_visible; }
+ Position position() const { return m_position; }
+
+ virtual void addWidget(const TQString &title, TQWidget *widget, bool skipActivation = false);
+ virtual void raiseWidget(TQWidget *widget);
+ virtual void lowerWidget(TQWidget *widget);
+ /**Removes the widget from dock. Does not delete it.*/
+ virtual void removeWidget(TQWidget *widget);
+
+ virtual void hideWidget(TQWidget *widget);
+ virtual void showWidget(TQWidget *widget);
+
+ virtual TQWidget *currentWidget() const;
+
+ virtual void setMovingEnabled(bool b);
+
+ virtual void saveSettings();
+
+ DMainWindow *mainWindow() const { return m_mainWindow; }
+
+ virtual void selectLastWidget();
+ virtual void selectNextWidget();
+ virtual void selectPrevWidget();
+
+ bool isActive();
+
+signals:
+ void hidden();
+
+private slots:
+ void selectWidget();
+ void selectWidget(Ideal::Button *button);
+ void contextMenu(TQPopupMenu*);
+ void moveToDockLeft();
+ void moveToDockRight();
+ void moveToDockBottom();
+ void moveToDock(DDockWindow::Position);
+
+protected:
+ virtual void loadSettings();
+
+ Ideal::ButtonBar *m_bar;
+ TQWidgetStack *m_widgetStack;
+
+ TQMap<Ideal::Button*, TQWidget*> m_widgets;
+ TQMap<TQWidget*, Ideal::Button*> m_buttons;
+
+private:
+ Position m_position;
+ bool m_visible;
+ TQString m_name;
+ DMainWindow *m_mainWindow;
+ bool m_doNotCloseActiveWidget;
+
+ Ideal::Button *m_toggledButton;
+ Ideal::Button *m_lastContextMenuButton;
+ TQBoxLayout *m_internalLayout;
+
+
+ KAction * m_moveToDockLeft;
+ KAction * m_moveToDockRight;
+ KAction * m_moveToDockBottom;
+};
+
+#endif