b1b77faf | 2015-03-04 22:38:36 | Slávek Banko |
Fix incorrectly renamed strings (cherry picked from commit eed11c8a8ad84e223d99f9fd7464a839bc0ca165) |
||
M src/electronics/components/pushswitch.cpp M src/itemview.cpp |
||
diff --git a/src/electronics/components/pushswitch.cpp b/src/electronics/components/pushswitch.cpp index 5b926d6..d2ac6d7 100644 --- a/src/electronics/components/pushswitch.cpp +++ b/src/electronics/components/pushswitch.cpp @@ -41,26 +41,26 @@ { m_name = i18n("Push to Break"); setSize( -16, -16, 32, 24 ); - + addButton( "button", TQRect( -16, 8, 32, 20 ), "" ); - + createProperty( "button_text", Variant::Type::String ); property("button_text")->setCaption( i18n("Button Text") ); - + Variant * v = createProperty( "bounce", Variant::Type::Bool ); v->setCaption( i18n("Bounce") ); v->setAdvanced(true); v->setValue(false); - + v = createProperty( "bounce_period", Variant::Type::Double ); v->setCaption( i18n("Bounce Period") ); v->setAdvanced(true); v->setUnit("s"); v->setValue(5e-3); - + init1PinLeft(0); init1PinRight(0); - + m_switch = createSwitch( m_pPNode[0], m_pNNode[0], false ); pressed = false; } @@ -73,7 +73,7 @@ void ECPTBSwitch::dataChanged() { button("button")->setText( dataString("button_text") ); - + bool bounce = dataBool("bounce"); int bouncePeriod_ms = int(dataDouble("bounce_period")*1e3); m_switch->setBounce( bounce, bouncePeriod_ms ); @@ -83,18 +83,18 @@ void ECPTBSwitch::drawShape( TQPainter &p ) { initPainter(p); - + int _x = (int)x()-16; int _y = (int)y()-8; const int radius = 2; const int _height = height()-8; - + int dy = pressed ? 6 : 4; - + p.drawLine( _x+width()/4, _y+dy, _x+(3*width())/4, _y+dy ); // Top horizontal line p.drawLine( _x, _y+(_height/2)-radius+dy, _x+width(), _y+(_height/2)-radius+dy ); // Bottom horizontal line - p.drawLine( _x+width()/2, _y+dy, _x+width()/2, _y+(_height/2)-radius+dy ); //Qt::Vertical line - + p.drawLine( _x+width()/2, _y+dy, _x+width()/2, _y+(_height/2)-radius+dy ); // Vertical line + p.drawEllipse( _x, _y+(_height/2)-radius, 2*radius, 2*radius ); // Left circle p.drawEllipse( _x+width()-2*radius+1, _y+(_height/2)-radius, 2*radius, 2*radius ); // Right circle @@ -133,26 +133,26 @@ { m_name = i18n("Push to Make"); setSize( -16, -16, 32, 24 ); - + addButton( "button", TQRect( -16, 8, 32, 20 ), "" ); - + createProperty( "button_text", Variant::Type::String ); property("button_text")->setCaption( i18n("Button Text") ); - + Variant * v = createProperty( "bounce", Variant::Type::Bool ); v->setCaption("Bounce"); v->setAdvanced(true); v->setValue(false); - + v = createProperty( "bounce_period", Variant::Type::Double ); v->setCaption("Bounce Period"); v->setAdvanced(true); v->setUnit("s"); v->setValue(5e-3); - + init1PinLeft(0); init1PinRight(0); - + m_switch = createSwitch( m_pPNode[0], m_pNNode[0], true ); pressed = false; } @@ -166,7 +166,7 @@ void ECPTMSwitch::dataChanged() { button("button")->setText( dataString("button_text") ); - + bool bounce = dataBool("bounce"); int bouncePeriod_ms = int(dataDouble("bounce_period")*1e3); m_switch->setBounce( bounce, bouncePeriod_ms ); @@ -176,18 +176,18 @@ void ECPTMSwitch::drawShape( TQPainter &p ) { initPainter(p); - + int _x = (int)x()-16; int _y = (int)y()-8; const int radius = 2; const int _height = height()-8; - + int dy = pressed ? 1 : 3; - + p.drawLine( _x+width()/4, _y-dy, _x+(3*width())/4, _y-dy ); // Top horizontal line p.drawLine( _x, _y+(_height/2)-radius-dy, _x+width(), _y+(_height/2)-radius-dy ); // Bottom horizontal line - p.drawLine( _x+width()/2, _y-dy, _x+width()/2, _y+(_height/2)-radius-dy ); //Qt::Vertical line - + p.drawLine( _x+width()/2, _y-dy, _x+width()/2, _y+(_height/2)-radius-dy ); // Vertical line + p.drawEllipse( _x, _y+(_height/2)-radius, 2*radius, 2*radius ); // Left circle p.drawEllipse( _x+width()-2*radius+1, _y+(_height/2)-radius, 2*radius, 2*radius ); // Right circle diff --git a/src/itemview.cpp b/src/itemview.cpp index f2a38a0..5361131 100644 --- a/src/itemview.cpp +++ b/src/itemview.cpp @@ -36,35 +36,35 @@ : View( itemDocument, viewContainer, viewAreaId, name ) { TDEActionCollection * ac = actionCollection(); - + KStdAction::selectAll( itemDocument, TQT_SLOT(selectAll()), ac ); KStdAction::zoomIn( TQT_TQOBJECT(this), TQT_SLOT(zoomIn()), ac ); KStdAction::zoomOut( TQT_TQOBJECT(this), TQT_SLOT(zoomOut()), ac ); KStdAction::actualSize( TQT_TQOBJECT(this), TQT_SLOT(actualSize()), ac )->setEnabled(false); - - + + TDEAccel *pAccel = new TDEAccel(this); pAccel->insert( "Cancel", i18n("Cancel"), i18n("Cancel the current operation"), TQt::Key_Escape, itemDocument, TQT_SLOT(cancelCurrentOperation()) ); pAccel->readSettings(); - + new TDEAction( i18n("Delete"), "edit-delete", TQt::Key_Delete, itemDocument, TQT_SLOT(deleteSelection()), ac, "edit_delete" ); new TDEAction( i18n("Export as Image..."), 0, 0, itemDocument, TQT_SLOT(exportToImage()), ac, "file_export_image"); - + //BEGIN Item Alignment actions - new TDEAction( i18n("AlignQt::Horizontally"), 0, 0, itemDocument, TQT_SLOT(alignHorizontally()), ac, "align_horizontally" ); - new TDEAction( i18n("AlignQt::Vertically"), 0, 0, itemDocument, TQT_SLOT(alignVertically()), ac, "align_vertically" ); - new TDEAction( i18n("DistributeQt::Horizontally"), 0, 0, itemDocument, TQT_SLOT(distributeHorizontally()), ac, "distribute_horizontally" ); - new TDEAction( i18n("DistributeQt::Vertically"), 0, 0, itemDocument, TQT_SLOT(distributeVertically()), ac, "distribute_vertically" ); + new TDEAction( i18n("Align Horizontally"), 0, 0, itemDocument, TQT_SLOT(alignHorizontally()), ac, "align_horizontally" ); + new TDEAction( i18n("Align Vertically"), 0, 0, itemDocument, TQT_SLOT(alignVertically()), ac, "align_vertically" ); + new TDEAction( i18n("Distribute Horizontally"), 0, 0, itemDocument, TQT_SLOT(distributeHorizontally()), ac, "distribute_horizontally" ); + new TDEAction( i18n("Distribute Vertically"), 0, 0, itemDocument, TQT_SLOT(distributeVertically()), ac, "distribute_vertically" ); //END Item Alignment actions - - + + //BEGIN Draw actions TDEToolBarPopupAction * pa = new TDEToolBarPopupAction( i18n("Draw"), "paintbrush", 0, 0, 0, ac, "edit_draw" ); pa->setDelayed(false); - + TDEPopupMenu * m = pa->popupMenu(); m->insertTitle( i18n("Draw") ); - + m->insertItem( TDEGlobal::iconLoader()->loadIcon( "tool_text", TDEIcon::Small ), i18n("Text"), DrawPart::da_text ); m->insertItem( TDEGlobal::iconLoader()->loadIcon( "tool_line", TDEIcon::Small ), i18n("Line"), DrawPart::da_line ); m->insertItem( TDEGlobal::iconLoader()->loadIcon( "tool_arrow", TDEIcon::Small ), i18n("Arrow"), DrawPart::da_arrow ); @@ -72,30 +72,30 @@ m->insertItem( TDEGlobal::iconLoader()->loadIcon( "tool_rectangle", TDEIcon::Small ), i18n("Rectangle"), DrawPart::da_rectangle ); connect( m, TQT_SIGNAL(activated(int)), itemDocument, TQT_SLOT(slotSetDrawAction(int)) ); //END Draw actions - - + + //BEGIN Item Control actions new TDEAction( i18n("Raise Selection"), "1uparrow", TQt::Key_PageUp, itemDocument, TQT_SLOT(raiseZ()), ac, "edit_raise" ); new TDEAction( i18n("Lower Selection"), "1downarrow", TQt::Key_PageDown, itemDocument, TQT_SLOT(lowerZ()), ac, "edit_lower" ); //END Item Control actions - - + + TDEAction * na = new TDEAction( "", 0, 0, 0, 0, ac, "null_action" ); na->setEnabled(false); - + setXMLFile( "ktechlabitemviewui.rc" ); - + m_pUpdateStatusTmr = new TQTimer(this); connect( m_pUpdateStatusTmr, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateStatus()) ); connect( this, TQT_SIGNAL(viewUnfocused()), this, TQT_SLOT(stopUpdatingStatus()) ); - + p_itemDocument = itemDocument; m_zoomLevel = 1.; m_CVBEditor = new CVBEditor( p_itemDocument->canvas(), this, "cvbEditor" ); m_CVBEditor->setLineWidth(1); - + m_layout->insertWidget( 0, m_CVBEditor ); - + setAcceptDrops(true); } @@ -119,19 +119,19 @@ { int currentZoomPercent = int(std::floor((100*m_zoomLevel)+0.5)); int newZoom = currentZoomPercent; - + if ( currentZoomPercent < 100 ) newZoom += 25; else if ( currentZoomPercent < 200 ) newZoom += 50; else newZoom += 100; - + m_zoomLevel = newZoom/100.; - + TQWMatrix m( m_zoomLevel, 0.0, 0.0, m_zoomLevel, 1.0, 1.0 ); m_CVBEditor->setWorldMatrix(m); - + ** Diff limit reached (max: 250 lines) ** |