protractor symbol fixed

preferencesAboutTextFull
Ivan Ilin 13 years ago
parent f2ebb62596
commit 7ca82a1e15
  1. 1
      src/board/UBLibraryController.cpp
  2. 30
      src/domain/UBGraphicsAudioItemDelegate.cpp
  3. 37
      src/domain/UBGraphicsVideoItemDelegate.cpp
  4. 1
      src/frameworks/UBPlatformUtils_linux.cpp
  5. 2
      src/tools/UBGraphicsProtractor.cpp

@ -91,7 +91,6 @@ void UBLibraryController::createInternalWidgetItems()
mInternalLibElements << newTool;
}
}
void UBLibraryController::createNewFolder(QString name, UBLibElement *parentElem)

@ -66,39 +66,27 @@ void UBGraphicsAudioItemDelegate::togglePlayPause()
{
Phonon::MediaObject* media = mDelegated->mediaObject();
if ( media->state() == Phonon::StoppedState )
{
if ( media->state() == Phonon::StoppedState ) {
media->play();
}
else if ( media->state() == Phonon::PlayingState )
{
if ( media->remainingTime() <= 0 )
{
} else if ( media->state() == Phonon::PlayingState ) {
if ( media->remainingTime() <= 0 ) {
media->stop();
media->play();
}
else
{
} else {
media->pause();
if ( mDelegated->scene() )
mDelegated->scene()->setModified ( true );
}
}
else if ( media->state() == Phonon::PausedState )
{
if ( media->remainingTime() <= 0 )
{
} else if ( media->state() == Phonon::PausedState ) {
if ( media->remainingTime() <= 0 ) {
media->stop();
}
media->play();
}
else if ( media->state() == Phonon::LoadingState ){
} else if ( media->state() == Phonon::LoadingState ) {
mDelegated->mediaObject()->setCurrentSource(mDelegated->mediaFileUrl());
media->play();
}
else{
qDebug() << "Media state "<< media->state() << " not supported";
} else if (media->state() == Phonon::ErrorState){
qDebug() << "Error appeared." << media->errorString();
}
}
}

@ -145,48 +145,34 @@ UBGraphicsVideoItem* UBGraphicsVideoItemDelegate::delegated()
void UBGraphicsVideoItemDelegate::togglePlayPause()
{
if (delegated() && delegated()->mediaObject())
{
Phonon::MediaObject* media = delegated()->mediaObject();
if (delegated() && delegated()->mediaObject()) {
if (media->state() == Phonon::StoppedState)
{
Phonon::MediaObject* media = delegated()->mediaObject();
if (media->state() == Phonon::StoppedState) {
media->play();
}
else if (media->state() == Phonon::PlayingState)
{
if (media->remainingTime() <= 0)
{
} else if (media->state() == Phonon::PlayingState) {
if (media->remainingTime() <= 0) {
media->stop();
media->play();
}
else
{
} else {
media->pause();
if(delegated()->scene())
delegated()->scene()->setModified(true);
}
}
else if (media->state() == Phonon::PausedState)
{
if (media->remainingTime() <= 0)
{
} else if (media->state() == Phonon::PausedState) {
if (media->remainingTime() <= 0) {
media->stop();
}
media->play();
}
else if ( media->state() == Phonon::LoadingState ){
} else if ( media->state() == Phonon::LoadingState ) {
delegated()->mediaObject()->setCurrentSource(delegated()->mediaFileUrl());
media->play();
}
else{
qDebug() << "Media state "<< media->state() << " not supported";
} else if (media->state() == Phonon::ErrorState){
qDebug() << "Error appeared." << media->errorString();
}
}
}
void UBGraphicsVideoItemDelegate::mediaStateChanged ( Phonon::State newstate, Phonon::State oldstate )
{
Q_UNUSED(newstate);
@ -338,7 +324,6 @@ void DelegateVideoControl::seekToMousePos(QPointF mousePos)
}
}
void DelegateVideoControl::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
mDisplayCurrentTime = false;

@ -26,7 +26,6 @@ void UBPlatformUtils::init()
initializeKeyboardLayouts();
}
QString UBPlatformUtils::applicationResourcesDirectory()
{
return QApplication::applicationDirPath();

@ -508,7 +508,7 @@ void UBGraphicsProtractor::paintAngleMarker(QPainter *painter)
if (angle != 0)
{
QString ang = QString("%1?°").arg(angle,0, 'f', 1);
QString ang = QString("%1°").arg(angle,0, 'f', 1);
QFont font2 = painter->font();
font2.setBold(true);
QFontMetricsF fm2(font2);

Loading…
Cancel
Save