1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667
/// C++ type: <span style='color: green;'>```QCheckBox```</span>
///
/// <a href="http://doc.qt.io/qt-5/qcheckbox.html">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>The <a href="http://doc.qt.io/qt-5/qcheckbox.html">QCheckBox</a> widget provides a checkbox with a text label.</p>
/// <p>A <a href="http://doc.qt.io/qt-5/qcheckbox.html">QCheckBox</a> is an option button that can be switched on (checked) or off (unchecked). Checkboxes are typically used to represent features in an application that can be enabled or disabled without affecting others. Different types of behavior can be implemented. For example, a <a href="http://doc.qt.io/qt-5/qbuttongroup.html">QButtonGroup</a> can be used to group check buttons logically, allowing exclusive checkboxes. However, <a href="http://doc.qt.io/qt-5/qbuttongroup.html">QButtonGroup</a> does not provide any visual representation.</p>
/// <p>The image below further illustrates the differences between exclusive and non-exclusive checkboxes.</p>
/// <div class="table"><table class="generic">
/// <tbody><tr valign="top" class="odd"><td><img src="http://doc.qt.io/qt-5/images/checkboxes-exclusive.png" alt=""></img></td><td><img src="http://doc.qt.io/qt-5/images/checkboxes-non-exclusive.png" alt=""></img></td></tr>
/// </tbody></table></div>
/// <p>Whenever a checkbox is checked or cleared, it emits the signal <a href="http://doc.qt.io/qt-5/qcheckbox.html#stateChanged">stateChanged</a>(). Connect to this signal if you want to trigger an action each time the checkbox changes state. You can use <a href="http://doc.qt.io/qt-5/qabstractbutton.html#checked-prop">isChecked</a>() to query whether or not a checkbox is checked.</p>
/// <p>In addition to the usual checked and unchecked states, <a href="http://doc.qt.io/qt-5/qcheckbox.html">QCheckBox</a> optionally provides a third state to indicate "no change". This is useful whenever you need to give the user the option of neither checking nor unchecking a checkbox. If you need this third state, enable it with <a href="http://doc.qt.io/qt-5/qcheckbox.html#tristate-prop">setTristate</a>(), and use <a href="http://doc.qt.io/qt-5/qcheckbox.html#checkState">checkState</a>() to query the current toggle state.</p>
/// <p>Just like <a href="http://doc.qt.io/qt-5/qpushbutton.html">QPushButton</a>, a checkbox displays text, and optionally a small icon. The icon is set with <a href="http://doc.qt.io/qt-5/qabstractbutton.html#icon-prop">setIcon</a>(). The text can be set in the constructor or with <a href="http://doc.qt.io/qt-5/qabstractbutton.html#text-prop">setText</a>(). A shortcut key can be specified by preceding the preferred character with an ampersand. For example:</p>
/// <pre class="cpp">
/// <span class="type"><a href="http://doc.qt.io/qt-5/qcheckbox.html#QCheckBox">QCheckBox</a></span> <span class="operator">*</span>checkbox <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="http://doc.qt.io/qt-5/qcheckbox.html#QCheckBox">QCheckBox</a></span>(<span class="string">"C&ase sensitive"</span><span class="operator">,</span> <span class="keyword">this</span>);
///
/// </pre>
/// <p>In this example, the shortcut is <i>Alt+A</i>. See the <a href="http://doc.qt.io/qt-5/qshortcut.html#mnemonic">QShortcut</a> documentation for details. To display an actual ampersand, use '&&'.</p>
/// <p>Important inherited functions: <a href="http://doc.qt.io/qt-5/qabstractbutton.html#text-prop">text</a>(), <a href="http://doc.qt.io/qt-5/qabstractbutton.html#text-prop">setText</a>(), <a href="http://doc.qt.io/qt-5/qabstractbutton.html#text-prop">text</a>(), pixmap(), setPixmap(), accel(), setAccel(), isToggleButton(), <a href="http://doc.qt.io/qt-5/qabstractbutton.html#down-prop">setDown</a>(), <a href="http://doc.qt.io/qt-5/qabstractbutton.html#down-prop">isDown</a>(), isOn(), <a href="http://doc.qt.io/qt-5/qcheckbox.html#checkState">checkState</a>(), <a href="http://doc.qt.io/qt-5/qabstractbutton.html#autoRepeat-prop">autoRepeat</a>(), isExclusiveToggle(), <a href="http://doc.qt.io/qt-5/qabstractbutton.html#group">group</a>(), <a href="http://doc.qt.io/qt-5/qabstractbutton.html#autoRepeat-prop">setAutoRepeat</a>(), <a href="http://doc.qt.io/qt-5/qabstractbutton.html#toggle">toggle</a>(), <a href="http://doc.qt.io/qt-5/qabstractbutton.html#pressed">pressed</a>(), <a href="http://doc.qt.io/qt-5/qabstractbutton.html#released">released</a>(), <a href="http://doc.qt.io/qt-5/qabstractbutton.html#clicked">clicked</a>(), <a href="http://doc.qt.io/qt-5/qabstractbutton.html#toggled">toggled</a>(), <a href="http://doc.qt.io/qt-5/qcheckbox.html#checkState">checkState</a>(), and <a href="http://doc.qt.io/qt-5/qcheckbox.html#stateChanged">stateChanged</a>().</p>
/// <div class="table"><table class="generic" width="100%">
/// <tbody><tr valign="top" class="odd"><td><img src="http://doc.qt.io/qt-5/images/macintosh-checkbox.png" alt="Screenshot of a Macintosh style checkbox"></img></td><td>A checkbox shown in the <a href="http://doc.qt.io/qt-5/gallery-macintosh.html">Macintosh widget style</a>.</td></tr>
/// <tr valign="top" class="even"><td><img src="http://doc.qt.io/qt-5/images/windowsvista-checkbox.png" alt="Screenshot of a Windows Vista style checkbox"></img></td><td>A checkbox shown in the <a href="http://doc.qt.io/qt-5/gallery-windowsvista.html">Windows Vista widget style</a>.</td></tr>
/// <tr valign="top" class="odd"><td><img src="http://doc.qt.io/qt-5/images/fusion-checkbox.png" alt="Screenshot of a Fusion style checkbox"></img></td><td>A checkbox shown in the <a href="http://doc.qt.io/qt-5/gallery-fusion.html">Fusion widget style</a>.</td></tr>
/// </tbody></table></div></div>
#[repr(C)]
pub struct CheckBox(u8);
impl CheckBox {
/// C++ method: <span style='color: green;'>```Qt::CheckState QCheckBox::checkState() const```</span>
///
/// <a href="http://doc.qt.io/qt-5/qcheckbox.html#checkState">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Returns the checkbox's check state. If you do not need tristate support, you can also use <a href="http://doc.qt.io/qt-5/qabstractbutton.html#checked-prop">QAbstractButton::isChecked</a>(), which returns a boolean.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qcheckbox.html#setCheckState">setCheckState</a>() and <a href="http://doc.qt.io/qt-5/qt.html#CheckState-enum">Qt::CheckState</a>.</p></div>
pub fn check_state(&self) -> ::qt_core::qt::CheckState {
unsafe { ::ffi::qt_widgets_c_QCheckBox_checkState(self as *const ::check_box::CheckBox) }
}
/// C++ method: <span style='color: green;'>```bool QCheckBox::isTristate() const```</span>
///
/// <a href="http://doc.qt.io/qt-5/qcheckbox.html#tristate-prop">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>This property holds whether the checkbox is a tri-state checkbox.</p>
/// <p>The default is false, i.e., the checkbox has only two states.</p>
/// <p><b>Access functions:</b></p>
/// <div class="table"><table class="alignedsummary">
/// <tbody><tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isTristate</b></span>() const</td></tr>
/// <tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setTristate</b></span>(bool <i>y</i> = true)</td></tr>
/// </tbody></table></div></div>
pub fn is_tristate(&self) -> bool {
unsafe { ::ffi::qt_widgets_c_QCheckBox_isTristate(self as *const ::check_box::CheckBox) }
}
/// C++ method: <span style='color: green;'>```virtual const QMetaObject* QCheckBox::metaObject() const```</span>
///
///
pub fn meta_object(&self) -> *const ::qt_core::meta_object::MetaObject {
unsafe { ::ffi::qt_widgets_c_QCheckBox_metaObject(self as *const ::check_box::CheckBox) }
}
/// C++ method: <span style='color: green;'>```virtual QSize QCheckBox::minimumSizeHint() const```</span>
///
/// <a href="http://doc.qt.io/qt-5/qcheckbox.html#minimumSizeHint">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Reimplemented from <a href="http://doc.qt.io/qt-5/qwidget.html#minimumSizeHint-prop">QWidget::minimumSizeHint</a>().</p></div>
pub fn minimum_size_hint(&self) -> ::qt_core::size::Size {
{
let mut object: ::qt_core::size::Size =
unsafe { ::cpp_utils::new_uninitialized::NewUninitialized::new_uninitialized() };
unsafe {
::ffi::qt_widgets_c_QCheckBox_minimumSizeHint_to_output(self as *const ::check_box::CheckBox, &mut object);
}
object
}
}
/// C++ method: <span style='color: green;'>```QCheckBox::QCheckBox```</span>
///
/// This is an overloaded function. Available variants:
///
///
///
/// ## Variant 1
///
/// Rust arguments: ```fn new(()) -> ::cpp_utils::CppBox<::check_box::CheckBox>```<br>
/// C++ method: <span style='color: green;'>```[constructor] void QCheckBox::QCheckBox()```</span>
///
/// <a href="http://doc.qt.io/qt-5/qcheckbox.html#QCheckBox">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Constructs a checkbox with the given <i>parent</i>, but with no text.</p>
/// <p><i>parent</i> is passed on to the <a href="http://doc.qt.io/qt-5/qabstractbutton.html">QAbstractButton</a> constructor.</p></div>
///
/// ## Variant 2
///
/// Rust arguments: ```fn new(&::qt_core::string::String) -> ::cpp_utils::CppBox<::check_box::CheckBox>```<br>
/// C++ method: <span style='color: green;'>```[constructor] void QCheckBox::QCheckBox(const QString& text)```</span>
///
/// <a href="http://doc.qt.io/qt-5/qcheckbox.html#QCheckBox-1">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Constructs a checkbox with the given <i>parent</i> and <i>text</i>.</p>
/// <p><i>parent</i> is passed on to the <a href="http://doc.qt.io/qt-5/qabstractbutton.html">QAbstractButton</a> constructor.</p></div>
pub fn new<Args>(args: Args) -> ::cpp_utils::CppBox<::check_box::CheckBox>
where Args: overloading::CheckBoxNewArgs
{
args.exec()
}
/// C++ method: <span style='color: green;'>```QCheckBox::QCheckBox```</span>
///
/// This is an overloaded function. Available variants:
///
///
///
/// ## Variant 1
///
/// Rust arguments: ```fn new_unsafe(*mut ::widget::Widget) -> ::cpp_utils::CppBox<::check_box::CheckBox>```<br>
/// C++ method: <span style='color: green;'>```[constructor] void QCheckBox::QCheckBox(QWidget* parent = ?)```</span>
///
/// <a href="http://doc.qt.io/qt-5/qcheckbox.html#QCheckBox">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Constructs a checkbox with the given <i>parent</i>, but with no text.</p>
/// <p><i>parent</i> is passed on to the <a href="http://doc.qt.io/qt-5/qabstractbutton.html">QAbstractButton</a> constructor.</p></div>
///
/// ## Variant 2
///
/// Rust arguments: ```fn new_unsafe((&::qt_core::string::String, *mut ::widget::Widget)) -> ::cpp_utils::CppBox<::check_box::CheckBox>```<br>
/// C++ method: <span style='color: green;'>```[constructor] void QCheckBox::QCheckBox(const QString& text, QWidget* parent = ?)```</span>
///
/// <a href="http://doc.qt.io/qt-5/qcheckbox.html#QCheckBox-1">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Constructs a checkbox with the given <i>parent</i> and <i>text</i>.</p>
/// <p><i>parent</i> is passed on to the <a href="http://doc.qt.io/qt-5/qabstractbutton.html">QAbstractButton</a> constructor.</p></div>
pub unsafe fn new_unsafe<Args>(args: Args) -> ::cpp_utils::CppBox<::check_box::CheckBox>
where Args: overloading::CheckBoxNewUnsafeArgs
{
args.exec()
}
/// C++ method: <span style='color: green;'>```virtual int QCheckBox::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3)```</span>
///
///
pub unsafe fn qt_metacall(&mut self,
arg1: ::qt_core::meta_object::Call,
arg2: ::libc::c_int,
arg3: *mut *mut ::libc::c_void)
-> ::libc::c_int {
::ffi::qt_widgets_c_QCheckBox_qt_metacall(self as *mut ::check_box::CheckBox, arg1, arg2, arg3)
}
/// C++ method: <span style='color: green;'>```virtual void* QCheckBox::qt_metacast(const char* arg1)```</span>
///
///
pub unsafe fn qt_metacast(&mut self, arg1: *const ::libc::c_char) -> *mut ::libc::c_void {
::ffi::qt_widgets_c_QCheckBox_qt_metacast(self as *mut ::check_box::CheckBox, arg1)
}
/// C++ method: <span style='color: green;'>```void QCheckBox::setCheckState(Qt::CheckState state)```</span>
///
/// <a href="http://doc.qt.io/qt-5/qcheckbox.html#setCheckState">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Sets the checkbox's check state to <i>state</i>. If you do not need tristate support, you can also use <a href="http://doc.qt.io/qt-5/qabstractbutton.html#checked-prop">QAbstractButton::setChecked</a>(), which takes a boolean.</p>
/// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qcheckbox.html#checkState">checkState</a>() and <a href="http://doc.qt.io/qt-5/qt.html#CheckState-enum">Qt::CheckState</a>.</p></div>
pub fn set_check_state(&mut self, state: ::qt_core::qt::CheckState) {
unsafe { ::ffi::qt_widgets_c_QCheckBox_setCheckState(self as *mut ::check_box::CheckBox, state) }
}
/// C++ method: <span style='color: green;'>```QCheckBox::setTristate```</span>
///
/// This is an overloaded function. Available variants:
///
///
///
/// ## Variant 1
///
/// Rust arguments: ```fn set_tristate(&mut self, ()) -> ()```<br>
/// C++ method: <span style='color: green;'>```void QCheckBox::setTristate()```</span>
///
/// <a href="http://doc.qt.io/qt-5/qcheckbox.html#tristate-prop">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>This property holds whether the checkbox is a tri-state checkbox.</p>
/// <p>The default is false, i.e., the checkbox has only two states.</p>
/// <p><b>Access functions:</b></p>
/// <div class="table"><table class="alignedsummary">
/// <tbody><tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isTristate</b></span>() const</td></tr>
/// <tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setTristate</b></span>(bool <i>y</i> = true)</td></tr>
/// </tbody></table></div></div>
///
/// ## Variant 2
///
/// Rust arguments: ```fn set_tristate(&mut self, bool) -> ()```<br>
/// C++ method: <span style='color: green;'>```void QCheckBox::setTristate(bool y = ?)```</span>
///
/// <a href="http://doc.qt.io/qt-5/qcheckbox.html#tristate-prop">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>This property holds whether the checkbox is a tri-state checkbox.</p>
/// <p>The default is false, i.e., the checkbox has only two states.</p>
/// <p><b>Access functions:</b></p>
/// <div class="table"><table class="alignedsummary">
/// <tbody><tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isTristate</b></span>() const</td></tr>
/// <tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setTristate</b></span>(bool <i>y</i> = true)</td></tr>
/// </tbody></table></div></div>
pub fn set_tristate<'largs, Args>(&'largs mut self, args: Args) -> ()
where Args: overloading::CheckBoxSetTristateArgs<'largs>
{
args.exec(self)
}
/// C++ method: <span style='color: green;'>```virtual QSize QCheckBox::sizeHint() const```</span>
///
/// <a href="http://doc.qt.io/qt-5/qcheckbox.html#sizeHint">C++ documentation:</a> <div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Reimplemented from <a href="http://doc.qt.io/qt-5/qwidget.html#sizeHint-prop">QWidget::sizeHint</a>().</p></div>
pub fn size_hint(&self) -> ::qt_core::size::Size {
{
let mut object: ::qt_core::size::Size =
unsafe { ::cpp_utils::new_uninitialized::NewUninitialized::new_uninitialized() };
unsafe {
::ffi::qt_widgets_c_QCheckBox_sizeHint_to_output(self as *const ::check_box::CheckBox, &mut object);
}
object
}
}
/// C++ method: <span style='color: green;'>```static QString QCheckBox::tr(const char* s, const char* c, int n)```</span>
///
///
pub unsafe fn tr(s: *const ::libc::c_char, c: *const ::libc::c_char, n: ::libc::c_int) -> ::qt_core::string::String {
{
let mut object: ::qt_core::string::String =
::cpp_utils::new_uninitialized::NewUninitialized::new_uninitialized();
::ffi::qt_widgets_c_QCheckBox_tr_to_output(s, c, n, &mut object);
object
}
}
/// C++ method: <span style='color: green;'>```static QString QCheckBox::trUtf8(const char* s, const char* c, int n)```</span>
///
///
pub unsafe fn tr_utf8(s: *const ::libc::c_char,
c: *const ::libc::c_char,
n: ::libc::c_int)
-> ::qt_core::string::String {
{
let mut object: ::qt_core::string::String =
::cpp_utils::new_uninitialized::NewUninitialized::new_uninitialized();
::ffi::qt_widgets_c_QCheckBox_trUtf8_to_output(s, c, n, &mut object);
object
}
}
}
impl ::cpp_utils::CppDeletable for ::check_box::CheckBox {
fn deleter() -> ::cpp_utils::Deleter<Self> {
::ffi::qt_widgets_c_QCheckBox_delete
}
}
/// Types for accessing built-in Qt signals and slots present in this module
pub mod connection {
use ::cpp_utils::StaticCast;
/// Provides access to built-in Qt signals of `CheckBox`.
pub struct Signals<'a>(&'a ::check_box::CheckBox);
/// Represents a built-in Qt signal `QCheckBox::stateChanged`.
///
/// An object of this type can be created from `CheckBox` with `object.signals().state_changed()` and used for creating Qt connections using `qt_core::connection` API. After the connection is made, the object can (should) be dropped. The connection will remain active until sender or receiver are destroyed or until a manual disconnection is made.
///
/// An object of this type contains a reference to the original `CheckBox` object.
pub struct StateChanged<'a>(&'a ::check_box::CheckBox);
impl<'a> ::qt_core::connection::Receiver for StateChanged<'a> {
type Arguments = (::libc::c_int,);
fn object(&self) -> &::qt_core::object::Object {
self.0.static_cast()
}
fn receiver_id() -> &'static [u8] {
b"2stateChanged(int)\0"
}
}
impl<'a> ::qt_core::connection::Signal for StateChanged<'a> {}
/// Represents a built-in Qt signal `QCheckBox::pressed`.
///
/// An object of this type can be created from `CheckBox` with `object.signals().pressed()` and used for creating Qt connections using `qt_core::connection` API. After the connection is made, the object can (should) be dropped. The connection will remain active until sender or receiver are destroyed or until a manual disconnection is made.
///
/// An object of this type contains a reference to the original `CheckBox` object.
pub struct Pressed<'a>(&'a ::check_box::CheckBox);
impl<'a> ::qt_core::connection::Receiver for Pressed<'a> {
type Arguments = ();
fn object(&self) -> &::qt_core::object::Object {
self.0.static_cast()
}
fn receiver_id() -> &'static [u8] {
b"2pressed()\0"
}
}
impl<'a> ::qt_core::connection::Signal for Pressed<'a> {}
/// Represents a built-in Qt signal `QCheckBox::clicked`.
///
/// An object of this type can be created from `CheckBox` with `object.signals().clicked()` and used for creating Qt connections using `qt_core::connection` API. After the connection is made, the object can (should) be dropped. The connection will remain active until sender or receiver are destroyed or until a manual disconnection is made.
///
/// An object of this type contains a reference to the original `CheckBox` object.
pub struct Clicked<'a>(&'a ::check_box::CheckBox);
impl<'a> ::qt_core::connection::Receiver for Clicked<'a> {
type Arguments = (bool,);
fn object(&self) -> &::qt_core::object::Object {
self.0.static_cast()
}
fn receiver_id() -> &'static [u8] {
b"2clicked(bool)\0"
}
}
impl<'a> ::qt_core::connection::Signal for Clicked<'a> {}
/// Represents a built-in Qt signal `QCheckBox::released`.
///
/// An object of this type can be created from `CheckBox` with `object.signals().released()` and used for creating Qt connections using `qt_core::connection` API. After the connection is made, the object can (should) be dropped. The connection will remain active until sender or receiver are destroyed or until a manual disconnection is made.
///
/// An object of this type contains a reference to the original `CheckBox` object.
pub struct Released<'a>(&'a ::check_box::CheckBox);
impl<'a> ::qt_core::connection::Receiver for Released<'a> {
type Arguments = ();
fn object(&self) -> &::qt_core::object::Object {
self.0.static_cast()
}
fn receiver_id() -> &'static [u8] {
b"2released()\0"
}
}
impl<'a> ::qt_core::connection::Signal for Released<'a> {}
/// Represents a built-in Qt signal `QCheckBox::toggled`.
///
/// An object of this type can be created from `CheckBox` with `object.signals().toggled()` and used for creating Qt connections using `qt_core::connection` API. After the connection is made, the object can (should) be dropped. The connection will remain active until sender or receiver are destroyed or until a manual disconnection is made.
///
/// An object of this type contains a reference to the original `CheckBox` object.
pub struct Toggled<'a>(&'a ::check_box::CheckBox);
impl<'a> ::qt_core::connection::Receiver for Toggled<'a> {
type Arguments = (bool,);
fn object(&self) -> &::qt_core::object::Object {
self.0.static_cast()
}
fn receiver_id() -> &'static [u8] {
b"2toggled(bool)\0"
}
}
impl<'a> ::qt_core::connection::Signal for Toggled<'a> {}
impl<'a> Signals<'a> {
/// Returns an object representing a built-in Qt signal `QCheckBox::stateChanged`.
///
/// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
pub fn state_changed(&self) -> StateChanged {
StateChanged(self.0)
}
/// Returns an object representing a built-in Qt signal `QCheckBox::pressed`.
///
/// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
pub fn pressed(&self) -> Pressed {
Pressed(self.0)
}
/// Returns an object representing a built-in Qt signal `QCheckBox::clicked`.
///
/// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
pub fn clicked(&self) -> Clicked {
Clicked(self.0)
}
/// Returns an object representing a built-in Qt signal `QCheckBox::released`.
///
/// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
pub fn released(&self) -> Released {
Released(self.0)
}
/// Returns an object representing a built-in Qt signal `QCheckBox::toggled`.
///
/// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
pub fn toggled(&self) -> Toggled {
Toggled(self.0)
}
}
/// Provides access to built-in Qt slots of `CheckBox`.
pub struct Slots<'a>(&'a ::check_box::CheckBox);
/// Represents a built-in Qt slot `QCheckBox::setIconSize`.
///
/// An object of this type can be created from `CheckBox` with `object.slots().set_icon_size()` and used for creating Qt connections using `qt_core::connection` API. After the connection is made, the object can (should) be dropped. The connection will remain active until sender or receiver are destroyed or until a manual disconnection is made.
///
/// An object of this type contains a reference to the original `CheckBox` object.
pub struct SetIconSize<'a>(&'a ::check_box::CheckBox);
impl<'a> ::qt_core::connection::Receiver for SetIconSize<'a> {
type Arguments = (&'static ::qt_core::size::Size,);
fn object(&self) -> &::qt_core::object::Object {
self.0.static_cast()
}
fn receiver_id() -> &'static [u8] {
b"1setIconSize(const QSize&)\0"
}
}
/// Represents a built-in Qt slot `QCheckBox::toggle`.
///
/// An object of this type can be created from `CheckBox` with `object.slots().toggle()` and used for creating Qt connections using `qt_core::connection` API. After the connection is made, the object can (should) be dropped. The connection will remain active until sender or receiver are destroyed or until a manual disconnection is made.
///
/// An object of this type contains a reference to the original `CheckBox` object.
pub struct Toggle<'a>(&'a ::check_box::CheckBox);
impl<'a> ::qt_core::connection::Receiver for Toggle<'a> {
type Arguments = ();
fn object(&self) -> &::qt_core::object::Object {
self.0.static_cast()
}
fn receiver_id() -> &'static [u8] {
b"1toggle()\0"
}
}
/// Represents a built-in Qt slot `QCheckBox::animateClick`.
///
/// An object of this type can be created from `CheckBox` with `object.slots().animate_click()` and used for creating Qt connections using `qt_core::connection` API. After the connection is made, the object can (should) be dropped. The connection will remain active until sender or receiver are destroyed or until a manual disconnection is made.
///
/// An object of this type contains a reference to the original `CheckBox` object.
pub struct AnimateClick<'a>(&'a ::check_box::CheckBox);
impl<'a> ::qt_core::connection::Receiver for AnimateClick<'a> {
type Arguments = (::libc::c_int,);
fn object(&self) -> &::qt_core::object::Object {
self.0.static_cast()
}
fn receiver_id() -> &'static [u8] {
b"1animateClick(int)\0"
}
}
/// Represents a built-in Qt slot `QCheckBox::click`.
///
/// An object of this type can be created from `CheckBox` with `object.slots().click()` and used for creating Qt connections using `qt_core::connection` API. After the connection is made, the object can (should) be dropped. The connection will remain active until sender or receiver are destroyed or until a manual disconnection is made.
///
/// An object of this type contains a reference to the original `CheckBox` object.
pub struct Click<'a>(&'a ::check_box::CheckBox);
impl<'a> ::qt_core::connection::Receiver for Click<'a> {
type Arguments = ();
fn object(&self) -> &::qt_core::object::Object {
self.0.static_cast()
}
fn receiver_id() -> &'static [u8] {
b"1click()\0"
}
}
/// Represents a built-in Qt slot `QCheckBox::setChecked`.
///
/// An object of this type can be created from `CheckBox` with `object.slots().set_checked()` and used for creating Qt connections using `qt_core::connection` API. After the connection is made, the object can (should) be dropped. The connection will remain active until sender or receiver are destroyed or until a manual disconnection is made.
///
/// An object of this type contains a reference to the original `CheckBox` object.
pub struct SetChecked<'a>(&'a ::check_box::CheckBox);
impl<'a> ::qt_core::connection::Receiver for SetChecked<'a> {
type Arguments = (bool,);
fn object(&self) -> &::qt_core::object::Object {
self.0.static_cast()
}
fn receiver_id() -> &'static [u8] {
b"1setChecked(bool)\0"
}
}
impl<'a> Slots<'a> {
/// Returns an object representing a built-in Qt slot `QCheckBox::setIconSize`.
///
/// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
pub fn set_icon_size(&self) -> SetIconSize {
SetIconSize(self.0)
}
/// Returns an object representing a built-in Qt slot `QCheckBox::toggle`.
///
/// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
pub fn toggle(&self) -> Toggle {
Toggle(self.0)
}
/// Returns an object representing a built-in Qt slot `QCheckBox::animateClick`.
///
/// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
pub fn animate_click(&self) -> AnimateClick {
AnimateClick(self.0)
}
/// Returns an object representing a built-in Qt slot `QCheckBox::click`.
///
/// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
pub fn click(&self) -> Click {
Click(self.0)
}
/// Returns an object representing a built-in Qt slot `QCheckBox::setChecked`.
///
/// Return value of this function can be used for creating Qt connections using `qt_core::connection` API.
pub fn set_checked(&self) -> SetChecked {
SetChecked(self.0)
}
}
impl ::check_box::CheckBox {
/// Provides access to built-in Qt signals of this type
pub fn signals(&self) -> Signals {
Signals(self)
}
/// Provides access to built-in Qt slots of this type
pub fn slots(&self) -> Slots {
Slots(self)
}
}
}
impl ::cpp_utils::DynamicCast<::check_box::CheckBox> for ::abstract_button::AbstractButton {
fn dynamic_cast_mut(&mut self) -> ::std::option::Option<&mut ::check_box::CheckBox> {
let ffi_result = unsafe { ::ffi::qt_widgets_c_QCheckBox_G_dynamic_cast_QCheckBox_ptr_QAbstractButton(self as *mut ::abstract_button::AbstractButton) };
unsafe { ffi_result.as_mut() }
}
fn dynamic_cast(&self) -> ::std::option::Option<&::check_box::CheckBox> {
let ffi_result = unsafe { ::ffi::qt_widgets_c_QCheckBox_G_dynamic_cast_QCheckBox_ptr_QAbstractButton(self as *const ::abstract_button::AbstractButton as *mut ::abstract_button::AbstractButton) };
unsafe { ffi_result.as_ref() }
}
}
impl ::cpp_utils::DynamicCast<::check_box::CheckBox> for ::widget::Widget {
fn dynamic_cast_mut(&mut self) -> ::std::option::Option<&mut ::check_box::CheckBox> {
let ffi_result =
unsafe { ::ffi::qt_widgets_c_QCheckBox_G_dynamic_cast_QCheckBox_ptr_QWidget(self as *mut ::widget::Widget) };
unsafe { ffi_result.as_mut() }
}
fn dynamic_cast(&self) -> ::std::option::Option<&::check_box::CheckBox> {
let ffi_result = unsafe { ::ffi::qt_widgets_c_QCheckBox_G_dynamic_cast_QCheckBox_ptr_QWidget(self as *const ::widget::Widget as *mut ::widget::Widget) };
unsafe { ffi_result.as_ref() }
}
}
impl ::cpp_utils::StaticCast<::qt_core::object::Object> for ::check_box::CheckBox {
fn static_cast_mut(&mut self) -> &mut ::qt_core::object::Object {
let ffi_result =
unsafe { ::ffi::qt_widgets_c_QCheckBox_G_static_cast_QObject_ptr(self as *mut ::check_box::CheckBox) };
unsafe { ffi_result.as_mut() }.expect("Attempted to convert null pointer to reference")
}
fn static_cast(&self) -> &::qt_core::object::Object {
let ffi_result = unsafe { ::ffi::qt_widgets_c_QCheckBox_G_static_cast_QObject_ptr(self as *const ::check_box::CheckBox as *mut ::check_box::CheckBox) };
unsafe { ffi_result.as_ref() }.expect("Attempted to convert null pointer to reference")
}
}
impl ::cpp_utils::StaticCast<::qt_gui::paint_device::PaintDevice> for ::check_box::CheckBox {
fn static_cast_mut(&mut self) -> &mut ::qt_gui::paint_device::PaintDevice {
let ffi_result =
unsafe { ::ffi::qt_widgets_c_QCheckBox_G_static_cast_QPaintDevice_ptr(self as *mut ::check_box::CheckBox) };
unsafe { ffi_result.as_mut() }.expect("Attempted to convert null pointer to reference")
}
fn static_cast(&self) -> &::qt_gui::paint_device::PaintDevice {
let ffi_result = unsafe { ::ffi::qt_widgets_c_QCheckBox_G_static_cast_QPaintDevice_ptr(self as *const ::check_box::CheckBox as *mut ::check_box::CheckBox) };
unsafe { ffi_result.as_ref() }.expect("Attempted to convert null pointer to reference")
}
}
impl ::cpp_utils::StaticCast<::abstract_button::AbstractButton> for ::check_box::CheckBox {
fn static_cast_mut(&mut self) -> &mut ::abstract_button::AbstractButton {
let ffi_result =
unsafe { ::ffi::qt_widgets_c_QCheckBox_G_static_cast_QAbstractButton_ptr(self as *mut ::check_box::CheckBox) };
unsafe { ffi_result.as_mut() }.expect("Attempted to convert null pointer to reference")
}
fn static_cast(&self) -> &::abstract_button::AbstractButton {
let ffi_result = unsafe { ::ffi::qt_widgets_c_QCheckBox_G_static_cast_QAbstractButton_ptr(self as *const ::check_box::CheckBox as *mut ::check_box::CheckBox) };
unsafe { ffi_result.as_ref() }.expect("Attempted to convert null pointer to reference")
}
}
impl ::cpp_utils::StaticCast<::widget::Widget> for ::check_box::CheckBox {
fn static_cast_mut(&mut self) -> &mut ::widget::Widget {
let ffi_result =
unsafe { ::ffi::qt_widgets_c_QCheckBox_G_static_cast_QWidget_ptr(self as *mut ::check_box::CheckBox) };
unsafe { ffi_result.as_mut() }.expect("Attempted to convert null pointer to reference")
}
fn static_cast(&self) -> &::widget::Widget {
let ffi_result = unsafe { ::ffi::qt_widgets_c_QCheckBox_G_static_cast_QWidget_ptr(self as *const ::check_box::CheckBox as *mut ::check_box::CheckBox) };
unsafe { ffi_result.as_ref() }.expect("Attempted to convert null pointer to reference")
}
}
impl ::cpp_utils::UnsafeStaticCast<::check_box::CheckBox> for ::abstract_button::AbstractButton {
unsafe fn static_cast_mut(&mut self) -> &mut ::check_box::CheckBox {
let ffi_result = ::ffi::qt_widgets_c_QCheckBox_G_static_cast_QCheckBox_ptr_QAbstractButton(self as *mut ::abstract_button::AbstractButton);
ffi_result.as_mut().expect("Attempted to convert null pointer to reference")
}
unsafe fn static_cast(&self) -> &::check_box::CheckBox {
let ffi_result = ::ffi::qt_widgets_c_QCheckBox_G_static_cast_QCheckBox_ptr_QAbstractButton(self as *const ::abstract_button::AbstractButton as *mut ::abstract_button::AbstractButton);
ffi_result.as_ref().expect("Attempted to convert null pointer to reference")
}
}
impl ::cpp_utils::UnsafeStaticCast<::check_box::CheckBox> for ::qt_core::object::Object {
unsafe fn static_cast_mut(&mut self) -> &mut ::check_box::CheckBox {
let ffi_result =
::ffi::qt_widgets_c_QCheckBox_G_static_cast_QCheckBox_ptr_QObject(self as *mut ::qt_core::object::Object);
ffi_result.as_mut().expect("Attempted to convert null pointer to reference")
}
unsafe fn static_cast(&self) -> &::check_box::CheckBox {
let ffi_result = ::ffi::qt_widgets_c_QCheckBox_G_static_cast_QCheckBox_ptr_QObject(self as *const ::qt_core::object::Object as *mut ::qt_core::object::Object);
ffi_result.as_ref().expect("Attempted to convert null pointer to reference")
}
}
impl ::cpp_utils::UnsafeStaticCast<::check_box::CheckBox> for ::qt_gui::paint_device::PaintDevice {
unsafe fn static_cast_mut(&mut self) -> &mut ::check_box::CheckBox {
let ffi_result = ::ffi::qt_widgets_c_QCheckBox_G_static_cast_QCheckBox_ptr_QPaintDevice(self as *mut ::qt_gui::paint_device::PaintDevice);
ffi_result.as_mut().expect("Attempted to convert null pointer to reference")
}
unsafe fn static_cast(&self) -> &::check_box::CheckBox {
let ffi_result = ::ffi::qt_widgets_c_QCheckBox_G_static_cast_QCheckBox_ptr_QPaintDevice(self as *const ::qt_gui::paint_device::PaintDevice as *mut ::qt_gui::paint_device::PaintDevice);
ffi_result.as_ref().expect("Attempted to convert null pointer to reference")
}
}
impl ::cpp_utils::UnsafeStaticCast<::check_box::CheckBox> for ::widget::Widget {
unsafe fn static_cast_mut(&mut self) -> &mut ::check_box::CheckBox {
let ffi_result = ::ffi::qt_widgets_c_QCheckBox_G_static_cast_QCheckBox_ptr_QWidget(self as *mut ::widget::Widget);
ffi_result.as_mut().expect("Attempted to convert null pointer to reference")
}
unsafe fn static_cast(&self) -> &::check_box::CheckBox {
let ffi_result = ::ffi::qt_widgets_c_QCheckBox_G_static_cast_QCheckBox_ptr_QWidget(self as *const ::widget::Widget as *mut ::widget::Widget);
ffi_result.as_ref().expect("Attempted to convert null pointer to reference")
}
}
impl ::std::ops::Deref for ::check_box::CheckBox {
type Target = ::abstract_button::AbstractButton;
fn deref(&self) -> &::abstract_button::AbstractButton {
let ffi_result = unsafe { ::ffi::qt_widgets_c_QCheckBox_G_static_cast_QAbstractButton_ptr(self as *const ::check_box::CheckBox as *mut ::check_box::CheckBox) };
unsafe { ffi_result.as_ref() }.expect("Attempted to convert null pointer to reference")
}
}
impl ::std::ops::DerefMut for ::check_box::CheckBox {
fn deref_mut(&mut self) -> &mut ::abstract_button::AbstractButton {
let ffi_result =
unsafe { ::ffi::qt_widgets_c_QCheckBox_G_static_cast_QAbstractButton_ptr(self as *mut ::check_box::CheckBox) };
unsafe { ffi_result.as_mut() }.expect("Attempted to convert null pointer to reference")
}
}
/// Types for emulating overloading for overloaded functions in this module
pub mod overloading {
/// This trait represents a set of arguments accepted by [CheckBox::new](../struct.CheckBox.html#method.new) method.
pub trait CheckBoxNewArgs {
fn exec(self) -> ::cpp_utils::CppBox<::check_box::CheckBox>;
}
impl CheckBoxNewArgs for () {
fn exec(self) -> ::cpp_utils::CppBox<::check_box::CheckBox> {
let ffi_result = unsafe { ::ffi::qt_widgets_c_QCheckBox_new_no_args() };
unsafe { ::cpp_utils::CppBox::new(ffi_result) }
}
}
impl<'a> CheckBoxNewArgs for &'a ::qt_core::string::String {
fn exec(self) -> ::cpp_utils::CppBox<::check_box::CheckBox> {
let text = self;
let ffi_result = unsafe { ::ffi::qt_widgets_c_QCheckBox_new_text(text as *const ::qt_core::string::String) };
unsafe { ::cpp_utils::CppBox::new(ffi_result) }
}
}
/// This trait represents a set of arguments accepted by [CheckBox::new_unsafe](../struct.CheckBox.html#method.new_unsafe) method.
pub trait CheckBoxNewUnsafeArgs {
unsafe fn exec(self) -> ::cpp_utils::CppBox<::check_box::CheckBox>;
}
impl CheckBoxNewUnsafeArgs for *mut ::widget::Widget {
unsafe fn exec(self) -> ::cpp_utils::CppBox<::check_box::CheckBox> {
let parent = self;
let ffi_result = ::ffi::qt_widgets_c_QCheckBox_new_parent(parent);
::cpp_utils::CppBox::new(ffi_result)
}
}
impl<'a> CheckBoxNewUnsafeArgs for (&'a ::qt_core::string::String, *mut ::widget::Widget) {
unsafe fn exec(self) -> ::cpp_utils::CppBox<::check_box::CheckBox> {
let text = self.0;
let parent = self.1;
let ffi_result = ::ffi::qt_widgets_c_QCheckBox_new_text_parent(text as *const ::qt_core::string::String, parent);
::cpp_utils::CppBox::new(ffi_result)
}
}
/// This trait represents a set of arguments accepted by [CheckBox::set_tristate](../struct.CheckBox.html#method.set_tristate) method.
pub trait CheckBoxSetTristateArgs<'largs> {
fn exec(self, original_self: &'largs mut ::check_box::CheckBox) -> ();
}
impl<'largs> CheckBoxSetTristateArgs<'largs> for () {
fn exec(self, original_self: &'largs mut ::check_box::CheckBox) -> () {
unsafe { ::ffi::qt_widgets_c_QCheckBox_setTristate_no_args(original_self as *mut ::check_box::CheckBox) }
}
}
impl<'largs> CheckBoxSetTristateArgs<'largs> for bool {
fn exec(self, original_self: &'largs mut ::check_box::CheckBox) -> () {
let y = self;
unsafe { ::ffi::qt_widgets_c_QCheckBox_setTristate_y(original_self as *mut ::check_box::CheckBox, y) }
}
}
}