1. Список говнокодов пользователя Resager

    Всего: 6

  2. C++ / Говнокод #5164

    +145

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    /********************************************************************************
    ** Form generated from reading UI file 'qrselector.ui'
    **
    ** Created: Thu 6. Jan 14:25:49 2011
    **      by: Qt User Interface Compiler version 4.7.0
    **
    ** WARNING! All changes made in this file will be lost when recompiling UI file!
    ********************************************************************************/
    
    #ifndef UI_QRSELECTOR_H
    #define UI_QRSELECTOR_H
    
    #include <QtCore/QVariant>
    #include <QtGui/QAction>
    #include <QtGui/QApplication>
    #include <QtGui/QButtonGroup>
    #include <QtGui/QHeaderView>
    #include <QtGui/QLabel>
    #include <QtGui/QWidget>
    
    QT_BEGIN_NAMESPACE
    
    class Ui_QRSelector
    {
    public:
        QLabel *label;
    
        void setupUi(QWidget *QRSelector)
        {
            if (QRSelector->objectName().isEmpty())
                QRSelector->setObjectName(QString::fromUtf8("QRSelector"));
            QRSelector->resize(400, 300);
            label = new QLabel(QRSelector);
            label->setObjectName(QString::fromUtf8("label"));
            label->setGeometry(QRect(10, 10, 371, 16));
    
            retranslateUi(QRSelector);
    
            QMetaObject::connectSlotsByName(QRSelector);
        } // setupUi
    
        void retranslateUi(QWidget *QRSelector)
        {
            QRSelector->setWindowTitle(QApplication::translate("QRSelector", "QRSelector", 0, QApplication::UnicodeUTF8));
            label->setText(QString());
        } // retranslateUi
    
    };
    
    namespace Ui {
        class QRSelector: public Ui_QRSelector {};
    } // namespace Ui
    
    QT_END_NAMESPACE
    
    #endif // UI_QRSELECTOR_H

    ui_qrselector.h

    Resager, 06 Января 2011

    Комментарии (10)
  3. C++ / Говнокод #5163

    +145

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    #-------------------------------------------------
    #
    # Project created by QtCreator 2011-01-06T13:54:57
    #
    #-------------------------------------------------
    
    QT       += core gui
    
    TARGET = RSelector
    TEMPLATE = app
    
    
    SOURCES += main.cpp\
            qrselector.cpp
    
    HEADERS  += qrselector.h
    
    FORMS    += qrselector.ui

    qrselector.pro

    Resager, 06 Января 2011

    Комментарии (2)
  4. C++ / Говнокод #5162

    +145

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    <?xml version="1.0" encoding="UTF-8"?>
    <ui version="4.0">
     <class>QRSelector</class>
     <widget class="QWidget" name="QRSelector">
      <property name="geometry">
       <rect>
        <x>0</x>
        <y>0</y>
        <width>400</width>
        <height>300</height>
       </rect>
      </property>
      <property name="windowTitle">
       <string>QRSelector</string>
      </property>
      <widget class="QLabel" name="label">
       <property name="geometry">
        <rect>
         <x>10</x>
         <y>10</y>
         <width>371</width>
         <height>16</height>
        </rect>
       </property>
       <property name="text">
        <string/>
       </property>
      </widget>
     </widget>
     <layoutdefault spacing="6" margin="11"/>
     <resources/>
     <connections/>
    </ui>

    qrselector.ui

    Resager, 06 Января 2011

    Комментарии (4)
  5. C++ / Говнокод #5161

    +145

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    #include <QtGui/QApplication>
    #include "qrselector.h"
    
    int main(int argc, char *argv[])
    {
        QApplication a(argc, argv);
        QRSelector w;
        w.show();
    
        return a.exec();
    }

    main.cpp

    Resager, 06 Января 2011

    Комментарии (0)
  6. C++ / Говнокод #5160

    +145

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    #ifndef QRSELECTOR_H
    #define QRSELECTOR_H
    
    #include "ui_qrselector.h"
    #include <QMouseEvent>
    #include <QRubberBand>
    #include <QPixmap>
    #include <QVBoxLayout>
    
    class QRSelector : public QWidget, private Ui::QRSelector
    {
        Q_OBJECT
    
    public:
        explicit QRSelector(QWidget *parent = 0);
        QRubberBand *rubberBand;
        QPoint origin;
    
    protected:
        void changeEvent(QEvent *e);
        void mousePressEvent(QMouseEvent *e);
        void mouseMoveEvent(QMouseEvent *e);
    };
    
    #endif // QRSELECTOR_H

    qrselector.h

    Resager, 06 Января 2011

    Комментарии (0)
  7. C++ / Говнокод #5159

    +145

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    #include "qrselector.h"
    
    QRSelector::QRSelector(QWidget *parent) :
        QWidget(parent){
        setupUi(this);
        showMaximized();
        //showFullScreen();
        rubberBand = 0;
        //this->autoFillBackground();
    
    
    
    
        //this->setWindowOpacity(0.2);
        //this->setAttribute(Qt::WA_TranslucentBackground);
        //this->setWindowFlags(Qt::FramelessWindowHint);
    }
    
    void QRSelector::changeEvent(QEvent *e)
    {
        QWidget::changeEvent(e);
        switch (e->type()) {
        case QEvent::LanguageChange:
            retranslateUi(this);
            break;
        default:
            break;
        }
    }
    
    void QRSelector::mousePressEvent(QMouseEvent *e)
    {
        if(rubberBand)
            rubberBand->hide();
        origin = e->pos();
        if (!rubberBand)
            rubberBand = new QRubberBand(QRubberBand::Rectangle, this);
        rubberBand->setGeometry(QRect(origin, QSize()));
    
        //rubberBand->setWindowOpacity(0.9);
        rubberBand->setPalette(QPalette (Qt::red));
        rubberBand->setStyleSheet("background-color: #F5EEA7;");
        rubberBand->show();
    
    }
    
    void QRSelector::mouseMoveEvent(QMouseEvent *e)
    {
        rubberBand->setGeometry(QRect(origin, e->pos()).normalized());
        int ww, hh;
        ww = origin.x() - e->x();
        hh = origin.y() - e->y();
        if(ww < 0) ww *= -1;
        if(hh < 0) hh *= -1;
        label->setText("height: "+QString::number(hh)+" width: "+QString::number(ww));
    }

    qrselector.cpp

    Resager, 06 Января 2011

    Комментарии (1)