WelcomePage: Add tooltip for sessions

The tooltip allows renaming, cloning and deleting and shows
included projects.

The following method was added to Session:

QStringList projectsForSessionName(const QString &session) const;

I moved the SessionNameInputDialog into the header to reuse it.

I added new roles to SessionModel (ProjectsPathRole, ProjectsDisplayRole).
The following slots were added to SessionModel to expose the backend
functionality:

void cloneSession(const QString &session);
void deleteSession(const QString &session);
void renameSession(const QString &session);

Change-Id: I0182a26dc63b4f051ea948756decd5413c832c60
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Thomas Hartmann
2012-02-23 17:50:30 +01:00
committed by hjk
parent 7e380e9d0c
commit 9bc042e09f
11 changed files with 443 additions and 84 deletions

View File

@@ -85,26 +85,6 @@ void SessionValidator::fixup(QString &input) const
input = copy;
}
class SessionNameInputDialog : public QDialog
{
Q_OBJECT
public:
SessionNameInputDialog(const QStringList &sessions, QWidget *parent = 0);
void setValue(const QString &value);
QString value() const;
bool isSwitchToRequested() const;
private slots:
void clicked(QAbstractButton *button);
private:
QLineEdit *m_newSessionLineEdit;
QPushButton *m_switchToButton;
bool m_usedSwitchTo;
};
SessionNameInputDialog::SessionNameInputDialog(const QStringList &sessions, QWidget *parent)
: QDialog(parent), m_usedSwitchTo(false)
{
@@ -299,5 +279,3 @@ void SessionDialog::switchToSession()
} // namespace Internal
} // namespace ProjectExplorer
#include "sessiondialog.moc"