return m_printer;
}
+void MainWindow::openProject()
+{
+ // ### We need a way to access the mimedatabase and differentiate
+ // between project types and other files. This is currently not possible
+ const QString filters = "All Files (*);;Projects(*.pro *.qmlproject)";
+ QString selectedFilters = "Projects(*.pro *.qmlproject)";
+ QStringList files =
+ Core::ICore::instance()->fileManager()->getOpenFileNames(
+ filters, tr("Open Project"), &selectedFilters);
+ openFiles(files);
+}
+
void MainWindow::setFullScreen(bool on)
{
if (bool(windowState() & Qt::WindowFullScreen) == on)
void windowActivated();
public slots:
+ void openProject();
void newFile();
void openFileWith();
void exit();
connect(ui->sessTreeWidget, SIGNAL(activated(QString)), SLOT(slotSessionClicked(QString)));
connect(ui->projTreeWidget, SIGNAL(activated(QString)), SLOT(slotProjectClicked(QString)));
connect(ui->createNewProjectButton, SIGNAL(clicked()), SLOT(slotCreateNewProject()));
- connect(ui->openProjectButton, SIGNAL(clicked()), this, SLOT(slotOpenProject()));
+ connect(ui->openProjectButton, SIGNAL(clicked()),
+ Core::ICore::instance()->mainWindow(), SLOT(openProject()));
connect(ui->manageSessionsButton, SIGNAL(clicked()), SIGNAL(manageSessions()));
ui->createNewProjectButton->setIcon(
modeManager->activateMode(Core::Constants::MODE_EDIT);
}
-void ProjectWelcomePageWidget::slotOpenProject()
-{
- // ### We need a way to access the mimedatabase and differentiate
- // between project types and other files. This is currently not possible
-
- const QString filters = "All Files (*);;Projects(*.pro *.qmlproject)";
- QString selectedFilters = "Projects(*.pro *.qmlproject)";
- QStringList files =
- Core::ICore::instance()->fileManager()->getOpenFileNames(
- filters, tr("Open Project"), &selectedFilters);
-
- Core::Internal::MainWindow *mw = qobject_cast<Core::Internal::MainWindow*>
- (Core::ICore::instance()->mainWindow());
- Q_ASSERT(mw);
- mw->openFiles(files);
-}
-
void ProjectWelcomePageWidget::slotSessionClicked(const QString &data)
{
emit requestSession(data);
void slotSessionClicked(const QString &data);
void slotProjectClicked(const QString &data);
void slotCreateNewProject();
- void slotOpenProject();
private:
void activateEditMode();
<rect>
<x>0</x>
<y>0</y>
- <width>486</width>
+ <width>520</width>
<height>221</height>
</rect>
</property>
<property name="text">
<string>Create Project...</string>
</property>
- <property name="icon">
- <iconset resource="../coreplugin/core.qrc">
- <normaloff>:/core/images/filenew.png</normaloff>:/core/images/filenew.png</iconset>
- </property>
<property name="flat">
<bool>false</bool>
</property>
<header location="global">utils/welcomemodetreewidget.h</header>
</customwidget>
</customwidgets>
- <resources>
- <include location="../coreplugin/core.qrc"/>
- </resources>
+ <resources/>
<connections/>
</ui>
#include <coreplugin/icore.h>
#include <coreplugin/coreconstants.h>
+#include <coreplugin/mainwindow.h>
#include <utils/pathchooser.h>
connect(ui->nextTipBtn, SIGNAL(clicked()), this, SLOT(slotNextTip()));
connect(ui->prevTipBtn, SIGNAL(clicked()), this, SLOT(slotPrevTip()));
+ connect(ui->openProjectButton, SIGNAL(clicked()), Core::ICore::instance()->mainWindow(), SLOT(openProject()));
connect(ui->createNewProjectButton, SIGNAL(clicked()), this, SLOT(slotCreateNewProject()));
ui->createNewProjectButton->setIcon(
QIcon::fromTheme("document-new", ui->createNewProjectButton->icon()));
+ ui->openProjectButton->setIcon(
+ QIcon::fromTheme("document-open", ui->openProjectButton->icon()));
}
GettingStartedWelcomePageWidget::~GettingStartedWelcomePageWidget()
</widget>
</item>
<item row="1" column="0">
- <widget class="Utils::WelcomeModeTreeWidget" name="tutorialTreeWidget" native="true"/>
+ <widget class="Utils::WelcomeModeTreeWidget" name="tutorialTreeWidget" native="true">
+ <zorder></zorder>
+ </widget>
</item>
</layout>
</widget>
</spacer>
</item>
<item>
+ <widget class="QPushButton" name="openProjectButton">
+ <property name="minimumSize">
+ <size>
+ <width>160</width>
+ <height>36</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Open Project...</string>
+ </property>
+ </widget>
+ </item>
+ <item>
<widget class="QPushButton" name="createNewProjectButton">
<property name="minimumSize">
<size>
<property name="text">
<string>Create Project...</string>
</property>
- <property name="icon">
- <iconset resource="../coreplugin/core.qrc">
- <normaloff>:/core/images/filenew.png</normaloff>:/core/images/filenew.png</iconset>
- </property>
<property name="flat">
<bool>false</bool>
</property>
</customwidget>
</customwidgets>
<resources>
- <include location="../coreplugin/core.qrc"/>
<include location="../welcome/welcome.qrc"/>
</resources>
<connections/>