Example #1
0
void CheckDocument::changeEvent(QEvent *e)
{
	if (e->type() == QEvent::LanguageChange)
	{
		languageChange();
	}
	else
		QWidget::changeEvent(e);
}
Example #2
0
void AlignDistributePalette::changeEvent(QEvent *e)
{
	if (e->type() == QEvent::LanguageChange)
	{
		languageChange();
	}
	else
		QWidget::changeEvent(e);
}
bool Fantasma::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    default:
	return QWidget::qt_invoke( _id, _o );
    }
    return TRUE;
}
void PropertiesPalette_Group::changeEvent(QEvent *e)
{
	if (e->type() == QEvent::LanguageChange)
	{
		languageChange();
		return;
	}
	QWidget::changeEvent(e);
}
PolynomFitDialog::PolynomFitDialog(QWidget *parent, Qt::WFlags fl)
    : QDialog(parent, fl) {
  setWindowTitle(tr("Polynomial Fit Options"));
  setSizeGripEnabled(true);

  QGroupBox *gb1 = new QGroupBox();
  QGridLayout *gl1 = new QGridLayout(gb1);
  gl1->addWidget(new QLabel(tr("Polynomial Fit of")), 0, 0);

  boxName = new QComboBox();
  gl1->addWidget(boxName, 0, 1);

  gl1->addWidget(new QLabel(tr("Order (1 - 9, 1 = linear)")), 1, 0);
  boxOrder = new QSpinBox();
  boxOrder->setRange(1, 9);
  boxOrder->setValue(2);
  gl1->addWidget(boxOrder, 1, 1);

  gl1->addWidget(new QLabel(tr("Fit curve Xmin")), 2, 0);
  boxStart = new QLineEdit(tr("0"));
  gl1->addWidget(boxStart, 2, 1);

  gl1->addWidget(new QLabel(tr("Fit curve Xmax")), 3, 0);
  boxEnd = new QLineEdit();
  gl1->addWidget(boxEnd, 3, 1);

  gl1->addWidget(new QLabel(tr("Color")), 4, 0);
  boxColor = new ColorBox();
  boxColor->setColor(QColor(Qt::red));
  gl1->addWidget(boxColor, 4, 1);

  boxShowFormula = new QCheckBox(tr("Show Formula on Graph?"));
  boxShowFormula->setChecked(false);
  gl1->addWidget(boxShowFormula, 5, 1);
  gl1->setRowStretch(6, 1);

  buttonFit = new QPushButton(tr("&Fit"));
  buttonFit->setDefault(true);

  buttonCancel = new QPushButton(tr("&Close"));

  QVBoxLayout *vl = new QVBoxLayout();
  vl->addWidget(buttonFit);
  vl->addWidget(buttonCancel);
  vl->addStretch();

  QHBoxLayout *hlayout = new QHBoxLayout(this);
  hlayout->addWidget(gb1);
  hlayout->addLayout(vl);

  languageChange();

  connect(buttonFit, SIGNAL(clicked()), this, SLOT(fit()));
  connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
  connect(boxName, SIGNAL(activated(const QString &)), this,
          SLOT(activateCurve(const QString &)));
}
void HelpBrowser::changeEvent(QEvent *e)
{
	if (e->type() == QEvent::LanguageChange)
	{
		languageChange();
	}
	else
		QWidget::changeEvent(e);
}
void PropertyWidget_OptMargins::changeEvent(QEvent *e)
{
	if (e->type() == QEvent::LanguageChange)
	{
		languageChange();
		return;
	}
	QWidget::changeEvent(e);
}
Example #8
0
void NodePalette::changeEvent(QEvent *e)
{
	if (e->type() == QEvent::LanguageChange)
	{
		languageChange();
	}
	else
		QWidget::changeEvent(e);
}
void SMCStyleWidget::changeEvent(QEvent *e)
{
	if (e->type() == QEvent::LanguageChange)
	{
		languageChange();
	}
	else
		QWidget::changeEvent(e);
}
Example #10
0
void PageSelector::changeEvent(QEvent *e)
{
	if (e->type() == QEvent::LanguageChange)
	{
		languageChange();
	}
	else
		QWidget::changeEvent(e);
}
void PropertyWidget_TextColor::changeEvent(QEvent *e)
{
	if (e->type() == QEvent::LanguageChange)
	{
		languageChange();
		return;
	}
	QWidget::changeEvent(e);
}
Example #12
0
void LoremManager::changeEvent(QEvent *e)
{
	if (e->type() == QEvent::LanguageChange)
	{
		languageChange();
	}
	else
		QWidget::changeEvent(e);
}
Prefs_PageSizes::Prefs_PageSizes(QWidget* parent, ScribusDoc* doc)
	: Prefs_Pane(parent)
{
	setupUi(this);
	languageChange();
	toActiveButton->setIcon(IconManager::instance()->loadIcon("22/go-next.png"));
	fromActiveButton->setIcon(IconManager::instance()->loadIcon("22/go-previous.png"));
	connect(toActiveButton, SIGNAL(clicked()), this, SLOT(moveToActive()));
	connect(fromActiveButton, SIGNAL(clicked()), this, SLOT(moveFromActive()));
}
bool DialogForm::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: toggleDetails(); break;
    case 1: languageChange(); break;
    default:
	return QDialog::qt_invoke( _id, _o );
    }
    return TRUE;
}
PropertyWidget_OptMargins::PropertyWidget_OptMargins(QWidget* parent) : QFrame(parent)
{
	setupUi(this);

	setFrameStyle(QFrame::Box | QFrame::Plain);
	setLineWidth(1);
	layout()->setAlignment( Qt::AlignTop );

	languageChange();
}
Example #16
0
void PagePalette::changeEvent(QEvent *e)
{
	if (e->type() == QEvent::LanguageChange)
	{
		languageChange();
		return;
	}

	ScDockPalette::changeEvent(e);
}
Example #17
0
bool dlgEpargne::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: Ok(); break;
    case 1: languageChange(); break;
    default:
	return QDialog::qt_invoke( _id, _o );
    }
    return TRUE;
}
Example #18
0
PropertiesPalette_Line::PropertiesPalette_Line( QWidget* parent) : QWidget(parent)
{
	m_ScMW = 0;
	m_doc  = 0;
	m_haveDoc  = false;
	m_haveItem = false;
	m_lineMode = false;
	m_unitRatio = 1.0;

	setupUi(this);
	setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));

	lineType->addItem( tr("Custom"));

	lineModeLabel->setBuddy(lineMode);
	lineTypeLabel->setBuddy(lineType);

	startArrowLabel->setBuddy(startArrow);
	endArrowLabel->setBuddy(endArrow);

	startArrowScale->setMaximum( 300 );
	startArrowScale->setMinimum( 1 );

	endArrowScale->setMaximum( 300 );
	endArrowScale->setMinimum( 1 );

	lineWidthLabel->setBuddy(lineWidth);
	lineJoinLabel->setBuddy(lineJoinStyle);
	lineEndLabel->setBuddy(lineEndStyle);

	lineStyles->setItemDelegate(new LineFormatItemDelegate);
	lineStyles->addItem( "No Style" );

	tableLineLayout->setAlignment( Qt::AlignTop );

	languageChange();

	connect(lineWidth     , SIGNAL(valueChanged(double)), this, SLOT(handleLineWidth()));
	connect(lineType    , SIGNAL(activated(int))      , this, SLOT(handleLineStyle()));
	connect(lineJoinStyle, SIGNAL(activated(int))      , this, SLOT(handleLineJoin()));
	connect(lineEndStyle , SIGNAL(activated(int))      , this, SLOT(handleLineEnd()));
	connect(lineMode  , SIGNAL(activated(int))      , this, SLOT(handleLineMode()));
	connect(dashEditor, SIGNAL(dashChanged())       , this, SLOT(handleDashChange()));
	connect(topLine   , SIGNAL(clicked())           , this, SLOT(handleTLines()));
	connect(leftLine  , SIGNAL(clicked())           , this, SLOT(handleTLines()));
	connect(rightLine , SIGNAL(clicked())           , this, SLOT(handleTLines()));
	connect(bottomLine, SIGNAL(clicked())           , this, SLOT(handleTLines()));
	connect(startArrow, SIGNAL(activated(int))      , this, SLOT(handleStartArrow(int )));
	connect(endArrow  , SIGNAL(activated(int))      , this, SLOT(handleEndArrow(int )));
	connect(startArrowScale, SIGNAL(valueChanged(int)), this, SLOT(handleStartArrowScale(int )));
	connect(endArrowScale  , SIGNAL(valueChanged(int)), this, SLOT(handleEndArrowScale(int )));
	connect(lineStyles, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(handleLineStyle(QListWidgetItem*)));

	stackedWidget->setCurrentIndex(0);
}
Example #19
0
PythonConsole::PythonConsole( QWidget* parent)
	: QMainWindow( parent )
{
	setupUi(this);
	setWindowIcon(loadIcon("AppIcon.png"));

	changedLabel = new QLabel(this);
	cursorTemplate = tr("Col: %1 Row: %2/%3");
	cursorLabel = new QLabel(this);
	statusBar()->addPermanentWidget(changedLabel);
	statusBar()->addPermanentWidget(cursorLabel);

	action_Open->setIcon(loadIcon("16/document-open.png"));
	action_Save->setIcon(loadIcon("16/document-save.png"));
	actionSave_As->setIcon(loadIcon("16/document-save-as.png"));
	action_Exit->setIcon(loadIcon("exit.png"));
	action_Run->setIcon(loadIcon("ok.png"));

	action_Open->setShortcut(tr("Ctrl+O"));
	action_Save->setShortcut(tr("Ctrl+S"));
	action_Run->setShortcut(Qt::Key_F9);
	actionRun_As_Console->setShortcut(Qt::CTRL + Qt::Key_F9);

	commandEdit->setTabStopWidth(qRound(commandEdit->fontPointSize() * 4));

	// install syntax highlighter.
	//SyntaxHighlighter *sxHigh =
	new SyntaxHighlighter(commandEdit);

	languageChange();
	commandEdit_cursorPositionChanged();

	// welcome note
	QString welcomeText("\"\"\"");
	welcomeText += tr("Scribus Python Console");
	welcomeText += "\n\n";
	welcomeText += tr(
			"This is a standard Python console with some \n"
			"known limitations. Please consult the Scribus \n"
			"Scripter documentation for futher information. ");
	welcomeText += "\"\"\"\n";
	commandEdit->setText(welcomeText);
	commandEdit->selectAll();

	connect(commandEdit, SIGNAL(cursorPositionChanged()), this, SLOT(commandEdit_cursorPositionChanged()));
	connect(commandEdit->document(), SIGNAL(modificationChanged(bool)), this, SLOT(documentChanged(bool)));

	connect(action_Open, SIGNAL(triggered()), this, SLOT(slot_open()));
	connect(action_Save, SIGNAL(triggered()), this, SLOT(slot_save()));
	connect(actionSave_As, SIGNAL(triggered()), this, SLOT(slot_saveAs()));
	connect(action_Exit, SIGNAL(triggered()), this, SLOT(slot_quit()));
	connect(action_Run, SIGNAL(triggered()), this, SLOT(slot_runScript()));
	connect(actionRun_As_Console, SIGNAL(triggered()), this, SLOT(slot_runScriptAsConsole()));
	connect(action_Save_Output, SIGNAL(triggered()), this, SLOT(slot_saveOutput()));
}
Example #20
0
/*
 *  Constructs a ConfigDialog as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
ConfigDialog::ConfigDialog( QWidget* parent, const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    if ( !name )
	setName( "ConfigDialog" );
    ConfigDialogLayout = new QHBoxLayout( this, 11, 6, "ConfigDialogLayout"); 

    layout1 = new QGridLayout( 0, 1, 1, 0, 6, "layout1"); 

    titleAlign = new QButtonGroup( this, "titleAlign" );
    titleAlign->setColumnLayout(0, Qt::Vertical );
    titleAlign->layout()->setSpacing( 6 );
    titleAlign->layout()->setMargin( 11 );
    titleAlignLayout = new QHBoxLayout( titleAlign->layout() );
    titleAlignLayout->setAlignment( Qt::AlignTop );

    AlignLeft = new QRadioButton( titleAlign, "AlignLeft" );
    titleAlignLayout->addWidget( AlignLeft );

    AlignHCenter = new QRadioButton( titleAlign, "AlignHCenter" );
    titleAlignLayout->addWidget( AlignHCenter );

    AlignRight = new QRadioButton( titleAlign, "AlignRight" );
    titleAlignLayout->addWidget( AlignRight );

    layout1->addMultiCellWidget( titleAlign, 0, 0, 0, 4 );

    highContrastButtons = new QCheckBox( this, "highContrastButtons" );

    layout1->addMultiCellWidget( highContrastButtons, 3, 3, 0, 2 );

    designatedTitlebarColor = new QCheckBox( this, "designatedTitlebarColor" );

    layout1->addMultiCellWidget( designatedTitlebarColor, 1, 1, 0, 4 );

    bordersBlendColor = new QCheckBox( this, "bordersBlendColor" );

    layout1->addMultiCellWidget( bordersBlendColor, 2, 2, 0, 3 );

    titleShadow = new QCheckBox( this, "titleShadow" );

    layout1->addMultiCellWidget( titleShadow, 4, 4, 0, 4 );
    ConfigDialogLayout->addLayout( layout1 );
    languageChange();
    resize( QSize(541, 194).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( AlignLeft, AlignHCenter );
    setTabOrder( AlignHCenter, AlignRight );
    setTabOrder( AlignRight, designatedTitlebarColor );
    setTabOrder( designatedTitlebarColor, bordersBlendColor );
    setTabOrder( bordersBlendColor, highContrastButtons );
    setTabOrder( highContrastButtons, titleShadow );
}
Example #21
0
bool MainAppWidget::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: slot_cmdactivated((const QString&)static_QUType_QString.get(_o+1)); break;
    case 1: slot_cmdactivated_int((int)static_QUType_int.get(_o+1)); break;
    case 2: languageChange(); break;
    default:
	return QMainWindow::qt_invoke( _id, _o );
    }
    return TRUE;
}
bool DateDialog::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    case 1: ok(); break;
    case 2: cancel(); break;
    default:
	return QDialog::qt_invoke( _id, _o );
    }
    return TRUE;
}
Example #23
0
bool ConnectDialog::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: init(); break;
    case 1: destroy(); break;
    case 2: languageChange(); break;
    default:
	return QDialog::qt_invoke( _id, _o );
    }
    return TRUE;
}
bool tbMainWindow::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: tbMainWindowSearchButton_clicked(); break;
    case 1: tbMainWindowCancelButton_clicked(); break;
    case 2: languageChange(); break;
    default:
	return QDialog::qt_invoke( _id, _o );
    }
    return TRUE;
}
Example #25
0
void HelpBrowser::setupLocalUI()
{
	setWindowIcon(loadIcon("AppIcon.png"));
	//Add Menus
	fileMenu=menuBar()->addMenu("");
	editMenu=menuBar()->addMenu("");
	bookMenu=menuBar()->addMenu("");
	histMenu=new QMenu(this);

	//Add Menu items
	filePrint=fileMenu->addAction(loadIcon("16/document-print.png"), "", this, SLOT(print()), Qt::CTRL+Qt::Key_P);
	fileMenu->addSeparator();
	fileExit=fileMenu->addAction(loadIcon("exit.png"), "", this, SLOT(close()));
	editFind=editMenu->addAction(loadIcon("find.png"), "", this, SLOT(find()), Qt::CTRL+Qt::Key_F);
	editFindNext=editMenu->addAction( "", this, SLOT(findNext()), Qt::Key_F3);
	editFindPrev=editMenu->addAction( "", this, SLOT(findPrevious()), Qt::SHIFT+Qt::Key_F3);
	bookAdd=bookMenu->addAction( "", this, SLOT(bookmarkButton_clicked()), Qt::CTRL+Qt::Key_D);
	bookDel=bookMenu->addAction( "", this, SLOT(deleteBookmarkButton_clicked()));
	bookDelAll=bookMenu->addAction( "", this, SLOT(deleteAllBookmarkButton_clicked()));

	//Add Toolbar items
	goHome=toolBar->addAction(loadIcon("16/go-home.png"), "", textBrowser, SLOT(home()));
	goBack=toolBar->addAction(loadIcon("16/go-previous.png"), "", textBrowser, SLOT(backward()));
	goFwd=toolBar->addAction(loadIcon("16/go-next.png"), "", textBrowser, SLOT(forward()));
	goBack->setMenu(histMenu);
	
	listView->header()->hide();
	searchingView->header()->hide();
	bookmarksView->header()->hide();

	splitter->setStretchFactor(splitter->indexOf(tabWidget), 0);
	splitter->setStretchFactor(splitter->indexOf(textBrowser), 1);
	// reset previous size
	prefs = PrefsManager::instance()->prefsFile->getPluginContext("helpbrowser");
	int xsize = prefs->getUInt("xsize", 640);
	int ysize = prefs->getUInt("ysize", 480);
	resize(QSize(xsize, ysize).expandedTo(minimumSizeHint()) );

	//basic ui
	connect(histMenu, SIGNAL(triggered(QAction*)), this, SLOT(histChosen(QAction*)));
	// searching
	connect(searchingEdit, SIGNAL(returnPressed()), this, SLOT(searchingButton_clicked()));
	connect(searchingButton, SIGNAL(clicked()), this, SLOT(searchingButton_clicked()));
	connect(searchingView, SIGNAL(itemClicked( QTreeWidgetItem *, int)), this, SLOT(itemSearchSelected(QTreeWidgetItem *, int)));
	// bookmarks
	connect(bookmarkButton, SIGNAL(clicked()), this, SLOT(bookmarkButton_clicked()));
	connect(deleteBookmarkButton, SIGNAL(clicked()), this, SLOT(deleteBookmarkButton_clicked()));
	connect(deleteAllBookmarkButton, SIGNAL(clicked()), this, SLOT(deleteAllBookmarkButton_clicked()));
	connect(bookmarksView, SIGNAL(itemClicked( QTreeWidgetItem *, int)), this, SLOT(itemBookmarkSelected(QTreeWidgetItem *, int)));
	// links hoover
	connect(textBrowser, SIGNAL(overLink(const QString &)), this, SLOT(showLinkContents(const QString &)));
	
	languageChange();
}
bool PreviewWidgetBase::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    case 1: init(); break;
    case 2: destroy(); break;
    default:
	return QWidget::qt_invoke( _id, _o );
    }
    return TRUE;
}
bool ConfigurationDialogBase::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: defaultTimeLabel_destroyed((QObject*)static_QUType_ptr.get(_o+1)); break;
    case 1: notifyPortLabel_destroyed((QObject*)static_QUType_ptr.get(_o+1)); break;
    case 2: languageChange(); break;
    default:
	return QDialog::qt_invoke( _id, _o );
    }
    return TRUE;
}
Example #28
0
bool NewFormBase::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    case 1: itemChanged((QIconViewItem*)static_QUType_ptr.get(_o+1)); break;
    case 2: projectChanged((const QString&)static_QUType_QString.get(_o+1)); break;
    default:
	return QDialog::qt_invoke( _id, _o );
    }
    return TRUE;
}
Example #29
0
bool EvaLoginVeriUIBase::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0:
        languageChange();
        break;
    default:
        return QDialog::qt_invoke( _id, _o );
    }
    return TRUE;
}
matrixDialog::matrixDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "matrixDialog" );
    setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, sizePolicy().hasHeightForWidth() ) );
    setMouseTracking( false );

	QButtonGroup *GroupBox1 = new QButtonGroup(3, QGroupBox::Horizontal,QString::null,this,"GroupBox1" );
	GroupBox1->setFlat(TRUE);
	GroupBox1->setLineWidth(0);

	new QLabel( tr( "Cell Width" ), GroupBox1, "TextLabel2",0 );
    boxColWidth = new QSpinBox(0,1000,10, GroupBox1, "boxColWidth" );
	new QLabel( "", GroupBox1, "TextLabel22",0 );

	new QLabel( tr( "Data Format" ), GroupBox1, "TextLabel2",0 );
    boxFormat = new QComboBox(GroupBox1, "boxFormat" );
	new QLabel( "", GroupBox1, "TextLabel23",0 );

	new QLabel( tr( "Numeric Display" ), GroupBox1, "TextLabel2",0 );
    boxNumericDisplay = new QComboBox(GroupBox1, "boxNumericDisplay");
	boxPrecision = new QSpinBox(0,100,1, GroupBox1, "boxPrecision");
	boxPrecision->hide();

	QButtonGroup *GroupBox2 = new QButtonGroup( 3,QGroupBox::Horizontal,QString::null,this,"GroupBox2" );
	GroupBox2->setFlat(TRUE);
	GroupBox2->setLineWidth(0);
	
	buttonApply = new QPushButton(GroupBox2, "buttonApply" );
    buttonApply->setAutoDefault( TRUE );

	buttonOk = new QPushButton(GroupBox2, "buttonOk" );
    buttonOk->setAutoDefault( TRUE );
    buttonOk->setDefault( TRUE );
   
    buttonCancel = new QPushButton(GroupBox2, "buttonCancel" );
    buttonCancel->setAutoDefault( TRUE );
	
	QVBoxLayout* hlayout = new QVBoxLayout(this, 5, 5, "hlayout");
    hlayout->addWidget(GroupBox1);
	hlayout->addWidget(GroupBox2);

    languageChange();
   
    // signals and slots connections
	connect( buttonApply, SIGNAL( clicked() ), this, SLOT( apply() ) );
    connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
    connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
	connect( boxNumericDisplay, SIGNAL( activated(int) ), this, SLOT( showPrecisionBox(int) ) );
	connect( boxColWidth, SIGNAL( valueChanged(int) ), this, SIGNAL( changeColumnsWidth(int) ) );
	connect( boxPrecision, SIGNAL( valueChanged(int) ), this, SLOT( changePrecision(int) ) );
}