comparison view/ViewManager.cpp @ 586:1ae54a29e59e

Merge from debug-output branch
author Chris Cannam
date Tue, 14 Jun 2011 14:48:29 +0100
parents f4960f8ce798
children 4806715f7a19
comparison
equal deleted inserted replaced
583:4c484636d5ec 586:1ae54a29e59e
59 settings.endGroup(); 59 settings.endGroup();
60 60
61 if (getGlobalDarkBackground()) { 61 if (getGlobalDarkBackground()) {
62 /* 62 /*
63 std::cerr << "dark palette:" << std::endl; 63 std::cerr << "dark palette:" << std::endl;
64 std::cerr << "window = " << QApplication::palette().color(QPalette::Window).name().toStdString() << std::endl; 64 std::cerr << "window = " << QApplication::palette().color(QPalette::Window).name() << std::endl;
65 std::cerr << "windowtext = " << QApplication::palette().color(QPalette::WindowText).name().toStdString() << std::endl; 65 std::cerr << "windowtext = " << QApplication::palette().color(QPalette::WindowText).name() << std::endl;
66 std::cerr << "base = " << QApplication::palette().color(QPalette::Base).name().toStdString() << std::endl; 66 std::cerr << "base = " << QApplication::palette().color(QPalette::Base).name() << std::endl;
67 std::cerr << "alternatebase = " << QApplication::palette().color(QPalette::AlternateBase).name().toStdString() << std::endl; 67 std::cerr << "alternatebase = " << QApplication::palette().color(QPalette::AlternateBase).name() << std::endl;
68 std::cerr << "text = " << QApplication::palette().color(QPalette::Text).name().toStdString() << std::endl; 68 std::cerr << "text = " << QApplication::palette().color(QPalette::Text).name() << std::endl;
69 std::cerr << "button = " << QApplication::palette().color(QPalette::Button).name().toStdString() << std::endl; 69 std::cerr << "button = " << QApplication::palette().color(QPalette::Button).name() << std::endl;
70 std::cerr << "buttontext = " << QApplication::palette().color(QPalette::ButtonText).name().toStdString() << std::endl; 70 std::cerr << "buttontext = " << QApplication::palette().color(QPalette::ButtonText).name() << std::endl;
71 std::cerr << "brighttext = " << QApplication::palette().color(QPalette::BrightText).name().toStdString() << std::endl; 71 std::cerr << "brighttext = " << QApplication::palette().color(QPalette::BrightText).name() << std::endl;
72 std::cerr << "light = " << QApplication::palette().color(QPalette::Light).name().toStdString() << std::endl; 72 std::cerr << "light = " << QApplication::palette().color(QPalette::Light).name() << std::endl;
73 std::cerr << "dark = " << QApplication::palette().color(QPalette::Dark).name().toStdString() << std::endl; 73 std::cerr << "dark = " << QApplication::palette().color(QPalette::Dark).name() << std::endl;
74 std::cerr << "mid = " << QApplication::palette().color(QPalette::Mid).name().toStdString() << std::endl; 74 std::cerr << "mid = " << QApplication::palette().color(QPalette::Mid).name() << std::endl;
75 */ 75 */
76 m_lightPalette = QPalette(QColor("#000000"), // WindowText 76 m_lightPalette = QPalette(QColor("#000000"), // WindowText
77 QColor("#dddfe4"), // Button 77 QColor("#dddfe4"), // Button
78 QColor("#ffffff"), // Light 78 QColor("#ffffff"), // Light
79 QColor("#555555"), // Dark 79 QColor("#555555"), // Dark
85 85
86 86
87 } else { 87 } else {
88 /* 88 /*
89 std::cerr << "light palette:" << std::endl; 89 std::cerr << "light palette:" << std::endl;
90 std::cerr << "window = " << QApplication::palette().color(QPalette::Window).name().toStdString() << std::endl; 90 std::cerr << "window = " << QApplication::palette().color(QPalette::Window).name() << std::endl;
91 std::cerr << "windowtext = " << QApplication::palette().color(QPalette::WindowText).name().toStdString() << std::endl; 91 std::cerr << "windowtext = " << QApplication::palette().color(QPalette::WindowText).name() << std::endl;
92 std::cerr << "base = " << QApplication::palette().color(QPalette::Base).name().toStdString() << std::endl; 92 std::cerr << "base = " << QApplication::palette().color(QPalette::Base).name() << std::endl;
93 std::cerr << "alternatebase = " << QApplication::palette().color(QPalette::AlternateBase).name().toStdString() << std::endl; 93 std::cerr << "alternatebase = " << QApplication::palette().color(QPalette::AlternateBase).name() << std::endl;
94 std::cerr << "text = " << QApplication::palette().color(QPalette::Text).name().toStdString() << std::endl; 94 std::cerr << "text = " << QApplication::palette().color(QPalette::Text).name() << std::endl;
95 std::cerr << "button = " << QApplication::palette().color(QPalette::Button).name().toStdString() << std::endl; 95 std::cerr << "button = " << QApplication::palette().color(QPalette::Button).name() << std::endl;
96 std::cerr << "buttontext = " << QApplication::palette().color(QPalette::ButtonText).name().toStdString() << std::endl; 96 std::cerr << "buttontext = " << QApplication::palette().color(QPalette::ButtonText).name() << std::endl;
97 std::cerr << "brighttext = " << QApplication::palette().color(QPalette::BrightText).name().toStdString() << std::endl; 97 std::cerr << "brighttext = " << QApplication::palette().color(QPalette::BrightText).name() << std::endl;
98 std::cerr << "light = " << QApplication::palette().color(QPalette::Light).name().toStdString() << std::endl; 98 std::cerr << "light = " << QApplication::palette().color(QPalette::Light).name() << std::endl;
99 std::cerr << "dark = " << QApplication::palette().color(QPalette::Dark).name().toStdString() << std::endl; 99 std::cerr << "dark = " << QApplication::palette().color(QPalette::Dark).name() << std::endl;
100 std::cerr << "mid = " << QApplication::palette().color(QPalette::Mid).name().toStdString() << std::endl; 100 std::cerr << "mid = " << QApplication::palette().color(QPalette::Mid).name() << std::endl;
101 */ 101 */
102 m_darkPalette = QPalette(QColor("#ffffff"), // WindowText 102 m_darkPalette = QPalette(QColor("#ffffff"), // WindowText
103 QColor("#3e3e3e"), // Button 103 QColor("#3e3e3e"), // Button
104 QColor("#808080"), // Light 104 QColor("#808080"), // Light
105 QColor("#1e1e1e"), // Dark 105 QColor("#1e1e1e"), // Dark
497 PlaybackFollowMode mode) 497 PlaybackFollowMode mode)
498 { 498 {
499 View *v = dynamic_cast<View *>(sender()); 499 View *v = dynamic_cast<View *>(sender());
500 500
501 #ifdef DEBUG_VIEW_MANAGER 501 #ifdef DEBUG_VIEW_MANAGER
502 std::cerr << "ViewManager::viewCentreFrameChanged(" << f << ", " << locked << ", " << mode << "), view is " << v << std::endl; 502 DEBUG << "ViewManager::viewCentreFrameChanged(" << f << ", " << locked << ", " << mode << "), view is " << v << endl;
503 #endif 503 #endif
504 504
505 if (locked) { 505 if (locked) {
506 m_globalCentreFrame = f; 506 m_globalCentreFrame = f;
507 emit globalCentreFrameChanged(f); 507 emit globalCentreFrameChanged(f);
554 ViewManager::viewZoomLevelChanged(unsigned long z, bool locked) 554 ViewManager::viewZoomLevelChanged(unsigned long z, bool locked)
555 { 555 {
556 View *v = dynamic_cast<View *>(sender()); 556 View *v = dynamic_cast<View *>(sender());
557 557
558 if (!v) { 558 if (!v) {
559 std::cerr << "ViewManager::viewZoomLevelChanged: WARNING: sender is not a view" << std::endl; 559 DEBUG << "ViewManager::viewZoomLevelChanged: WARNING: sender is not a view" << endl;
560 return; 560 return;
561 } 561 }
562 562
563 //!!! emit zoomLevelChanged(); 563 //!!! emit zoomLevelChanged();
564 564