[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-kimageshop
Subject: Strange error
From: Michael Thaler <michael.thaler () physik ! tu-muenchen ! de>
Date: 2005-10-18 11:54:00
Message-ID: 200510181354.00199.michael.thaler () physik ! tu-muenchen ! de
[Download RAW message or body]
Hello,
I am trying to refactor the crop tool and I got stuck because of a strange
error. I have defined an enumeration handleType in kis_crop_selection.h. Here
is the relevant part of kis_crop_selection.h:
#ifndef KIS_CROP_SELECTION_H_
#define KIS_CROP_SELECTION_H_
#include <qregion.h>
#include <qrect.h>
enum handleType
{
None = 0,
Left = 1,
TopLeft = 2,
Top = 3,
TopRight = 4,
Right = 5,
BottomRight = 6,
Bottom = 7,
BottomLeft = 8,
InsideSelection = 9
};
class QPainter;
class KisCanvasSubject;
class KisCropSelection : public QRect
{
...
}
I included this file in kis_tool_crop.h
and did the following
void KisToolCrop::setCursorType (handleType handle)
{
switch (handle)
{
case (Left):
m_subject->canvasController()->setCanvasCursor(KisCursor::sizeHorCursor());
return;
case (TopLeft):
//case (BottomRight):
m_subject->canvasController()->setCanvasCursor(KisCursor::sizeFDiagCursor());
return;
//case (BottomLeft):
//case (TopRight):
m_subject->canvasController()->setCanvasCursor(KisCursor::sizeBDiagCursor());
return;
case (Top):
case (Bottom):
m_subject->canvasController()->setCanvasCursor(KisCursor::sizeVerCursor());
return;
case (Left):
case (Right):
m_subject->canvasController()->setCanvasCursor(KisCursor::sizeHorCursor());
return;
case (InsideSelection):
m_subject->canvasController()->setCanvasCursor(KisCursor::sizeAllCursor());
return;
}
m_subject->canvasController()->setCanvasCursor(KisCursor::selectCursor());
return;
}
in kis_tool_crop.cc. When I try to compile it I get the following error
message:
kis_tool_crop.cc: In member function `void
KisToolCrop::setCursorType(handleType)':
kis_tool_crop.cc:567: error: duplicate case value
kis_tool_crop.cc:560: error: previously used here
kis_tool_crop.cc:571: error: duplicate case value
kis_tool_crop.cc:564: error: previously used here
kis_tool_crop.cc:578: warning: enumeration value `TopRight' not handled in
switch
kis_tool_crop.cc:578: warning: enumeration value `BottomRight' not handled in
switch
kis_tool_crop.cc:578: warning: enumeration value `BottomLeft' not handled in
switch
make: *** [kis_tool_crop.lo] Error 1
Line 567: case (Top):
Line 559: case (BottomRight):
Line 571: case (Left):
Line 564: case (TopRight):
I don't understand this. Does somebody know what is going wrong here?
Greetings,
Michael
_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic