[prev in list] [next in list] [prev in thread] [next in thread]
List: atlantik-devel
Subject: [atlantik-cvs] CVS: kdegames/atlantik/libatlantikui board.cpp,
From: kde () office ! kde ! org
Date: 2003-12-09 1:40:07
[Download RAW message or body]
Update of /home/kde/kdegames/atlantik/libatlantikui
In directory office:/tmp/cvs-serv5867/libatlantikui
Modified Files:
Tag: atlantik_3_3_branch
board.cpp estatedetails.cpp
Log Message:
less flicker when user wants to show consecutive details
Index: board.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantikui/board.cpp,v
retrieving revision 1.119.2.2
retrieving revision 1.119.2.3
diff -u -d -r1.119.2.2 -r1.119.2.3
--- board.cpp 8 Dec 2003 23:50:22 -0000 1.119.2.2
+++ board.cpp 9 Dec 2003 01:40:00 -0000 1.119.2.3
@@ -554,19 +554,36 @@
if (!estate)
return;
- EstateDetails *eDetails = new EstateDetails(estate, QString::null, this);
- eDetails->addDetails();
- eDetails->addCloseButton();
+ EstateDetails *eDetails = 0;
- if (m_displayQueue.getFirst() != m_lastServerDisplay)
- m_displayQueue.removeFirst();
+ if (m_displayQueue.getFirst() == m_lastServerDisplay)
+ {
+ eDetails = new EstateDetails(estate, QString::null, this);
+ m_displayQueue.prepend(eDetails);
- m_displayQueue.prepend(eDetails);
- updateCenter();
+ connect(eDetails, SIGNAL(buttonCommand(QString)), this, SIGNAL(buttonCommand(QString)));
+ connect(eDetails, SIGNAL(buttonClose()), this, SLOT(displayDefault()));
+ }
+ else
+ {
+ eDetails = dynamic_cast<EstateDetails*> ( m_displayQueue.getFirst() );
+ if (eDetails)
+ {
+ eDetails->setEstate(estate);
+ eDetails->setText( QString::null );
+ // eDetails->clearButtons();
+ }
+ else
+ {
+ kdDebug() << "manual estatedetails with first in queue neither server nor details" << endl;
+ return;
+ }
+ }
- connect(eDetails, SIGNAL(buttonCommand(QString)), this, SIGNAL(buttonCommand(QString)));
- connect(eDetails, SIGNAL(buttonClose()), this, SLOT(displayDefault()));
+ eDetails->addDetails();
+ eDetails->addCloseButton();
+ updateCenter();
}
void AtlantikBoard::updateCenter()
Index: estatedetails.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantikui/estatedetails.cpp,v
retrieving revision 1.25.2.2
retrieving revision 1.25.2.3
diff -u -d -r1.25.2.2 -r1.25.2.3
--- estatedetails.cpp 8 Dec 2003 23:50:22 -0000 1.25.2.2
+++ estatedetails.cpp 9 Dec 2003 01:40:00 -0000 1.25.2.3
@@ -59,8 +59,7 @@
m_infoListView->setSorting(-1);
m_mainLayout->addWidget(m_infoListView);
- if (!text.isEmpty())
- appendText(text);
+ appendText(text);
m_buttonBox = new QHBoxLayout(m_mainLayout, KDialog::spacingHint());
m_buttonBox->setMargin(0);
@@ -293,13 +292,16 @@
void EstateDetails::appendText(QString text)
{
+ if ( text.isEmpty() )
+ return;
+
QListViewItem *infoText = new QListViewItem(m_infoListView, m_infoListView->lastItem(), text);
if (text.contains("rolls"))
infoText->setPixmap(0, QPixmap(SmallIcon("roll")));
else
infoText->setPixmap(0, QPixmap(SmallIcon("atlantik")));
- m_infoListView->ensureVisible(0, m_infoListView->contentsHeight());
+ m_infoListView->ensureItemVisible( infoText );
}
void EstateDetails::clearButtons()
_______________________________________________
atlantik-cvs mailing list
atlantik-cvs@kde.org
https://mail.kde.org/mailman/listinfo/atlantik-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic