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; mInternalLibElements << newTool;
} }
} }
void UBLibraryController::createNewFolder(QString name, UBLibElement *parentElem) void UBLibraryController::createNewFolder(QString name, UBLibElement *parentElem)

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

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

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

@ -508,7 +508,7 @@ void UBGraphicsProtractor::paintAngleMarker(QPainter *painter)
if (angle != 0) 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(); QFont font2 = painter->font();
font2.setBold(true); font2.setBold(true);
QFontMetricsF fm2(font2); QFontMetricsF fm2(font2);

Loading…
Cancel
Save