示例#1
0
/*!
 * \en	Constructor. \_en
 * \ru	Конструктор.
 * 	Задает значение ширины по умолчанию для столбца = 100. \_ru
 */
wDBTable::wDBTable( QString objtype,  QWidget *parent, const char *name )
    : Q3DataTable( parent, name )
{
//	vId = 0;
//	verticalHeader()->hide();
	setLeftMargin(0);
	setNullText("");
	objtype = "";
	defColWidth = 100; //default column width
	tableInd = -1;
	inEditMode = false;
	searchWidget = 0;
	searchMode = false;
	searchString = "";
	connect( this, SIGNAL(cursorChanged ( QSql::Op ) ), this, SLOT(lineUpdate( QSql::Op ) ) );
	connect( this, SIGNAL(currentChanged ( int, int ) ), this, SLOT(lineChange( int, int ) ) );
	connect( this, SIGNAL(beforeInsert ( QSqlRecord* ) ), this, SLOT(lineInsert( QSqlRecord* ) ) );
	connect( this, SIGNAL(valueChanged ( int, int )  ), this, SLOT(updateTableCellHandler(int, int ) ) );
	connect( this, SIGNAL(doubleClicked ( int, int, int, const QPoint&) ), this, SLOT(doubleClickEventHandler(int,int,int, const QPoint&)));
	init();


	aLog::print(aLog::Debug, tr("wDBTable init ok"));
//	printf("ok init wdbtable\n");

}
CProcessListTable::CProcessListTable (QWidget * parent, CMySQLServer *m)
: CQueryTable(parent, 0, m, "CProcessListTable")
{
  bool notnew = m->mysql()->version().major <= 3 && m->mysql()->version().minor <= 22;

  sql = "SHOW ";
  if (!notnew)
    sql += "FULL ";
  sql += "PROCESSLIST";

  setKeepColumnWidth(true);
  qry = new CMySQLQuery(m->mysql());
  qry->setEmitMessages(false);
  setQuery(qry);

  columnsWindow = new CTableFieldChooser(0, this, "CProcessListTableColumnsWindow");
  setCaption(tr("Process List"));
  columnsWindow->setCaption("[" + m->connectionName() + "] " + tr("Process List Columns"));
  verticalHeader()->hide();
  setFocusStyle(QTable::FollowStyle);
  setSelectionMode(QTable::MultiRow);
  setLeftMargin(0);
  is_first = true;
  setReadOnly(false);
  refresh();
}
示例#3
0
KVocTrainTable::KVocTrainTable(kvoctrainDoc *doc, const LangSet *ls, QWidget *parent, const char *name)
  : QTable(parent, name), langs(ls)
{
  m_doc = doc;
  defaultItem = 0;
  setNumCols(m_doc->numLangs());
  setNumRows(m_doc->numEntries());

  setLeftMargin(0);
  setSelectionMode(MultiRow);
  setColumnMovingEnabled(false);
  setRowMovingEnabled(false);
  setSorting(false);

  setDoc(m_doc);

  triggerSect = -1;

  m_pixInQuery = QPixmap(KGlobal::iconLoader()->loadIcon("ok", KIcon::Small));
  m_pixInactive = QPixmap(KGlobal::iconLoader()->loadIcon("no", KIcon::Small));

  delayTimer = new QTimer(this);
  connect(delayTimer, SIGNAL(timeout()), this, SLOT(menuTriggerTimeout()));

  QHeader *header = horizontalHeader();
  connect(header, SIGNAL(pressed(int)), this, SLOT(headerPressEvent(int)));
  connect(header, SIGNAL(released(int)), this, SLOT(headerReleaseEvent(int)));

  connect(this, SIGNAL(currentChanged(int, int)), this, SLOT(slotCurrentChanged(int, int)));
}
示例#4
0
void Text3DOverlay::setProperties(const QVariantMap& properties) {
    Billboard3DOverlay::setProperties(properties);

    auto text = properties["text"];
    if (text.isValid()) {
        setText(text.toString());
    }

    auto textAlpha = properties["textAlpha"];
    if (textAlpha.isValid()) {
        float prevTextAlpha = getTextAlpha();
        setTextAlpha(textAlpha.toFloat());
        // Update our payload key if necessary to handle transparency
        if ((prevTextAlpha < 1.0f && _textAlpha >= 1.0f) || (prevTextAlpha >= 1.0f && _textAlpha < 1.0f)) {
            auto itemID = getRenderItemID();
            if (render::Item::isValidID(itemID)) {
                render::ScenePointer scene = AbstractViewStateInterface::instance()->getMain3DScene();
                render::Transaction transaction;
                transaction.updateItem(itemID);
                scene->enqueueTransaction(transaction);
            }
        }
    }

    bool valid;
    auto backgroundColor = properties["backgroundColor"];
    if (backgroundColor.isValid()) {
        auto color = u8vec3FromVariant(backgroundColor, valid);
        if (valid) {
            _backgroundColor = color;
        }
    }

    if (properties["backgroundAlpha"].isValid()) {
        setAlpha(properties["backgroundAlpha"].toFloat());
    }

    if (properties["lineHeight"].isValid()) {
        setLineHeight(properties["lineHeight"].toFloat());
    }

    if (properties["leftMargin"].isValid()) {
        setLeftMargin(properties["leftMargin"].toFloat());
    }

    if (properties["topMargin"].isValid()) {
        setTopMargin(properties["topMargin"].toFloat());
    }

    if (properties["rightMargin"].isValid()) {
        setRightMargin(properties["rightMargin"].toFloat());
    }

    if (properties["bottomMargin"].isValid()) {
        setBottomMargin(properties["bottomMargin"].toFloat());
    }
}
示例#5
0
MarkList::MarkList( QWidget* parent, const char* name, KGVMiniWidget* mini)
    : QTable( parent, name ),
    _selected ( -1 ),
_miniWidget( mini )
{
    setNumCols( 1 );
    setLeftMargin( 0 ); // we don't want the vertical header
    horizontalHeader()->setLabel( 0, i18n("Page") );

    connect( this, SIGNAL( currentChanged( int, int ) ),
	    this, SIGNAL( selected( int ) ) );
}
	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	//
	// KviCanvasItemPropertiesWidget
	//
	KviCanvasItemPropertiesWidget::KviCanvasItemPropertiesWidget(QWidget * par)
	: QTable(par)
	{
		setSelectionMode(QTable::NoSelection);
		setColumnMovingEnabled(false);
		setRowMovingEnabled(false);
		setShowGrid(true);
		setNumCols(2);
		setSorting(false);
		setLeftMargin(0);
		verticalHeader()->hide();
		connect(this,SIGNAL(valueChanged(int,int)),this,SLOT(cellEdited(int,int)));
	}
示例#7
0
void Text3DOverlay::setProperties(const QScriptValue& properties) {
    Planar3DOverlay::setProperties(properties);
    
    QScriptValue text = properties.property("text");
    if (text.isValid()) {
        setText(text.toVariant().toString());
    }

    QScriptValue backgroundColor = properties.property("backgroundColor");
    if (backgroundColor.isValid()) {
        QScriptValue red = backgroundColor.property("red");
        QScriptValue green = backgroundColor.property("green");
        QScriptValue blue = backgroundColor.property("blue");
        if (red.isValid() && green.isValid() && blue.isValid()) {
            _backgroundColor.red = red.toVariant().toInt();
            _backgroundColor.green = green.toVariant().toInt();
            _backgroundColor.blue = blue.toVariant().toInt();
        }
    }

    if (properties.property("backgroundAlpha").isValid()) {
        _backgroundAlpha = properties.property("backgroundAlpha").toVariant().toFloat();
    }

    if (properties.property("lineHeight").isValid()) {
        setLineHeight(properties.property("lineHeight").toVariant().toFloat());
    }

    if (properties.property("leftMargin").isValid()) {
        setLeftMargin(properties.property("leftMargin").toVariant().toFloat());
    }

    if (properties.property("topMargin").isValid()) {
        setTopMargin(properties.property("topMargin").toVariant().toFloat());
    }

    if (properties.property("rightMargin").isValid()) {
        setRightMargin(properties.property("rightMargin").toVariant().toFloat());
    }

    if (properties.property("bottomMargin").isValid()) {
        setBottomMargin(properties.property("bottomMargin").toVariant().toFloat());
    }

    QScriptValue isFacingAvatarValue = properties.property("isFacingAvatar");
    if (isFacingAvatarValue.isValid()) {
        _isFacingAvatar = isFacingAvatarValue.toVariant().toBool();
    }

}
示例#8
0
void KoSectionStyle::loadOdf(const KoXmlElement *element, KoOdfLoadingContext &context)
{
    if (element->hasAttributeNS(KoXmlNS::style, "display-name"))
        d->name = element->attributeNS(KoXmlNS::style, "display-name", QString());

    if (d->name.isEmpty()) // if no style:display-name is given us the style:name
        d->name = element->attributeNS(KoXmlNS::style, "name", QString());

    context.styleStack().save();
    // Load all parents - only because we don't support inheritance.
    QString family = element->attributeNS(KoXmlNS::style, "family", "section");
    context.addStyles(element, family.toLocal8Bit().constData());   // Load all parents - only because we don't support inheritance.

    context.styleStack().setTypeProperties("section");   // load all style attributes from "style:section-properties"

    KoStyleStack &styleStack = context.styleStack();

    // in 1.6 this was defined at KoParagLayout::loadOasisParagLayout(KoParagLayout&, KoOasisContext&)

    if (styleStack.hasProperty(KoXmlNS::style, "writing-mode")) {     // http://www.w3.org/TR/2004/WD-xsl11-20041216/#writing-mode
        QString writingMode = styleStack.property(KoXmlNS::style, "writing-mode");
        setTextProgressionDirection(KoText::directionFromString(writingMode));
    }

    // Indentation (margin)
    bool hasMarginLeft = styleStack.hasProperty(KoXmlNS::fo, "margin-left");
    bool hasMarginRight = styleStack.hasProperty(KoXmlNS::fo, "margin-right");
    if (hasMarginLeft)
        setLeftMargin(KoUnit::parseValue(styleStack.property(KoXmlNS::fo, "margin-left")));
    if (hasMarginRight)
        setRightMargin(KoUnit::parseValue(styleStack.property(KoXmlNS::fo, "margin-right")));


    // The fo:background-color attribute specifies the background color of a paragraph.
    if (styleStack.hasProperty(KoXmlNS::fo, "background-color")) {
        const QString bgcolor = styleStack.property(KoXmlNS::fo, "background-color");
        QBrush brush = background();
        if (bgcolor == "transparent")
            brush.setStyle(Qt::NoBrush);
        else {
            if (brush.style() == Qt::NoBrush)
                brush.setStyle(Qt::SolidPattern);
            brush.setColor(bgcolor); // #rrggbb format
        }
        setBackground(brush);
    }

    styleStack.restore();
}
示例#9
0
ParagraphGeneral::ParagraphGeneral(QWidget *parent)
        : QWidget(parent),
        m_blockSignals(false),
        m_nameHidden(false),
        m_style(0)
{
    widget.setupUi(this);

//Disable for now
    //inherit style
    widget.label_3->setVisible(false);
    widget.inheritStyle->setVisible(false);
    //use named charStyle
    widget.useCharacterStyle->setVisible(false);
    widget.label_4->setVisible(false);
    widget.characterStyle->setVisible(false);
    //include in TOC
    widget.inToc->setVisible(false);
//
    m_paragraphIndentSpacing = new ParagraphIndentSpacing(this);
    widget.tabs->addTab(m_paragraphIndentSpacing, i18n("Indent/Spacing"));
    connect(m_paragraphIndentSpacing, SIGNAL(firstLineMarginChanged(qreal)),
            widget.preview, SLOT(setFirstLineMargin(qreal)));
    connect(m_paragraphIndentSpacing, SIGNAL(leftMarginChanged(qreal)),
            widget.preview, SLOT(setLeftMargin(qreal)));
    connect(m_paragraphIndentSpacing, SIGNAL(rightMarginChanged(qreal)),
            widget.preview, SLOT(setRightMargin(qreal)));
    connect(m_paragraphIndentSpacing, SIGNAL(lineSpacingChanged(qreal,qreal,qreal,int,bool)),
            widget.preview, SLOT(setLineSpacing(qreal,qreal,qreal,int,bool)));

    m_paragraphLayout = new ParagraphLayout(this);
    widget.tabs->addTab(m_paragraphLayout, i18n("General Layout"));
    connect(m_paragraphLayout, SIGNAL(horizontalAlignmentChanged(Qt::Alignment)), this, SLOT(horizontalAlignmentChanged(Qt::Alignment)));

    m_paragraphBulletsNumbers = new ParagraphBulletsNumbers(this);
    widget.tabs->addTab(m_paragraphBulletsNumbers, i18n("Bullets/Numbers"));
    connect(m_paragraphBulletsNumbers, SIGNAL(bulletListItemChanged(const QString&)),
        this, SLOT(bulletListItemChanged(const QString&)));

    m_paragraphDecorations = new ParagraphDecorations(this);
    widget.tabs->addTab(m_paragraphDecorations, i18n("Decorations"));
    connect(m_paragraphDecorations, SIGNAL(backgroundColorChanged(const QColor&)),
        this, SLOT(backgroundColorChanged(const QColor&)));

    widget.preview->setText(QString("Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat."));

    connect(widget.name, SIGNAL(textChanged(const QString &)), this, SIGNAL(nameChanged(const QString&)));
    connect(widget.name, SIGNAL(textChanged(const QString &)), this, SLOT(setName(const QString&)));
}
示例#10
0
void TextOverlay::setProperties(const QScriptValue& properties) {
    Overlay2D::setProperties(properties);
    _qmlElement->setX(_bounds.left());
    _qmlElement->setY(_bounds.top());
    _qmlElement->setWidth(_bounds.width());
    _qmlElement->setHeight(_bounds.height());
    _qmlElement->settextColor(toQmlColor(vec4(toGlm(_color), _alpha)));
    QScriptValue font = properties.property("font");
    if (font.isObject()) {
        if (font.property("size").isValid()) {
            setFontSize(font.property("size").toInt32());
        }
        QFont font(_qmlElement->fontFamily());
        font.setPixelSize(_qmlElement->fontSize());
        QFontMetrics fm(font);
        _qmlElement->setlineHeight(fm.lineSpacing() * 1.2);
    }

    QScriptValue text = properties.property("text");
    if (text.isValid()) {
        setText(text.toVariant().toString());
    }

    QScriptValue backgroundColor = properties.property("backgroundColor");
    if (backgroundColor.isValid()) {
        QScriptValue red = backgroundColor.property("red");
        QScriptValue green = backgroundColor.property("green");
        QScriptValue blue = backgroundColor.property("blue");
        if (red.isValid() && green.isValid() && blue.isValid()) {
            _backgroundColor.red = red.toVariant().toInt();
            _backgroundColor.green = green.toVariant().toInt();
            _backgroundColor.blue = blue.toVariant().toInt();
        }
    }

    if (properties.property("backgroundAlpha").isValid()) {
        _backgroundAlpha = properties.property("backgroundAlpha").toVariant().toFloat();
    }
    _qmlElement->setbackgroundColor(toQmlColor(vec4(toGlm(_backgroundColor), _backgroundAlpha)));

    if (properties.property("leftMargin").isValid()) {
        setLeftMargin(properties.property("leftMargin").toVariant().toInt());
    }

    if (properties.property("topMargin").isValid()) {
        setTopMargin(properties.property("topMargin").toVariant().toInt());
    }
}
示例#11
0
KWidgetListbox::KWidgetListbox(QWidget *parent, const char *name)
 : QTable(parent, name)
{
  setNumRows(0);
  setNumCols(1);
  setColumnStretchable(0, true);
  setLeftMargin(0);
  setTopMargin(0);
  horizontalHeader()->hide();
  verticalHeader()->hide();
  setSelectionMode(QTable::NoSelection);
  setFocusStyle(QTable::FollowStyle);
  connect(this, SIGNAL(currentChanged(int, int)),
          this, SLOT(selectionChanged(int, int)));
  setHScrollBarMode(QScrollView::AlwaysOff);
  setVScrollBarMode(QScrollView::Auto);
}
CShowTableProperties::CShowTableProperties(QWidget * parent, const char *name)
: CTable(parent, name)
{
#ifdef DEBUG
  qDebug("CShowTableProperties::CShowTableProperties()");
#endif

  if (!name)
    setName("CShowTableProperties");

  verticalHeader()->hide();
  setReadOnly(true);
  setFocusStyle(QTable::FollowStyle);
  setSelectionMode(QTable::SingleRow);
  setLeftMargin(0);
  current_item = 0;  
}
int LineEditExtension::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 1)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 1;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< int*>(_v) = leftMargin(); break;
        case 1: *reinterpret_cast< int*>(_v) = rightMargin(); break;
        case 2: *reinterpret_cast< int*>(_v) = topMargin(); break;
        case 3: *reinterpret_cast< int*>(_v) = bottomMargin(); break;
        }
        _id -= 4;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: setLeftMargin(*reinterpret_cast< int*>(_v)); break;
        case 1: setRightMargin(*reinterpret_cast< int*>(_v)); break;
        case 2: setTopMargin(*reinterpret_cast< int*>(_v)); break;
        case 3: setBottomMargin(*reinterpret_cast< int*>(_v)); break;
        }
        _id -= 4;
    } else if (_c == QMetaObject::ResetProperty) {
        _id -= 4;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        _id -= 4;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 4;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 4;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 4;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 4;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}
CServerStatusTable::CServerStatusTable(QWidget * parent, CMySQLServer *m)
: CQueryTable(parent, 0, m, "CServerStatusTable")
{
  verticalHeader()->hide();
  setFocusStyle(QTable::FollowStyle);
  setSelectionMode(QTable::Single);
  setLeftMargin(0);
  setKeepColumnWidth(true);
  qry = new CMySQLQuery(m->mysql());
  qry->setEmitMessages(false);
  setQuery(qry);
  setReadOnly(true);
  is_first = true;
  is_traditional = false;
  columnsWindow = new CTableFieldChooser(0, this, "CServerStatusTableColumnsWindow");
  columnsWindow->setCaption("[" + mysql()->connectionName() + "] " + tr("Server Status Columns"));
  setCaption(tr("Server Status"));
}
示例#15
0
void QDeclarativeAnchors::setMargins(qreal offset)
{
    Q_D(QDeclarativeAnchors);
    if (d->margins == offset)
        return;
    //###Is it significantly faster to set them directly so we can call fillChanged only once?
    if(!d->rightMargin || d->rightMargin == d->margins)
        setRightMargin(offset);
    if(!d->leftMargin || d->leftMargin == d->margins)
        setLeftMargin(offset);
    if(!d->topMargin || d->topMargin == d->margins)
        setTopMargin(offset);
    if(!d->bottomMargin || d->bottomMargin == d->margins)
        setBottomMargin(offset);
    d->margins = offset;
    emit marginsChanged();

}
示例#16
0
void TextOverlay::setProperties(const QScriptValue& properties) {
    Overlay2D::setProperties(properties);
    
    QScriptValue font = properties.property("font");
    if (font.isObject()) {
        if (font.property("size").isValid()) {
            setFontSize(font.property("size").toInt32());
        }
    }

    QScriptValue text = properties.property("text");
    if (text.isValid()) {
        setText(text.toVariant().toString());
    }

    QScriptValue backgroundColor = properties.property("backgroundColor");
    if (backgroundColor.isValid()) {
        QScriptValue red = backgroundColor.property("red");
        QScriptValue green = backgroundColor.property("green");
        QScriptValue blue = backgroundColor.property("blue");
        if (red.isValid() && green.isValid() && blue.isValid()) {
            _backgroundColor.red = red.toVariant().toInt();
            _backgroundColor.green = green.toVariant().toInt();
            _backgroundColor.blue = blue.toVariant().toInt();
        }
    }

    if (properties.property("backgroundAlpha").isValid()) {
        _backgroundAlpha = properties.property("backgroundAlpha").toVariant().toFloat();
    }

    if (properties.property("leftMargin").isValid()) {
        setLeftMargin(properties.property("leftMargin").toVariant().toInt());
    }

    if (properties.property("topMargin").isValid()) {
        setTopMargin(properties.property("topMargin").toVariant().toInt());
    }
}
示例#17
0
Calender::Calender(QWidget *parent, const char *name, WeekStarts wS, bool dLZ) : QTable(6, 7, parent, name)
{
    QFont serifFont( "Times", 10);
    setLeftMargin(2);
    setDragEnabled(false);
    setFont(serifFont);

    weekStarts = wS;
    dayLeadingZero = dLZ;
    
    int i;
    for (i = 0; i < 7; i++) {
      setColumnStretchable(i, true);
    }

    for (i = 0; i < 6; i++) {
      setRowStretchable(i, true);
    }
    
    QObject::connect(this, 
       SIGNAL(doubleClicked(int, int, int, const QPoint&)), 
       this,
       SLOT(selectedLine(int, int, int, const QPoint&)));
}
示例#18
0
KCategoryDrawer::KCategoryDrawer(KCategorizedView *view)
    : d(new Private(view))
{
    setLeftMargin(2);
    setRightMargin(2);
}
示例#19
0
KateCategoryDrawer::KateCategoryDrawer() : KCategoryDrawerV3 (0)
{
    setLeftMargin( 7 );
    setRightMargin( 7 );
}
示例#20
0
void plotDYSignal(int print=0)
{
  TH1D *h1signalMM4p2= loadHisto("cs_DYmm_13TeVMuApproved_csA.root","h1Signal",
				 "h1signalMM4p2",1,h1dummy);
  TH1D *h1signalMM4p3= loadHisto("cs_DYmm_13TeVMuApproved_csB.root","h1Signal",
				 "h1signalMM4p2",1,h1dummy);
  TH1D *h1signalEE= loadHisto("cs_DYee_13TeV_El3.root","h1Signal",
			      "h1signalEE",1,h1dummy);

  double lumiMM4p2= 865.919;
  double lumiMM4p3= 2832.673 - lumiMM4p2;
  double lumiEE= 2316.969;

  h1signalMM4p2->Scale(1/lumiMM4p2);
  h1signalMM4p3->Scale(1/lumiMM4p3);
  h1signalEE->Scale(1/lumiEE);

  TString massStr= niceMassAxisLabel(2,"");
  //TString eemassStr= niceMassAxisLabel(0,"");
  //TString mmmassStr= niceMassAxisLabel(1,"");
  TString axisStr= ";" + massStr + ";signal yield/Lumi";

  TGraphErrors *grEE= createGraph(h1signalEE,"grEE", 0);
  TGraphErrors *grMM4p2= createGraph(h1signalMM4p2, "grMM4p2", -1);
  TGraphErrors *grMM4p3= createGraph(h1signalMM4p3, "grMM4p3",  1);

  printHisto(h1signalEE);
  printHisto(h1signalMM4p2);

  graphStyle(grEE, kGreen+1, 7, 1, 0.8);
  graphStyle(grMM4p2, 46, 24, 1, 0.8);
  graphStyle(grMM4p3, kBlack, 20, 1, 0.8);

  std::vector<TCanvas*> canvasV;
  for (int i=0; i<5; i++) {
    TString canvName="";
    TH2D *h2frame=NULL;
    TCanvas *cx= createMassFrame(i,"cSignal_",
				 "signal" + axisStr, 2,
				 &canvName,&h2frame);
    canvasV.push_back(cx);
    //plotHistoSame(h1csEE,canvName,"LPE1", "DY#rightarrowee");
    //plotHistoSame(h1csMM,canvName,"LPE1", "DY#rightarrow#mu#mu");
    plotGraphSame(grEE,canvName,"PE1", "DY#rightarrowee");
    plotGraphSame(grMM4p2,canvName,"PE1", "DY#rightarrow#mu#mu (HLT4.2)");
    plotGraphSame(grMM4p3,canvName,"PE1", "DY#rightarrow#mu#mu (HLT4.3)");
    if (i==1) {
      h2frame->GetYaxis()->SetTitleOffset(1.5);
      setLeftMargin(cx,0.11);
      moveLegend(cx,0.45,0.);
    }
    if (i==4) {
      h2frame->GetYaxis()->SetNoExponent(false);
      h2frame->GetYaxis()->SetTitleOffset(1.5);
      setLeftMargin(cx,0.15);
      moveLegend(cx,0.45,0.55);
    }
    if (i==5) moveLegend(cx,0.45,0.55);
  }


  if (print==1) {
    TFile fout("foutCanvas_DYSignal.root","RECREATE");
    SaveCanvases(canvasV,"dir-plot-DYSignal",&fout);
    writeTimeTag();
    fout.Close();
    std::cout << "file <" << fout.GetName() << "> created\n";
  }
}
示例#21
0
    MyTable( int r, int c ) : QTable( r, c ) {
	items.setAutoDelete( TRUE );
	widgets.setAutoDelete( TRUE );
	setCaption( tr( "A 1 Million x 1 Million Cell Table" ) );
	setLeftMargin( fontMetrics().width( "W999999W" ) );
    }
示例#22
0
CategorizedListViewPainter::CategorizedListViewPainter(CategorizedListView *view)
                : View(view)
{
        setLeftMargin(2);
        setRightMargin(2);
}
示例#23
0
bool QTable::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: setNumRows((int)static_QUType_int.get(_o+1)); break;
    case 1: setNumCols((int)static_QUType_int.get(_o+1)); break;
    case 2: setShowGrid((bool)static_QUType_bool.get(_o+1)); break;
    case 3: hideRow((int)static_QUType_int.get(_o+1)); break;
    case 4: hideColumn((int)static_QUType_int.get(_o+1)); break;
    case 5: showRow((int)static_QUType_int.get(_o+1)); break;
    case 6: showColumn((int)static_QUType_int.get(_o+1)); break;
    case 7: static_QUType_bool.set(_o,isRowHidden((int)static_QUType_int.get(_o+1))); break;
    case 8: static_QUType_bool.set(_o,isColumnHidden((int)static_QUType_int.get(_o+1))); break;
    case 9: setColumnWidth((int)static_QUType_int.get(_o+1),(int)static_QUType_int.get(_o+2)); break;
    case 10: setRowHeight((int)static_QUType_int.get(_o+1),(int)static_QUType_int.get(_o+2)); break;
    case 11: adjustColumn((int)static_QUType_int.get(_o+1)); break;
    case 12: adjustRow((int)static_QUType_int.get(_o+1)); break;
    case 13: setColumnStretchable((int)static_QUType_int.get(_o+1),(bool)static_QUType_bool.get(_o+2)); break;
    case 14: setRowStretchable((int)static_QUType_int.get(_o+1),(bool)static_QUType_bool.get(_o+2)); break;
    case 15: static_QUType_bool.set(_o,isColumnStretchable((int)static_QUType_int.get(_o+1))); break;
    case 16: static_QUType_bool.set(_o,isRowStretchable((int)static_QUType_int.get(_o+1))); break;
    case 17: setSorting((bool)static_QUType_bool.get(_o+1)); break;
    case 18: swapRows((int)static_QUType_int.get(_o+1),(int)static_QUType_int.get(_o+2)); break;
    case 19: swapRows((int)static_QUType_int.get(_o+1),(int)static_QUType_int.get(_o+2),(bool)static_QUType_bool.get(_o+3)); break;
    case 20: swapColumns((int)static_QUType_int.get(_o+1),(int)static_QUType_int.get(_o+2)); break;
    case 21: swapColumns((int)static_QUType_int.get(_o+1),(int)static_QUType_int.get(_o+2),(bool)static_QUType_bool.get(_o+3)); break;
    case 22: swapCells((int)static_QUType_int.get(_o+1),(int)static_QUType_int.get(_o+2),(int)static_QUType_int.get(_o+3),(int)static_QUType_int.get(_o+4)); break;
    case 23: setLeftMargin((int)static_QUType_int.get(_o+1)); break;
    case 24: setTopMargin((int)static_QUType_int.get(_o+1)); break;
    case 25: setCurrentCell((int)static_QUType_int.get(_o+1),(int)static_QUType_int.get(_o+2)); break;
    case 26: clearSelection(); break;
    case 27: clearSelection((bool)static_QUType_bool.get(_o+1)); break;
    case 28: setColumnMovingEnabled((bool)static_QUType_bool.get(_o+1)); break;
    case 29: setRowMovingEnabled((bool)static_QUType_bool.get(_o+1)); break;
    case 30: setReadOnly((bool)static_QUType_bool.get(_o+1)); break;
    case 31: setRowReadOnly((int)static_QUType_int.get(_o+1),(bool)static_QUType_bool.get(_o+2)); break;
    case 32: setColumnReadOnly((int)static_QUType_int.get(_o+1),(bool)static_QUType_bool.get(_o+2)); break;
    case 33: setDragEnabled((bool)static_QUType_bool.get(_o+1)); break;
    case 34: static_QUType_bool.set(_o,dragEnabled()); break;
    case 35: insertRows((int)static_QUType_int.get(_o+1)); break;
    case 36: insertRows((int)static_QUType_int.get(_o+1),(int)static_QUType_int.get(_o+2)); break;
    case 37: insertColumns((int)static_QUType_int.get(_o+1)); break;
    case 38: insertColumns((int)static_QUType_int.get(_o+1),(int)static_QUType_int.get(_o+2)); break;
    case 39: removeRow((int)static_QUType_int.get(_o+1)); break;
    case 40: removeRows((const QMemArray<int>&)*((const QMemArray<int>*)static_QUType_ptr.get(_o+1))); break;
    case 41: removeColumn((int)static_QUType_int.get(_o+1)); break;
    case 42: removeColumns((const QMemArray<int>&)*((const QMemArray<int>*)static_QUType_ptr.get(_o+1))); break;
    case 43: editCell((int)static_QUType_int.get(_o+1),(int)static_QUType_int.get(_o+2)); break;
    case 44: editCell((int)static_QUType_int.get(_o+1),(int)static_QUType_int.get(_o+2),(bool)static_QUType_bool.get(_o+3)); break;
    case 45: setRowLabels((const QStringList&)*((const QStringList*)static_QUType_ptr.get(_o+1))); break;
    case 46: setColumnLabels((const QStringList&)*((const QStringList*)static_QUType_ptr.get(_o+1))); break;
    case 47: columnWidthChanged((int)static_QUType_int.get(_o+1)); break;
    case 48: rowHeightChanged((int)static_QUType_int.get(_o+1)); break;
    case 49: columnIndexChanged((int)static_QUType_int.get(_o+1),(int)static_QUType_int.get(_o+2),(int)static_QUType_int.get(_o+3)); break;
    case 50: rowIndexChanged((int)static_QUType_int.get(_o+1),(int)static_QUType_int.get(_o+2),(int)static_QUType_int.get(_o+3)); break;
    case 51: columnClicked((int)static_QUType_int.get(_o+1)); break;
    case 52: doAutoScroll(); break;
    case 53: doValueChanged(); break;
    case 54: updateGeometriesSlot(); break;
    default:
	return QScrollView::qt_invoke( _id, _o );
    }
    return TRUE;
}