當前位置: 首頁>>代碼示例>>C#>>正文


C# Qyoto.QObject類代碼示例

本文整理匯總了C#中Qyoto.QObject的典型用法代碼示例。如果您正苦於以下問題:C# QObject類的具體用法?C# QObject怎麽用?C# QObject使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


QObject類屬於Qyoto命名空間,在下文中一共展示了QObject類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Connect

 public static bool Connect(QObject sender, int signal_index, QObject receiver, int method_index, int type, ref int types)
 {
     StackItem[] stack = new StackItem[7];
     #if DEBUG
     stack[1].s_class = (IntPtr) DebugGCHandle.Alloc(sender);
     #else
     stack[1].s_class = (IntPtr) GCHandle.Alloc(sender);
     #endif
     stack[2].s_int = signal_index;
     #if DEBUG
     stack[3].s_class = (IntPtr) DebugGCHandle.Alloc(receiver);
     #else
     stack[3].s_class = (IntPtr) GCHandle.Alloc(receiver);
     #endif
     stack[4].s_int = method_index;
     stack[5].s_int = type;
     stack[6].s_int = types;
     staticInterceptor.Invoke("connect#$#$$$", "connect(const QObject*, int, const QObject*, int, int, int*)", stack);
     #if DEBUG
     DebugGCHandle.Free((GCHandle) stack[1].s_class);
     #else
     ((GCHandle) stack[1].s_class).Free();
     #endif
     #if DEBUG
     DebugGCHandle.Free((GCHandle) stack[3].s_class);
     #else
     ((GCHandle) stack[3].s_class).Free();
     #endif
     types = stack[6].s_int;
     return stack[0].s_bool;
 }
開發者ID:0xd34df00d,項目名稱:Qross,代碼行數:31,代碼來源:QMetaObject.cs

示例2: EventFilter

        public new bool EventFilter(QObject obj, QEvent evnt)
        {
            var type = evnt.type();

            if (type == QEvent.TypeOf.MouseButtonPress) {
                var mouseEvent = (QMouseEvent)evnt;
                if (mouseEvent.Button() == Qt.MouseButton.LeftButton) {
                    m_Moving = true;
                    m_OrigX = mouseEvent.X();
                    m_OrigY = mouseEvent.Y();
                    m_ParentWidget.Cursor = new QCursor(Qt.CursorShape.SizeAllCursor);
                }

            } else if (type == QEvent.TypeOf.MouseMove) {
                var mouseEvent = (QMouseEvent)evnt;
                if (m_Moving) {
                    var pos = mouseEvent.GlobalPos();
                    m_ParentWidget.Move(pos.X() - m_OrigX, pos.Y() - m_OrigY);
                }

            } else if (type == QEvent.TypeOf.MouseButtonRelease) {
                var mouseEvent = (QMouseEvent)evnt;
                if (m_Moving && mouseEvent.Button() == Qt.MouseButton.LeftButton) {
                    m_Moving = false;
                    m_ParentWidget.Cursor = new QCursor(Qt.CursorShape.ArrowCursor);
                }
            }

            return obj.EventFilter(obj, evnt);
        }
開發者ID:jrudolph,項目名稱:synapse,代碼行數:30,代碼來源:WindowMover.cs

示例3: EventFilter

 public new bool EventFilter(QObject obj, QEvent evnt)
 {
     if (evnt.type() == QEvent.TypeOf.KeyPress) {
         if (KeyEvent != null) {
             if (KeyEvent((QKeyEvent)evnt)) {
                 return true;
             }
         }
     }
     return obj.EventFilter(obj, evnt);
 }
開發者ID:jrudolph,項目名稱:synapse,代碼行數:11,代碼來源:KeyPressEater.cs

示例4: TrayIcon

        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);
        }
開發者ID:jrudolph,項目名稱:synapse,代碼行數:36,代碼來源:TrayIcon.cs

示例5: Open

 public void Open(QObject receiver, string member)
 {
     interceptor.Invoke("open#$", "open(QObject*, const char*)", typeof(void), typeof(QObject), receiver, typeof(string), member);
 }
開發者ID:KDE,項目名稱:qyoto,代碼行數:4,代碼來源:QFontDialog.cs

示例6: RegisterComponent

 /// <remarks>
 ///  Register a slot to be called when the configuration for the componentData
 ///  has changed. <code>componentData</code> is the KComponentData object
 ///  that is passed to KGenericFactory (if it is used). You can query
 ///  it with KGenericFactory<YourClassName>.ComponentData().
 ///  componentData.componentName() is also the same name that is put into the
 ///  .desktop file of the KCMs for the X-KDE-ParentComponents.
 /// <param> name="componentData" The KComponentData object
 /// </param><param> name="recv" The object that should receive the signal
 /// </param><param> name="slot" The slot to be called: "slotName"
 ///      </param></remarks>        <short>    Register a slot to be called when the configuration for the componentData  has changed.</short>
 public static void RegisterComponent(KComponentData componentData, QObject recv, string slot)
 {
     staticInterceptor.Invoke("registerComponent##$", "registerComponent(const KComponentData&, QObject*, const char*)", typeof(void), typeof(KComponentData), componentData, typeof(QObject), recv, typeof(string), slot);
 }
開發者ID:KDE,項目名稱:kimono,代碼行數:15,代碼來源:KSettings_Dispatcher.cs

示例7: OrgKdeKLauncherInterface

 // QDBusReply<void> autoStart(); >>>> NOT CONVERTED
 // QDBusReply<void> autoStart(int arg1); >>>> NOT CONVERTED
 // QDBusReply<void> exec_blind(const QString& arg1,const QStringList& arg2,const QStringList& arg3,const QString& arg4); >>>> NOT CONVERTED
 // QDBusReply<void> exec_blind(const QString& arg1,const QStringList& arg2); >>>> NOT CONVERTED
 // QDBusReply<int> kdeinit_exec(const QString& arg1,const QStringList& arg2,const QStringList& arg3,const QString& arg4,QString& arg5,QString& arg6,int& arg7); >>>> NOT CONVERTED
 // QDBusReply<int> kdeinit_exec_wait(const QString& arg1,const QStringList& arg2,const QStringList& arg3,const QString& arg4,QString& arg5,QString& arg6,int& arg7); >>>> NOT CONVERTED
 // QDBusReply<void> reparseConfiguration(); >>>> NOT CONVERTED
 // QDBusReply<int> requestHoldSlave(const QString& arg1,const QString& arg2); >>>> NOT CONVERTED
 // QDBusReply<int> requestSlave(const QString& arg1,const QString& arg2,const QString& arg3,QString& arg4); >>>> NOT CONVERTED
 // QDBusReply<void> setLaunchEnv(const QString& arg1,const QString& arg2); >>>> NOT CONVERTED
 // QDBusReply<int> start_service_by_desktop_name(const QString& arg1,const QStringList& arg2,const QStringList& arg3,const QString& arg4,bool arg5,QString& arg6,QString& arg7,int& arg8); >>>> NOT CONVERTED
 // QDBusReply<int> start_service_by_desktop_path(const QString& arg1,const QStringList& arg2,const QStringList& arg3,const QString& arg4,bool arg5,QString& arg6,QString& arg7,int& arg8); >>>> NOT CONVERTED
 // QDBusReply<int> start_service_by_name(const QString& arg1,const QStringList& arg2,const QStringList& arg3,const QString& arg4,bool arg5,QString& arg6,QString& arg7,int& arg8); >>>> NOT CONVERTED
 // QDBusReply<void> waitForSlave(int arg1); >>>> NOT CONVERTED
 public OrgKdeKLauncherInterface(string service, string path, QDBusConnection connection, QObject parent)
     : this((Type) null)
 {
     CreateProxy();
     interceptor.Invoke("OrgKdeKLauncherInterface$$##", "OrgKdeKLauncherInterface(const QString&, const QString&, const QDBusConnection&, QObject*)", typeof(void), typeof(string), service, typeof(string), path, typeof(QDBusConnection), connection, typeof(QObject), parent);
 }
開發者ID:KDE,項目名稱:kimono,代碼行數:20,代碼來源:OrgKdeKLauncherInterface.cs

示例8: VisualizationIsConnected

 /// <remarks>
 /// </remarks>        <return> true if the visualization is currently connected
 ///          </return>
 ///         <short>   </short>
 public bool VisualizationIsConnected(QObject visualization)
 {
     return (bool) interceptor.Invoke("visualizationIsConnected#", "visualizationIsConnected(QObject*) const", typeof(bool), typeof(QObject), visualization);
 }
開發者ID:KDE,項目名稱:kimono,代碼行數:8,代碼來源:Plasma_DataContainer.cs

示例9: ConnectVisualization

 /// <remarks>
 ///  Connects an object to this DataContainer.
 ///  May be called repeatedly for the same visualization without
 ///  side effects
 /// <param> name="visualization" the object to connect to this DataContainer
 /// </param><param> name="pollingInterval" the time in milliseconds between updates
 /// </param><param> name="alignment" the clock position to align updates to
 /// </param></remarks>        <short>    Connects an object to this DataContainer.</short>
 public void ConnectVisualization(QObject visualization, uint pollingInterval, Plasma.IntervalAlignment alignment)
 {
     interceptor.Invoke("connectVisualization#$$", "connectVisualization(QObject*, uint, Plasma::IntervalAlignment)", typeof(void), typeof(QObject), visualization, typeof(uint), pollingInterval, typeof(Plasma.IntervalAlignment), alignment);
 }
開發者ID:KDE,項目名稱:kimono,代碼行數:12,代碼來源:Plasma_DataContainer.cs

示例10: Service

 /// <remarks>
 ///  Default constructor
 ///  @arg parent the parent object for this service
 ///      </remarks>        <short>    Default constructor </short>
 public Service(QObject parent)
     : this((Type) null)
 {
     CreateProxy();
     interceptor.Invoke("Service#", "Service(QObject*)", typeof(void), typeof(QObject), parent);
 }
開發者ID:0xd34df00d,項目名稱:Qross,代碼行數:10,代碼來源:Plasma_Service.cs

示例11: QsciLexerCSS

 public QsciLexerCSS(QObject parent)
     : this((Type) null)
 {
     CreateProxy();
     interceptor.Invoke("QsciLexerCSS#", "QsciLexerCSS(QObject*)", typeof(void), typeof(QObject), parent);
 }
開發者ID:KDE,項目名稱:qyoto,代碼行數:6,代碼來源:QsciLexerCSS.cs

示例12: DataEngine

 /// <remarks>
 ///  Constructor.
 /// <param> name="parent" The parent object.
 /// </param><param> name="service" pointer to the service that describes the engine
 /// </param></remarks>        <short>    Constructor.</short>
 public DataEngine(QObject parent, KService service)
     : this((Type) null)
 {
     CreateProxy();
     interceptor.Invoke("DataEngine#?", "DataEngine(QObject*, KSharedPtr<KService>)", typeof(void), typeof(QObject), parent, typeof(KService), service);
 }
開發者ID:0xd34df00d,項目名稱:Qross,代碼行數:11,代碼來源:Plasma_DataEngine.cs

示例13: DisconnectSource

 /// <remarks>
 ///  Disconnects a source to an object that was receiving data updates.
 /// <param> name="source" the name of the data source
 /// </param><param> name="visualization" the object to connect the data source to
 /// </param></remarks>        <short>    Disconnects a source to an object that was receiving data updates.</short>
 public void DisconnectSource(string source, QObject visualization)
 {
     interceptor.Invoke("disconnectSource$#", "disconnectSource(const QString&, QObject*) const", typeof(void), typeof(string), source, typeof(QObject), visualization);
 }
開發者ID:0xd34df00d,項目名稱:Qross,代碼行數:9,代碼來源:Plasma_DataEngine.cs

示例14: ConnectSource

 public void ConnectSource(string source, QObject visualization, uint pollingInterval)
 {
     interceptor.Invoke("connectSource$#$", "connectSource(const QString&, QObject*, uint) const", typeof(void), typeof(string), source, typeof(QObject), visualization, typeof(uint), pollingInterval);
 }
開發者ID:0xd34df00d,項目名稱:Qross,代碼行數:4,代碼來源:Plasma_DataEngine.cs

示例15: Load

 /// <remarks>
 ///  Used to load a given service from a plugin.
 /// <param> name="name" the plugin name of the service to load
 /// </param><param> name="parent" the parent object, if any, for the service
 /// </param></remarks>        <return> a Service object, guaranteed to be not null.
 ///      </return>
 ///         <short>    Used to load a given service from a plugin.</short>
 public static Plasma.Service Load(string name, QObject parent)
 {
     return (Plasma.Service) staticInterceptor.Invoke("load$#", "load(const QString&, QObject*)", typeof(Plasma.Service), typeof(string), name, typeof(QObject), parent);
 }
開發者ID:0xd34df00d,項目名稱:Qross,代碼行數:11,代碼來源:Plasma_Service.cs


注:本文中的Qyoto.QObject類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。