r19839 by craig - Clean up autoformbuttomgroup code, and comment out the hiding of icons on OSX, awaiting Qt bug 44565 to be resolved
scribus-commit
scribus-commit at lists.scribus.net
Thu Feb 19 22:02:13 UTC 2015
Author: craig
Date: Thu Feb 19 22:02:13 2015
New Revision: 19839
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19839
Log:
Clean up autoformbuttomgroup code, and comment out the hiding of icons on OSX, awaiting Qt bug 44565 to be resolved
Modified:
trunk/Scribus/scribus/scribus.cpp
trunk/Scribus/scribus/ui/autoformbuttongroup.cpp
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19839&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Thu Feb 19 22:02:13 2015
@@ -302,7 +302,8 @@
ExternalApp=0;
ScriptRunning = 0;
#ifdef Q_OS_MAC
- ScQApp->setAttribute(Qt::AA_DontShowIconsInMenus);
+ //commenting this out until this is resolved :https://bugreports.qt.io/browse/QTBUG-44565
+ //ScQApp->setAttribute(Qt::AA_DontShowIconsInMenus);
noIcon = loadIcon("noicon.xpm");
#endif
}
Modified: trunk/Scribus/scribus/ui/autoformbuttongroup.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19839&path=/trunk/Scribus/scribus/ui/autoformbuttongroup.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/autoformbuttongroup.cpp (original)
+++ trunk/Scribus/scribus/ui/autoformbuttongroup.cpp Thu Feb 19 22:02:13 2015
@@ -83,517 +83,7 @@
connect(action, SIGNAL(triggered()), signalMapper, SLOT(map()));
signalMapper->setMapping(action, shapenum);
}
-/*
-AutoformButtonGroup::AutoformButtonGroup( QWidget* parent ) : QFrame( parent )
-{
- QSizePolicy policy = QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
- buttonGroup1Layout = new QGridLayout( this );
- buttonGroup1Layout->setSpacing( 0 );
- buttonGroup1Layout->setMargin( 0 );
- int rowNum = 0;
- toolButton1 = new QToolButton( this );
- toolButton1->setCheckable( true );
- toolButton1->setIcon(QIcon(getIconPixmap(0,16)));
- toolButton1->setIconSize(QSize(16, 16));
- toolButton1->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton1, rowNum, 0 );
- toolButton2 = new QToolButton( this );
- toolButton2->setCheckable( true );
- toolButton2->setIcon(QIcon(getIconPixmap(1,16)));
- toolButton2->setIconSize(QSize(16, 16));
- toolButton2->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton2, rowNum, 1 );
- toolButton3 = new QToolButton( this );
- toolButton3->setCheckable( true );
- toolButton3->setIcon(QIcon(getIconPixmap(2,16)));
- toolButton3->setIconSize(QSize(16, 16));
- toolButton3->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton3, rowNum, 2 );
- toolButton4 = new QToolButton( this );
- toolButton4->setCheckable( true );
- toolButton4->setIcon(QIcon(getIconPixmap(3,16)));
- toolButton4->setIconSize(QSize(16, 16));
- toolButton4->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton4, rowNum, 3 );
- rowNum++;
- toolButton9 = new QToolButton( this );
- toolButton9->setCheckable( true );
- toolButton9->setIcon(QIcon(getIconPixmap(8,16)));
- toolButton9->setIconSize(QSize(16, 16));
- toolButton9->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton9, rowNum, 0 );
- toolButton10 = new QToolButton( this );
- toolButton10->setCheckable( true );
- toolButton10->setIcon(QIcon(getIconPixmap(9,16)));
- toolButton10->setIconSize(QSize(16, 16));
- toolButton10->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton10, rowNum, 1 );
- toolButton11 = new QToolButton( this );
- toolButton11->setCheckable( true );
- toolButton11->setIcon(QIcon(getIconPixmap(10,16)));
- toolButton11->setIconSize(QSize(16, 16));
- toolButton11->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton11, rowNum, 2 );
- toolButton12 = new QToolButton( this );
- toolButton12->setCheckable( true );
- toolButton12->setIcon(QIcon(getIconPixmap(11,16)));
- toolButton12->setIconSize(QSize(16, 16));
- toolButton12->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton12, rowNum, 3 );
- rowNum++;
-
- toolButton13 = new QToolButton( this );
- toolButton13->setCheckable( true );
- toolButton13->setIcon(QIcon(getIconPixmap(12,16)));
- toolButton13->setIconSize(QSize(16, 16));
- toolButton13->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton13, rowNum, 0 );
- toolButton14 = new QToolButton( this );
- toolButton14->setCheckable( true );
- toolButton14->setIcon(QIcon(getIconPixmap(13,16)));
- toolButton14->setIconSize(QSize(16, 16));
- toolButton14->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton14, rowNum, 1 );
- toolButton15 = new QToolButton( this );
- toolButton15->setCheckable( true );
- toolButton15->setIcon(QIcon(getIconPixmap(14,16)));
- toolButton15->setIconSize(QSize(16, 16));
- toolButton15->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton15, rowNum, 2 );
- toolButton16 = new QToolButton( this );
- toolButton16->setCheckable( true );
- toolButton16->setIcon(QIcon(getIconPixmap(15,16)));
- toolButton16->setIconSize(QSize(16, 16));
- toolButton16->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton16, rowNum, 3 );
- rowNum++;
-
- toolButton17 = new QToolButton( this );
- toolButton17->setCheckable( true );
- toolButton17->setIcon(QIcon(getIconPixmap(16,16)));
- toolButton17->setIconSize(QSize(16, 16));
- toolButton17->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton17, rowNum, 0 );
- toolButton18 = new QToolButton( this );
- toolButton18->setCheckable( true );
- toolButton18->setIcon(QIcon(getIconPixmap(17,16)));
- toolButton18->setIconSize(QSize(16, 16));
- toolButton18->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton18, rowNum, 1 );
- rowNum++;
-
- checkDoubleArrows = new QCheckBox( tr("Arrows"), this);
- checkDoubleArrows->setChecked(true);
- buttonGroup1Layout->addWidget(checkDoubleArrows, rowNum, 0, 1, 4);
- rowNum++;
-
- toolButton5 = new QToolButton( this );
- toolButton5->setCheckable( true );
- toolButton5->setIcon(QIcon(getIconPixmap(4,16)));
- toolButton5->setIconSize(QSize(16, 16));
- toolButton5->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton5, rowNum, 0 );
- toolButton6 = new QToolButton( this );
- toolButton6->setCheckable( true );
- toolButton6->setIcon(QIcon(getIconPixmap(5,16)));
- toolButton6->setIconSize(QSize(16, 16));
- toolButton6->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton6, rowNum, 1 );
- toolButton7 = new QToolButton( this );
- toolButton7->setCheckable( true );
- toolButton7->setIcon(QIcon(getIconPixmap(6,16)));
- toolButton7->setIconSize(QSize(16, 16));
- toolButton7->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton7, rowNum, 2 );
- toolButton8 = new QToolButton( this );
- toolButton8->setCheckable( true );
- toolButton8->setIcon(QIcon(getIconPixmap(7,16)));
- toolButton8->setIconSize(QSize(16, 16));
- toolButton8->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton8, rowNum, 3 );
- rowNum++;
- toolButton21 = new QToolButton( this );
- toolButton21->setCheckable( true );
- toolButton21->setIcon(QIcon(getIconPixmap(20,16)));
- toolButton21->setIconSize(QSize(16, 16));
- toolButton21->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton21, rowNum, 0 );
- toolButton22 = new QToolButton( this );
- toolButton22->setCheckable( true );
- toolButton22->setIcon(QIcon(getIconPixmap(21,16)));
- toolButton22->setIconSize(QSize(16, 16));
- toolButton22->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton22, rowNum, 1 );
- toolButton23 = new QToolButton( this );
- toolButton23->setCheckable( true );
- toolButton23->setIcon(QIcon(getIconPixmap(22,16)));
- toolButton23->setIconSize(QSize(16, 16));
- toolButton23->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton23, rowNum, 2 );
- rowNum++;
-
- checkFlowChart = new QCheckBox( tr("Flow Chart"), this);
- checkFlowChart->setChecked(true);
- buttonGroup1Layout->addWidget(checkFlowChart, rowNum, 0, 1, 4);
- rowNum++;
-
- toolButton25 = new QToolButton( this );
- toolButton25->setCheckable( true );
- toolButton25->setIcon(QIcon(getIconPixmap(24,16)));
- toolButton25->setIconSize(QSize(16, 16));
- toolButton25->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton25, rowNum, 0 );
- toolButton26 = new QToolButton( this );
- toolButton26->setCheckable( true );
- toolButton26->setIcon(QIcon(getIconPixmap(25,16)));
- toolButton26->setIconSize(QSize(16, 16));
- toolButton26->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton26, rowNum, 1 );
- toolButton27 = new QToolButton( this );
- toolButton27->setCheckable( true );
- toolButton27->setIcon(QIcon(getIconPixmap(26,16)));
- toolButton27->setIconSize(QSize(16, 16));
- toolButton27->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton27, rowNum, 2 );
- toolButton28 = new QToolButton( this );
- toolButton28->setCheckable( true );
- toolButton28->setIcon(QIcon(getIconPixmap(27,16)));
- toolButton28->setIconSize(QSize(16, 16));
- toolButton28->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton28, rowNum, 3 );
- rowNum++;
-
- toolButton29 = new QToolButton( this );
- toolButton29->setCheckable( true );
- toolButton29->setIcon(QIcon(getIconPixmap(28,16)));
- toolButton29->setIconSize(QSize(16, 16));
- toolButton29->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton29, rowNum, 0 );
- toolButton30 = new QToolButton( this );
- toolButton30->setCheckable( true );
- toolButton30->setIcon(QIcon(getIconPixmap(29,16)));
- toolButton30->setIconSize(QSize(16, 16));
- toolButton30->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton30, rowNum, 1 );
- toolButton31 = new QToolButton( this );
- toolButton31->setCheckable( true );
- toolButton31->setIcon(QIcon(getIconPixmap(30,16)));
- toolButton31->setIconSize(QSize(16, 16));
- toolButton31->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton31, rowNum, 2 );
- toolButton32 = new QToolButton( this );
- toolButton32->setCheckable( true );
- toolButton32->setIcon(QIcon(getIconPixmap(31,16)));
- toolButton32->setIconSize(QSize(16, 16));
- toolButton32->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton32, rowNum, 3 );
- rowNum++;
-
- checkJigSaw = new QCheckBox( tr("Jigsaw"), this);
- checkJigSaw->setChecked(true);
- buttonGroup1Layout->addWidget(checkJigSaw, rowNum, 0, 1, 4);
- rowNum++;
-
- toolButton33 = new QToolButton( this );
- toolButton33->setCheckable( true );
- toolButton33->setIcon(QIcon(getIconPixmap(32,16)));
- toolButton33->setIconSize(QSize(16, 16));
- toolButton33->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton33, rowNum, 0 );
- toolButton34 = new QToolButton( this );
- toolButton34->setCheckable( true );
- toolButton34->setIcon(QIcon(getIconPixmap(33,16)));
- toolButton34->setIconSize(QSize(16, 16));
- toolButton34->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton34, rowNum, 1 );
- toolButton35 = new QToolButton( this );
- toolButton35->setCheckable( true );
- toolButton35->setIcon(QIcon(getIconPixmap(34,16)));
- toolButton35->setIconSize(QSize(16, 16));
- toolButton35->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton35, rowNum, 2 );
- toolButton36 = new QToolButton( this );
- toolButton36->setCheckable( true );
- toolButton36->setIcon(QIcon(getIconPixmap(35,16)));
- toolButton36->setIconSize(QSize(16, 16));
- toolButton36->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton36, rowNum, 3 );
- rowNum++;
- toolButton37 = new QToolButton( this );
- toolButton37->setCheckable( true );
- toolButton37->setIcon(QIcon(getIconPixmap(36,16)));
- toolButton37->setIconSize(QSize(16, 16));
- toolButton37->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton37, rowNum, 0 );
- toolButton38 = new QToolButton( this );
- toolButton38->setCheckable( true );
- toolButton38->setIcon(QIcon(getIconPixmap(37,16)));
- toolButton38->setIconSize(QSize(16, 16));
- toolButton38->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton38, rowNum, 1 );
- toolButton39 = new QToolButton( this );
- toolButton39->setCheckable( true );
- toolButton39->setIcon(QIcon(getIconPixmap(38,16)));
- toolButton39->setIconSize(QSize(16, 16));
- toolButton39->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton39, rowNum, 2 );
- toolButton40 = new QToolButton( this );
- toolButton40->setCheckable( true );
- toolButton40->setIcon(QIcon(getIconPixmap(39,16)));
- toolButton40->setIconSize(QSize(16, 16));
- toolButton40->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton40, rowNum, 3 );
- rowNum++;
- toolButton41 = new QToolButton( this );
- toolButton41->setCheckable( true );
- toolButton41->setIcon(QIcon(getIconPixmap(40,16)));
- toolButton41->setIconSize(QSize(16, 16));
- toolButton41->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton41, rowNum, 0 );
- toolButton42 = new QToolButton( this );
- toolButton42->setCheckable( true );
- toolButton42->setIcon(QIcon(getIconPixmap(41,16)));
- toolButton42->setIconSize(QSize(16, 16));
- toolButton42->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton42, rowNum, 1 );
- toolButton43 = new QToolButton( this );
- toolButton43->setCheckable( true );
- toolButton43->setIcon(QIcon(getIconPixmap(42,16)));
- toolButton43->setIconSize(QSize(16, 16));
- toolButton43->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton43, rowNum, 2 );
- toolButton44 = new QToolButton( this );
- toolButton44->setCheckable( true );
- toolButton44->setIcon(QIcon(getIconPixmap(43,16)));
- toolButton44->setIconSize(QSize(16, 16));
- toolButton44->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton44, rowNum, 3 );
- rowNum++;
-
- checkSpecials = new QCheckBox( tr("Specials"), this);
- checkSpecials->setChecked(true);
- buttonGroup1Layout->addWidget(checkSpecials, rowNum, 0, 1, 4);
- rowNum++;
-
- toolButton19 = new QToolButton( this );
- toolButton19->setCheckable( true );
- toolButton19->setIcon(QIcon(getIconPixmap(18,16)));
- toolButton19->setIconSize(QSize(16, 16));
- toolButton19->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton19, rowNum, 0 );
- toolButton20 = new QToolButton( this );
- toolButton20->setCheckable( true );
- toolButton20->setIcon(QIcon(getIconPixmap(19,16)));
- toolButton20->setIconSize(QSize(16, 16));
- toolButton20->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton20, rowNum, 1 );
- toolButton24 = new QToolButton( this );
- toolButton24->setCheckable( true );
- toolButton24->setIcon(QIcon(getIconPixmap(23,16)));
- toolButton24->setIconSize(QSize(16, 16));
- toolButton24->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton24, rowNum, 2 );
- toolButton45 = new QToolButton( this );
- toolButton45->setCheckable( true );
- toolButton45->setIcon(QIcon(getIconPixmap(44,16)));
- toolButton45->setIconSize(QSize(16, 16));
- toolButton45->setSizePolicy(policy);
- buttonGroup1Layout->addWidget( toolButton45, rowNum, 3 );
-
- buttonGroup = new QButtonGroup(this);
- buttonGroup->addButton(toolButton1, 0);
- buttonGroup->addButton(toolButton2, 1);
- buttonGroup->addButton(toolButton3, 2);
- buttonGroup->addButton(toolButton4, 3);
- buttonGroup->addButton(toolButton5, 4);
- buttonGroup->addButton(toolButton6, 5);
- buttonGroup->addButton(toolButton7, 6);
- buttonGroup->addButton(toolButton8, 7);
- buttonGroup->addButton(toolButton9, 8);
- buttonGroup->addButton(toolButton10, 9);
- buttonGroup->addButton(toolButton11, 10);
- buttonGroup->addButton(toolButton12, 11);
- buttonGroup->addButton(toolButton13, 12);
- buttonGroup->addButton(toolButton14, 13);
- buttonGroup->addButton(toolButton15, 14);
- buttonGroup->addButton(toolButton16, 15);
- buttonGroup->addButton(toolButton17, 16);
- buttonGroup->addButton(toolButton18, 17);
- buttonGroup->addButton(toolButton19, 18);
- buttonGroup->addButton(toolButton20, 19);
- buttonGroup->addButton(toolButton21, 20);
- buttonGroup->addButton(toolButton22, 21);
- buttonGroup->addButton(toolButton23, 22);
- buttonGroup->addButton(toolButton24, 23);
- buttonGroup->addButton(toolButton25, 24);
- buttonGroup->addButton(toolButton26, 25);
- buttonGroup->addButton(toolButton27, 26);
- buttonGroup->addButton(toolButton28, 27);
- buttonGroup->addButton(toolButton29, 28);
- buttonGroup->addButton(toolButton30, 29);
- buttonGroup->addButton(toolButton31, 30);
- buttonGroup->addButton(toolButton32, 31);
- buttonGroup->addButton(toolButton33, 32);
- buttonGroup->addButton(toolButton34, 33);
- buttonGroup->addButton(toolButton35, 34);
- buttonGroup->addButton(toolButton36, 35);
- buttonGroup->addButton(toolButton37, 36);
- buttonGroup->addButton(toolButton38, 37);
- buttonGroup->addButton(toolButton39, 38);
- buttonGroup->addButton(toolButton40, 39);
- buttonGroup->addButton(toolButton41, 40);
- buttonGroup->addButton(toolButton42, 41);
- buttonGroup->addButton(toolButton43, 42);
- buttonGroup->addButton(toolButton44, 43);
- buttonGroup->addButton(toolButton45, 44);
-
- connect(buttonGroup, SIGNAL(buttonClicked(int)), this, SLOT(selForm(int)));
- connect(checkDoubleArrows, SIGNAL(clicked(bool)), this, SLOT(toggleDoubleArrows(bool)));
- connect(checkFlowChart, SIGNAL(clicked(bool)), this, SLOT(toggleFlowChart(bool)));
- connect(checkSpecials, SIGNAL(clicked(bool)), this, SLOT(toggleSpecials(bool)));
- connect(checkJigSaw, SIGNAL(clicked(bool)), this, SLOT(toggleJigSaw(bool)));
-
-}
-
-void AutoformButtonGroup::toggleDoubleArrows(bool visible)
-{
- int oldH = minimumSizeHint().height();
- QSizePolicy policy;
- if (visible)
- policy = QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
- else
- policy = QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
- toolButton5->setVisible(visible);
- toolButton5->setSizePolicy(policy);
- toolButton6->setVisible(visible);
- toolButton6->setSizePolicy(policy);
- toolButton7->setVisible(visible);
- toolButton7->setSizePolicy(policy);
- toolButton8->setVisible(visible);
- toolButton8->setSizePolicy(policy);
- toolButton21->setVisible(visible);
- toolButton21->setSizePolicy(policy);
- toolButton22->setVisible(visible);
- toolButton22->setSizePolicy(policy);
- toolButton23->setVisible(visible);
- toolButton23->setSizePolicy(policy);
- buttonGroup1Layout->activate();
- updateGeometry();
- int newH = minimumSizeHint().height();
- resize(minimumSizeHint());
- QSize pS = parentWidget()->size();
- int pH = pS.height();
- pS.setHeight(pH - (oldH - newH));
- parentWidget()->updateGeometry();
- parentWidget()->resize(pS);
-}
-
-void AutoformButtonGroup::toggleFlowChart(bool visible)
-{
- int oldH = minimumSizeHint().height();
- QSizePolicy policy;
- if (visible)
- policy = QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
- else
- policy = QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
- toolButton25->setVisible(visible);
- toolButton25->setSizePolicy(policy);
- toolButton26->setVisible(visible);
- toolButton26->setSizePolicy(policy);
- toolButton27->setVisible(visible);
- toolButton27->setSizePolicy(policy);
- toolButton28->setVisible(visible);
- toolButton28->setSizePolicy(policy);
- toolButton29->setVisible(visible);
- toolButton29->setSizePolicy(policy);
- toolButton30->setVisible(visible);
- toolButton30->setSizePolicy(policy);
- toolButton31->setVisible(visible);
- toolButton31->setSizePolicy(policy);
- toolButton32->setVisible(visible);
- toolButton32->setSizePolicy(policy);
- buttonGroup1Layout->activate();
- updateGeometry();
- int newH = minimumSizeHint().height();
- resize(minimumSizeHint());
- QSize pS = parentWidget()->size();
- int pH = pS.height();
- pS.setHeight(pH - (oldH - newH));
- parentWidget()->updateGeometry();
- parentWidget()->resize(pS);
-}
-
-void AutoformButtonGroup::toggleJigSaw(bool visible)
-{
- int oldH = minimumSizeHint().height();
- QSizePolicy policy;
- if (visible)
- policy = QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
- else
- policy = QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
- toolButton33->setVisible(visible);
- toolButton33->setSizePolicy(policy);
- toolButton34->setVisible(visible);
- toolButton34->setSizePolicy(policy);
- toolButton35->setVisible(visible);
- toolButton35->setSizePolicy(policy);
- toolButton36->setVisible(visible);
- toolButton36->setSizePolicy(policy);
- toolButton37->setVisible(visible);
- toolButton37->setSizePolicy(policy);
- toolButton38->setVisible(visible);
- toolButton38->setSizePolicy(policy);
- toolButton39->setVisible(visible);
- toolButton39->setSizePolicy(policy);
- toolButton40->setVisible(visible);
- toolButton40->setSizePolicy(policy);
- toolButton41->setVisible(visible);
- toolButton41->setSizePolicy(policy);
- toolButton42->setVisible(visible);
- toolButton42->setSizePolicy(policy);
- toolButton43->setVisible(visible);
- toolButton43->setSizePolicy(policy);
- toolButton44->setVisible(visible);
- toolButton44->setSizePolicy(policy);
- buttonGroup1Layout->activate();
- updateGeometry();
- int newH = minimumSizeHint().height();
- resize(minimumSizeHint());
- QSize pS = parentWidget()->size();
- int pH = pS.height();
- pS.setHeight(pH - (oldH - newH));
- parentWidget()->updateGeometry();
- parentWidget()->resize(pS);
-}
-
-void AutoformButtonGroup::toggleSpecials(bool visible)
-{
- int oldH = minimumSizeHint().height();
- QSizePolicy policy;
- if (visible)
- policy = QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
- else
- policy = QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
- toolButton24->setVisible(visible);
- toolButton24->setSizePolicy(policy);
- toolButton19->setVisible(visible);
- toolButton19->setSizePolicy(policy);
- toolButton20->setVisible(visible);
- toolButton20->setSizePolicy(policy);
- toolButton45->setVisible(visible);
- toolButton45->setSizePolicy(policy);
- buttonGroup1Layout->activate();
- updateGeometry();
- int newH = minimumSizeHint().height();
- resize(minimumSizeHint());
- QSize pS = parentWidget()->size();
- int pH = pS.height();
- pS.setHeight(pH - (oldH - newH));
- parentWidget()->updateGeometry();
- parentWidget()->resize(pS);
-}
-*/
qreal* AutoformButtonGroup::getShapeData(int a, int *n)
{
qreal *vals = NULL;
More information about the scribus-commit
mailing list