annotate data/model/PowerOfSqrtTwoZoomConstraint.h @ 157:c03ec31005e1

* Add zoom thumbwheels to Pane. Implement horizontal thumbwheel, and vertical depending on layer type (supported for waveform and spectrogram, though wrong for log-scale spectrogram at the moment). * Add bare bones of a spectrum layer. * Add window icon * Add shortcut for "insert time instant" on laptops without keypad enter (";") * Delete FFT processing thread when it exits (at least, next time we're asked for something interesting) * Get audio file extensions from the file readers, and thus from libsndfile for the wave file reader -- leads to rather a wide combo box in file dialog though * Better refresh order for spectrogram (redraw centre section first)
author Chris Cannam
date Fri, 04 Aug 2006 17:01:37 +0000
parents 3a13b0d4934e
children 0ed2b2e26b44
rev   line source
Chris@147 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@147 2
Chris@147 3 /*
Chris@147 4 Sonic Visualiser
Chris@147 5 An audio file viewer and annotation editor.
Chris@147 6 Centre for Digital Music, Queen Mary, University of London.
Chris@147 7 This file copyright 2006 Chris Cannam.
Chris@147 8
Chris@147 9 This program is free software; you can redistribute it and/or
Chris@147 10 modify it under the terms of the GNU General Public License as
Chris@147 11 published by the Free Software Foundation; either version 2 of the
Chris@147 12 License, or (at your option) any later version. See the file
Chris@147 13 COPYING included with this distribution for more information.
Chris@147 14 */
Chris@147 15
Chris@147 16 #ifndef _POWER_OF_SQRT_TWO_ZOOM_CONSTRAINT_H_
Chris@147 17 #define _POWER_OF_SQRT_TWO_ZOOM_CONSTRAINT_H_
Chris@147 18
Chris@147 19 #include "base/ZoomConstraint.h"
Chris@147 20
Chris@147 21 class PowerOfSqrtTwoZoomConstraint : virtual public ZoomConstraint
Chris@147 22 {
Chris@147 23 public:
Chris@147 24 virtual size_t getNearestBlockSize(size_t requestedBlockSize,
Chris@147 25 RoundingDirection dir = RoundNearest)
Chris@147 26 const;
Chris@147 27
Chris@147 28 protected:
Chris@147 29 virtual size_t getNearestBlockSize(size_t requestedBlockSize,
Chris@147 30 int &type,
Chris@147 31 int &power,
Chris@147 32 RoundingDirection dir = RoundNearest)
Chris@147 33 const;
Chris@147 34
Chris@147 35 virtual size_t getMinCachePower() const { return 6; }
Chris@147 36 };
Chris@147 37
Chris@147 38 #endif
Chris@147 39