mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 08:28:25 +00:00
only called once
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21754 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
7df235d649
commit
502125671a
@ -25,8 +25,6 @@
|
|||||||
#include "frontends/FontLoader.h"
|
#include "frontends/FontLoader.h"
|
||||||
#include "frontends/FontMetrics.h"
|
#include "frontends/FontMetrics.h"
|
||||||
|
|
||||||
#include "graphics/LoaderQueue.h"
|
|
||||||
|
|
||||||
#include "support/ExceptionMessage.h"
|
#include "support/ExceptionMessage.h"
|
||||||
#include "support/FileName.h"
|
#include "support/FileName.h"
|
||||||
#include "support/lstrings.h"
|
#include "support/lstrings.h"
|
||||||
@ -187,8 +185,6 @@ GuiApplication::GuiApplication(int & argc, char ** argv)
|
|||||||
QWidget w;
|
QWidget w;
|
||||||
lyxrc.dpi = (w.logicalDpiX() + w.logicalDpiY()) / 2;
|
lyxrc.dpi = (w.logicalDpiX() + w.logicalDpiY()) / 2;
|
||||||
|
|
||||||
LoaderQueue::setPriority(10,100);
|
|
||||||
|
|
||||||
guiApp = this;
|
guiApp = this;
|
||||||
|
|
||||||
// Set the cache to 5120 kilobytes which corresponds to screen size of
|
// Set the cache to 5120 kilobytes which corresponds to screen size of
|
||||||
|
@ -23,9 +23,11 @@ using std::list;
|
|||||||
namespace lyx {
|
namespace lyx {
|
||||||
namespace graphics {
|
namespace graphics {
|
||||||
|
|
||||||
static int s_numimages_ = 5;
|
//static int s_numimages_ = 5;
|
||||||
static int s_millisecs_ = 500;
|
//static int s_millisecs_ = 500;
|
||||||
|
|
||||||
|
static int s_numimages_ = 10;
|
||||||
|
static int s_millisecs_ = 500;
|
||||||
|
|
||||||
LoaderQueue & LoaderQueue::get()
|
LoaderQueue & LoaderQueue::get()
|
||||||
{
|
{
|
||||||
@ -54,16 +56,6 @@ void LoaderQueue::loadNext()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void LoaderQueue::setPriority(int numimages , int millisecs)
|
|
||||||
{
|
|
||||||
s_numimages_ = numimages;
|
|
||||||
s_millisecs_ = millisecs;
|
|
||||||
LYXERR(Debug::GRAPHICS, "LoaderQueue: priority set to "
|
|
||||||
<< s_numimages_ << " images at a time, "
|
|
||||||
<< s_millisecs_ << " milliseconds between calls");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
LoaderQueue::LoaderQueue() : timer(s_millisecs_, Timeout::ONETIME),
|
LoaderQueue::LoaderQueue() : timer(s_millisecs_, Timeout::ONETIME),
|
||||||
running_(false)
|
running_(false)
|
||||||
{
|
{
|
||||||
|
@ -38,13 +38,6 @@ public:
|
|||||||
bool running() const;
|
bool running() const;
|
||||||
///get the and only instance of the class
|
///get the and only instance of the class
|
||||||
static LoaderQueue & get();
|
static LoaderQueue & get();
|
||||||
/** Adjusts the queue priority:
|
|
||||||
* numimages is the number of images loaded in a particular call
|
|
||||||
* from the timer.
|
|
||||||
* millisecs is the time interval between calls.
|
|
||||||
* Higher numimages, lower millisecs means higher priority.
|
|
||||||
*/
|
|
||||||
static void setPriority(int numimages, int millisecs);
|
|
||||||
private:
|
private:
|
||||||
/// This class is a singleton class... use LoaderQueue::get() instead
|
/// This class is a singleton class... use LoaderQueue::get() instead
|
||||||
LoaderQueue();
|
LoaderQueue();
|
||||||
|
Loading…
Reference in New Issue
Block a user