示例#1
0
/** void QWidget::swapFullScreen()
 * bind/QWidget.h:65
 */
static int MenuBar_swapFullScreen(lua_State *L) {
  try {
    MenuBar *self = *((MenuBar **)dub_checksdata(L, 1, "mimas.MenuBar"));
    if (!self->isFullScreen()) {
      self->showFullScreen();
    } else {
      self->showNormal();
    }
    return 0;
  } catch (std::exception &e) {
    lua_pushfstring(L, "swapFullScreen: %s", e.what());
  } catch (...) {
    lua_pushfstring(L, "swapFullScreen: Unknown exception");
  }
  return dub_error(L);
}
示例#2
0
/** void QWidget::showFullScreen(bool enable=true)
 * bind/QWidget.h:61
 */
static int MenuBar_showFullScreen(lua_State *L) {
  try {
    MenuBar *self = *((MenuBar **)dub_checksdata(L, 1, "mimas.MenuBar"));
    int top__ = lua_gettop(L);
    if (top__ >= 2) {
      bool enable = dub_checkboolean(L, 2);
      if (enable) {
        self->showFullScreen();
      } else {
        self->showNormal();
      }
      return 0;
    } else {
      self->showFullScreen();
      return 0;
    }
  } catch (std::exception &e) {
    lua_pushfstring(L, "showFullScreen: %s", e.what());
  } catch (...) {
    lua_pushfstring(L, "showFullScreen: Unknown exception");
  }
  return dub_error(L);
}