MCPcopy Create free account
hub / github.com/LMMS/lmms / MainWindow

Method MainWindow

src/gui/MainWindow.cpp:85–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83
84
85MainWindow::MainWindow() :
86 m_workspace( NULL ),
87 m_templatesMenu( NULL ),
88 m_recentlyOpenedProjectsMenu( NULL ),
89 m_toolsMenu( NULL ),
90 m_autoSaveTimer( this ),
91 m_viewMenu( NULL ),
92 m_metronomeToggle( 0 ),
93 m_session( Normal )
94{
95#if !defined(LMMS_BUILD_WIN32) && !defined(LMMS_BUILD_APPLE) && !defined(LMMS_BUILD_HAIKU) && QT_VERSION >= 0x050000
96 disableAutoKeyAccelerators(this);
97#endif
98 setAttribute( Qt::WA_DeleteOnClose );
99
100 QWidget * main_widget = new QWidget( this );
101 QVBoxLayout * vbox = new QVBoxLayout( main_widget );
102 vbox->setSpacing( 0 );
103 vbox->setMargin( 0 );
104
105 QWidget * w = new QWidget( main_widget );
106 QHBoxLayout * hbox = new QHBoxLayout( w );
107 hbox->setSpacing( 0 );
108 hbox->setMargin( 0 );
109
110 SideBar * sideBar = new SideBar( Qt::Vertical, w );
111
112 QSplitter * splitter = new QSplitter( Qt::Horizontal, w );
113 splitter->setChildrenCollapsible( false );
114
115 ConfigManager* confMgr = ConfigManager::inst();
116
117 emit initProgress(tr("Preparing plugin browser"));
118 sideBar->appendTab( new PluginBrowser( splitter ) );
119 emit initProgress(tr("Preparing file browsers"));
120 sideBar->appendTab( new FileBrowser(
121 confMgr->userProjectsDir() + "*" +
122 confMgr->factoryProjectsDir(),
123 "*.mmp *.mmpz *.xml *.mid",
124 tr( "My Projects" ),
125 embed::getIconPixmap( "project_file" ).transformed( QTransform().rotate( 90 ) ),
126 splitter, false, true ) );
127 sideBar->appendTab( new FileBrowser(
128 confMgr->userSamplesDir() + "*" +
129 confMgr->factorySamplesDir(),
130 "*", tr( "My Samples" ),
131 embed::getIconPixmap( "sample_file" ).transformed( QTransform().rotate( 90 ) ),
132 splitter, false, true ) );
133 sideBar->appendTab( new FileBrowser(
134 confMgr->userPresetsDir() + "*" +
135 confMgr->factoryPresetsDir(),
136 "*.xpf *.cs.xml *.xiz",
137 tr( "My Presets" ),
138 embed::getIconPixmap( "preset_file" ).transformed( QTransform().rotate( 90 ) ),
139 splitter , false, true ) );
140 sideBar->appendTab( new FileBrowser( QDir::homePath(), "*",
141 tr( "My Home" ),
142 embed::getIconPixmap( "home" ).transformed( QTransform().rotate( 90 ) ),

Callers

nothing calls this directly

Calls 10

getIconPixmapFunction · 0.85
timeoutFunction · 0.85
getSongFunction · 0.85
appendTabMethod · 0.80
isNullMethod · 0.80
instFunction · 0.50
isEmptyMethod · 0.45
startMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected