mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 12:32:26 +00:00
Prepare for external/internal clipboard merging.
* Clipboard.h: new isInternal() pure virtual method * Selection.h: new isInternal() pure virtual method * GuiClipboard, GuiSelection: implement new method. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16476 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
61f7ebd4a9
commit
6fcb3fe6a2
@ -39,6 +39,10 @@ public:
|
||||
* the clipboard.
|
||||
*/
|
||||
virtual void put(docstring const &) = 0;
|
||||
|
||||
/// state of clipboard.
|
||||
/// \retval true if the system clipboard has been set within LyX.
|
||||
virtual bool isInternal() const = 0;
|
||||
};
|
||||
|
||||
} // namespace frontend
|
||||
|
@ -43,6 +43,10 @@ public:
|
||||
* This should be called whenever some text is highlighted.
|
||||
*/
|
||||
virtual void put(docstring const &) = 0;
|
||||
|
||||
/// state of clipboard.
|
||||
/// \retval true if the system clipboard has been set within LyX.
|
||||
virtual bool isInternal() const = 0;
|
||||
};
|
||||
|
||||
} // namespace frontend
|
||||
|
@ -50,5 +50,11 @@ void GuiClipboard::put(docstring const & str)
|
||||
QClipboard::Clipboard);
|
||||
}
|
||||
|
||||
|
||||
bool GuiClipboard::isInternal() const
|
||||
{
|
||||
return qApp->clipboard()->ownsClipboard();
|
||||
}
|
||||
|
||||
} // namespace frontend
|
||||
} // namespace lyx
|
||||
|
@ -32,6 +32,7 @@ public:
|
||||
//@{
|
||||
docstring const get() const;
|
||||
void put(docstring const & str);
|
||||
bool isInternal() const;
|
||||
//@}
|
||||
};
|
||||
|
||||
|
@ -62,5 +62,11 @@ void GuiSelection::put(docstring const & str)
|
||||
QClipboard::Selection);
|
||||
}
|
||||
|
||||
|
||||
bool GuiSelection::isInternal() const
|
||||
{
|
||||
return qApp->clipboard()->ownsSelection();
|
||||
}
|
||||
|
||||
} // namespace frontend
|
||||
} // namespace lyx
|
||||
|
@ -33,6 +33,7 @@ public:
|
||||
void haveSelection(bool own);
|
||||
docstring const get() const;
|
||||
void put(docstring const & str);
|
||||
bool isInternal() const;
|
||||
//@}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user