summaryrefslogtreecommitdiff
path: root/quacker/rackdisplay.cpp
AgeCommit message (Collapse)Author
2023-07-19Fix various Qt6 deprecations.John Fultz
2023-07-18Fix Qt6 MOC compilation on some platforms.John Fultz
That was super painful. It seems that some of the Quackle types that have custom operator==() give fits to the MOC compiler when those types are used as arguments for slots and/or signals (or maybe it's only when they're connected in a certain way...frankly, I never did figure this out precisely to my satisfaction). The compilers provide very little help in resolving this problem. Once I understood the problem, VS22 was giving me just the tiniest morsel, enough that I could hunt down the offending slot/signal (it wasn't even giving me the name of the slot/signal...just the type it was trying to use). I've changed all offending functions to use const pointers to types instead of const references, and this makes Qt happy. I couldn't find any info on the web directly about this, but here's the closest I did find, which suggests that this is related to increased functionality in Qt6 regarding reflection. https://forum.qt.io/topic/141434/ This fixes my VC++22 x86-64 build. Hopefully it fixes all of the others, too.
2020-06-17Xcode compiler warnings.John Fultz
* Replace std::random_shuffle() with std::shuffle(). * Populate switch statements which were checking the Move enums, but not Move::PlaceError. * endl -> Qt::endl for QTextStream usage. * QString::SkipEmptyParts -> Qt::SkipEmptyParts * QLabel::pixmap() now takes Qt::ReturnByValue * Use QElapsedTimer where appropriate.
2019-08-11Fix devicePixelRatios on tile pixmap after dragging it.John Fultz
Apparently, when you serialize a pixmap through a QDataStream(), it loses track of its devicePixelRatio setting. End rule was that if, on a HiDpi screen, you dragged and dropped a tile within the rack, you'd get a tile that was larger than it should have been by a factor of the default pixel ratio. Solution is to simply reapply the pixel ratio to the newly created Pixmap after deserializing it in the drag-drop code.
2019-07-28Fix #87, make tiles high-res on HiDpi screens.John Fultz
QPixmap is still in actual pixels, so it needs to be created at devicePixelRatio() times its present size, in addition to having its own devicePixelRatio() set.
2019-07-19Fix deprecation errors for Qt 5.13.John Fultz
Most are Qt4-isms, except where noted. * Replaced QFontMetrics::width with QFontMetrics::horizontalAdvance, conditionally as the latter wasn't even introduced until Qt 5.11. * QColor::light and dark instead of QColor::light and dark. * QString() instead of QString::null. * std::sort instead of qSort * QTreeWidgetItem::setSelected instead of QTreeWidget::setItemSelected. * QFileDialog::setOption(QFileDialog::DontConfirmOverwrite) instead of QFileDialog::setConfirmOverwrite(false). * QDrag::exec instead of QDrag::start.
2019-02-04After discussion with Jason/John, add myself as a copyright holder.John Fultz
Also, extend copyright to 2019.
2019-01-14Remove player name from rack label text.John Fultz
The player name in the label in the rack text was being updated after every play. Not unreasonable, but this was the principle cause for layout elements bouncing horizontally across the window when plays alternated. So, now, it just has the fixed text "Rack:".
2017-08-02More Qt5 changes and cleanups.John Fultz
Now builds on Qt 5.9.1, and works on Mac, Windows, Linux.
2016-01-12Port Quackle to Qt 5.5Gökçen Eraslan
2014-09-02Change GPL file headers to v3.John Fultz
Not a very interesting commit...only changes in comments.
2013-08-25Initial git commit.Jason Katz-Brown