r16119 by jghali - first version of new shape property widget
scribus-commit
scribus-commit at lists.scribus.net
Mon Dec 20 00:49:51 CET 2010
Author: jghali
Date: Sun Dec 19 23:49:50 2010
New Revision: 16119
URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16119
Log:
first version of new shape property widget
Added:
branches/ScribusOIF/scribus/ui/propertywidget_shape.cpp
branches/ScribusOIF/scribus/ui/propertywidget_shape.h
branches/ScribusOIF/scribus/ui/propertywidget_shapebase.ui
Modified:
branches/ScribusOIF/scribus/CMakeLists.txt
branches/ScribusOIF/scribus/ui/propertiespalette_frame.cpp
branches/ScribusOIF/scribus/ui/propertiespalette_frame.h
branches/ScribusOIF/scribus/ui/propertywidget_pos.cpp
branches/ScribusOIF/scribus/ui/propertywidget_posbase.ui
branches/ScribusOIF/win32/vc8/Scribus.vcproj
Modified: branches/ScribusOIF/scribus/CMakeLists.txt
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16119&path=/branches/ScribusOIF/scribus/CMakeLists.txt
==============================================================================
--- branches/ScribusOIF/scribus/CMakeLists.txt (original)
+++ branches/ScribusOIF/scribus/CMakeLists.txt Sun Dec 19 23:49:50 2010
@@ -134,6 +134,7 @@
ui/propertywidget_optmarginsbase.ui
ui/propertywidget_pathtextbase.ui
ui/propertywidget_posbase.ui
+ ui/propertywidget_shapebase.ui
ui/propertywidget_textcolorbase.ui
ui/replacecolors.ui
ui/replaceonecolor.ui
@@ -372,6 +373,7 @@
ui/propertywidget_optmargins.h
ui/propertywidget_pathtext.h
ui/propertywidget_pos.h
+ ui/propertywidget_shape.h
ui/propertywidget_textcolor.h
ui/query.h
# ui/reformdoc.h
@@ -785,6 +787,7 @@
ui/propertywidget_optmargins.cpp
ui/propertywidget_pathtext.cpp
ui/propertywidget_pos.cpp
+ ui/propertywidget_shape.cpp
ui/propertywidget_textcolor.cpp
ui/propertywidgetbase.cpp
ui/query.cpp
Modified: branches/ScribusOIF/scribus/ui/propertiespalette_frame.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16119&path=/branches/ScribusOIF/scribus/ui/propertiespalette_frame.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_frame.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_frame.cpp Sun Dec 19 23:49:50 2010
@@ -15,6 +15,7 @@
#include "pageitem.h"
#include "propertiespalette_frame.h"
#include "propertywidget_pos.h"
+#include "propertywidget_shape.h"
#include "scribus.h"
#include "scribuscore.h"
#include "scribusdoc.h"
@@ -51,6 +52,9 @@
posWidget = new PropertyWidget_Position(widget);
vboxLayout->addWidget(posWidget);
+ shapeWidget = new PropertyWidget_Shape(widget);
+ vboxLayout->addWidget(shapeWidget);
+
setWidget(widget);
languageChange();
@@ -86,6 +90,7 @@
move(p2);
this->posWidget->setMainWindow(mw);
+ this->shapeWidget->setMainWindow(mw);
}
void PropertiesPalette_Frame::setDoc(ScribusDoc *d)
@@ -103,6 +108,7 @@
m_item = NULL;
this->posWidget->setDoc(m_doc);
+ this->shapeWidget->setDoc(m_doc);
if (m_doc.isNull())
{
Modified: branches/ScribusOIF/scribus/ui/propertiespalette_frame.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16119&path=/branches/ScribusOIF/scribus/ui/propertiespalette_frame.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_frame.h (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_frame.h Sun Dec 19 23:49:50 2010
@@ -14,6 +14,7 @@
class PageItem;
class PropertyWidget_Position;
+class PropertyWidget_Shape;
class ScribusDoc;
class ScribusMainWindow;
class Selection;
@@ -43,6 +44,7 @@
private:
PropertyWidget_Position* posWidget;
+ PropertyWidget_Shape* shapeWidget;
public slots:
void setDoc(ScribusDoc *d);
Modified: branches/ScribusOIF/scribus/ui/propertywidget_pos.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16119&path=/branches/ScribusOIF/scribus/ui/propertywidget_pos.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_pos.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_pos.cpp Sun Dec 19 23:49:50 2010
@@ -111,6 +111,8 @@
widthSpin->showValue(0);
heightSpin->showValue(0);
rotationSpin->showValue(0);
+
+ setEnabled(false);
}
void PropertyWidget_Position::changeEvent(QEvent *e)
@@ -238,7 +240,6 @@
}
else
{
-
flipH->setEnabled(true);
flipV->setEnabled(true);
//CB If Toggle is not possible, then we need to enable it so we can turn it off
@@ -397,54 +398,54 @@
if (m_item)
{
-
- int itemCount = m_doc->Items->count();
- levelSpin->setMinimum(1);
- levelSpin->setMaximum(itemCount);
- levelSpin->setValue(m_item->ItemNr + 1);
- numObjsLabel->setText( QString("/ %1").arg(itemCount) );
-
- if ((m_item->itemType() == PageItem::Line) && m_lineMode)
- {
- xposLabel->setText( tr( "&X1" ) );
- yposLabel->setText( tr( "Y&1" ) );
- widthLabel->setText( tr( "X&2" ) );
- heightLabel->setText( tr( "&Y2" ) );
- rotationSpin->setEnabled(false);
- }
- else
- {
- xposLabel->setText( tr( "&X" ) );
- yposLabel->setText( tr( "&Y" ) );
- widthLabel->setText( tr( "&W" ) );
- heightLabel->setText( tr( "&H" ) );
- rotationSpin->setEnabled(!((m_item->isTableItem) && (m_item->isSingleSel)));
- }
-
- double selX = m_item->xPos();
- double selY = m_item->yPos();
- double selW = m_item->width();
- double selH = m_item->height();
- if (m_doc->m_Selection->count() > 1)
- m_doc->m_Selection->getGroupRect(&selX, &selY, &selW, &selH);
- displayXY(selX, selY);
- displayWH(selW, selH);
- displayLocked(m_item->locked());
- displaySizeLocked(m_item->sizeLocked());
-
- m_oldRotation = m_item->rotation();
- double rr = m_item->rotation();
- if (item->rotation() > 0)
- rr = 360 - rr;
- rotationSpin->showValue(fabs(rr));
-
- noPrint->setChecked(!m_item->printEnabled());
- displayFlippedH(m_item->imageFlippedH());
- displayFlippedV(m_item->imageFlippedV());
+ int itemCount = m_doc->Items->count();
+ levelSpin->setMinimum(1);
+ levelSpin->setMaximum(itemCount);
+ levelSpin->setValue(m_item->ItemNr + 1);
+ numObjsLabel->setText( QString("/ %1").arg(itemCount) );
+
+ if ((m_item->itemType() == PageItem::Line) && m_lineMode)
+ {
+ xposLabel->setText( tr( "&X1" ) );
+ yposLabel->setText( tr( "Y&1" ) );
+ widthLabel->setText( tr( "X&2" ) );
+ heightLabel->setText( tr( "&Y2" ) );
+ rotationSpin->setEnabled(false);
+ }
+ else
+ {
+ xposLabel->setText( tr( "&X" ) );
+ yposLabel->setText( tr( "&Y" ) );
+ widthLabel->setText( tr( "&W" ) );
+ heightLabel->setText( tr( "&H" ) );
+ rotationSpin->setEnabled(!((m_item->isTableItem) && (m_item->isSingleSel)));
+ }
+
+ double selX = m_item->xPos();
+ double selY = m_item->yPos();
+ double selW = m_item->width();
+ double selH = m_item->height();
+ if (m_doc->m_Selection->count() > 1)
+ m_doc->m_Selection->getGroupRect(&selX, &selY, &selW, &selH);
+ displayXY(selX, selY);
+ displayWH(selW, selH);
+ displayLocked(m_item->locked());
+ displaySizeLocked(m_item->sizeLocked());
+
+ m_oldRotation = m_item->rotation();
+ double rr = m_item->rotation();
+ if (item->rotation() > 0)
+ rr = 360 - rr;
+ rotationSpin->showValue(fabs(rr));
+
+ noPrint->setChecked(!m_item->printEnabled());
+ displayFlippedH(m_item->imageFlippedH());
+ displayFlippedV(m_item->imageFlippedV());
+
+ connectSignals();
}
updateSpinBoxConstants();
- connectSignals();
}
void PropertyWidget_Position::handleSelectionChanged()
Modified: branches/ScribusOIF/scribus/ui/propertywidget_posbase.ui
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16119&path=/branches/ScribusOIF/scribus/ui/propertywidget_posbase.ui
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_posbase.ui (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_posbase.ui Sun Dec 19 23:49:50 2010
@@ -15,6 +15,9 @@
</property>
<property name="title">
<string>Position</string>
+ </property>
+ <property name="flat">
+ <bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
Modified: branches/ScribusOIF/win32/vc8/Scribus.vcproj
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16119&path=/branches/ScribusOIF/win32/vc8/Scribus.vcproj
==============================================================================
--- branches/ScribusOIF/win32/vc8/Scribus.vcproj (original)
+++ branches/ScribusOIF/win32/vc8/Scribus.vcproj Sun Dec 19 23:49:50 2010
@@ -1543,6 +1543,10 @@
>
</File>
<File
+ RelativePath="..\..\scribus\ui\propertywidget_shape.cpp"
+ >
+ </File>
+ <File
RelativePath="..\..\scribus\ui\propertywidget_textcolor.cpp"
>
</File>
@@ -8560,6 +8564,38 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\..\scribus\ui\propertywidget_shape.h"
+ >
+ <FileConfiguration
+ Name="Debug-cairo|Win32"
+ >
+ <Tool
+ Name="moc.exe"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release-cairo|Win32"
+ >
+ <Tool
+ Name="moc.exe"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug-arthur|Win32"
+ >
+ <Tool
+ Name="moc.exe"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release-arthur|Win32"
+ >
+ <Tool
+ Name="moc.exe"
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="..\..\scribus\ui\propertywidget_textcolor.h"
>
<FileConfiguration
@@ -12053,6 +12089,10 @@
>
</File>
<File
+ RelativePath="..\..\scribus\ui\ui_propertywidget_shapebase.h"
+ >
+ </File>
+ <File
RelativePath="..\..\scribus\ui\ui_propertywidget_textcolorbase.h"
>
</File>
@@ -12838,6 +12878,10 @@
>
</File>
<File
+ RelativePath="..\..\scribus\ui\moc_propertywidget_shape.cpp"
+ >
+ </File>
+ <File
RelativePath="..\..\scribus\ui\moc_propertywidget_textcolor.cpp"
>
</File>
@@ -13447,6 +13491,10 @@
>
</File>
<File
+ RelativePath="..\..\scribus\ui\propertywidget_shapebase.ui"
+ >
+ </File>
+ <File
RelativePath="..\..\scribus\ui\propertywidget_textcolorbase.ui"
>
</File>
More information about the scribus-commit
mailing list