From e0737c56c1e384e05064a0c6e1ac46979371041b Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Wed, 19 Dec 2018 22:58:32 +0100 Subject: New upstream version 2.0.0+repack --- LettersSpinBox.cpp | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 LettersSpinBox.cpp (limited to 'LettersSpinBox.cpp') diff --git a/LettersSpinBox.cpp b/LettersSpinBox.cpp deleted file mode 100644 index 9079d8d9..00000000 --- a/LettersSpinBox.cpp +++ /dev/null @@ -1,25 +0,0 @@ -#include "LettersSpinBox.hpp" - -#include -#include "moc_LettersSpinBox.cpp" - -QString LettersSpinBox::textFromValue (int value) const -{ - QString text; - do { - auto digit = value % 26; - value /= 26; - text = QChar {lowercase_ ? 'a' + digit : 'A' + digit} + text; - } while (value); - return text; -} - -int LettersSpinBox::valueFromText (QString const& text) const -{ - int value {0}; - for (int index = text.size (); index > 0; --index) - { - value = value * 26 + text[index - 1].toLatin1 () - (lowercase_ ? 'a' : 'A'); - } - return value; -} -- cgit v1.2.3