You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

315 lines
13 KiB

/****************************************************************************
** Form implementation generated from reading ui file './ksgraphwizardinterf.ui'
**
** Created: śro mar 20 18:53:28 2002
** by: The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "ksgraphwizardinterf.h"
#include <qvariant.h>
#include <qbuttongroup.h>
#include <qcheckbox.h>
#include <qframe.h>
#include <qgroupbox.h>
#include <qiconview.h>
#include <qlabel.h>
#include <qlistbox.h>
#include <qpushbutton.h>
#include <qradiobutton.h>
#include <qtabwidget.h>
#include <qtextedit.h>
#include <qwidget.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>
#include "kschannellist.h"
static const char* const image0_data[] = {
"32 32 10 1",
". c None",
"# c #000000",
"b c #00c200",
"e c #313031",
"h c #410000",
"d c #5a595a",
"g c #a4a1a4",
"f c #c5c2c5",
"a c #c5ffc5",
"c c #ffffff",
"...###..........................",
"...#aa##........................",
".###baaa##......................",
".#cd##baaa##....................",
".#cccd##baaa##..##e.............",
".#cccccd##baaa##aaa##...........",
".#cccccccd##baaaaaaaa##.........",
".#cccccccccd##baaaaaaa#.........",
".#cccccfcffgg#bbbbaaaaa#........",
".#ccccccfcfffd#bbbbbbaa#........",
".#cccfcfcfcffgd##bh#bbba#.......",
".#ccccfcfffffffgd#dd##ba#.......",
".#cfcfcfcfffffffffgfgd#bb#......",
".#ccfcfffffffffgfgfgfgd#b#......",
".#cfcfcfffffffffgfgfggd#b#......",
".#fcfffffffffgfgfgggggd#b#......",
".#cfcfffffffffgfgfggggd#b#......",
".#fffffffffgfgfgggggggdhb#......",
".#ffffffffffgfgfggggggd#b#......",
".#ggfffffgfgfgggggggggd#b#......",
".#ddggffffgfgfggggggggd#b#......",
"..##ddggfgfgggggggggggd#b#......",
"....##ddgggfggggggggggd#b#......",
"......##ddggggggggggggd#b#......",
"........##ddggggggggggd#b#......",
"..........##ddggggggggd#b#......",
"............##ddggggggd#b###....",
"..............##ddggggd#b#####..",
"................##ddggd#b######.",
"..................##ddd#b#####..",
"....................##d#b###....",
"......................####......"};
/*
* Constructs a KSGraphWizardInterf which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*
* The wizard will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal wizard.
*/
KSGraphWizardInterf::KSGraphWizardInterf( QWidget* parent, const char* name, bool modal, WFlags fl )
: QWizard( parent, name, modal, fl )
{
QPixmap image0( ( const char** ) image0_data );
if ( !name )
setName( "KSGraphWizardInterf" );
resize( 533, 491 );
setCaption( trUtf8( "Graph wizard" ) );
page = new QWidget( this, "page" );
pageLayout = new QGridLayout( page, 1, 1, 25, 6, "pageLayout");
TextLabel1 = new QLabel( page, "TextLabel1" );
TextLabel1->setText( trUtf8( "<center><h2>Welcome in the graph wizard !</h2></center>\n"
"<br>\n"
"<p>This wizard allows you to create graphs easily and quickly. Notice that it doesn't cover all aspects of graph appearance, but concentrates on organising your data. You will have to tune other graph properties after finishing work with this wizard. Graphs are created in two simple steps:</p>\n"
"<br>\n"
"\n"
"<UL>\n"
"<LI><b>First step.</b>\n"
"In the first step you choose a graph type and a worksheet with your data. The graph is added to the currently selected axes, but if you didn't create axes yet you will have an occasion to create a new axes object together with your graph.\n"
"</UL>\n"
"<br>\n"
"<UL>\n"
"<LI><b>Second step.</b>\n"
"In the second step you assign data to the graph. Each graph accepts a few matrices, some are required and some are optional. For example, an ordinary XY plot accepts four matrices: X,<b>Y</b>, DX, DY - optional matrices are grayed out. You assign the data to them by selecting areas in the worksheet, but you can also write a formula. The size of all matrices must be correct, in this example all ones must be column vectors with the same number of rows. \n"
"\n"
"</UL>" ) );
TextLabel1->setTextFormat( QLabel::RichText );
TextLabel1->setAlignment( int( QLabel::WordBreak | QLabel::AlignJustify | QLabel::AlignTop ) );
pageLayout->addWidget( TextLabel1, 0, 0 );
addPage( page, trUtf8( "" ) );
page_2 = new QWidget( this, "page_2" );
pageLayout_2 = new QGridLayout( page_2, 1, 1, 2, 5, "pageLayout_2");
GroupBox2 = new QGroupBox( page_2, "GroupBox2" );
GroupBox2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)7, 0, 4, GroupBox2->sizePolicy().hasHeightForWidth() ) );
GroupBox2->setMinimumSize( QSize( 0, 220 ) );
GroupBox2->setTitle( trUtf8( "Select graph type" ) );
GroupBox2->setColumnLayout(0, Qt::Vertical );
GroupBox2->layout()->setSpacing( 6 );
GroupBox2->layout()->setMargin( 11 );
GroupBox2Layout = new QGridLayout( GroupBox2->layout() );
GroupBox2Layout->setAlignment( Qt::AlignTop );
graphSubtype = new QIconView( GroupBox2, "graphSubtype" );
(void) new QIconViewItem( graphSubtype, trUtf8( "New Item" ), image0 );
(void) new QIconViewItem( graphSubtype, trUtf8( "New Item" ), image0 );
graphSubtype->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, graphSubtype->sizePolicy().hasHeightForWidth() ) );
graphSubtype->setMouseTracking( FALSE );
graphSubtype->setAcceptDrops( FALSE );
graphSubtype->setVScrollBarMode( QIconView::Auto );
graphSubtype->setHScrollBarMode( QIconView::AlwaysOff );
graphSubtype->setDragAutoScroll( FALSE );
graphSubtype->setItemsMovable( FALSE );
GroupBox2Layout->addWidget( graphSubtype, 1, 1 );
TextLabel6 = new QLabel( GroupBox2, "TextLabel6" );
TextLabel6->setText( trUtf8( " Subtype" ) );
GroupBox2Layout->addWidget( TextLabel6, 0, 1 );
graphType = new QListBox( GroupBox2, "graphType" );
graphType->insertItem( trUtf8( "XY plot" ) );
graphType->insertItem( trUtf8( "Pixmap" ) );
graphType->insertItem( trUtf8( "Contour" ) );
graphType->insertItem( trUtf8( "Surface" ) );
graphType->insertItem( trUtf8( "Figure" ) );
graphType->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)7, 0, 0, graphType->sizePolicy().hasHeightForWidth() ) );
graphType->setMinimumSize( QSize( 160, 0 ) );
graphType->setMaximumSize( QSize( 160, 32767 ) );
QFont graphType_font( graphType->font() );
graphType_font.setPointSize( 14 );
graphType_font.setBold( TRUE );
graphType->setFont( graphType_font );
graphType->setMargin( 3 );
graphType->setHScrollBarMode( QListBox::AlwaysOff );
GroupBox2Layout->addWidget( graphType, 1, 0 );
TextLabel5 = new QLabel( GroupBox2, "TextLabel5" );
TextLabel5->setText( trUtf8( " Type :" ) );
GroupBox2Layout->addWidget( TextLabel5, 0, 0 );
pageLayout_2->addMultiCellWidget( GroupBox2, 1, 1, 0, 1 );
GroupBox5 = new QGroupBox( page_2, "GroupBox5" );
GroupBox5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 1, 2, GroupBox5->sizePolicy().hasHeightForWidth() ) );
GroupBox5->setTitle( trUtf8( "Worksheet" ) );
GroupBox5->setAlignment( int( QGroupBox::AlignTop ) );
GroupBox5->setColumnLayout(0, Qt::Vertical );
GroupBox5->layout()->setSpacing( 6 );
GroupBox5->layout()->setMargin( 15 );
GroupBox5Layout = new QGridLayout( GroupBox5->layout() );
GroupBox5Layout->setAlignment( Qt::AlignTop );
worksheetList = new KSChannelList( GroupBox5, "worksheetList" );
worksheetList->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, worksheetList->sizePolicy().hasHeightForWidth() ) );
worksheetList->setMaximumSize( QSize( 32767, 150 ) );
GroupBox5Layout->addWidget( worksheetList, 0, 0 );
pageLayout_2->addWidget( GroupBox5, 0, 0 );
useAxes = new QButtonGroup( page_2, "useAxes" );
useAxes->setFrameShadow( QButtonGroup::Sunken );
useAxes->setTitle( trUtf8( "Axes" ) );
useAxes->setExclusive( TRUE );
useAxes->setColumnLayout(0, Qt::Vertical );
useAxes->layout()->setSpacing( 6 );
useAxes->layout()->setMargin( 40 );
useAxesLayout = new QGridLayout( useAxes->layout() );
useAxesLayout->setAlignment( Qt::AlignTop );
newAxes3D = new QRadioButton( useAxes, "newAxes3D" );
newAxes3D->setText( trUtf8( "Create new XYZ axes" ) );
useAxesLayout->addWidget( newAxes3D, 2, 0 );
newAxes2D = new QRadioButton( useAxes, "newAxes2D" );
newAxes2D->setText( trUtf8( "Create new XY axes" ) );
useAxesLayout->addWidget( newAxes2D, 1, 0 );
selectedAxes = new QRadioButton( useAxes, "selectedAxes" );
selectedAxes->setText( trUtf8( "Use the selected axes" ) );
useAxesLayout->addWidget( selectedAxes, 0, 0 );
pageLayout_2->addWidget( useAxes, 0, 1 );
addPage( page_2, trUtf8( "1. Choose a source worksheet and a graph type" ) );
page_3 = new QWidget( this, "page_3" );
pageLayout_3 = new QGridLayout( page_3, 1, 1, 2, 5, "pageLayout_3");
GroupBox3_2 = new QGroupBox( page_3, "GroupBox3_2" );
GroupBox3_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, GroupBox3_2->sizePolicy().hasHeightForWidth() ) );
GroupBox3_2->setTitle( trUtf8( "Graph data" ) );
GroupBox3_2->setColumnLayout(0, Qt::Vertical );
GroupBox3_2->layout()->setSpacing( 6 );
GroupBox3_2->layout()->setMargin( 11 );
GroupBox3_2Layout = new QGridLayout( GroupBox3_2->layout() );
GroupBox3_2Layout->setAlignment( Qt::AlignTop );
TabWidget2 = new QTabWidget( GroupBox3_2, "TabWidget2" );
TabWidget2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 1, TabWidget2->sizePolicy().hasHeightForWidth() ) );
TabWidget2->setTabShape( QTabWidget::Rounded );
tab = new QWidget( TabWidget2, "tab" );
tabLayout = new QGridLayout( tab, 1, 1, 2, 6, "tabLayout");
sheetEditorPlace = new QFrame( tab, "sheetEditorPlace" );
sheetEditorPlace->setFrameShape( QFrame::StyledPanel );
sheetEditorPlace->setFrameShadow( QFrame::Sunken );
tabLayout->addWidget( sheetEditorPlace, 0, 0 );
TabWidget2->insertTab( tab, trUtf8( "Data range" ) );
tab_2 = new QWidget( TabWidget2, "tab_2" );
tabLayout_2 = new QGridLayout( tab_2, 1, 1, 11, 6, "tabLayout_2");
useFormula = new QCheckBox( tab_2, "useFormula" );
useFormula->setText( trUtf8( "Formula" ) );
tabLayout_2->addWidget( useFormula, 0, 0 );
QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
tabLayout_2->addItem( spacer, 2, 0 );
formulaString = new QTextEdit( tab_2, "formulaString" );
formulaString->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, formulaString->sizePolicy().hasHeightForWidth() ) );
formulaString->setMaximumSize( QSize( 32767, 32767 ) );
tabLayout_2->addWidget( formulaString, 1, 0 );
TabWidget2->insertTab( tab_2, trUtf8( "Options" ) );
GroupBox3_2Layout->addMultiCellWidget( TabWidget2, 0, 2, 1, 1 );
channelList = new QListBox( GroupBox3_2, "channelList" );
channelList->insertItem( trUtf8( "New Item" ) );
channelList->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 3, channelList->sizePolicy().hasHeightForWidth() ) );
channelList->setMaximumSize( QSize( 150, 32767 ) );
GroupBox3_2Layout->addWidget( channelList, 0, 0 );
channelDescription = new QLabel( GroupBox3_2, "channelDescription" );
channelDescription->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, channelDescription->sizePolicy().hasHeightForWidth() ) );
channelDescription->setMinimumSize( QSize( 150, 0 ) );
channelDescription->setMaximumSize( QSize( 150, 32767 ) );
QFont channelDescription_font( channelDescription->font() );
channelDescription_font.setPointSize( 9 );
channelDescription->setFont( channelDescription_font );
channelDescription->setText( trUtf8( "Select a data channel on the list above and assign data to it by selecting cells of the worksheet." ) );
channelDescription->setAlignment( int( QLabel::WordBreak | QLabel::AlignJustify | QLabel::AlignTop ) );
channelDescription->setIndent( 5 );
GroupBox3_2Layout->addWidget( channelDescription, 2, 0 );
clearChannel = new QPushButton( GroupBox3_2, "clearChannel" );
clearChannel->setText( trUtf8( "Clear" ) );
GroupBox3_2Layout->addWidget( clearChannel, 1, 0 );
pageLayout_3->addWidget( GroupBox3_2, 0, 0 );
addPage( page_3, trUtf8( "2. Assign data to the graph" ) );
page_4 = new QWidget( this, "page_4" );
pageLayout_4 = new QGridLayout( page_4, 1, 1, 11, 6, "pageLayout_4");
previewPlace = new QFrame( page_4, "previewPlace" );
previewPlace->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, previewPlace->sizePolicy().hasHeightForWidth() ) );
previewPlace->setPaletteBackgroundColor( QColor( 255, 255, 255 ) );
previewPlace->setFrameShape( QFrame::Panel );
previewPlace->setFrameShadow( QFrame::Sunken );
pageLayout_4->addWidget( previewPlace, 0, 0 );
addPage( page_4, trUtf8( "Click <b>Finish</b> to create the graph" ) );
}
/*
* Destroys the object and frees any allocated resources
*/
KSGraphWizardInterf::~KSGraphWizardInterf()
{
// no need to delete child widgets, Qt does it all for us
}
#include "ksgraphwizardinterf.moc"