Пример #1
0
 public void SetValidator(QValidator arg1)
 {
     interceptor.Invoke("setValidator#", "setValidator(const QValidator*)", typeof(void), typeof(QValidator), arg1);
 }
Пример #2
0
 public void SetValidator(QValidator v)
 {
     interceptor.Invoke("setValidator#", "setValidator(const QValidator*)", typeof(void), typeof(QValidator), v);
 }
Пример #3
0
 public static string GetText(string caption, string label, string value, ref bool ok, QWidget parent, QValidator validator)
 {
     StackItem[] stack = new StackItem[7];
     #if DEBUG
     stack[1].s_class = (IntPtr) DebugGCHandle.Alloc(caption);
     #else
     stack[1].s_class = (IntPtr) GCHandle.Alloc(caption);
     #endif
     #if DEBUG
     stack[2].s_class = (IntPtr) DebugGCHandle.Alloc(label);
     #else
     stack[2].s_class = (IntPtr) GCHandle.Alloc(label);
     #endif
     #if DEBUG
     stack[3].s_class = (IntPtr) DebugGCHandle.Alloc(value);
     #else
     stack[3].s_class = (IntPtr) GCHandle.Alloc(value);
     #endif
     stack[4].s_bool = ok;
     #if DEBUG
     stack[5].s_class = (IntPtr) DebugGCHandle.Alloc(parent);
     #else
     stack[5].s_class = (IntPtr) GCHandle.Alloc(parent);
     #endif
     #if DEBUG
     stack[6].s_class = (IntPtr) DebugGCHandle.Alloc(validator);
     #else
     stack[6].s_class = (IntPtr) GCHandle.Alloc(validator);
     #endif
     staticInterceptor.Invoke("getText$$$$##", "getText(const QString&, const QString&, const QString&, bool*, QWidget*, QValidator*)", stack);
     #if DEBUG
     DebugGCHandle.Free((GCHandle) stack[1].s_class);
     #else
     ((GCHandle) stack[1].s_class).Free();
     #endif
     #if DEBUG
     DebugGCHandle.Free((GCHandle) stack[2].s_class);
     #else
     ((GCHandle) stack[2].s_class).Free();
     #endif
     #if DEBUG
     DebugGCHandle.Free((GCHandle) stack[3].s_class);
     #else
     ((GCHandle) stack[3].s_class).Free();
     #endif
     ok = stack[4].s_bool;
     #if DEBUG
     DebugGCHandle.Free((GCHandle) stack[5].s_class);
     #else
     ((GCHandle) stack[5].s_class).Free();
     #endif
     #if DEBUG
     DebugGCHandle.Free((GCHandle) stack[6].s_class);
     #else
     ((GCHandle) stack[6].s_class).Free();
     #endif
     object returnValue = ((GCHandle) stack[0].s_class).Target;
     #if DEBUG
     DebugGCHandle.Free((GCHandle) stack[0].s_class);
     #else
     ((GCHandle) stack[0].s_class).Free();
     #endif
     return (string) returnValue;
 }
Пример #4
0
 /// <remarks>
 ///  Static convenience function to get a string from the user.
 ///  caption is the text that is displayed in the title bar. label is the
 ///  text that appears as a label for the line edit. value is the initial
 ///  value of the line edit. ok will be set to true if user pressed Ok
 ///  and false if user pressed Cancel.
 ///  If you provide a validator, the Ok button is disabled as long as
 ///  the validator doesn't return Acceptable. If there is no validator,
 ///  the Ok button is enabled whenever the line edit isn't empty. If you
 ///  want to accept empty input, create a trivial QValidator that
 ///  always returns acceptable, e.g. QRegExpValidator with a regexp
 ///  of ".*".
 /// <param> name="caption" Caption of the dialog
 /// </param><param> name="label" Text of the label for the line edit
 /// </param><param> name="value" Initial value of the line edit
 /// </param><param> name="ok" This bool would be set to true if user pressed Ok
 /// </param><param> name="parent" Parent of the dialog widget
 /// </param><param> name="validator" A <see cref="QValidator"></see> to be associated with the line edit
 /// </param><param> name="mask" Mask associated with the line edit. See the
 ///                   documentation for <see cref="QLineEdit"></see> about masks
 /// </param><param> name="whatsThis" a QWhatsThis text for the input widget.
 /// </param><param> name="completionList" a list of items which should be used for input completion
 /// </param></remarks>        <return> String user entered if Ok was pressed, else a null string
 ///      </return>
 ///         <short>    Static convenience function to get a string from the user.</short>
 public static string GetText(string caption, string label, string value, ref bool ok, QWidget parent, QValidator validator, string mask, string whatsThis, List<string> completionList)
 {
     StackItem[] stack = new StackItem[10];
     #if DEBUG
     stack[1].s_class = (IntPtr) DebugGCHandle.Alloc(caption);
     #else
     stack[1].s_class = (IntPtr) GCHandle.Alloc(caption);
     #endif
     #if DEBUG
     stack[2].s_class = (IntPtr) DebugGCHandle.Alloc(label);
     #else
     stack[2].s_class = (IntPtr) GCHandle.Alloc(label);
     #endif
     #if DEBUG
     stack[3].s_class = (IntPtr) DebugGCHandle.Alloc(value);
     #else
     stack[3].s_class = (IntPtr) GCHandle.Alloc(value);
     #endif
     stack[4].s_bool = ok;
     #if DEBUG
     stack[5].s_class = (IntPtr) DebugGCHandle.Alloc(parent);
     #else
     stack[5].s_class = (IntPtr) GCHandle.Alloc(parent);
     #endif
     #if DEBUG
     stack[6].s_class = (IntPtr) DebugGCHandle.Alloc(validator);
     #else
     stack[6].s_class = (IntPtr) GCHandle.Alloc(validator);
     #endif
     #if DEBUG
     stack[7].s_class = (IntPtr) DebugGCHandle.Alloc(mask);
     #else
     stack[7].s_class = (IntPtr) GCHandle.Alloc(mask);
     #endif
     #if DEBUG
     stack[8].s_class = (IntPtr) DebugGCHandle.Alloc(whatsThis);
     #else
     stack[8].s_class = (IntPtr) GCHandle.Alloc(whatsThis);
     #endif
     #if DEBUG
     stack[9].s_class = (IntPtr) DebugGCHandle.Alloc(completionList);
     #else
     stack[9].s_class = (IntPtr) GCHandle.Alloc(completionList);
     #endif
     staticInterceptor.Invoke("getText$$$$##$$?", "getText(const QString&, const QString&, const QString&, bool*, QWidget*, QValidator*, const QString&, const QString&, const QStringList&)", stack);
     #if DEBUG
     DebugGCHandle.Free((GCHandle) stack[1].s_class);
     #else
     ((GCHandle) stack[1].s_class).SynchronizedFree();
     #endif
     #if DEBUG
     DebugGCHandle.Free((GCHandle) stack[2].s_class);
     #else
     ((GCHandle) stack[2].s_class).SynchronizedFree();
     #endif
     #if DEBUG
     DebugGCHandle.Free((GCHandle) stack[3].s_class);
     #else
     ((GCHandle) stack[3].s_class).SynchronizedFree();
     #endif
     ok = stack[4].s_bool;
     #if DEBUG
     DebugGCHandle.Free((GCHandle) stack[5].s_class);
     #else
     ((GCHandle) stack[5].s_class).SynchronizedFree();
     #endif
     #if DEBUG
     DebugGCHandle.Free((GCHandle) stack[6].s_class);
     #else
     ((GCHandle) stack[6].s_class).SynchronizedFree();
     #endif
     #if DEBUG
     DebugGCHandle.Free((GCHandle) stack[7].s_class);
     #else
     ((GCHandle) stack[7].s_class).SynchronizedFree();
     #endif
     #if DEBUG
     DebugGCHandle.Free((GCHandle) stack[8].s_class);
     #else
     ((GCHandle) stack[8].s_class).SynchronizedFree();
     #endif
     #if DEBUG
     DebugGCHandle.Free((GCHandle) stack[9].s_class);
     #else
     ((GCHandle) stack[9].s_class).SynchronizedFree();
     #endif
     object returnValue = ((GCHandle) stack[0].s_class).Target;
     #if DEBUG
     DebugGCHandle.Free((GCHandle) stack[0].s_class);
     #else
     ((GCHandle) stack[0].s_class).SynchronizedFree();
     #endif
     return (string) returnValue;
 }