Tatu samarqand filiali di 112 guruh talabasi qurbonov samandarbek



Download 177.2 Kb.
Sana08.05.2021
Hajmi177.2 Kb.

TATU

SAMARQAND FILIALI

DI 112 GURUH TALABASI

QURBONOV SAMANDARBEK

DASTURLASH 2

14-HAFTA AMALIYOTI


  1. Qt muhitida talabalarning reyting koʻrsatkichlarini CustomPlotda tasvirlovchi dastur tuzing. Bunda guruh talabalarining bir fan (masalan, “Dasturlash II” fani) bo`yicha 1-olariq nazorat natijalari bo`yicha to`plagan ballarini “5”, “4”, “3” va “2” baholar oraliqlariga ajratib, ularning o`zaro nisbatlarini doiraviy grafik ko`rinishda, foizlarda tasvirlovchi dastur tuzish lozim. Masalan quyidagicha ko`rinishda:



https://www.qcustomplot.com/index.php/demos/scatterpixmapdemo

Javobi:

Mainwindow.cpp

#include "mainwindow.h"

#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :

QMainWindow(parent),

ui(new Ui::MainWindow)

{

ui->setupUi(this);

ui->customPlot->legend->setVisible(true);
ui->customPlot->axisRect()->setBackground(QPixmap("./solarpanels.jpg"));

ui->customPlot->addGraph();

ui->customPlot->graph()->setLineStyle(QCPGraph::lsLine);

QPen pen;

pen.setColor(QColor(255, 200, 20, 200));

pen.setStyle(Qt::DashLine);

pen.setWidthF(2.5);

ui->customPlot->graph()->setPen(pen);

ui->customPlot->graph()->setBrush(QBrush(QColor(255,200,20,70)));

ui->customPlot->graph()->setScatterStyle(QCPScatterStyle(QPixmap("D:\\Soft\\Tayyor\\konus\\sun.png")));

// set graph name, will show up in legend next to icon:

ui->customPlot->graph()->setName("112-guruh talabalari");

// set data:

QVector year, value;

year << 2013 << 2014 << 2015 << 2016 << 2017 << 2018 << 2019;

value << 6.17 << 3.42 << 4.94 << 17.38 << 15.86 << 29.33 << 52.1;

ui->customPlot->graph()->setData(year, value);
// set title of plot:

ui->customPlot->plotLayout()->insertRow(0);

ui->customPlot->plotLayout()->addElement(0, 0, new QCPTextElement(ui->customPlot, "Ballar grafigi", QFont("sans", 12, QFont::Bold)));

// axis configurations:

ui->customPlot->xAxis->setLabel("Yillar");

ui->customPlot->yAxis->setLabel("Tayyorladi: QURBONOV SAMANDARBEK");

ui->customPlot->xAxis2->setVisible(true);

ui->customPlot->yAxis2->setVisible(true);

ui->customPlot->xAxis2->setTickLabels(false);

ui->customPlot->yAxis2->setTickLabels(false);

ui->customPlot->xAxis2->setTicks(false);

ui->customPlot->yAxis2->setTicks(false);

ui->customPlot->xAxis2->setSubTicks(false);

ui->customPlot->yAxis2->setSubTicks(false);

ui->customPlot->xAxis->setRange(2012.5, 2019.5);

ui->customPlot->yAxis->setRange(0, 52);

// setup legend:

ui->customPlot->legend->setFont(QFont(font().family(), 7));

ui->customPlot->legend->setIconSize(50, 20);

ui->customPlot->legend->setVisible(true);

ui->customPlot->axisRect()->insetLayout()->setInsetAlignment(0, Qt::AlignLeft | Qt::AlignTop);
}
MainWindow::~MainWindow()

{

delete ui;

}


Download 177.2 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2020
ma'muriyatiga murojaat qiling

    Bosh sahifa
davlat universiteti
ta’lim vazirligi
maxsus ta’lim
O’zbekiston respublikasi
zbekiston respublikasi
axborot texnologiyalari
o’rta maxsus
guruh talabasi
nomidagi toshkent
davlat pedagogika
texnologiyalari universiteti
xorazmiy nomidagi
toshkent axborot
pedagogika instituti
haqida tushuncha
rivojlantirish vazirligi
toshkent davlat
Toshkent davlat
vazirligi toshkent
tashkil etish
matematika fakulteti
ta’limi vazirligi
samarqand davlat
kommunikatsiyalarini rivojlantirish
bilan ishlash
pedagogika universiteti
vazirligi muhammad
fanining predmeti
Darsning maqsadi
o’rta ta’lim
navoiy nomidagi
haqida umumiy
Ishdan maqsad
moliya instituti
fizika matematika
nomidagi samarqand
sinflar uchun
fanlar fakulteti
Nizomiy nomidagi
maxsus ta'lim
Ўзбекистон республикаси
ta'lim vazirligi
universiteti fizika
umumiy o’rta
Referat mavzu
respublikasi axborot
таълим вазирлиги
Alisher navoiy
махсус таълим
Toshkent axborot
Buxoro davlat