void unicorn::MainWindow::finishUi() { #ifndef NDEBUG QMenu* debug = appMenuBar()->addMenu( "Debug" ); debug->addAction( tr("Refresh Stylesheet"), qApp, SLOT(refreshStyleSheet()), Qt::CTRL + Qt::Key_R ); #endif cleverlyPosition(); }
void unicorn::Application::init() { #ifdef Q_OS_MAC addLibraryPath( applicationDirPath() + "/../plugins" ); #elif defined Q_OS_WIN addLibraryPath( applicationDirPath() + "/plugins" ); #endif #ifdef Q_WS_MAC qt_mac_set_menubar_icons( false ); #endif CoreApplication::init(); setupHotKeys(); #ifdef __APPLE__ setGetURLEventHandler(); AEEventHandlerUPP urlHandler = NewAEEventHandlerUPP( appleEventHandler ); AEInstallEventHandler( kInternetEventClass, kAEGetURL, urlHandler, 0, false ); setOpenApplicationEventHandler(); AEEventHandlerUPP openHandler = NewAEEventHandlerUPP( appleEventHandler ); AEInstallEventHandler( kCoreEventClass, kAEReopenApplication, openHandler, 0, false ); #endif #ifdef Q_WS_MAC #define CSS_PATH "/../Resources/" #else #define CSS_PATH "/" #endif refreshStyleSheet(); translate(); m_icm = new lastfm::InternetConnectionMonitor( this ); connect( m_icm, SIGNAL( up( QString ) ), this, SIGNAL( internetConnectionUp() ) ); connect( m_icm, SIGNAL( down( QString ) ), this, SIGNAL( internetConnectionDown() ) ); connect( &m_bus, SIGNAL( wizardRunningQuery( QString )), SLOT( onWizardRunningQuery( QString ))); connect( &m_bus, SIGNAL( sessionQuery( QString )), SLOT( onBusSessionQuery( QString ))); connect( &m_bus, SIGNAL( sessionChanged( const QMap<QString, QString>& )), SLOT( onBusSessionChanged( const QMap<QString, QString>& ))); connect( &m_bus, SIGNAL( lovedStateChanged(bool)), SIGNAL( busLovedStateChanged(bool))); m_bus.board(); #ifdef __APPLE__ setQuitOnLastWindowClosed( false ); #endif }
void NinjamTrackView::setOrientation(Qt::Orientation newOrientation) { if (this->orientation == newOrientation) return; this->orientation = newOrientation; if (newOrientation == Qt::Horizontal) setupHorizontalLayout(); else setupVerticalLayout(); setProperty("horizontal", newOrientation == Qt::Horizontal ? true : false); refreshStyleSheet(); }
void BaseTrackView::setUnlightStatus(bool unlighted) { setProperty("unlighted", QVariant(unlighted)); refreshStyleSheet(); }