Commit 6c7b02e6 authored by Dmitry Suzdalev's avatar Dmitry Suzdalev

Remove some unneeded code

svn path=/trunk/KDE/kdegames/kreversi/; revision=670156
parent faa99587
/*******************************************************************
*
* Copyright 2006 Dmitry Suzdalev <dimsuz@gmail.com>
* Copyright 2006-2007 Dmitry Suzdalev <dimsuz@gmail.com>
*
* This file is part of the KDE project "KReversi"
*
......@@ -40,8 +40,6 @@ KReversiScene::KReversiScene( KReversiGame* game , const QString& chipsPath )
setChipsPixmap(chipsPath);
resizeScene( (int)m_curCellSize*10, (int)m_curCellSize*10 );
m_animTimer = new QTimer(this);
connect(m_animTimer, SIGNAL(timeout()), SLOT(slotAnimationStep()));
......@@ -55,6 +53,7 @@ KReversiScene::~KReversiScene()
void KReversiScene::resizeScene( int width, int height )
{
kDebug() << "resizeScene " << width << "x" << height<<endl;
setSceneRect( 0, 0, width, height );
int size = qMin(width, height);
......
......@@ -35,18 +35,9 @@ KReversiView::KReversiView( KReversiScene* scene, QWidget *parent )
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setFrameStyle( QFrame::NoFrame );
setMinimumSize( sizeHint() );
resize( sizeHint() );
}
void KReversiView::resizeEvent( QResizeEvent* ev )
{
m_scene->resizeScene( ev->size().width(), ev->size().height() );
QGraphicsView::resizeEvent(ev);
}
QSize KReversiView::sizeHint() const
{
return QSize( (int)m_scene->width(), (int)m_scene->height() );
}
......@@ -33,8 +33,6 @@ public:
KReversiView( KReversiScene* scene, QWidget *parent );
private:
virtual void resizeEvent( QResizeEvent* );
virtual QSize sizeHint() const;
KReversiScene* m_scene;
};
#endif
......@@ -87,7 +87,6 @@ KReversiMainWindow::KReversiMainWindow(QWidget* parent, bool startDemo )
lay->setMargin(1);
m_view = new KReversiView(m_scene, mainWid);
m_view->show();
lay->addWidget(m_view, 0, 0, 2, 1);
m_historyLabel = new QLabel( i18n("Move history"), mainWid );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment