Inheritance: Object, IDisposable
Example #1
0
File: mouse.cs Project: KDE/qyoto
 public Mouse()
     : base()
 {
     speed = 0;
     mouseEyeDirection = 0;
     random = new Random();
     color = new QColor(random.Next(255), random.Next(255), random.Next(255));
     timer = new MouseTimer(this);
     Rotate(random.Next(360 * 16));
 }
Example #2
0
    protected override void PaintEvent(QPaintEvent e)
    {
        QColor hourColor = new QColor(127, 0, 127);
        QColor minuteColor = new QColor(0, 127, 127, 191);

        int side = QMin(Width(), Height());
        QTime time = QTime.CurrentTime();

        QPainter painter = new QPainter(this);
        painter.SetRenderHint(QPainter.RenderHint.Antialiasing);
        painter.Translate(Width() / 2, Height() / 2);
        painter.Scale(side / 200.0, side / 200.0);

        painter.SetPen(Qt.PenStyle.NoPen);
        painter.SetBrush(hourColor);

        painter.Save();
        painter.Rotate(30.0 * ((time.Hour() + time.Minute() / 60.0)));
        painter.DrawConvexPolygon(new QPolygon(hourHand));
        painter.Restore();

        painter.SetPen(hourColor);

        for (int i = 0; i < 12; ++i) {
            painter.DrawLine(88, 0, 96, 0);
            painter.Rotate(30.0);
        }

        painter.SetPen(Qt.PenStyle.NoPen);
        painter.SetBrush(minuteColor);

        painter.Save();
        painter.Rotate(6.0 * (time.Minute() + time.Second() / 60.0));
        painter.DrawConvexPolygon(new QPolygon(minuteHand));
        painter.Restore();

        painter.SetPen(minuteColor);

        for (int j = 0; j < 60; ++j) {
            if ((j % 5) != 0)
                painter.DrawLine(92, 0, 96, 0);
            painter.Rotate(6.0);
        }

        painter.End();
    }
Example #3
0
 protected void SetFormat(int start, int count, QColor color)
 {
     interceptor.Invoke("setFormat$$#", "setFormat(int, int, const QColor&)", typeof(void), typeof(int), start, typeof(int), count, typeof(QColor), color);
 }
Example #4
0
 public void FillRect(int x, int y, int w, int h, QColor color)
 {
     interceptor.Invoke("fillRect$$$$#", "fillRect(int, int, int, int, const QColor&)", typeof(void), typeof(int), x, typeof(int), y, typeof(int), w, typeof(int), h, typeof(QColor), color);
 }
Example #5
0
File: Qt.cs Project: KDE/qyoto
 public static void QDrawPlainRect(QPainter p, int x, int y, int w, int h, QColor arg6)
 {
     staticInterceptor.Invoke("qDrawPlainRect#$$$$#", "qDrawPlainRect(QPainter*, int, int, int, int, const QColor&)", typeof(void), typeof(QPainter), p, typeof(int), x, typeof(int), y, typeof(int), w, typeof(int), h, typeof(QColor), arg6);
 }
Example #6
0
File: Qt.cs Project: KDE/qyoto
 public static QDataStream Write(QDataStream arg1, QColor arg2)
 {
     return (QDataStream) staticInterceptor.Invoke("operator<<##", "operator<<(QDataStream&, const QColor&)", typeof(QDataStream), typeof(QDataStream), arg1, typeof(QColor), arg2);
 }
Example #7
0
 public virtual void SetSelectionForegroundColor(QColor col)
 {
     interceptor.Invoke("setSelectionForegroundColor#", "setSelectionForegroundColor(const QColor&)", typeof(void), typeof(QColor), col);
 }
Example #8
0
 public void SetTextBackgroundColor(QColor c)
 {
     interceptor.Invoke("setTextBackgroundColor#", "setTextBackgroundColor(const QColor&)", typeof(void), typeof(QColor), c);
 }
Example #9
0
 public QBrush(QColor color, QPixmap pixmap) : this((Type)null)
 {
     CreateProxy();
     interceptor.Invoke("QBrush##", "QBrush(const QColor&, const QPixmap&)", typeof(void), typeof(QColor), color, typeof(QPixmap), pixmap);
 }
Example #10
0
 public void SetFoldMarginColors(QColor fore, QColor back)
 {
     interceptor.Invoke("setFoldMarginColors##", "setFoldMarginColors(const QColor&, const QColor&)", typeof(void), typeof(QColor), fore, typeof(QColor), back);
 }
Example #11
0
 public uint Pixel(QColor color)
 {
     return((uint)interceptor.Invoke("pixel#", "pixel(const QColor&) const", typeof(uint), typeof(QColor), color));
 }
Example #12
0
 public QBrush(QColor color, Qt.BrushStyle bs) : this((Type)null)
 {
     CreateProxy();
     interceptor.Invoke("QBrush#$", "QBrush(const QColor&, Qt::BrushStyle)", typeof(void), typeof(QColor), color, typeof(Qt.BrushStyle), bs);
 }
Example #13
0
 protected uint ColorIndex(QColor c)
 {
     return((uint)interceptor.Invoke("colorIndex#", "colorIndex(const QColor&) const", typeof(uint), typeof(QColor), c));
 }
Example #14
0
 public QColorDialog(QColor initial) : this((Type)null)
 {
     CreateProxy();
     interceptor.Invoke("QColorDialog#", "QColorDialog(const QColor&)", typeof(void), typeof(QColor), initial);
 }
Example #15
0
 public QColorDialog(QColor initial, QWidget parent) : this((Type)null)
 {
     CreateProxy();
     interceptor.Invoke("QColorDialog##", "QColorDialog(const QColor&, QWidget*)", typeof(void), typeof(QColor), initial, typeof(QWidget), parent);
 }
Example #16
0
File: QPen.cs Project: KDE/qyoto
 public QPen(QColor color)
     : this((Type) null)
 {
     CreateProxy();
     interceptor.Invoke("QPen#", "QPen(const QColor&)", typeof(void), typeof(QColor), color);
 }
Example #17
0
 public void Fill(QColor fillColor)
 {
     interceptor.Invoke("fill#", "fill(const QColor&)", typeof(void), typeof(QColor), fillColor);
 }
Example #18
0
 public void ShowMessage(string message, int alignment, QColor color)
 {
     interceptor.Invoke("showMessage$$#", "showMessage(const QString&, int, const QColor&)", typeof(void), typeof(string), message, typeof(int), alignment, typeof(QColor), color);
 }
Example #19
0
 public QBitmap CreateMaskFromColor(QColor maskColor)
 {
     return((QBitmap)interceptor.Invoke("createMaskFromColor#", "createMaskFromColor(const QColor&) const", typeof(QBitmap), typeof(QColor), maskColor));
 }
Example #20
0
 public void SetMarkerForegroundColor(QColor col, int mnr)
 {
     interceptor.Invoke("setMarkerForegroundColor#$", "setMarkerForegroundColor(const QColor&, int)", typeof(void), typeof(QColor), col, typeof(int), mnr);
 }
Example #21
0
 public QBitmap CreateMaskFromColor(QColor maskColor, Qt.MaskMode mode)
 {
     return((QBitmap)interceptor.Invoke("createMaskFromColor#$", "createMaskFromColor(const QColor&, Qt::MaskMode) const", typeof(QBitmap), typeof(QColor), maskColor, typeof(Qt.MaskMode), mode));
 }
Example #22
0
 public static QColor GetColor(QColor initial)
 {
     return((QColor)staticInterceptor.Invoke("getColor#", "getColor(const QColor&)", typeof(QColor), typeof(QColor), initial));
 }
Example #23
0
 public void SetTextColor(int column, QColor color)
 {
     interceptor.Invoke("setTextColor$#", "setTextColor(int, const QColor&)", typeof(void), typeof(int), column, typeof(QColor), color);
 }
Example #24
0
 protected void SetFormat(int start, int count, QColor color)
 {
     interceptor.Invoke("setFormat$$#", "setFormat(int, int, const QColor&)", typeof(void), typeof(int), start, typeof(int), count, typeof(QColor), color);
 }
Example #25
0
 public void ShowMessage(string message, int alignment, QColor color)
 {
     interceptor.Invoke("showMessage$$#", "showMessage(const QString&, int, const QColor&)", typeof(void), typeof(string), message, typeof(int), alignment, typeof(QColor), color);
 }
Example #26
0
File: Qt.cs Project: KDE/qyoto
 public static void QDrawPlainRect(QPainter p, QRect r, QColor arg3)
 {
     staticInterceptor.Invoke("qDrawPlainRect###", "qDrawPlainRect(QPainter*, const QRect&, const QColor&)", typeof(void), typeof(QPainter), p, typeof(QRect), r, typeof(QColor), arg3);
 }
Example #27
0
 public void SetColorAt(double pos, QColor color)
 {
     interceptor.Invoke("setColorAt$#", "setColorAt(qreal, const QColor&)", typeof(void), typeof(double), pos, typeof(QColor), color);
 }
Example #28
0
 public static QColor GetColor(QColor initial, QWidget parent, string title)
 {
     return((QColor)staticInterceptor.Invoke("getColor##$", "getColor(const QColor&, QWidget*, const QString&)", typeof(QColor), typeof(QColor), initial, typeof(QWidget), parent, typeof(string), title));
 }
Example #29
0
 public virtual void SetBackgroundColor(QColor color)
 {
     interceptor.Invoke("setBackgroundColor#", "setBackgroundColor(const QColor&)", typeof(void), typeof(QColor), color);
 }
Example #30
0
 public void SetPen(QColor color)
 {
     interceptor.Invoke("setPen#", "setPen(const QColor&)", typeof(void), typeof(QColor), color);
 }
Example #31
0
 public void SetTextColor(QColor color)
 {
     interceptor.Invoke("setTextColor#", "setTextColor(const QColor&)", typeof(void), typeof(QColor), color);
 }
Example #32
0
 public void FillRect(QRect arg1, QColor color)
 {
     interceptor.Invoke("fillRect##", "fillRect(const QRect&, const QColor&)", typeof(void), typeof(QRect), arg1, typeof(QColor), color);
 }
Example #33
0
 public void SetColor(QPalette.ColorRole cr, QColor color)
 {
     interceptor.Invoke("setColor$#", "setColor(QPalette::ColorRole, const QColor&)", typeof(void), typeof(QPalette.ColorRole), cr, typeof(QColor), color);
 }
Example #34
0
 public void QglClearColor(QColor c)
 {
     interceptor.Invoke("qglClearColor#", "qglClearColor(const QColor&) const", typeof(void), typeof(QColor), c);
 }
Example #35
0
 public QPalette(QColor button, QColor window) : this((Type)null)
 {
     CreateProxy();
     interceptor.Invoke("QPalette##", "QPalette(const QColor&, const QColor&)", typeof(void), typeof(QColor), button, typeof(QColor), window);
 }
Example #36
0
 public void SetBackgroundColor(QColor color)
 {
     interceptor.Invoke("setBackgroundColor#", "setBackgroundColor(const QColor&)", typeof(void), typeof(QColor), color);
 }
Example #37
0
 public QPalette(QColor windowText, QColor window, QColor light, QColor dark, QColor mid, QColor text, QColor arg7) : this((Type)null)
 {
     CreateProxy();
     interceptor.Invoke("QPalette#######", "QPalette(const QColor&, const QColor&, const QColor&, const QColor&, const QColor&, const QColor&, const QColor&)", typeof(void), typeof(QColor), windowText, typeof(QColor), window, typeof(QColor), light, typeof(QColor), dark, typeof(QColor), mid, typeof(QColor), text, typeof(QColor), arg7);
 }
Example #38
0
 public virtual void SetIndentationGuidesForegroundColor(QColor col)
 {
     interceptor.Invoke("setIndentationGuidesForegroundColor#", "setIndentationGuidesForegroundColor(const QColor&)", typeof(void), typeof(QColor), col);
 }
Example #39
0
 public void SetCallTipsHighlightColor(QColor col)
 {
     interceptor.Invoke("setCallTipsHighlightColor#", "setCallTipsHighlightColor(const QColor&)", typeof(void), typeof(QColor), col);
 }
Example #40
0
 public void SetMarkerForegroundColor(QColor col)
 {
     interceptor.Invoke("setMarkerForegroundColor#", "setMarkerForegroundColor(const QColor&)", typeof(void), typeof(QColor), col);
 }
Example #41
0
 public virtual void SetColor(QColor c)
 {
     interceptor.Invoke("setColor#", "setColor(const QColor&)", typeof(void), typeof(QColor), c);
 }
Example #42
0
 public void SetUnmatchedBraceForegroundColor(QColor col)
 {
     interceptor.Invoke("setUnmatchedBraceForegroundColor#", "setUnmatchedBraceForegroundColor(const QColor&)", typeof(void), typeof(QColor), col);
 }
Example #43
0
 public static QColor GetColor(QColor initial, QWidget parent)
 {
     return((QColor)staticInterceptor.Invoke("getColor##", "getColor(const QColor&, QWidget*)", typeof(QColor), typeof(QColor), initial, typeof(QWidget), parent));
 }
Example #44
0
 public virtual void SetCaretLineBackgroundColor(QColor col)
 {
     interceptor.Invoke("setCaretLineBackgroundColor#", "setCaretLineBackgroundColor(const QColor&)", typeof(void), typeof(QColor), col);
 }
Example #45
0
 public QColor(QColor color) : this((Type)null)
 {
     CreateProxy();
     interceptor.Invoke("QColor#", "QColor(const QColor&)", typeof(void), typeof(QColor), color);
 }
Example #46
0
 public void SetEdgeColor(QColor col)
 {
     interceptor.Invoke("setEdgeColor#", "setEdgeColor(const QColor&)", typeof(void), typeof(QColor), col);
 }
Example #47
0
 public void SetEntry(int idx, QColor color) {
     interceptor.Invoke("setEntry$#", "setEntry(int, const QColor&)", typeof(void), typeof(int), idx, typeof(QColor), color);
 }
Example #48
0
 public uint Pixel(QColor color)
 {
     return (uint) interceptor.Invoke("pixel#", "pixel(const QColor&) const", typeof(uint), typeof(QColor), color);
 }
Example #49
0
 public QColorDialog(QColor initial)
     : this((Type) null)
 {
     CreateProxy();
     interceptor.Invoke("QColorDialog#", "QColorDialog(const QColor&)", typeof(void), typeof(QColor), initial);
 }
Example #50
0
File: Qt.cs Project: KDE/qyoto
 public static void QDrawPlainRect(QPainter p, int x, int y, int w, int h, QColor arg6, int lineWidth, QBrush fill)
 {
     staticInterceptor.Invoke("qDrawPlainRect#$$$$#$#", "qDrawPlainRect(QPainter*, int, int, int, int, const QColor&, int, const QBrush*)", typeof(void), typeof(QPainter), p, typeof(int), x, typeof(int), y, typeof(int), w, typeof(int), h, typeof(QColor), arg6, typeof(int), lineWidth, typeof(QBrush), fill);
 }
Example #51
0
 public void SetTabTextColor(int index, QColor color)
 {
     interceptor.Invoke("setTabTextColor$#", "setTabTextColor(int, const QColor&)", typeof(void), typeof(int), index, typeof(QColor), color);
 }
Example #52
0
File: Qt.cs Project: KDE/qyoto
 public static void QDrawPlainRect(QPainter p, QRect r, QColor arg3, int lineWidth)
 {
     staticInterceptor.Invoke("qDrawPlainRect###$", "qDrawPlainRect(QPainter*, const QRect&, const QColor&, int)", typeof(void), typeof(QPainter), p, typeof(QRect), r, typeof(QColor), arg3, typeof(int), lineWidth);
 }
Example #53
0
 public long SendScintilla(uint msg, QColor col)
 {
     return (long) interceptor.Invoke("SendScintilla$#", "SendScintilla(unsigned int, const QColor&) const", typeof(long), typeof(uint), msg, typeof(QColor), col);
 }
Example #54
0
File: Qt.cs Project: KDE/qyoto
 public static QDataStream Read(QDataStream arg1, QColor arg2)
 {
     return (QDataStream) staticInterceptor.Invoke("operator>>##", "operator>>(QDataStream&, QColor&)", typeof(QDataStream), typeof(QDataStream), arg1, typeof(QColor), arg2);
 }
Example #55
0
 /// <remarks>
 ///  Set text label color for the meter
 /// <param> name="index" label index
 /// </param><param> name="color" the color to apply to the label
 ///      </param></remarks>        <short>    Set text label color for the meter </short>
 public void SetLabelColor(int index, QColor color)
 {
     interceptor.Invoke("setLabelColor$#", "setLabelColor(int, const QColor&)", typeof(void), typeof(int), index, typeof(QColor), color);
 }
Example #56
0
 public void SetDefaultTextColor(QColor c)
 {
     interceptor.Invoke("setDefaultTextColor#", "setDefaultTextColor(const QColor&)", typeof(void), typeof(QColor), c);
 }
Example #57
0
 public static QColor GetColor(QColor initial, QWidget parent, string title, uint options)
 {
     return((QColor)staticInterceptor.Invoke("getColor##$$", "getColor(const QColor&, QWidget*, const QString&, QColorDialog::ColorDialogOptions)", typeof(QColor), typeof(QColor), initial, typeof(QWidget), parent, typeof(string), title, typeof(uint), options));
 }