Solar type IV radio bursts present a theoretical challenge because they are composed of both continuum emission and fine structures. The latter include zebra bursts, which appear as harmonically spaced multiplets that shift in frequency with time. Similarities between these features and terrestrial auroral emissions suggest a new model to explain zebra-structured type IV emissions. In this model, the basic generation mechanism is identical with that proposed by Winglee and Dulk: mode conversion of Z-mode waves generated by the cyclotron maser mechanism under the condition fuh = Nfce, with N an integer; however, we propose a twist on this model whereby the zebra bursts do not arise from multiple N-values. Rather, the presence of localized density irregularities within the type IV source region leads to trapping of the upper hybrid Z-mode waves in density enhancements, which results in a discrete spectrum of upper hybrid modes with nearly constant frequency spacing. The number m of quasi-harmonics is limited by the trapping (quantization) conditions. The problem is described by an equivalent Schrödinger equation for the trapped mode, which is solved for an (idealized) cylindrical square density irregularity. In this model, the eigenfrequency spacing matches the observed type IV frequency spacings for less than 10% density enhancements with individual scale sizes of 30-1000 thermal electron gyroradii, corresponding to 1-100 m scales in coronal loops. To produce the observed emitted power for a reasonable (\u3c1%) efficiency requires a large number of such individual microscopic sources occurring over a portion of a magnetic type IV loop at a restricted altitude within which the magnetic field and density are approximately constant. The loop plasma in the zebra emission source is thus highly turbulent in the sense that it contains a large number of density fluctuations. In this case transition radiation can effectively contribute to the radiation background and may also provide the wave power required in the upper hybrid range for generating zebra emissions