* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include "timestampspinbox.hpp"
value_ = val;
updateEdit();
- Q_EMIT valueChanged(value_);
+ valueChanged(value_);
}
void TimestampSpinBox::on_editingFinished()
captures.removeFirst(); // remove entire match
QString str = captures.join("");
setValue(pv::util::Timestamp(str.toStdString()));
- }
- else {
+ } else {
// replace the malformed entered string with the old value
updateEdit();
}
void TimestampSpinBox::updateEdit()
{
- QString newtext = pv::util::format_si_value(
- value_, "s", 8, precision_);
+ QString newtext = pv::util::format_time_si(
+ value_, pv::util::SIPrefix::none, precision_);
lineEdit()->setText(newtext);
}
-} // widgets
-} // pv
+} // namespace widgets
+} // namespace pv