• Amaliy ish -15 Bajardi: Temirova G Qabul qildi: Mahkamova D Samarqand 2024 y
  • O’zbekiston respublikasi axborot texnologialari va komunikatsialarni rivojlantirish vazirligi muhammad al-xorazmiy nomidagi toshkent axborot texnologiyalari universiteti samarqand filiali kompyuter injiniringi fakulteti talabasi tayyorlagan Amaliy ish -15




    Download 130,34 Kb.
    Sana08.06.2024
    Hajmi130,34 Kb.
    #261808
    Bog'liq
    15 amaliy


    O’ZBEKISTON RESPUBLIKASI AXBOROT TEXNOLOGIALARI VA KOMUNIKATSIALARNI RIVOJLANTIRISH VAZIRLIGI
    MUHAMMAD AL-XORAZMIY NOMIDAGI TOSHKENT AXBOROT TEXNOLOGIYALARI UNIVERSITETI SAMARQAND FILIALI

    Kompyuter injiniringi fakulteti
    talabasi tayyorlagan


    Amaliy ish -15


    Bajardi: Temirova G
    Qabul qildi: Mahkamova D


    Samarqand 2024 y

    12.SAVOL


    Foydalanuvchiga oson sana tanlash imkoniyatini beruvchi data picker komponentini qo'shish.
    #include
    #include

    int main() {


    sf::RenderWindow window(sf::VideoMode(800, 600), "Data Tanlash");

    sf::Date currentDate = sf::Date::getCurrentDate();


    int currentMonth = currentDate.getMonth();
    int currentYear = currentDate.getYear();

    sf::Font font;


    if (!font.loadFromFile("arial.ttf")) {
    std::cerr << "Font yuklanmadi!" << std::endl;
    return EXIT_FAILURE;
    }

    sf::Text headerText;


    headerText.setFont(font);
    headerText.setString("Data Tanlash");
    headerText.setCharacterSize(24);
    headerText.setFillColor(sf::Color::Black);
    headerText.setPosition(300.f, 20.f);

    sf::Text monthYearText;


    monthYearText.setFont(font);
    monthYearText.setCharacterSize(20);
    monthYearText.setFillColor(sf::Color::Black);
    monthYearText.setPosition(50.f, 70.f);

    sf::RectangleShape calendar(sf::Vector2f(700.f, 400.f));


    calendar.setFillColor(sf::Color::White);
    calendar.setPosition(50.f, 100.f);

    while (window.isOpen()) {


    sf::Event event;
    while (window.pollEvent(event)) {
    if (event.type == sf::Event::Closed) {
    window.close();
    }
    }

    window.clear(sf::Color::White);

    monthYearText.setString(std::to_string(currentMonth) + "/" + std::to_string(currentYear));

    window.draw(headerText);


    window.draw(monthYearText);
    window.draw(calendar);

    window.display();


    }
    sss
    return EXIT_SUCCESS;
    }

    Download 130,34 Kb.




    Download 130,34 Kb.

    Bosh sahifa
    Aloqalar

        Bosh sahifa



    O’zbekiston respublikasi axborot texnologialari va komunikatsialarni rivojlantirish vazirligi muhammad al-xorazmiy nomidagi toshkent axborot texnologiyalari universiteti samarqand filiali kompyuter injiniringi fakulteti talabasi tayyorlagan Amaliy ish -15

    Download 130,34 Kb.