Commit 7ca82a1e authored by Ivan Ilin's avatar Ivan Ilin

protractor symbol fixed

parent f2ebb625
...@@ -91,7 +91,6 @@ void UBLibraryController::createInternalWidgetItems() ...@@ -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() ...@@ -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() ...@@ -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) ...@@ -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() ...@@ -26,7 +26,6 @@ void UBPlatformUtils::init()
initializeKeyboardLayouts(); initializeKeyboardLayouts();
} }
QString UBPlatformUtils::applicationResourcesDirectory() QString UBPlatformUtils::applicationResourcesDirectory()
{ {
return QApplication::applicationDirPath(); return QApplication::applicationDirPath();
......
...@@ -86,7 +86,7 @@ UBKeyboardPalette* UBKeyboardPalette::create(QWidget *parent) ...@@ -86,7 +86,7 @@ UBKeyboardPalette* UBKeyboardPalette::create(QWidget *parent)
instance->move(firstKeyboard->m_pos); instance->move(firstKeyboard->m_pos);
connect(UBSettings::settings()->boardKeyboardPaletteKeyBtnSize, SIGNAL(changed(QVariant)), instance, SLOT(keyboardPaletteButtonSizeChanged(QVariant))); connect(UBSettings::settings()->boardKeyboardPaletteKeyBtnSize, SIGNAL(changed(QVariant)), instance, SLOT(keyboardPaletteButtonSizeChanged(QVariant)));
connect(UBApplication::mainWindow->actionVirtualKeyboard, SIGNAL(triggered(bool)), instance, SLOT(showKeyboard(bool))); connect(UBApplication::mainWindow->actionVirtualKeyboard, SIGNAL(triggered(bool)), instance, SLOT(showKeyboard(bool)));
// connect(instance, SIGNAL(moved(const QPoint&)), instance, SLOT(syncPosition(const QPoint&))); // connect(instance, SIGNAL(moved(const QPoint&)), instance, SLOT(syncPosition(const QPoint&)));
connect(instance, SIGNAL(closed()), instance, SLOT(hideKeyboard())); connect(instance, SIGNAL(closed()), instance, SLOT(hideKeyboard()));
...@@ -109,10 +109,10 @@ UBKeyboardPalette* UBKeyboardPalette::create(QWidget *parent) ...@@ -109,10 +109,10 @@ UBKeyboardPalette* UBKeyboardPalette::create(QWidget *parent)
return instance; return instance;
} }
void UBKeyboardPalette::showKeyboard(bool show) void UBKeyboardPalette::showKeyboard(bool show)
{ {
m_isVisible = show; m_isVisible = show;
} }
void UBKeyboardPalette::hideKeyboard() void UBKeyboardPalette::hideKeyboard()
......
...@@ -508,7 +508,7 @@ void UBGraphicsProtractor::paintAngleMarker(QPainter *painter) ...@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment