diff --git a/src/desktop/UBDesktopAnnotationController.cpp b/src/desktop/UBDesktopAnnotationController.cpp
index cb44c140..d4f95361 100644
--- a/src/desktop/UBDesktopAnnotationController.cpp
+++ b/src/desktop/UBDesktopAnnotationController.cpp
@@ -37,7 +37,6 @@
#include "UBCustomCaptureWindow.h"
#include "UBWindowCapture.h"
#include "UBDesktopPalette.h"
-#include "UBDesktopToolsPalette.h"
#include "UBDesktopPenPalette.h"
#include "UBDesktopMarkerPalette.h"
#include "UBDesktopEraserPalette.h"
@@ -52,7 +51,6 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
, mTransparentDrawingScene(0)
, mDesktopPalette(NULL)
, mKeyboardPalette(0)
- , mDesktopToolsPalette(NULL)
, mDesktopPenPalette(NULL)
, mDesktopMarkerPalette(NULL)
, mDesktopEraserPalette(NULL)
@@ -124,7 +122,6 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
, this, SLOT(stylusToolChanged(int)));
// Add the desktop associated palettes
- mDesktopToolsPalette = new UBDesktopToolsPalette(mTransparentDrawingView);
mDesktopPenPalette = new UBDesktopPenPalette(mTransparentDrawingView);
connect(mDesktopPalette, SIGNAL(maximized()), mDesktopPenPalette, SLOT(onParentMaximized()));
@@ -134,12 +131,10 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
mDesktopEraserPalette = new UBDesktopEraserPalette(mTransparentDrawingView);
mDesktopPalette->setBackgroundBrush(UBSettings::settings()->opaquePaletteColor);
- mDesktopToolsPalette->setBackgroundBrush(UBSettings::settings()->opaquePaletteColor);
mDesktopPenPalette->setBackgroundBrush(UBSettings::settings()->opaquePaletteColor);
mDesktopMarkerPalette->setBackgroundBrush(UBSettings::settings()->opaquePaletteColor);
mDesktopEraserPalette->setBackgroundBrush(UBSettings::settings()->opaquePaletteColor);
- mDesktopToolsPalette->setVisible(UBApplication::mainWindow->actionDesktopTools->isChecked());
// Hack : the size of the property palettes is computed the first time the palette is visible
// In order to prevent palette overlap on if the desktop palette is on the right of the
@@ -151,7 +146,6 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
mDesktopMarkerPalette->setVisible(false);
mDesktopEraserPalette->setVisible(false);
- connect(UBApplication::mainWindow->actionDesktopTools, SIGNAL(triggered(bool)), this, SLOT(desktopToolsActionToogled(bool)));
connect(UBApplication::mainWindow->actionEraseDesktopAnnotations, SIGNAL(triggered()), this, SLOT(eraseDesktopAnnotations()));
connect(&mHoldTimerPen, SIGNAL(timeout()), this, SLOT(penActionReleased()));
@@ -226,23 +220,6 @@ UBDesktopPalette* UBDesktopAnnotationController::desktopPalette()
return mDesktopPalette;
}
-
-void UBDesktopAnnotationController::desktopToolsActionToogled(bool checked)
-{
- if (!mDesktopToolsPalettePositioned)
- {
- QPoint pos = mDesktopPalette->geometry().bottomLeft();
- pos += QPoint(0, 10);
-
- mDesktopToolsPalette->setCustomPosition(true);
- mDesktopToolsPalette->move(pos);
-
- mDesktopToolsPalettePositioned = true;
- }
-
- mDesktopToolsPalette->setVisible(checked);
-}
-
/**
* \brief Toggle the visibility of the pen associated palette
* @param checked as the visibility state
diff --git a/src/desktop/UBDesktopAnnotationController.h b/src/desktop/UBDesktopAnnotationController.h
index f569332a..42043e32 100644
--- a/src/desktop/UBDesktopAnnotationController.h
+++ b/src/desktop/UBDesktopAnnotationController.h
@@ -23,7 +23,6 @@
#include "gui/UBRightPalette.h"
class UBDesktopPalette;
-class UBDesktopToolsPalette;
class UBBoardView;
class UBGraphicsScene;
class UBDesktopPenPalette;
@@ -89,7 +88,6 @@ class UBDesktopAnnotationController : public QObject
UBGraphicsScene* mTransparentDrawingScene;
private slots:
- void desktopToolsActionToogled(bool);
void desktopPenActionToggled(bool checked);
void desktopMarkerActionToggled(bool checked);
void desktopEraserActionToggled(bool checked);
@@ -112,7 +110,6 @@ class UBDesktopAnnotationController : public QObject
UBDesktopPalette *mDesktopPalette;
UBKeyboardPalette *mKeyboardPalette;
- UBDesktopToolsPalette *mDesktopToolsPalette;
UBDesktopPenPalette* mDesktopPenPalette;
UBDesktopMarkerPalette* mDesktopMarkerPalette;
UBDesktopEraserPalette* mDesktopEraserPalette;
diff --git a/src/desktop/UBDesktopPalette.cpp b/src/desktop/UBDesktopPalette.cpp
index 8a054169..ba88e3b4 100644
--- a/src/desktop/UBDesktopPalette.cpp
+++ b/src/desktop/UBDesktopPalette.cpp
@@ -159,8 +159,6 @@ void UBDesktopPalette::maximizeMe()
actions << mDisplaySelectAction;
actions << mShowHideAction;
- //actions << UBApplication::mainWindow->actionDesktopTools;
-
setActions(actions);
QSize newSize = preferredSize();
diff --git a/src/desktop/UBDesktopToolsPalette.cpp b/src/desktop/UBDesktopToolsPalette.cpp
deleted file mode 100644
index ed2ab4d5..00000000
--- a/src/desktop/UBDesktopToolsPalette.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 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 General Public License
- * along with this program. If not, see .
- */
-#include "UBDesktopToolsPalette.h"
-
-#include "core/UBApplication.h"
-#include "core/UBSettings.h"
-
-#include "board/UBBoardController.h"
-#include "board/UBDrawingController.h"
-
-#include "gui/UBMainWindow.h"
-#include "gui/UBToolbarButtonGroup.h"
-
-#include "core/memcheck.h"
-
-UBDesktopToolsPalette::UBDesktopToolsPalette(QWidget *parent)
- : UBActionPalette(Qt::Horizontal, parent)
-{
- // Setup color choice widget
- QList colorActions;
- colorActions.append(UBApplication::mainWindow->actionColor0);
- colorActions.append(UBApplication::mainWindow->actionColor1);
- colorActions.append(UBApplication::mainWindow->actionColor2);
- colorActions.append(UBApplication::mainWindow->actionColor3);
-
- UBToolbarButtonGroup *colorChoice =
- new UBToolbarButtonGroup(UBApplication::mainWindow->boardToolBar, colorActions);
-
- colorChoice->displayText(false);
-
- //connect(colorChoice, SIGNAL(activated(int)), this, SLOT(UBApplication::boardController->setColorIndex(int)));
- connect(UBDrawingController::drawingController(), SIGNAL(colorIndexChanged(int)), colorChoice, SLOT(setCurrentIndex(int)));
- connect(UBDrawingController::drawingController(), SIGNAL(colorPaletteChanged()), colorChoice, SLOT(colorPaletteChanged()));
-
- layout()->addWidget(colorChoice);
-
- // Setup line width choice widget
- QList lineWidthActions;
- lineWidthActions.append(UBApplication::mainWindow->actionLineSmall);
- lineWidthActions.append(UBApplication::mainWindow->actionLineMedium);
- lineWidthActions.append(UBApplication::mainWindow->actionLineLarge);
-
- UBToolbarButtonGroup *lineWidthChoice =
- new UBToolbarButtonGroup(UBApplication::mainWindow->boardToolBar, lineWidthActions);
- lineWidthChoice->displayText(false);
-
- connect(lineWidthChoice, SIGNAL(activated(int))
- , UBDrawingController::drawingController(), SLOT(setLineWidthIndex(int)));
-
- connect(UBDrawingController::drawingController(), SIGNAL(lineWidthIndexChanged(int))
- , lineWidthChoice, SLOT(setCurrentIndex(int)));
-
- layout()->addWidget(lineWidthChoice);
-
- // Setup eraser width choice widget
- QList eraserWidthActions;
- eraserWidthActions.append(UBApplication::mainWindow->actionEraserSmall);
- eraserWidthActions.append(UBApplication::mainWindow->actionEraserMedium);
- eraserWidthActions.append(UBApplication::mainWindow->actionEraserLarge);
-
- UBToolbarButtonGroup *eraserWidthChoice =
- new UBToolbarButtonGroup(UBApplication::mainWindow->boardToolBar, eraserWidthActions);
-
- connect(eraserWidthChoice, SIGNAL(activated(int)), UBDrawingController::drawingController(), SLOT(setEraserWidthIndex(int)));
-
- eraserWidthChoice->displayText(false);
- eraserWidthChoice->setCurrentIndex(UBSettings::settings()->eraserWidthIndex());
-
- layout()->addWidget(eraserWidthChoice);
-
- addAction(UBApplication::mainWindow->actionEraseDesktopAnnotations);
-
-}
diff --git a/src/desktop/UBDesktopToolsPalette.h b/src/desktop/UBDesktopToolsPalette.h
deleted file mode 100644
index f6867f3c..00000000
--- a/src/desktop/UBDesktopToolsPalette.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 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 General Public License
- * along with this program. If not, see .
- */
-#ifndef UBDESKTOPTOOLSPALETTE_H
-#define UBDESKTOPTOOLSPALETTE_H
-
-#include
-
-#include "gui/UBActionPalette.h"
-
-class UBDesktopToolsPalette : public UBActionPalette
-{
- public:
- UBDesktopToolsPalette(QWidget *parent = 0);
- virtual ~UBDesktopToolsPalette(){}
-};
-
-#endif // UBDESKTOPTOOLSPALETTE_H
diff --git a/src/desktop/desktop.pri b/src/desktop/desktop.pri
index eda60eb0..37600cd2 100644
--- a/src/desktop/desktop.pri
+++ b/src/desktop/desktop.pri
@@ -2,7 +2,6 @@ HEADERS += src/desktop/UBDesktopPalette.h \
src/desktop/UBDesktopAnnotationController.h \
src/desktop/UBCustomCaptureWindow.h \
src/desktop/UBWindowCapture.h \
- src/desktop/UBDesktopToolsPalette.h \
src/desktop/UBDesktopPenPalette.h \
src/desktop/UBDesktopMarkerPalette.h \
src/desktop/UBDesktopEraserPalette.h
@@ -10,7 +9,6 @@ HEADERS += src/desktop/UBDesktopPalette.h \
SOURCES += src/desktop/UBDesktopPalette.cpp \
src/desktop/UBDesktopAnnotationController.cpp \
src/desktop/UBCustomCaptureWindow.cpp \
- src/desktop/UBDesktopToolsPalette.cpp \
src/desktop/UBDesktopPenPalette.cpp \
src/desktop/UBDesktopMarkerPalette.cpp \
src/desktop/UBDesktopEraserPalette.cpp