\def\qsetw#1{\message{\noexpand\qsetw is not supported, sorry!}}
\def\faketreewidth#1{\message{\noexpand\faketreewidth is not supported, sorry!}}
\def\qbalance{\message{\noexpand\qbalance is not supported, sorry!}}
\def\qframesubtree{\message{\noexpand\qframesubtree is not supported, sorry!}}
% Implement \qroof as a fancy leaf node
\newtoks\@qrooflabel
\def\qroof#1.{%
\begin{tikzpicture}[baseline]
{\pgftransformshift{\pgftree@levelshift}%
\node(qroofbot){#1};}
\@qroof
}
\def\@qroof{\@ifnextchar\egroup{%
% since we are putting the qroof inside a node, we already have an inner sep
% so for the purposes of defining our bounding box, we must eliminate inner sep
\begin{pgfsubpicture}
\node [inner sep=0pt] {\the\@qrooflabel};%
\end{pgfsubpicture}
\pgfpathrectanglecorners{\pgfpoint{\the\pgf@subpicminx}{\the\pgf@subpicminy}}{\pgfpoint{\the\pgf@subpicmaxx}{\the\pgf@subpicmaxy}}%
\pgfusepath{use as bounding box}%
\node (qrooftop) {\the\@qrooflabel};
\draw \roof@edge{qrooftop}{qroofbot};%
\end{tikzpicture}}
{\@@qroof}}
\def\@@qroof#1{\expandafter\@qrooflabel\expandafter{\the\@qrooflabel #1}\@qroof}
%%% This is lifted straight from qtree.sty
% and another odd convenience:
%
% Make _, ^ go into math mode automatically in the scope of \automath
%
{ % Temporarily change catcodes
\catcode`\_=\active
\catcode`\^=\active
% Let \0, \1, \2 produce ^0, $'$, $''$
% The \rlap results in better centering of the label (ignoring the
% superscript)
\def\qtreeprimes@internal{%
\def\0{\ifmmode ^0\else \rlap{$^0$}\fi}%
\def\1{\ifmmode '\else \rlap{$'$}\fi}%
\def\2{\ifmmode ''\else \rlap{$''$}\fi}%
}
% Same commands, but without the \rlap feature
\def\qtreeprimes{%
\def\0{\ensuremath{^0}}%
\def\1{\ensuremath{'}}%
\def\2{\ensuremath{''}}}