aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/utils/crumblepath.h
diff options
context:
space:
mode:
authorLasse Holmstedt <lasse.holmstedt@nokia.com>2010-07-30 16:09:17 +0200
committerLasse Holmstedt <lasse.holmstedt@nokia.com>2010-07-30 16:09:29 +0200
commit8918cff941a9a75d2444e9803ac9b16ef3630b65 (patch)
tree94c232756e99dc2762e29e66ce4a9b7b8ae0b8c2 /src/libs/utils/crumblepath.h
parentf4b1c441aae6ba1d433c29229dac6eda2ff60b76 (diff)
Moved CrumblePath to Utils
This widget has little to do with the QML debugging library, and will be reused inside the QML JS Inspector UI as well.
Diffstat (limited to 'src/libs/utils/crumblepath.h')
-rw-r--r--src/libs/utils/crumblepath.h76
1 files changed, 76 insertions, 0 deletions
diff --git a/src/libs/utils/crumblepath.h b/src/libs/utils/crumblepath.h
new file mode 100644
index 00000000000..5a78a96e999
--- /dev/null
+++ b/src/libs/utils/crumblepath.h
@@ -0,0 +1,76 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
+#ifndef CRUMBLEPATH_H
+#define CRUMBLEPATH_H
+
+#include <QWidget>
+#include <QList>
+#include "utils_global.h"
+
+QT_FORWARD_DECLARE_CLASS(QResizeEvent);
+
+namespace Utils {
+
+class CrumblePathButton;
+
+class QTCREATOR_UTILS_EXPORT CrumblePath : public QWidget
+{
+ Q_OBJECT
+public:
+ explicit CrumblePath(QWidget *parent = 0);
+ ~CrumblePath();
+
+public slots:
+ void pushElement(const QString &title);
+ void popElement();
+ void clear();
+
+signals:
+ void elementClicked(int index);
+ void elementContextMenuRequested(int index);
+
+protected:
+ void resizeEvent(QResizeEvent *);
+
+private slots:
+ void mapClickToIndex();
+ void mapContextMenuRequestToIndex();
+
+private:
+ void resizeButtons();
+
+private:
+ QList<CrumblePathButton*> m_buttons;
+ QWidget *m_background;
+};
+
+} // namespace QmlViewer
+
+#endif // CRUMBLEPATH_H