Exemplo n.º 1
0
void MOTableView::setModel(QAbstractItemModel *_model)
{
    QTableView::setModel(_model);

    connect(_model, SIGNAL(layoutChanged()), this, SLOT(adjustViewSize()));

    adjustViewSize();
}
/*!
    This function handles orientationChanged signal
    
    @param [in] orientation New Orientation of the screen
 */
void WlanLoginView::handleOrientationChanged(Qt::Orientation orientation)
{
    Q_UNUSED(orientation);
    OstTraceFunctionEntry0( WLANLOGINVIEW_ORIENTATIONCHANGED_ENTRY );
    
    adjustViewSize();
    
    OstTraceFunctionEntry0( WLANLOGINVIEW_ORIENTATIONCHANGED_EXIT );
}
Exemplo n.º 3
0
bool MOTableView::eventFilter( QObject *obj, QEvent *ev )
{
    if( obj == this )
    {
        if( ev->type() == QEvent::Resize )
        {
            adjustViewSize();
            return false;
        }
    }
    return false;
}
/*!
    This function handles loadfinished signal from QGraphicsWebView

    @param [in] status Success status
 */
void WlanLoginView::handleLoadFinished(bool status)
{
   OstTraceFunctionEntry0(WLANLOGINVIEW_HANDLELOADFINISHED_ENTRY);
   
    if(status)
    {   
        adjustViewSize();
    }
   
    mProgressBar->setVisible(false);
  
    OstTraceFunctionExit0(WLANLOGINVIEW_HANDLELOADFINISHED_EXIT);
}
Exemplo n.º 5
0
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent),
      scene(new QGraphicsScene(this)),
      view(new QGraphicsView(scene, this)),
      game(new GameController(*scene, this))
{
    setCentralWidget(view);
    resize(600, 600);

    initScene();
    initSceneBackground();

    QTimer::singleShot(0, this, SLOT(adjustViewSize()));
}
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent),
      scene(new QGraphicsScene(this)),
      view(new QGraphicsView(scene, this)),
      timer(new QTimer())
{
    setCentralWidget(view);
    resize(600, 600);

    initScene();
    initSceneBackground();

    scene->addItem(Food::getInstance());
    scene->addItem(Snake::getInstance());

    QTimer::singleShot(0, this, SLOT(adjustViewSize()));

    connect(timer, SIGNAL(timeout()), scene, SLOT(advance()));
    timer->start( 1000/33 );
}