Наследование: QPaintDevice, IDisposable
Пример #1
1
        public TrayIcon(QObject parent)
            : base(parent)
        {
            m_ShowMainWindowAction = new QAction("Show Synapse", this);
            m_ShowMainWindowAction.Checkable = true;
            QObject.Connect(m_ShowMainWindowAction, Qt.SIGNAL("triggered()"), HandleShowMainWindowActionTriggered);

            m_ShowDebugWindowAction = new QAction("Debug Window", this);
            m_ShowDebugWindowAction.Checkable = true;
            QObject.Connect(m_ShowDebugWindowAction, Qt.SIGNAL("triggered()"), HandleShowDebugWindowActionTriggered);

            m_Menu = new QMenu();
            m_Menu.AddAction(m_ShowMainWindowAction);
            m_Menu.AddAction(m_ShowDebugWindowAction);
            m_Menu.AddSeparator();
            m_Menu.AddAction(Gui.GlobalActions.NewMessageAction);
            m_Menu.AddAction(Gui.GlobalActions.JoinConferenceAction);
            m_Menu.AddAction(Gui.GlobalActions.ShowBrowserAction);
            m_Menu.AddAction(Gui.GlobalActions.EditProfileAction);
            m_Menu.AddAction(Gui.GlobalActions.ChangeStatusAction);
            m_Menu.AddSeparator();
            m_Menu.AddAction(Gui.GlobalActions.ShowPreferencesAction);
            m_Menu.AddSeparator();
            m_Menu.AddAction(Gui.GlobalActions.AboutAction);
            m_Menu.AddAction(Gui.GlobalActions.SendFeedbackAction);
            m_Menu.AddSeparator();
            m_Menu.AddAction(Gui.GlobalActions.QuitAction);
            QObject.Connect(m_Menu, Qt.SIGNAL("aboutToShow()"), HandleMenuAboutToShow);

            QPixmap pixmap = new QPixmap("resource:/octy-22.png");
            QIcon icon = new QIcon(pixmap);
            m_Icon = new QSystemTrayIcon(icon);
            m_Icon.SetContextMenu(m_Menu);

            QObject.Connect<QSystemTrayIcon.ActivationReason>(m_Icon, Qt.SIGNAL("activated(QSystemTrayIcon::ActivationReason)"), HandleTrayActivated);
        }
Пример #2
0
        public MainWindow()
        {
            SetupUi();
            base.WindowFlags = (uint)Qt.WindowType.FramelessWindowHint;

            closeButton.icon = new QIcon(new QPixmap("resource:/stock-close_12.png"));
            menuButton.icon = new QIcon(new QPixmap("resource:/menu-icon.png"));

            // FIXME: Add a global "Application Icon" somewhere that contains multiple sizes.
            QPixmap pixmap = new QPixmap("resource:/octy-22.png");
            base.WindowIcon = new QIcon(pixmap);

            m_NoAccountsStyleSheet = Util.ReadResource("mainwindow-noaccounts.qss");
            m_StyleSheet = Util.ReadResource("mainwindow.qss");

            containerWidget.SetStyleSheet(m_StyleSheet);

            QVBoxLayout layout = new QVBoxLayout();
            layout.SetContentsMargins(0, 0, 0, 0);
            contentWidget.SetLayout(layout);

            m_RosterWidget = new RosterWidget(contentWidget);
            contentWidget.Layout().AddWidget(m_RosterWidget);

            m_NoAccountsWidget = new NoAccountsWidget(contentWidget);
            contentWidget.Layout().AddWidget(m_NoAccountsWidget);

            // This makes the shortcut work.
            base.AddAction(Gui.GlobalActions.QuitAction);

            m_MainMenu = new QMenu(this);
            m_MainMenu.AddAction(Gui.GlobalActions.NewMessageAction);
            m_MainMenu.AddAction(Gui.GlobalActions.JoinConferenceAction);
            m_MainMenu.AddAction(Gui.GlobalActions.ShowBrowserAction);
            m_MainMenu.AddAction(Gui.GlobalActions.EditProfileAction);
            m_MainMenu.AddAction(Gui.GlobalActions.ChangeStatusAction);
            m_MainMenu.AddSeparator();
            m_MainMenu.AddAction(Gui.GlobalActions.ShowPreferencesAction);
            m_MainMenu.AddSeparator();
            m_MainMenu.AddAction(Gui.GlobalActions.AboutAction);
            m_MainMenu.AddAction(Gui.GlobalActions.SendFeedbackAction);
            m_MainMenu.AddSeparator();
            m_MainMenu.AddAction(Gui.GlobalActions.QuitAction);

            Gui.CenterWidgetOnScreen(this);

            headerLabel.InstallEventFilter(new WindowMover(this));

            AccountService accountService = ServiceManager.Get<AccountService>();
            accountService.AccountAdded   += AddAccount;
            accountService.AccountRemoved += RemoveAccount;

            foreach (Account account in accountService.Accounts) {
                AddAccount(account);
            }
        }
Пример #3
0
 public void DrawPixmap(QPoint p, QPixmap pm)
 {
     interceptor.Invoke("drawPixmap##", "drawPixmap(const QPoint&, const QPixmap&)", typeof(void), typeof(QPoint), p, typeof(QPixmap), pm);
 }
Пример #4
0
 public static bool Insert(string key, QPixmap arg2)
 {
     return((bool)staticInterceptor.Invoke("insert$#", "insert(const QString&, const QPixmap&)", typeof(bool), typeof(string), key, typeof(QPixmap), arg2));
 }
Пример #5
0
 public void DrawPixmap(int x, int y, QPixmap pm, int sx, int sy, int sw, int sh)
 {
     interceptor.Invoke("drawPixmap$$#$$$$", "drawPixmap(int, int, const QPixmap&, int, int, int, int)", typeof(void), typeof(int), x, typeof(int), y, typeof(QPixmap), pm, typeof(int), sx, typeof(int), sy, typeof(int), sw, typeof(int), sh);
 }
Пример #6
0
 public QSplashScreen(QWidget parent, QPixmap pixmap)
     : this((Type) null)
 {
     CreateProxy();
     interceptor.Invoke("QSplashScreen##", "QSplashScreen(QWidget*, const QPixmap&)", typeof(void), typeof(QWidget), parent, typeof(QPixmap), pixmap);
 }
Пример #7
0
 public static void SetWebGraphic(QWebSettings.WebGraphic type, QPixmap graphic)
 {
     staticInterceptor.Invoke("setWebGraphic$#", "setWebGraphic(QWebSettings::WebGraphic, const QPixmap&)", typeof(void), typeof(QWebSettings.WebGraphic), type, typeof(QPixmap), graphic);
 }
Пример #8
0
 /// <remarks> Should not be created directly. Use KMultiTabBar.AppendButton
 ///     </remarks>        <short>   Should not be created directly.</short>
 public KMultiTabBarButton(QPixmap pic, string arg2, int id, QWidget parent)
     : this((Type) null)
 {
     CreateProxy();
     interceptor.Invoke("KMultiTabBarButton#$$#", "KMultiTabBarButton(const QPixmap&, const QString&, int, QWidget*)", typeof(void), typeof(QPixmap), pic, typeof(string), arg2, typeof(int), id, typeof(QWidget), parent);
 }
Пример #9
0
 /// <remarks>
 ///  set an image that appears next to the prompt.
 ///      </remarks>        <short>    set an image that appears next to the prompt.</short>
 public void SetPixmap(QPixmap arg1)
 {
     interceptor.Invoke("setPixmap#", "setPixmap(const QPixmap&)", typeof(void), typeof(QPixmap), arg1);
 }
Пример #10
0
 public void SetTexture(QPixmap pixmap)
 {
     interceptor.Invoke("setTexture#", "setTexture(const QPixmap&)", typeof(void), typeof(QPixmap), pixmap);
 }
Пример #11
0
 public QBrush(Qt.GlobalColor color, QPixmap pixmap) : this((Type)null)
 {
     CreateProxy();
     interceptor.Invoke("QBrush$#", "QBrush(Qt::GlobalColor, const QPixmap&)", typeof(void), typeof(Qt.GlobalColor), color, typeof(QPixmap), pixmap);
 }
Пример #12
0
 public QGraphicsPixmapItem AddPixmap(QPixmap pixmap)
 {
     return((QGraphicsPixmapItem)interceptor.Invoke("addPixmap#", "addPixmap(const QPixmap&)", typeof(QGraphicsPixmapItem), typeof(QPixmap), pixmap));
 }
Пример #13
0
 public override QPixmap GeneratedIconPixmap(QIcon.Mode iconMode, QPixmap pixmap, QStyleOption opt)
 {
     return((QPixmap)interceptor.Invoke("generatedIconPixmap$##", "generatedIconPixmap(QIcon::Mode, const QPixmap&, const QStyleOption*) const", typeof(QPixmap), typeof(QIcon.Mode), iconMode, typeof(QPixmap), pixmap, typeof(QStyleOption), opt));
 }
Пример #14
0
 public void SetPixmap(QPixmap arg1, QClipboard.Mode mode)
 {
     interceptor.Invoke("setPixmap#$", "setPixmap(const QPixmap&, QClipboard::Mode)", typeof(void), typeof(QPixmap), arg1, typeof(QClipboard.Mode), mode);
 }
Пример #15
0
 public void AddPixmap(QPixmap pixmap)
 {
     interceptor.Invoke("addPixmap#", "addPixmap(const QPixmap&)", typeof(void), typeof(QPixmap), pixmap);
 }
Пример #16
0
 public void AddPixmap(QPixmap pixmap, QIcon.Mode mode)
 {
     interceptor.Invoke("addPixmap#$", "addPixmap(const QPixmap&, QIcon::Mode)", typeof(void), typeof(QPixmap), pixmap, typeof(QIcon.Mode), mode);
 }
Пример #17
0
 public void DrawPixmap(QRect r, QPixmap pm)
 {
     interceptor.Invoke("drawPixmap##", "drawPixmap(const QRect&, const QPixmap&)", typeof(void), typeof(QRect), r, typeof(QPixmap), pm);
 }
Пример #18
0
 public void SetAlphaChannel(QPixmap arg1)
 {
     interceptor.Invoke("setAlphaChannel#", "setAlphaChannel(const QPixmap&)", typeof(void), typeof(QPixmap), arg1);
 }
Пример #19
0
 public void DrawTiledPixmap(int x, int y, int w, int h, QPixmap arg5)
 {
     interceptor.Invoke("drawTiledPixmap$$$$#", "drawTiledPixmap(int, int, int, int, const QPixmap&)", typeof(void), typeof(int), x, typeof(int), y, typeof(int), w, typeof(int), h, typeof(QPixmap), arg5);
 }
Пример #20
0
 public QPixmap(QPixmap arg1) : this((Type)null)
 {
     CreateProxy();
     interceptor.Invoke("QPixmap#", "QPixmap(const QPixmap&)", typeof(void), typeof(QPixmap), arg1);
 }
Пример #21
0
 public QCursor(QPixmap pixmap)
     : this((Type) null)
 {
     CreateProxy();
     interceptor.Invoke("QCursor#", "QCursor(const QPixmap&)", typeof(void), typeof(QPixmap), pixmap);
 }
Пример #22
0
 public QCursor(QPixmap pixmap, int hotX) : this((Type)null)
 {
     CreateProxy();
     interceptor.Invoke("QCursor#$", "QCursor(const QPixmap&, int)", typeof(void), typeof(QPixmap), pixmap, typeof(int), hotX);
 }
Пример #23
0
 public uint BindTexture(QPixmap pixmap)
 {
     return((uint)interceptor.Invoke("bindTexture#", "bindTexture(const QPixmap&)", typeof(uint), typeof(QPixmap), pixmap));
 }
Пример #24
0
 /// <remarks>
 ///  Set a custom pixmap.
 ///      </remarks>        <short>    Set a custom pixmap.</short>
 public void SetCustomPixmap(QPixmap pixmap)
 {
     interceptor.Invoke("setCustomPixmap#", "setCustomPixmap(const QPixmap&)", typeof(void), typeof(QPixmap), pixmap);
 }
Пример #25
0
 public int MarkerDefine(QPixmap pm)
 {
     return (int) interceptor.Invoke("markerDefine#", "markerDefine(const QPixmap&)", typeof(int), typeof(QPixmap), pm);
 }
Пример #26
0
 public void DrawItemPixmap(QRect r, int flags, QPixmap pixmap)
 {
     interceptor.Invoke("drawItemPixmap#$#", "drawItemPixmap(const QRect&, int, const QPixmap&)", typeof(void), typeof(QRect), r, typeof(int), flags, typeof(QPixmap), pixmap);
 }
Пример #27
0
 public static void SetWebGraphic(QWebSettings.WebGraphic type, QPixmap graphic)
 {
     staticInterceptor.Invoke("setWebGraphic$#", "setWebGraphic(QWebSettings::WebGraphic, const QPixmap&)", typeof(void), typeof(QWebSettings.WebGraphic), type, typeof(QPixmap), graphic);
 }
Пример #28
0
 public QSplashScreen(QWidget parent, QPixmap pixmap, uint f) : this((Type)null)
 {
     CreateProxy();
     interceptor.Invoke("QSplashScreen##$", "QSplashScreen(QWidget*, const QPixmap&, Qt::WindowFlags)", typeof(void), typeof(QWidget), parent, typeof(QPixmap), pixmap, typeof(uint), f);
 }
Пример #29
0
Файл: Qt.cs Проект: KDE/qyoto
 public static QDataStream Write(QDataStream arg1, QPixmap arg2)
 {
     return (QDataStream) staticInterceptor.Invoke("operator<<##", "operator<<(QDataStream&, const QPixmap&)", typeof(QDataStream), typeof(QDataStream), arg1, typeof(QPixmap), arg2);
 }
Пример #30
0
 public QSplashScreen(QWidget parent, QPixmap pixmap) : this((Type)null)
 {
     CreateProxy();
     interceptor.Invoke("QSplashScreen##", "QSplashScreen(QWidget*, const QPixmap&)", typeof(void), typeof(QWidget), parent, typeof(QPixmap), pixmap);
 }
Пример #31
0
 public void DrawPixmap(QRect targetRect, QPixmap pixmap, QRect sourceRect)
 {
     interceptor.Invoke("drawPixmap###", "drawPixmap(const QRect&, const QPixmap&, const QRect&)", typeof(void), typeof(QRect), targetRect, typeof(QPixmap), pixmap, typeof(QRect), sourceRect);
 }
Пример #32
0
 public abstract void DrawPixmap(QRectF r, QPixmap pm, QRectF sr);
Пример #33
0
 public void DrawPixmap(QPoint p, QPixmap pm, QRect sr)
 {
     interceptor.Invoke("drawPixmap###", "drawPixmap(const QPoint&, const QPixmap&, const QRect&)", typeof(void), typeof(QPoint), p, typeof(QPixmap), pm, typeof(QRect), sr);
 }
Пример #34
0
 public virtual void DrawTiledPixmap(QRectF r, QPixmap pixmap, QPointF s)
 {
     interceptor.Invoke("drawTiledPixmap###", "drawTiledPixmap(const QRectF&, const QPixmap&, const QPointF&)", typeof(void), typeof(QRectF), r, typeof(QPixmap), pixmap, typeof(QPointF), s);
 }
Пример #35
0
 public void DrawPixmap(int x, int y, QPixmap pm)
 {
     interceptor.Invoke("drawPixmap$$#", "drawPixmap(int, int, const QPixmap&)", typeof(void), typeof(int), x, typeof(int), y, typeof(QPixmap), pm);
 }
Пример #36
0
 public virtual void AddPixmap(QPixmap pixmap, QIcon.Mode mode, QIcon.State state)
 {
     interceptor.Invoke("addPixmap#$$", "addPixmap(const QPixmap&, QIcon::Mode, QIcon::State)", typeof(void), typeof(QPixmap), pixmap, typeof(QIcon.Mode), mode, typeof(QIcon.State), state);
 }
Пример #37
0
 public void DrawTiledPixmap(QRectF rect, QPixmap pm)
 {
     interceptor.Invoke("drawTiledPixmap##", "drawTiledPixmap(const QRectF&, const QPixmap&)", typeof(void), typeof(QRectF), rect, typeof(QPixmap), pm);
 }
Пример #38
0
 public void SetPixmap(QWizard.WizardPixmap which, QPixmap pixmap)
 {
     interceptor.Invoke("setPixmap$#", "setPixmap(QWizard::WizardPixmap, const QPixmap&)", typeof(void), typeof(QWizard.WizardPixmap), which, typeof(QPixmap), pixmap);
 }
Пример #39
0
 public void DrawTiledPixmap(QRect arg1, QPixmap arg2)
 {
     interceptor.Invoke("drawTiledPixmap##", "drawTiledPixmap(const QRect&, const QPixmap&)", typeof(void), typeof(QRect), arg1, typeof(QPixmap), arg2);
 }
Пример #40
0
 protected QPixmap Selected(QPixmap pixmap, QPalette palette, bool enabled)
 {
     return((QPixmap)interceptor.Invoke("selected##$", "selected(const QPixmap&, const QPalette&, bool) const", typeof(QPixmap), typeof(QPixmap), pixmap, typeof(QPalette), palette, typeof(bool), enabled));
 }
Пример #41
0
 public QCursor(QPixmap pixmap, int hotX)
     : this((Type) null)
 {
     CreateProxy();
     interceptor.Invoke("QCursor#$", "QCursor(const QPixmap&, int)", typeof(void), typeof(QPixmap), pixmap, typeof(int), hotX);
 }
Пример #42
0
 protected virtual void DrawDecoration(QPainter painter, QStyleOptionViewItem option, QRect rect, QPixmap pixmap)
 {
     interceptor.Invoke("drawDecoration####", "drawDecoration(QPainter*, const QStyleOptionViewItem&, const QRect&, const QPixmap&) const", typeof(void), typeof(QPainter), painter, typeof(QStyleOptionViewItem), option, typeof(QRect), rect, typeof(QPixmap), pixmap);
 }
Пример #43
0
 public void SetInitialPixmap(int id, QPixmap pixmap)
 {
     interceptor.Invoke("setInitialPixmap$#", "setInitialPixmap(int, const QPixmap&)", typeof(void), typeof(int), id, typeof(QPixmap), pixmap);
 }
Пример #44
0
 public void SetPixmap(QWizard.WizardPixmap which, QPixmap pixmap)
 {
     interceptor.Invoke("setPixmap$#", "setPixmap(QWizard::WizardPixmap, const QPixmap&)", typeof(void), typeof(QWizard.WizardPixmap), which, typeof(QPixmap), pixmap);
 }
Пример #45
0
 public uint BindTexture(QPixmap pixmap, int target)
 {
     return((uint)interceptor.Invoke("bindTexture#$", "bindTexture(const QPixmap&, GLenum)", typeof(uint), typeof(QPixmap), pixmap, typeof(int), target));
 }
Пример #46
0
 public QBitmap(QPixmap arg1)
     : this((Type) null)
 {
     CreateProxy();
     interceptor.Invoke("QBitmap#", "QBitmap(const QPixmap&)", typeof(void), typeof(QPixmap), arg1);
 }
Пример #47
0
 public QSplashScreen(QWidget parent, QPixmap pixmap, uint f)
     : this((Type) null)
 {
     CreateProxy();
     interceptor.Invoke("QSplashScreen##$", "QSplashScreen(QWidget*, const QPixmap&, Qt::WindowFlags)", typeof(void), typeof(QWidget), parent, typeof(QPixmap), pixmap, typeof(uint), f);
 }
Пример #48
0
 public void SetPixmap(QPixmap arg1)
 {
     interceptor.Invoke("setPixmap#", "setPixmap(const QPixmap&)", typeof(void), typeof(QPixmap), arg1);
 }
Пример #49
0
 public int MarkerDefine(QPixmap pm, int mnr)
 {
     return (int) interceptor.Invoke("markerDefine#$", "markerDefine(const QPixmap&, int)", typeof(int), typeof(QPixmap), pm, typeof(int), mnr);
 }
Пример #50
0
 public void SetDragCursor(QPixmap cursor, Qt.DropAction action)
 {
     interceptor.Invoke("setDragCursor#$", "setDragCursor(const QPixmap&, Qt::DropAction)", typeof(void), typeof(QPixmap), cursor, typeof(Qt.DropAction), action);
 }
Пример #51
0
 public void RegisterImage(int id, QPixmap pm)
 {
     interceptor.Invoke("registerImage$#", "registerImage(int, const QPixmap&)", typeof(void), typeof(int), id, typeof(QPixmap), pm);
 }
Пример #52
0
 public long SendScintilla(uint msg, ulong wParam, QPixmap lParam)
 {
     return (long) interceptor.Invoke("SendScintilla$$#", "SendScintilla(unsigned int, unsigned long, const QPixmap&) const", typeof(long), typeof(uint), msg, typeof(ulong), wParam, typeof(QPixmap), lParam);
 }
Пример #53
0
 public QCursor(QPixmap pixmap) : this((Type)null)
 {
     CreateProxy();
     interceptor.Invoke("QCursor#", "QCursor(const QPixmap&)", typeof(void), typeof(QPixmap), pixmap);
 }
Пример #54
0
 public virtual QRect ItemPixmapRect(QRect r, int flags, QPixmap pixmap)
 {
     return((QRect)interceptor.Invoke("itemPixmapRect#$#", "itemPixmapRect(const QRect&, int, const QPixmap&) const", typeof(QRect), typeof(QRect), r, typeof(int), flags, typeof(QPixmap), pixmap));
 }
Пример #55
0
 public QGraphicsPixmapItem AddPixmap(QPixmap pixmap)
 {
     return (QGraphicsPixmapItem) interceptor.Invoke("addPixmap#", "addPixmap(const QPixmap&)", typeof(QGraphicsPixmapItem), typeof(QPixmap), pixmap);
 }
Пример #56
0
 public virtual void DrawItemPixmap(QPainter painter, QRect rect, int alignment, QPixmap pixmap)
 {
     interceptor.Invoke("drawItemPixmap##$#", "drawItemPixmap(QPainter*, const QRect&, int, const QPixmap&) const", typeof(void), typeof(QPainter), painter, typeof(QRect), rect, typeof(int), alignment, typeof(QPixmap), pixmap);
 }
Пример #57
0
Файл: Qt.cs Проект: KDE/qyoto
 public static QDataStream Read(QDataStream arg1, QPixmap arg2)
 {
     return (QDataStream) staticInterceptor.Invoke("operator>>##", "operator>>(QDataStream&, QPixmap&)", typeof(QDataStream), typeof(QDataStream), arg1, typeof(QPixmap), arg2);
 }
Пример #58
0
 public abstract QPixmap GeneratedIconPixmap(QIcon.Mode iconMode, QPixmap pixmap, QStyleOption opt);
Пример #59
0
        void HandleAvatarUpdated(string jid, string hash)
        {
            if (jid == m_Account.Jid.Bare) {
                QApplication.Invoke(delegate {
                    QPixmap pixmap = new QPixmap(36, 36);
                    pixmap.Fill(GlobalColor.transparent);

                    QPainter painter = new QPainter(pixmap);
                    Gui.DrawAvatar(painter, m_AvatarLabel.Width(), m_AvatarLabel.Height(), (QPixmap)AvatarManager.GetAvatar(hash));
                    painter.Dispose();

                    m_AvatarLabel.Pixmap = pixmap;
                });
            }
        }
Пример #60
0
 public static bool Find(string key, QPixmap arg2)
 {
     return((bool)staticInterceptor.Invoke("find$#", "find(const QString&, QPixmap&)", typeof(bool), typeof(string), key, typeof(QPixmap), arg2));
 }