Changeset View
Changeset View
Standalone View
Standalone View
libs/widgets/KoModeBoxDocker.cpp
Show All 14 Lines | |||||
15 | * | 15 | * | ||
16 | * You should have received a copy of the GNU Library General Public License | 16 | * You should have received a copy of the GNU Library General Public License | ||
17 | * along with this library; see the file COPYING.LIB. If not, write to | 17 | * along with this library; see the file COPYING.LIB. If not, write to | ||
18 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 18 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
19 | * Boston, MA 02110-1301, USA. | 19 | * Boston, MA 02110-1301, USA. | ||
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | #include "KoModeBoxDocker_p.h" | 22 | #include "KoModeBoxDocker_p.h" | ||
23 | #include "KoModeBox_p.h" | 23 | #include "KoModeBox.h" | ||
24 | #include <KoCanvasController.h> | 24 | #include <KoCanvasController.h> | ||
25 | 25 | | |||
26 | #include <WidgetsDebug.h> | 26 | #include <WidgetsDebug.h> | ||
27 | 27 | | |||
28 | 28 | | |||
29 | KoModeBoxDocker::KoModeBoxDocker(KoModeBox *modeBox) | 29 | KoModeBoxDocker::KoModeBoxDocker(KoModeBox *modeBox) | ||
30 | : m_modeBox(modeBox) | 30 | : m_modeBox(modeBox) | ||
31 | { | 31 | { | ||
32 | setWidget(modeBox); | 32 | setWidget(modeBox); | ||
33 | setFeatures(QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable); | 33 | setFeatures(QDockWidget::NoDockWidgetFeatures); | ||
34 | setWindowTitle(""); | 34 | setWindowTitle(""); | ||
35 | setObjectName("ModeBox"); | 35 | setObjectName("ModeBox"); | ||
36 | 36 | | |||
37 | connect(this, SIGNAL(dockLocationChanged(Qt::DockWidgetArea)), this, SLOT(locationChanged(Qt::DockWidgetArea))); | 37 | connect(this, &KoModeBoxDocker::dockLocationChanged, this, &KoModeBoxDocker::locationChanged); | ||
38 | } | 38 | } | ||
39 | 39 | | |||
40 | void KoModeBoxDocker::setCanvas(KoCanvasBase *canvas) | 40 | void KoModeBoxDocker::setCanvas(KoCanvasBase *canvas) | ||
41 | { | 41 | { | ||
42 | setEnabled(canvas != nullptr); | 42 | setEnabled(canvas != nullptr); | ||
43 | m_modeBox->setCanvas(canvas); | 43 | m_modeBox->setCanvas(canvas); | ||
44 | } | 44 | } | ||
45 | 45 | | |||
Show All 10 Lines |