Skip to content
Extraits de code Groupes Projets
Vérifiée Valider 292089a8 rédigé par Kubat's avatar Kubat
Parcourir les fichiers

VIEW: Add a tooltip for the document views

parent 9c140a9f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!3Add documents
...@@ -272,7 +272,8 @@ MainWindow::loadSubDocumentAudio() noexcept ...@@ -272,7 +272,8 @@ MainWindow::loadSubDocumentAudio() noexcept
void void
MainWindow::addTab(VivyDocumentView *tab) MainWindow::addTab(VivyDocumentView *tab)
{ {
documents->addTab(tab, QIcon(":/icons/vivy.png"), tab->getDocumentTabName()); const int index = documents->addTab(tab, QIcon(":/icons/vivy.png"), tab->getDocumentTabName());
documents->setTabToolTip(index, tab->getDocumentTabToolTip());
qDebug() << "View constructed successfully"; qDebug() << "View constructed successfully";
} }
......
...@@ -37,6 +37,15 @@ VivyDocumentView::getDocumentTabName() const noexcept ...@@ -37,6 +37,15 @@ VivyDocumentView::getDocumentTabName() const noexcept
document->getName(); document->getName();
} }
QString
VivyDocumentView::getDocumentTabToolTip() const noexcept
{
return "UUID: " + document->getUuid().toString() + "\nCapabilities: [" +
document->getDocumentCapabilitiesString() + "]" +
(document->checkDocumentOption(VivyDocument::UntouchedByDefault) ? "\nUntouched document"
: "");
}
void void
VivyDocumentView::loadAudioView() noexcept VivyDocumentView::loadAudioView() noexcept
{ {
......
...@@ -21,6 +21,7 @@ public: ...@@ -21,6 +21,7 @@ public:
std::weak_ptr<VivyDocument> getDocument() const noexcept; std::weak_ptr<VivyDocument> getDocument() const noexcept;
QString getDocumentTabName() const noexcept; QString getDocumentTabName() const noexcept;
QString getDocumentTabToolTip() const noexcept;
private: private:
std::shared_ptr<VivyDocument> document; std::shared_ptr<VivyDocument> document;
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter