removed UBDesktopToolPalette

preferencesAboutTextFull
Claudio Valerio 13 years ago
parent b264964c4e
commit 5ae6e6b65e
  1. 23
      src/desktop/UBDesktopAnnotationController.cpp
  2. 3
      src/desktop/UBDesktopAnnotationController.h
  3. 2
      src/desktop/UBDesktopPalette.cpp
  4. 85
      src/desktop/UBDesktopToolsPalette.cpp
  5. 29
      src/desktop/UBDesktopToolsPalette.h
  6. 2
      src/desktop/desktop.pri

@ -37,7 +37,6 @@
#include "UBCustomCaptureWindow.h" #include "UBCustomCaptureWindow.h"
#include "UBWindowCapture.h" #include "UBWindowCapture.h"
#include "UBDesktopPalette.h" #include "UBDesktopPalette.h"
#include "UBDesktopToolsPalette.h"
#include "UBDesktopPenPalette.h" #include "UBDesktopPenPalette.h"
#include "UBDesktopMarkerPalette.h" #include "UBDesktopMarkerPalette.h"
#include "UBDesktopEraserPalette.h" #include "UBDesktopEraserPalette.h"
@ -52,7 +51,6 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
, mTransparentDrawingScene(0) , mTransparentDrawingScene(0)
, mDesktopPalette(NULL) , mDesktopPalette(NULL)
, mKeyboardPalette(0) , mKeyboardPalette(0)
, mDesktopToolsPalette(NULL)
, mDesktopPenPalette(NULL) , mDesktopPenPalette(NULL)
, mDesktopMarkerPalette(NULL) , mDesktopMarkerPalette(NULL)
, mDesktopEraserPalette(NULL) , mDesktopEraserPalette(NULL)
@ -124,7 +122,6 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
, this, SLOT(stylusToolChanged(int))); , this, SLOT(stylusToolChanged(int)));
// Add the desktop associated palettes // Add the desktop associated palettes
mDesktopToolsPalette = new UBDesktopToolsPalette(mTransparentDrawingView);
mDesktopPenPalette = new UBDesktopPenPalette(mTransparentDrawingView); mDesktopPenPalette = new UBDesktopPenPalette(mTransparentDrawingView);
connect(mDesktopPalette, SIGNAL(maximized()), mDesktopPenPalette, SLOT(onParentMaximized())); connect(mDesktopPalette, SIGNAL(maximized()), mDesktopPenPalette, SLOT(onParentMaximized()));
@ -134,12 +131,10 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
mDesktopEraserPalette = new UBDesktopEraserPalette(mTransparentDrawingView); mDesktopEraserPalette = new UBDesktopEraserPalette(mTransparentDrawingView);
mDesktopPalette->setBackgroundBrush(UBSettings::settings()->opaquePaletteColor); mDesktopPalette->setBackgroundBrush(UBSettings::settings()->opaquePaletteColor);
mDesktopToolsPalette->setBackgroundBrush(UBSettings::settings()->opaquePaletteColor);
mDesktopPenPalette->setBackgroundBrush(UBSettings::settings()->opaquePaletteColor); mDesktopPenPalette->setBackgroundBrush(UBSettings::settings()->opaquePaletteColor);
mDesktopMarkerPalette->setBackgroundBrush(UBSettings::settings()->opaquePaletteColor); mDesktopMarkerPalette->setBackgroundBrush(UBSettings::settings()->opaquePaletteColor);
mDesktopEraserPalette->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 // 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 // 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); mDesktopMarkerPalette->setVisible(false);
mDesktopEraserPalette->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(UBApplication::mainWindow->actionEraseDesktopAnnotations, SIGNAL(triggered()), this, SLOT(eraseDesktopAnnotations()));
connect(&mHoldTimerPen, SIGNAL(timeout()), this, SLOT(penActionReleased())); connect(&mHoldTimerPen, SIGNAL(timeout()), this, SLOT(penActionReleased()));
@ -226,23 +220,6 @@ UBDesktopPalette* UBDesktopAnnotationController::desktopPalette()
return mDesktopPalette; 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 * \brief Toggle the visibility of the pen associated palette
* @param checked as the visibility state * @param checked as the visibility state

@ -23,7 +23,6 @@
#include "gui/UBRightPalette.h" #include "gui/UBRightPalette.h"
class UBDesktopPalette; class UBDesktopPalette;
class UBDesktopToolsPalette;
class UBBoardView; class UBBoardView;
class UBGraphicsScene; class UBGraphicsScene;
class UBDesktopPenPalette; class UBDesktopPenPalette;
@ -89,7 +88,6 @@ class UBDesktopAnnotationController : public QObject
UBGraphicsScene* mTransparentDrawingScene; UBGraphicsScene* mTransparentDrawingScene;
private slots: private slots:
void desktopToolsActionToogled(bool);
void desktopPenActionToggled(bool checked); void desktopPenActionToggled(bool checked);
void desktopMarkerActionToggled(bool checked); void desktopMarkerActionToggled(bool checked);
void desktopEraserActionToggled(bool checked); void desktopEraserActionToggled(bool checked);
@ -112,7 +110,6 @@ class UBDesktopAnnotationController : public QObject
UBDesktopPalette *mDesktopPalette; UBDesktopPalette *mDesktopPalette;
UBKeyboardPalette *mKeyboardPalette; UBKeyboardPalette *mKeyboardPalette;
UBDesktopToolsPalette *mDesktopToolsPalette;
UBDesktopPenPalette* mDesktopPenPalette; UBDesktopPenPalette* mDesktopPenPalette;
UBDesktopMarkerPalette* mDesktopMarkerPalette; UBDesktopMarkerPalette* mDesktopMarkerPalette;
UBDesktopEraserPalette* mDesktopEraserPalette; UBDesktopEraserPalette* mDesktopEraserPalette;

@ -159,8 +159,6 @@ void UBDesktopPalette::maximizeMe()
actions << mDisplaySelectAction; actions << mDisplaySelectAction;
actions << mShowHideAction; actions << mShowHideAction;
//actions << UBApplication::mainWindow->actionDesktopTools;
setActions(actions); setActions(actions);
QSize newSize = preferredSize(); QSize newSize = preferredSize();

@ -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 <http://www.gnu.org/licenses/>.
*/
#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<QAction *> 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<QAction *> 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<QAction *> 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);
}

@ -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 <http://www.gnu.org/licenses/>.
*/
#ifndef UBDESKTOPTOOLSPALETTE_H
#define UBDESKTOPTOOLSPALETTE_H
#include <QtGui>
#include "gui/UBActionPalette.h"
class UBDesktopToolsPalette : public UBActionPalette
{
public:
UBDesktopToolsPalette(QWidget *parent = 0);
virtual ~UBDesktopToolsPalette(){}
};
#endif // UBDESKTOPTOOLSPALETTE_H

@ -2,7 +2,6 @@ HEADERS += src/desktop/UBDesktopPalette.h \
src/desktop/UBDesktopAnnotationController.h \ src/desktop/UBDesktopAnnotationController.h \
src/desktop/UBCustomCaptureWindow.h \ src/desktop/UBCustomCaptureWindow.h \
src/desktop/UBWindowCapture.h \ src/desktop/UBWindowCapture.h \
src/desktop/UBDesktopToolsPalette.h \
src/desktop/UBDesktopPenPalette.h \ src/desktop/UBDesktopPenPalette.h \
src/desktop/UBDesktopMarkerPalette.h \ src/desktop/UBDesktopMarkerPalette.h \
src/desktop/UBDesktopEraserPalette.h src/desktop/UBDesktopEraserPalette.h
@ -10,7 +9,6 @@ HEADERS += src/desktop/UBDesktopPalette.h \
SOURCES += src/desktop/UBDesktopPalette.cpp \ SOURCES += src/desktop/UBDesktopPalette.cpp \
src/desktop/UBDesktopAnnotationController.cpp \ src/desktop/UBDesktopAnnotationController.cpp \
src/desktop/UBCustomCaptureWindow.cpp \ src/desktop/UBCustomCaptureWindow.cpp \
src/desktop/UBDesktopToolsPalette.cpp \
src/desktop/UBDesktopPenPalette.cpp \ src/desktop/UBDesktopPenPalette.cpp \
src/desktop/UBDesktopMarkerPalette.cpp \ src/desktop/UBDesktopMarkerPalette.cpp \
src/desktop/UBDesktopEraserPalette.cpp src/desktop/UBDesktopEraserPalette.cpp

Loading…
Cancel
Save